I'm using the Video For Linux 2 API from my Android app's native library to talk to the Qualcomm FM radio chipset in my rooted Xperia E C1504, and I need to run my native library's code with root privileges in order to access /dev/radio0 with write permission before I can begin issuing (successful) ioctl.h commands. Specifically, I'm fairly sure I need the fcntl.h function call:
int device_fd = open("/dev/radio0", O_RDWR);
to not throw a 'permission denied' error. I know how to issue shell commands as SU, but how can I obtain root privileges for the entire scope of my native library's execution? This post suggests that installing my app in the /system/app directory should grant the permissions I need, but I tried it and still receive errno 13 (permission denied) when I try to open the target device in read/write mode.