I'm afraid I'm quite lost because I've built an Android app that uses tinyalsa through jni, but when I call pcm_open
, I get:
cannot open device '/dev/snd/pcmC1D0c': Permission denied
I do see the file in question if I su -c 'ls /dev/snd'
on adb shell. In fact, if I stat
this file and the directories above it, all the way up to the root directory, the permissions that stat
outputs conform to the permissions that I see on my ordinary linux workstation:
All of the directories are 0755/drwxr-xr-x
, and the file itself is 0660/crw-rw----
.
Is my approach wrong? I am attempting to use tinyalsa by adding pcm.c and an Android.mk file to compile it as a module. Then in another .c file, I call pcm_open.
Please, why would Android deny me permission, and what do I need to do about it?