ADB Root Enabler by anasfanani switches ADB on and removes the "Allow USB debugging?" authorization prompt. The main use is a phone whose screen is broken: you can't tap that prompt, but with this module installed you can still connect from a PC, over USB or over the network.
What it changes
The module has no scripts. It's a single system.prop that Magisk applies at boot:
ro.debuggable=0 # 1 in the debugable variant
ro.adb.secure=0
persist.service.adb.enable=1
persist.service.debuggable=0 # 1 in the debugable variant
persist.sys.usb.config=mtp,adb
service.adb.tcp.port=33445 # 5555 in the two -5555 variantsro.adb.secure=0turns off ADB's RSA key check, so no authorization prompt appears.persist.sys.usb.config=mtp,adbkeeps USB in file transfer (MTP) plus ADB mode.service.adb.tcp.portmakes adbd listen on the network as well, so you can connect over Wi-Fi (added in v1.3 by xweiba).ro.debuggable=1, only in the debugable variant, marks the build as debuggable. adbd needs that beforeadb rootwill restart it as root; with the other two you get a normal shell and usesu.
Which zip to pick
| Zip | ro.debuggable | TCP port |
|---|---|---|
Adb-Root-Enabler-v1.3.zip | 0 | 33445 |
Adb-Root-Enabler-5555-v1.3.zip | 0 | 5555 |
Adb-Root-Enabler-debugable-5555-v1.3.zip | 1 | 5555 |
Port 5555 is the one adb connect assumes by default. Install only one variant; they share the module ID Adb-Root-Enabler, so a new one replaces the old.
Installation
- Install the zip from the Modules screen in Magisk, or flash it in TWRP. The installer uses Magisk's own installer functions, so Magisk v20.4 or newer has to be on the phone either way.
- Reboot.
- Connect over USB with
adb devices, or over the network withadb connect <phone-ip>:5555(or:33445for the default zip). - On the debugable variant,
adb rootrestarts adbd as root. On the others, runadb shelland thensu.
To undo it, remove the module in Magisk and reboot. Version 1.2, the older release, came in adb-only, mtp and rndis USB variants and has no network port.