RootManager icon indicating copy to clipboard operation
RootManager copied to clipboard

Error check is device rooted

Open petrovichtim opened this issue 8 years ago • 12 comments

On the Lenovo Vibe A7010 (K4 Note) Android version 6.0. Method rootManager.hasRooted() return false, but device has root.

petrovichtim avatar Jun 30 '16 11:06 petrovichtim

Thanks. But I don't have this model, could u help me to have a check on your phone?

  1. open adb shell, can u run 'su' successfully?
  2. if yes, please run 'printenv' and send me the output. I might miss some path configs in my code.

Thanks.

Chrisplus avatar Jun 30 '16 12:06 Chrisplus

I don't have this device. This error told my user. I will call him to join us.

petrovichtim avatar Jun 30 '16 12:06 petrovichtim

@Chrisplus good day. Now i found method rootManager.hasRooted() return false if you run it twice , and first time you don't give SU permission, or ask to dialog.

petrovichtim avatar Oct 22 '16 14:10 petrovichtim

@petrovichtim Thanks for the information. Is the device Lenovo Vibe A7010 (K4 Note) as mentioned before? The permission dialog relies on the permission management application such as SuperUser. Does the phone show the permission dialog when running 'su' in adb shell?

Thanks.

Chrisplus avatar Oct 24 '16 04:10 Chrisplus

Device is Huawei MediaPad 7 Lite, Android version 4.0.3. Permissions showing first time. This is probably a bug in third-party programs

petrovichtim avatar Oct 24 '16 04:10 petrovichtim

Thanks. hasRooted() only check if the device might be rooted or not by find 'SU' binary in the path. And obtainPermission() will try to gain the SU permission indeed.

It seems I may miss some paths, could you help me run 'printenv' and 'which su' in the adb shell and send me the output, when you have time. Thanks.

Chrisplus avatar Oct 24 '16 04:10 Chrisplus

Here printenv https://gist.github.com/petrovichtim/1f8ce8715cf283bfacc31d311a8eb1fb SU info https://gist.github.com/petrovichtim/1b5ee6595ac1b402a1ec2c4785f9d3be

petrovichtim avatar Oct 24 '16 04:10 petrovichtim

Thanks @petrovichtim, I'm about to check it and see if I could update a patch in couple of days. :)

Chrisplus avatar Oct 24 '16 05:10 Chrisplus

I think you need to add more values to Constants.SU_BINARY_DIRS . Here are more of them http://stackoverflow.com/a/19289543/4442286

petrovichtim avatar Dec 19 '16 05:12 petrovichtim

@petrovichtim Hi, thanks for the information and so sorry for the late reply. I am about to add it to the develop branch.

Chrisplus avatar Dec 26 '16 04:12 Chrisplus

i do not have a rooted device. i only wanted to view system files. i am now learning what code means and all the definitions and not clicking on any buttons that i do not know what actions will happen

ghost avatar Jun 27 '20 20:06 ghost

every time hasRooted() returns false and than when i call RootManger.getInstance().obtainPermision(), it even not taking permision.It shows permission denied. help!.

BhargavBhanshali avatar Oct 22 '20 12:10 BhargavBhanshali