How To Guide Get yourself out of bootloop in case of faulty magisk module without TWRP

Search This thread

Mahoro.san

Senior Member
Dec 17, 2011
102
23
So I have been spending a good afternoon getting the phone out of bootloop because of a fault magisk I install , and there's no TRWP to save my ass


What doesn't work :
-Safe mode (click volume down key the second loading to the system (5G screen) , pass the MIUI.
What make mine works:
1. Get the original boot.img, flash this with like how you root your phone initially in rooting magisk.


Code:
fastboot flash boot boot.img

2. Now that you can go in the phone , but you don't have root access to remove the magisk module that's nested within root. You would need to get the ADB by going to
Additional Setting> developer option> enable USB debugging to have access to ADB

3. Either go to magisk and patch the boot.img again, or use to the one you have patched previously , go to fastboot and flash the patched boot.img

4. Reboot your phone (or type fastboot reboot) and continue to plug in your phone, now that you are in boot loop but 1. Have root access 2. Able to use ADB

5. In the ADB cmd console (probably same as your fastboot cmd console)
Type in ADB devices to check if you have ADB connection to your phone .

If yes, type the code below which would remove all the magisk module


Code:
adb wait-for-device shell magisk --remove-modules

6. It will reboot on its own , I have tried the process two times but I am able to get my phone out of loop.


I have spent a good afternoon figuring out, hopefully this could save anyone a headache
 

deif102

Senior Member
Nov 25, 2012
78
8
Not working here, I run the command but after reboot stills at bootloop, so I will stay without root because I can boot if I flash stock boot.img, I will wait to any twrp to flash magisk unistaller. (Advice: dont try to install 2019 modules)
 

Mahoro.san

Senior Member
Dec 17, 2011
102
23
Before running the command ,make sure you are in adb mode by typing adb devices .


It would not work in fastboot environment.
It would work in normal boot environment after you enabled usb debugging in developer option and in normal environment (after the MIUI boot screen, it works out even you are in bootloop status )
 

deif102

Senior Member
Nov 25, 2012
78
8
Yeah I know, I do it like you say, flashed magisk patched boot , wait for adb devices working, run the command for remove all the modules, but after the reboot stills on bootloop.
Can you send me the list of modules that you have after run the command? I have 3 modules
use this to see the installed modules

adb wait-for-device shell magisk -list
 

Mahoro.san

Senior Member
Dec 17, 2011
102
23
I believe your code is abit wrong there. Theres two -


Code:
adb wait-for-device shell magisk --remove-modules

Do reference the initial link I provided earlier .
Is all the info you need.
 

Mahoro.san

Senior Member
Dec 17, 2011
102
23
The modules that failed is pix3lify .

And below is my current module list.
Screenshot_2021-05-04-16-42-18-969_ndn.dztptztrv.szn.jpg

Not sure if that helps
 

Mahoro.san

Senior Member
Dec 17, 2011
102
23
Pretty much
1.
Code:
Fastboot flash boot boot.img
on flashing the original and patched IMG ( you get that right )

2. After enabling the usb debugging when you flash the original IMG, you need to flash the magisk patched IMG again. (I believe you missed this part)

Code:
Adb devices
To check if you have ADB access to the devices

Code:
adb wait-for-device shell magisk --remove-modules
To remove the module
 

deif102

Senior Member
Nov 25, 2012
78
8
Pretty much
1.
Code:
Fastboot flash boot boot.img
on flashing the original and patched IMG ( you get that right )

2. After enabling the usb debugging when you flash the original IMG, you need to flash the magisk patched IMG again. (I believe you missed this part)

Code:
Adb devices
To check if you have ADB access to the devices

Code:
adb wait-for-device shell magisk --remove-modules
To remove the module
Dude, without the intention of disturbing. I know what I have to do. I'm able to boot if I flash stock boot.img, if I flash magisk patched boot.img I can use adb devices command but the device is in bootloop, then I use adb devices and adb wait-for-device shell magisk --remove-modules
The problem is that nothing happens when I use the last command, just reboots but still on bootloop
 

deif102

Senior Member
Nov 25, 2012
78
8
Btw I get magisk working, just entered in safe mode (vol - and vol+ before boot animation) and then used the command that removes all modules. This time after reboot, no bootloop and magisk working fine
 
  • Like
Reactions: nitro_xlr8r

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    So I have been spending a good afternoon getting the phone out of bootloop because of a fault magisk I install , and there's no TRWP to save my ass


    What doesn't work :
    -Safe mode (click volume down key the second loading to the system (5G screen) , pass the MIUI.
    What make mine works:
    1. Get the original boot.img, flash this with like how you root your phone initially in rooting magisk.


    Code:
    fastboot flash boot boot.img

    2. Now that you can go in the phone , but you don't have root access to remove the magisk module that's nested within root. You would need to get the ADB by going to
    Additional Setting> developer option> enable USB debugging to have access to ADB

    3. Either go to magisk and patch the boot.img again, or use to the one you have patched previously , go to fastboot and flash the patched boot.img

    4. Reboot your phone (or type fastboot reboot) and continue to plug in your phone, now that you are in boot loop but 1. Have root access 2. Able to use ADB

    5. In the ADB cmd console (probably same as your fastboot cmd console)
    Type in ADB devices to check if you have ADB connection to your phone .

    If yes, type the code below which would remove all the magisk module


    Code:
    adb wait-for-device shell magisk --remove-modules

    6. It will reboot on its own , I have tried the process two times but I am able to get my phone out of loop.


    I have spent a good afternoon figuring out, hopefully this could save anyone a headache
    1
    Btw I get magisk working, just entered in safe mode (vol - and vol+ before boot animation) and then used the command that removes all modules. This time after reboot, no bootloop and magisk working fine
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone