Rooted but su says "Permission denied"
Asked Answered
W

3

12

I have this "old" Lenovo A2107 tablet which I rooted years ago (using a download from http://androidforums.com/threads/a2107-root-mods-and-rom-discussion.661261/, tho running its root.bat script by hand from my GNU/Linux machine) and that worked fine.

Then I passed this tablet to my daughter for a couple years, and now I got it back.

/system/bin/su is still present, still the same date and size, still mode "rwsr-sr-x", still the same firmware (Android 4.0.3) so all looks fine, but when I try to run it from a shell, it just tells me "Permission denied".

Any idea what might be going on? What I could try to do to track it down?

Witte answered 2/9, 2015 at 12:27 Comment(4)
Better ask on android.stackexchange.comHymenopteran
And the phone is still rooted? I mean do you have tried Root checker?Chinchilla
Welll, no, that's the problem: the "su" program doesn't do what it used to do any more. "RootChecker" bumps into the same problem (and other programs that need root, like the system.apps mover.Witte
Similar: Why can't I get root access from shell?Monachism
W
5

OK, for those curious to know, I figured out what it was: the /system/bin/su program either accepts the request as-is (depending on who asks) or passes the request to some other program (Superuser.apk).

As it turns out, I still have /system/bin/su but Superuser.apk was missing. Luckily, /system/bin/su worked fine from the "adb shell", even though it said "Permission denied" when used from ConnectBot and other terminal emulators. So I used "adb shell" to get root access and manually copied Superuser.apk into /system/apps.

Witte answered 4/9, 2015 at 20:14 Comment(3)
it may be ok for one device. How to copy superuser.apk when app is being installed on multiple devices?Salena
Do you mean "copied Superuser.apk into /system/app". Because there is no folder system/appsRimrock
Can't remember exactly and I don't have this device any more, but it was the /system subdirectory where many other *.apk are found.Witte
M
26

Nowadays Magisk is commonly used for rooting.

I've found that on my Oneplus 5 (Oxygen OS, Nougat) it was sufficient to go to Magisk Manager app, open superuser permissions screen and toggle Shell (com.android.shell) to resolve the adb su permission denied problem.

Monachism answered 28/1, 2018 at 15:26 Comment(3)
For me, Magisk Manager -> Superuser contained Perfdum, which needed to be toggled as directed by this answer. Thank you for pointing me to the right place.Mohan
magisk has no version for android 4.0.3Rimrock
When I did this, the correct screen could be found by pressing the shield icon (2nd button from the left) on the bar at the bottom of the app.Arleenarlen
W
5

OK, for those curious to know, I figured out what it was: the /system/bin/su program either accepts the request as-is (depending on who asks) or passes the request to some other program (Superuser.apk).

As it turns out, I still have /system/bin/su but Superuser.apk was missing. Luckily, /system/bin/su worked fine from the "adb shell", even though it said "Permission denied" when used from ConnectBot and other terminal emulators. So I used "adb shell" to get root access and manually copied Superuser.apk into /system/apps.

Witte answered 4/9, 2015 at 20:14 Comment(3)
it may be ok for one device. How to copy superuser.apk when app is being installed on multiple devices?Salena
Do you mean "copied Superuser.apk into /system/app". Because there is no folder system/appsRimrock
Can't remember exactly and I don't have this device any more, but it was the /system subdirectory where many other *.apk are found.Witte
C
3

FWIW... I had a similar problem ( running 'su' from ADB shell yielded 'permission denied' ), so I'll describe my solution.

For context, I had rebrained my Galaxy Nexus with CyanogenMod.

So, I looked at the system settings, and it contains a 'Superuser' section; in that section's own settings ( small menu ), there is a 'Superuser Access' option, which was set to 'Apps only'. I changed that to 'Apps and ADB', and then I was able to start an ADB shell, and from that shell, I was now allowed to run 'su'. :-)

Cherianne answered 1/3, 2016 at 17:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.