Bootloop on Magisk with Android 11

Noorquacker

Member
May 28, 2017
5
3
0
I made a mistake when upgrading to Android 11 - not giving a single thought to how Magisk would play out.
I had modules like YouTube Vanced and EdXposed installed before upgrading, and now when I try getting a stock boot.img, throwing it in Magisk Canary, and flashing with fastboot, I'm stuck on the G logo with the infinite loading bar.
I'm guessing EdXposed or some other Magisk module is messing me up. If it helps, I screwed with UART and got a log of my phone booting up. Guess I'm doxxing my serial number by giving this out, but here: https://pastebin.com/syEG69T1
Heck, I even tried getting a console from UART, hoping I can just delete /data/adb/modules or something.
I don't want to lose userdata in order to get Magisk. I'd rather wait for the next TWRP release, if it ever comes back. My phone's fine right now with factory images manually flashed without wiping userdata, so this isn't too urgent
 

TonikJDK

Senior Member
Dec 9, 2012
2,607
1,288
183
While on a stock boot image can't you go into Magisk Manager and remove the modules? Then reroot and put them back in on at a time?
 

Noorquacker

Member
May 28, 2017
5
3
0
While on a stock boot image can't you go into Magisk Manager and remove the modules? Then reroot and put them back in on at a time?
Unfortunately, Magisk Manager is basically useless when Magisk isn't installed, especially since modules are, or at least I'm pretty sure, stored in /data/adb/modules, so I can't get at them without root
 

TonikJDK

Senior Member
Dec 9, 2012
2,607
1,288
183
Unfortunately, Magisk Manager is basically useless when Magisk isn't installed, especially since modules are, or at least I'm pretty sure, stored in /data/adb/modules, so I can't get at them without root
Ok, take a shot with the below. It's all about luck and timing.

connect your phone to your computer (while bootlooping or stuck on loading)
open a command window where you have the platform tools
run the command: adb wait-for-device shell magisk --remove-modules
hold your power button until the phone restarts,
run the command again while the phone powers up
it will restart itself and if you're lucky it will boot properly this time
 

Incanity

Senior Member
Apr 17, 2008
216
67
28
IJmuiden
Hi! After quite a search, i figured out how to fix this. in short:

1. Flash the boot.img from the official image zip to your device and boot up.
2. Hold the power button until the menu comes up
3. Hold the power off button until you get the safe mode message
4. when rebooting into safe mode, hold down the volume down button to get into fastboot.
5. flash your magisk_patched.img
6. the phone will now boot into safe mode with magisk
7. magisk will automatically disable all modules
8. reboot the phone again to disable safe mode
9. after booting, confirm that magisk works
10. remove all disabled magisk modules with the following adb command:
Code:
adb wait-for-device shell magisk --remove-modules
11. the phone will reboot again. Magisk should still work and all modules are deleted.
 

Noorquacker

Member
May 28, 2017
5
3
0
Ok, take a shot with the below. It's all about luck and timing.

connect your phone to your computer (while bootlooping or stuck on loading)
open a command window where you have the platform tools
run the command: adb wait-for-device shell magisk --remove-modules
hold your power button until the phone restarts,
run the command again while the phone powers up
it will restart itself and if you're lucky it will boot properly this time
This didn't quite work. However, it did make my phone forcefully reboot when it was bootlooping, so the command did kinda run

Hi! After quite a search, i figured out how to fix this. in short:

1. Flash the boot.img from the official image zip to your device and boot up.
2. Hold the power button until the menu comes up
3. Hold the power off button until you get the safe mode message
4. when rebooting into safe mode, hold down the volume down button to get into fastboot.
5. flash your magisk_patched.img
6. the phone will now boot into safe mode with magisk
7. magisk will automatically disable all modules
8. reboot the phone again to disable safe mode
9. after booting, confirm that magisk works
10. remove all disabled magisk modules with the following adb command:
Code:
adb wait-for-device shell magisk --remove-modules
11. the phone will reboot again. Magisk should still work and all modules are deleted.
This worked! I'm back in business, thank you for this solution.
 
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