开发者

Running an app with root permission in Android

Do you know how to run an app in Android with root permission? I used the following snippet but the root permission is only granted to generated开发者_Go百科 process, not the app itself.

process = Runtime.getRuntime().exec("su")


You can't really, at least not without some kind of horrible hack.

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

Android applications run inside a Dalvik machine in a process that's forked off of a process called Zygote which maps a lot of system libraries into memory, so it's children inherit shared copies. You'd have to somehow modify zygote to tell it to leave the newly forked child root, instead of downgrading it to an application user.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜