2

I need help with adb. I'm using rooted Xiaomi Redmi 6A (Android 9). Recently, I flashed the Magisk ADB Root module, which is used to access adb root command (adb push, adb pull). This module utilizes the adbd daemon running on your phone with root rights. It did actually work, but with one problem - now I can't use adb outside of TWRP recovery.

Since I already did what I wanted to do with adb root, I uninstalled this module - but it didn't do anything. Every time I'm trying to use adb, the daemon is started successfully, but adb doesn't see any devices attached. This isn't a problem with the cable or PC - before using this module, it all worked without issues. Inside the module file, I found a setpolicy.rule file:

allow adbd adbd process setcurrent
allow adbd su process dyntransition
allow su * * *

I'm looking for a way to reset adb/adbd settings to default, which hopefully would fix my problem. (I did try to contact them via their Telegram, but it seems inactive).

1 Answer 1

0

After seeing the module, I think the module only replaces adbd daemon on Android with the patched adbd binary. If you have any problems after installing this module, you can uninstall them, and reboot, since the Magisk module doesn't affect your system permanently.

You can restart adb daemon on a Windows PC with adb kill-server and then relaunch with adb devices.

And make sure you activate adb on developers mode.

If you want to automatically turn on adb on boot and allow adb root, try my Magisk module: Adb-Root-Enabler

2
  • Thanks for the help. Unfortunately, I did uninstalled this module and rebooted, but the problem persisted - 'adb devices' still can't see my phone. I'm hoping that if I reset all command modified by setpolicy.rule to default, it would fix my problem. Do you know the default values for these three arguments from my post?
    – Letus252
    Commented Dec 16, 2023 at 20:56
  • I have no idea to revert back, afaik, magisk will not apply that sepolicy.rules after the module uninstalled, for reference, start from here, latest magisk will copy all sepolicy rules github.com/vvb2060/Magisk/blob/… then line 584 will copy to directory $(magisk --path)/.magisk/preinit/module_name/sepolicy.rule, in order to show current policy you can use magiskpolicy
    – Anas
    Commented Dec 17, 2023 at 0:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .