1

My phone is Mi 5s Plus 6GB/128GB. After a clean installation (flashed MIUI 9.6.27 first) of official LineageOS 16.0 Sep 19, 2019 I can't find "Manage root accesses" under developer options.

After format and advanced wipe, I installed LineageOS, Open Gapps Pico ARM64 for Android 9.0, and Magisk 19.4. Now all three seems to be working ok, and I was able grant root access to AdAway and Titanium backup through Magisk. But I couldn't find manage root accesses under developers options.

So Installed addonsu-16.0-arm64-signed(.)zip from this LineageOS page, through TWRP. Though after a reboot, the manage root accesses option is still missing. It's not even displayed as greyed-out option, it's just not there. On the "Trust" screen, it says, Root access: Disabled right below SELinux: Enforcing.

I would like to grant root access to ADB. Is it possible through terminal emulator (on the phone)? Is there any command for it... 'coz I can become root "by su" in terminal emulator through Magisk.

Edit-2:

(1) As I have mentioned earlier, I tried the same through Windows 10 administrator command prompt too, and the result was the same.

As per my understanding, Window 10 do not have "udev rules".

(2) This is how I was running adb sideload command from Ubuntu mate 19.04 Terminal:

admn@um:~$ sudo su

[sudo] password for admn: root@um:/home/admn# adb sideload lineage-16.0-20190719-nightly-natrium-signed.zip

Was getting "insufficient permissions" error.

(3) Here is the "insufficient permissions" error in full detail, where you can see it refers to Android developer website:

root@um:/home/admn/Downloads# adb sideload lineage-16.0-20190919-nightly-natrium-signed.zip

adb: sideload connection failed: insufficient permissions for device: user in plugdev group; are your udev rules wrong?

See [http://developer.android.com/tools/device.html] for more information

adb: trying pre-KitKat sideload method...

adb: pre-KitKat sideload connection failed: insufficient permissions for device: user in plugdev group; are your udev rules wrong?

See [http://developer.android.com/tools/device.html] for more information

root@um:/home/admn/Downloads#

(4) Right on the phone, through TWRP: Now I have updated the same phone for past two+ years in exact same manner. Almost once a week for two+ years.

Note: Every single time, I always verify sha256sum before transferring the ROM to the phone.

First I transfer the LineageOS ROM into Download folder of the phone through USB cable, boot into TWRP > install > find the LineageOS zip.

But this time, first time in two+ years, update failed with "Error 7".

(4-A) I tried this route many times, after quite a few reboots, but installation was not going through.

(4-B) Now the phone was not booting up normally. It was getting stuck at LineageOS logo screen for 30+ minutes.

(5) I'm trying to get to this "Manage root accesses" screen: https://i.imgur.com/l3owFfY.jpg

Of course this image is not mine but it's from LineageOS.

(6) LineageOS's "AddonSU" is NOT just meant only for userdebug builds. Here's a link to LineageOS installation instructions pages for Natrium (Mi 5s Plus) and Beryllium (Poco F1). Where at the end of a page it says: "(Optional): Root your device by installing LineageOS’ AddonSU, (use the arm64 package) or by using any other method you prefer."

I'm attaching a screenshot: https://i.imgur.com/jTTypVj.jpg

Thanks.

Edit-1:

  • Official LineageOS 16 ROM doesn't come with "Addon-SU" pre-built. Their installations instructions says to install Addon-SU (separately) from "extras" page I have linked.
  • With Magisk, I know I can grant root access to any regular app but how could I grant "Root access to ADB"?

The reason I'd like root access to ADB is, 2 days ago I tried updating LineageOS ROM through TWRP but it failed, and then I couldn't flash new or old Lineage ROM through ADB, as I kept getting this error:

adb: sideload connection failed: insufficient permissions for device: user in plugdev group; are your udev rules wrong?

Even though I was running this adb sideload lineage-16.0-20190719-nightly-natrium-signed.zip command as ROOT user from Ubuntu 19.04. I also tried the same from Windows 10 admin command prompt.

So after a failed LineageOS update: (1) I couldn't flash new/old Lineage ROM through TWRP, (2) I couldn't flash any Lineage ROM through ADB.

I had to install MIUI 10 ROM, then format and advanced wipe to install LineageOS back again. So now I'm trying to grant root access to ADB to prevent this from happening again.

0

addonsu is an open source rooting solution from LineageOS. Magisk is another rooting solution. So are/were SuperSU, PHH's SuperUser, CF-Auto-Root and so on. You cannot / don't need to / should not use multiple rooting solutions simultaneously. Magisk - during flashing process - deletes any files related to other rooting solutions, including /system/xbin/su put by addonsu. That must be the reason for Missing “Manage root accesses” under developer options.

If your ROM is pre-built with addonsu (check in Developer Options), you don't need to flash Magisk. If it's not, flash either addonsu or Magisk.

I would like to grant root access to ADB. Is it possible through terminal emulator (on the phone)?
...
With Magisk, I know I can grant root access to any regular app but how could I grant "Root access to ADB"?

ADB daemon (adbd) can be run as root only on userdebug builds* as explained in Why “adb root” does nothing? And that doesn't require rooting your phone.
Magisk can grant root access to shell i.e. when you execute adb shell su, Magisk treats shell (UID: 2000) as a normal app. So “grant root access to ADB” is different from “grant root access to ADB shell”.

I tried updating LineageOS ROM through TWRP but it failed
...
as I kept getting this error:
adb: sideload connection failed: insufficient permissions for device: user in plugdev group; are your udev rules wrong?

The error you have mentioned isn't related to Android but to your Linux OS. When you insert Android device to PC, the device node created in /dev/bus/usb/... must be readable / writable to non-root user, which is usually not. So you either need to run adb server as root:

~$ sudo adb kill-server
~$ sudo adb start-server

Or configure udev to set ownership/permissions of device node as explained here and add yourself to plugdev group (if not already) as explained here.

Even though I was running this adb sideload lineage-16.0-20190719-nightly-natrium-signed.zip command as ROOT user from Ubuntu 19.04.

You executed adb first time without root, so ADB server was running as non-root user. Later running adb with root makes no difference. See documentation here.

So now I'm trying to grant root access to ADB

ADB Sideload is supposed to be run in recovery mode i.e. TWRP in your case. In TWRP, adbd is always running as root. Root is required only when device is running main Android OS. Recovery and Android are two independent OS's. Also don't confuse ADB Daemon with ADB Server.


* As evident from here, LineageOS's addonsu also seems to be working only on userdebug builds (which custom ROMs are mostly).

  • Thanks for the reply. I have just added "Edit-2" with screenshots, and installation instructions page of LineageOS for Natrium (my phone) and Beryllium (one more as a proof). – Jags Sep 22 at 3:32
  • @Jags childish questions; did you put device in ADB Sideload mode before doing adb sideload from PC? Are you sure you killed ADB server before running as root? Do adb push and adb shell work? If adb push and flashing on device is also failing, then may be a problem with your filesystems e.g. due to a dying eMMC. Can you mount filesystems (/data, /system, /vendor, /cache) manually in R/W mode without errors? What reason the recovery.log shows for Error 7? – Irfan Latif Sep 22 at 9:10
  • (1) Yes. After formatting and advanced wipe, in TWRP, advanced and sideload, put it into sideload mode. Then from PC side adb sideload. (2) Yes whenever I'm running any critical process, first I login as root by "sudo su", then proceed. (3) As I've mentioned earlier, that was 2 days ago. So now I can't run any test. Since nothing worked from Windows 10 and Ubuntu 19.04, I "clean install" MIUI 10, then Lineageos Sep 19. Typing from the same phone at the moment. – Jags Sep 22 at 9:25
  • Most importantly, I'm here to find out, how to get that, "Manage Root Accesses" options. That is the purpose of my post. I'm not here to find why Lineageos installation failed first time in 2+ years. Because I formatted, Installed MIUI 10, format again, and LineageOS 16 is working perfectly fine... except root access. Thanks for your help. – Jags Sep 22 at 9:28
  • Here's a screenshot of what I'm trying to achieve: i.imgur.com/l3owFfY.jpg – Jags Sep 22 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.