Cannot run shell with superuser permissions when connecting with adb to rooted FP3

I have a rooted FP3 running /e/. I have not problems running a root shell in a terminal. However trying to run a root shell through adb from my computer yields:

% adb shell
shell@FP3:/ $ su
Permission denied
shell@FP3:/ $

On the phone I get the message: “Shell was denied Superuser rights”

I don’t have this problem with my rooted FP2 running Fairphone-Open. This sort of thing really irritates me!

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

Does it work if you do

adb root
adb shell

And maybe you need to check the developer options. IIRC later Android versions can allow root for apps, via adb or both. Maybe you need to enable it for adb, too (don’t have a phone running /e/ at the moment so I can’t check).

2 Likes

Thanks, I can’t see any settings in developer options that look set in a way that would prevent running a shell as root… When I try what you suggest I get:

adb root
adbd cannot run as root in production builds

Since the phone is rooted, there ought to be some easy way to get adbd to run as root. I’ve tried installing the “ADB and Fastboot” module from Magisk, to see if stopping the server and re-starting it in a root shell would solve the problem, but it doesn’t.

I discovered that installing the Magisk module adb_root from https://github.com/evdenis/adb_root makes abdb always run as root, and a root shell always opens - not the best solution! However allowing shell to have root permission in Magisk, with adb_root disables does what I originally wanted, but in this case adbd itself does cannot be run as root, which is OK for me. I don’t know why I might want to run adbd as root but I know how to now!

Any news? I have the same issue with version 1.1 on my FP3.

There is no ‘root’ option in developer options, and I’m unable to get root access with ADB.