Granting permission to use the Android application

Using adb.exe, which comes with the Android SDK, I can get root access to the Android device. For testing purposes, I would also like to grant the rights to use Android applications. I know that the application runs under a specific account called app_68. Is there an adb shell command to add app_68 to the "root group"?

Thanks in advance for your comments / decisions.

+5
source share
1 answer

You need the superuser binary ( su) to run your application as the root user. To run as root, do the following:

Process p = Runtime.getRuntime().exec("su");
DataOutputStream os = new DataOutputStream(p.getOutputStream());

os.writeBytes("yourCommand\n");

os.writeBytes("exit\n");

os.flush();
os.close();
try { p.waitFor(); } catch (InterruptedException e) {}

- su: uid xxxx not allowed, SuperSU.

. fooobar.com/questions/49043/..., . :

. ( stdout), :

0

All Articles