9

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?

Minzkraut
  • 1,838
  • 22
  • 30
Stefan
  • 26,706
  • 4
  • 42
  • 75
  • 3
    Better ask on http://android.stackexchange.com/ – ligi Sep 02 '15 at 12:29
  • And the phone is still rooted? I mean do you have tried `Root checker`? – Skizo-ozᴉʞS Sep 02 '15 at 12:29
  • 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. – Stefan Sep 02 '15 at 12:32
  • Similar: [Why can't I get root access from shell?](https://android.stackexchange.com/questions/40059/why-cant-i-get-root-access-from-shell) – Vadzim Jan 28 '18 at 11:01

3 Answers3

21

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.

Vadzim
  • 21,258
  • 10
  • 119
  • 142
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.

d2alphame
  • 85
  • 2
  • 8
Stefan
  • 26,706
  • 4
  • 42
  • 75
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'. :-)

bernz
  • 155
  • 6