How can i add uses-permisson to an apk.If i need to access /dev/mem using an native interface.
I will put my problem in 2 steps.
1) I am trying to control I/O using an apk with the help of native method(JNI).In my native method I am trying to open /dev/mem and mmaping the i/o address.
But native code fails in opening /dev/mem. I have explicitly installed apk in system/apk on a remounted file system.
2) If i run a linux executable using mmap on the same android machine it works.
So is there any way to run this apk as root by adding permission in manifest file.I have tried changing permission for dev/mem in apk itself(no success)
For me it looks Android security framework is forbidding to use /dev/mem.
I explored bit on linux capabilities(linux/capabilities.h) and tried to use capset prior to calling dev/mem open call.
But capset also failed due to unprivileged access.
Any suggestions appreciated.