运行在Android的超级用户权限的应用程序 [英] Running an app with root permission in Android

查看:170
本文介绍了运行在Android的超级用户权限的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你知道如何在Android中使用超级用户权限运行的应用程序?我用下面的代码片段,但root权限仅授予产生的处理的,而不是程序本身。

 程序=调用Runtime.getRuntime()。EXEC(素)
 

解决方案

你真的不能,至少在没有某种可怕的黑客。

您不能使现有流程的根,它必须是这样,从它的创作。

一Dalvik的机内的多数民众赞成进程衍生出一种叫做受精卵的过程,映射了大量的系统库到内存中的进程中运行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 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.

这篇关于运行在Android的超级用户权限的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆