How to disable Magisk modules without Magisk and TWRP recovery

Search This thread

martin131

Member
Nov 22, 2011
44
15
Hi, I installed an incompatible Magisk module in the past, which cause bootloop of my phone. Co I dirty flashed my ROM (Pixel Experience) to get my phone work again. My current situation is that I cannot flash Magisk because an incompatible module is still on my phone. How to disable this module without root and TWRP? TWRP is not yet available for my phone


Phone: Xiaomi Mi 9 (cepheus)
ROM: Pixel Experience (PixelExperience_cepheus-12.0-20220123-1916-OFFICIAL.zip)
Magisk 23 or 24
Recovery: PixelExperience Recovery
 
  • Like
Reactions: duttyend

Danielisko

Senior Member
Jun 29, 2015
75
18
Download latest twrp, try first fastboot boot image to test it, then flash with fastboot and delete broken module from /data/adb
 

martin131

Member
Nov 22, 2011
44
15
OK, I tried boot latest twrp. The touchscreen was not working, so I plugged in a USB mouse. But now I cannot mount data partition in TWRP
 

TeaStay

Member
Feb 11, 2022
6
3
Try to enter safe mode on your device. Magisk will disable all modules if detected the safe mode enable. Reboot and remove the problem modules, and reboot again.
 
  • Like
Reactions: Dave_247

dec0de

New member
Feb 11, 2016
1
2
I have an Xperia 10 III (XQ-BT52) only rooted with Magisk (no RTWP) in which I tried to install the Magisk module wfd_pie_magisk_20_4.zip which ended up in a bootloop. Having the unit connected whilst booting I bombarded the command line with

adb shell

and lo and behold it did connect for a few (8-10) seconds giving me a prompt, before rebooting again.
Realising these few seconds could be enough to delete the module, i went for:

adb shell

XQ-BT52:/ $
su
XQ-BT52:/ #
rm -rf /data/adb/modules/WFD_PIE

and the unit rebooted. It did loop again twice, but the second time it all came up nicely.

Conclusion, if you get into a boot loop you might be able to recover if being quick enough to erase the module. First you need to identify what the directory name of the module is by simply do:

ls /data/adb/modules

hosts
WFD_PIE



Once knowing the name of the directory (WFD_PIE in my case) get the prompt whilst booting, quickly write (or simply prepare the rm command by putting it into the terminals cut/paste buffer).

su
rm -rf /data/adb/modules/[directory name]

hit enter, and hope for the best. The system will hopefully get up and running again after a few boots (one more boot than expected).
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    I found the solution!
    1. Flash Magisk
    2. Reboot
    3. adb wait-for-device shell magisk --remove-modules while booting
    2
    I have an Xperia 10 III (XQ-BT52) only rooted with Magisk (no RTWP) in which I tried to install the Magisk module wfd_pie_magisk_20_4.zip which ended up in a bootloop. Having the unit connected whilst booting I bombarded the command line with

    adb shell

    and lo and behold it did connect for a few (8-10) seconds giving me a prompt, before rebooting again.
    Realising these few seconds could be enough to delete the module, i went for:

    adb shell

    XQ-BT52:/ $
    su
    XQ-BT52:/ #
    rm -rf /data/adb/modules/WFD_PIE

    and the unit rebooted. It did loop again twice, but the second time it all came up nicely.

    Conclusion, if you get into a boot loop you might be able to recover if being quick enough to erase the module. First you need to identify what the directory name of the module is by simply do:

    ls /data/adb/modules

    hosts
    WFD_PIE



    Once knowing the name of the directory (WFD_PIE in my case) get the prompt whilst booting, quickly write (or simply prepare the rm command by putting it into the terminals cut/paste buffer).

    su
    rm -rf /data/adb/modules/[directory name]

    hit enter, and hope for the best. The system will hopefully get up and running again after a few boots (one more boot than expected).
    1
    Hi, I installed an incompatible Magisk module in the past, which cause bootloop of my phone. Co I dirty flashed my ROM (Pixel Experience) to get my phone work again. My current situation is that I cannot flash Magisk because an incompatible module is still on my phone. How to disable this module without root and TWRP? TWRP is not yet available for my phone


    Phone: Xiaomi Mi 9 (cepheus)
    ROM: Pixel Experience (PixelExperience_cepheus-12.0-20220123-1916-OFFICIAL.zip)
    Magisk 23 or 24
    Recovery: PixelExperience Recovery
    1
    Enter in TWRP.
    Advanced > File Manager.
    Go to "/data/adb" and delete the folders of the specific magisk module.
    Reboot.
    1
    Try to enter safe mode on your device. Magisk will disable all modules if detected the safe mode enable. Reboot and remove the problem modules, and reboot again.