[Guide]How to Root Your Pixel 3a and Install Magisk - Android 9, 10 or 11

AndDiSa

Senior Member
Dec 2, 2009
3,467
4,533
268
Heidelberg
@Uzephi well, without having Magisk installed it's very unlikely that a bad module is preventing the flashing / booting. But you are right that this might have led to this situation: as soon as there is a boot image with Magisk starting it will try to initialize the bad module -> boot will fail -> boot slot will be marked as "failed"
On reboot the other slot will be used and if there is also a Magisk patched boot image the same procedure will happen ... and finally both slots are no longer bootable.
 

Uzephi

Recognized Contributor
Apr 20, 2012
3,433
1,884
258
Phoenix
@Uzephi well, without having Magisk installed it's very unlikely that a bad module is preventing the flashing / booting. But you are right that this might have led to this situation: as soon as there is a boot image with Magisk starting it will try to initialize the bad module -> boot will fail -> boot slot will be marked as "failed"
On reboot the other slot will be used and if there is also a Magisk patched boot image the same procedure will happen ... and finally both slots are no longer bootable.
They could be in the predicament I am in. I have flashed full factory images since Android 10, so my slot B is still Android 9.
 
  • Like
Reactions: AndDiSa

daddylonglegs

Senior Member
Oct 23, 2009
486
101
63
Vermont
It could be a bad module also. I would suggest using the below command when booting with Magisk and reinstall your modules one by one.

adb wait-for-device shell magisk --remove-modules
I appreciate the reply but I can't boot with Magisk at all.

After flashing the OTA, do you let the system boot at least once without installing Magisk? I would suggest you to at least do one reboot before you try to flash a new boot.img. The bootloader holds flags which slot was used the last time when booting and in addition whether booting was successful or not. If both boot slots are marked as "unbootable" I suppose you will get this error message ...
Yes I let it boot fully. Every single time I flash the patched Magisk boot image I get NO VALID SLOT TO BOOT error :(
 

daddylonglegs

Senior Member
Oct 23, 2009
486
101
63
Vermont
If you get the Google G, that adb command will work. It is a failsafe in Magisk in case you have a module causing a no boot scenario.
I appreciate it but every time I type that ADB command it looks like it's doing something and nothing happens. I let my phone sit there for an hour and the command prompt window just stays at "adb wait-for-device shell magisk --remove-module"

At this point I am not sure how it can be a module anyway. Why would a bad module refuse to let my phone boot with a NO VALID SLOT TO BOOT error?
 

Uzephi

Recognized Contributor
Apr 20, 2012
3,433
1,884
258
Phoenix
I appreciate it but every time I type that ADB command it looks like it's doing something and nothing happens. I let my phone sit there for an hour and the command prompt window just stays at "adb wait-for-device shell magisk --remove-module"

At this point I am not sure how it can be a module anyway. Why would a bad module refuse to let my phone boot with a NO VALID SLOT TO BOOT error?
Is your phone trying to boot? Does it go to the Google G? The adb command will wait for the phone to allow usb debugging (which happens during boot phase. Magisk is designed to not load modules until usb debugging is enabled for this specific command). If you never set that PC to "always allow" before, the command won't work. What you could do is boot without Magisk and run "adb reboot bootloader" command, tick the "always allow" check box. Once in bootloader, just boot the Magisk boot image and run that remove module command again.

If you are getting a no valid slot to boot error, that could be a magisk module as it will still try to load the module on either slot since the module resides in /data. I had this issue with AccA on an update before.
 
  • Like
Reactions: daddylonglegs

daddylonglegs

Senior Member
Oct 23, 2009
486
101
63
Vermont
Is your phone trying to boot? Does it go to the Google G? The adb command will wait for the phone to allow usb debugging (which happens during boot phase. Magisk is designed to not load modules until usb debugging is enabled for this specific command). If you never set that PC to "always allow" before, the command won't work. What you could do is boot without Magisk and run "adb reboot bootloader" command, tick the "always allow" check box. Once in bootloader, just boot the Magisk boot image and run that remove module command again.

If you are getting a no valid slot to boot error, that could be a magisk module as it will still try to load the module on either slot since the module resides in /data. I had this issue with AccA on an update before.
Thanks so much for the reply.

My phone does not even make it to the google G.

USB Debugging is always enabled.

I can't boot the magisk boot image. If I try to flash it, I get NO VALID SLOT TO BOOT
If I try to boot it instead of flash it I get stuck on the Google G and nothing happens.

Any ideas? :(
 

daddylonglegs

Senior Member
Oct 23, 2009
486
101
63
Vermont
Alright so huge update; everything now works! How did I do it?

I switched from using Command Prompt to PowerShell. I don't even know what made me figure out to give that a try, but it worked!

Mystery solved for anyone else that ever has this problem!
 
  • Like
Reactions: Uzephi

Uzephi

Recognized Contributor
Apr 20, 2012
3,433
1,884
258
Phoenix
Alright so huge update; everything now works! How did I do it?

I switched from using Command Prompt to PowerShell. I don't even know what made me figure out to give that a try, but it worked!

Mystery solved for anyone else that ever has this problem!
Gotta love windows. Cmd works for me running that command, which is why most of us would recommend a bootable linux usb drive for adb and fastboot because in Linux, it just works. 😉

Glad you're up and running, though and disabling modules fixed the issue.
 

sic0048

Senior Member
Jun 25, 2010
911
466
83

Can someone explain me if this new release of TWRP can be installed on Android 11 and how? There is no changelog or instructions.......
TWRP is dead. The quicker you accept that, the quicker you can move on with your life.

The TWRP team hasn't even successfully gotten it working on all Android 10 devices - just a select few.

(Please don't take this as a knock against the TWRP team. They did miracles for years, but their luck ran out with the changes Google made with Android 10 and 11. I totally respect that team and I wish them well).