Question :
How to execute one complete app with root previleges (not just few commands)?
Scenario :
I am working on a rooted android device.
In an android app, I need to play the H.264 stream received through eth0
. I need root privileges to open (raw open) eth0
.
The corresponding code is in JNI. Since there are a lot of buffers that need to be exchanged between JNI code and Java code, the executable way(Process.exec(su)
) is very inconvenient.
Ideal solution:
The JNI code is executed in the same process context as of the Java code. Therefore, granting root privileges to my android process should solve my problem. But I am not sure how to do that.
I tried :
- Making the application as
system app/priv-app
. I thought this will give the app root access. But that did not happen.