Running an app with root privileges on Android

Do you know how to run an Android app with root privileges? I used the following snippet, but root permission is granted only to the created process, and not to the application itself.

process = Runtime.getRuntime().exec("su") 
+4
source share
1 answer

You cannot, at least not without some terrible hack.

You cannot create an existing root process, it must be that way from its creation.

Android applications run inside the Dalvik machine in a process that drops a process called Zygote, which maps many system libraries to memory, so children inherit shared copies. You need to modify zygote in some way to say that it leaves a new forked root root directory, rather than downgrading it to the application user.

+8
source

All Articles