简体   繁体   中英

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. When I call RootTools.isRootAvailable() I receive true but when calling RootTools.isAccessGiven() which should actually give me root access I receive false ?? I have also logged in the device via adb shell and executed the commands su and id which returns

    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?

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 .

NOTE: If you just upgraded to Android 4.3, you need to manually re-root, updating the app will not suffice. Sorry for the massive amounts of updates, but we need to get 4.3 working right.

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. You can see the capabilities on the java process in /proc/<pid>/status . Even though you are exec'ing su capabilies/file capabilities across execve is really wonky. Also Zyogote sets the capability bounding set for the java processes that are forked off of it. Hope that helps some.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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