0

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?

g00dy
  • 6,752
  • 2
  • 30
  • 43
wasp256
  • 5,943
  • 12
  • 72
  • 119
  • Doesn't roottools just wrap calls to su? Does your app or java process have permissions to execute su? It's one thing if it can read .system/xbin where su is but if you can't execute su then that might be the problem(at least thats where it is in my device builds). When you use adb shell you login into the device as the shell user which usually has permission to execute su. Also what method did you use to root your device? Are version of android are you running? If selinux/se for android is running on your device are you in permissive? – dudebrobro Aug 14 '13 at 12:52
  • I have installed SuperSU which gives me the superuser rights. `xbin` is in `/system/xbin`; Yes I logged in as shell user then executed `su` -> now I'm root and I executed `id` which output you can see above... I'm running android 4.3 and used the following method http://smart-phones-how-to.blogspot.it/2013/05/how-to-root-nexus-4-windowsmac.html – wasp256 Aug 14 '13 at 12:56
  • version is 4.3, as mentioned above – wasp256 Aug 14 '13 at 13:06

1 Answers1

0

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.

dudebrobro
  • 1,287
  • 10
  • 17