简体   繁体   English

Android Java接收root访问被拒绝

[英]android java receive root access is denied

I have successfully rooted my Nexus4 and am trying to receive the root access in java via the RootTools.jar extension. 我已成功将Nexus4植根,并试图通过RootTools.jar扩展名接收java中的root访问权限。 When I call RootTools.isRootAvailable() I receive true but when calling RootTools.isAccessGiven() which should actually give me root access I receive false ?? 当我打电话RootTools.isRootAvailable()我得到true ,但打电话时RootTools.isAccessGiven()这实际上应该给我的根访问我收到false I have also logged in the device via adb shell and executed the commands su and id which returns 我还通过adb shell登录了设备并执行了命令suid ,该命令返回

    uid=0(root) gid=0(root) groups=1003(graphics), 1004(input),1007(log),1009(mount),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats) context=u:r:shell:s0

So why am I not able get the root access in java? 那么,为什么我不能在Java中获得root访问权限?

A couple of things. 有几件事。 On the Google play pager there is an indication that there are still bugs with this app on Android4.3 SuperSU . 在Google Play传呼机上,有迹象表明该应用在Android4.3 SuperSU上仍然存在错误。

NOTE: If you just upgraded to Android 4.3, you need to manually re-root, updating the app will not suffice. 注意:如果您刚升级到Android 4.3,则需要手动重新root,更新该应用程序将不足。 Sorry for the massive amounts of updates, but we need to get 4.3 working right. 抱歉,大量的更新,但是我们需要正确地运行4.3。

Android 4.3 also adds support for file capabilities support to remove the need for setuid binaries, that could be part of the problem you are seeing by not being able to run your java code as the super user but on your java code's process. Android 4.3还添加了对文件功能支持的支持,从而消除了对setuid二进制文件的需求,这可能是您所看到的问题的一部分,因为您无法以超级用户身份运行Java代码,但无法在Java代码的进程中运行Java代码。 You can see the capabilities on the java process in /proc/<pid>/status . 您可以在/proc/<pid>/status查看Java进程的功能。 Even though you are exec'ing su capabilies/file capabilities across execve is really wonky. 即使您在execve上执行su功能/文件功能,也确实很困难。 Also Zyogote sets the capability bounding set for the java processes that are forked off of it. Zyogote还会为从中派生的Java进程设置功能边界集。 Hope that helps some. 希望对您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM