Trying to root the Pixel 5 running Android 12 by flashing a magisk-patched boot image results in the phone only booting to fastboot mode ("failed to load/verify boot images")
Some users have reported that booting (instead of flashing) the patched boot image works and makes root temporarily available but i didn't have any success with that.
The phone booted up but root didn't work.
I won't explain how to unlock the bootloader or set up adb here.
!Warning! This will wipe your phone so take a backup!
Also i do not take any responsibility if you break your device.
And if anything goes wrong just factory reset your device using the Android Flash Tool or by following this tutorial.
Here's what i did to get Magisk v22.0 working on the first developer preview of Android 12:
Install A12 with disabled AVB & dm-verity:
Patch & flash boot.img
Now root should be working. If it bootloops and says your phone has to be factory reset, do it.
If for some reason you still get an AVB-Error and end up stuck in fastboot mode just flash the stock image and try to patch it again.
This is my first post on here and i didn't have much time but i'm glad if it helped at least one person.
Some users have reported that booting (instead of flashing) the patched boot image works and makes root temporarily available but i didn't have any success with that.
The phone booted up but root didn't work.
I won't explain how to unlock the bootloader or set up adb here.
!Warning! This will wipe your phone so take a backup!
Also i do not take any responsibility if you break your device.
And if anything goes wrong just factory reset your device using the Android Flash Tool or by following this tutorial.
Here's what i did to get Magisk v22.0 working on the first developer preview of Android 12:
Install A12 with disabled AVB & dm-verity:
- Make sure USB-Debugging is enabled in developer-options and you have authorized the pc you're using on your phone.
- Boot your phone into fastboot mode.
You can do this by turning it off and then starting it by holding Power + Volume Down
until fastboot mode appears or just adb reboot bootloader
- Go here and click on the link for the Android Flash Tool.
(I didn't copy the link directly so i don't have to update it everytime google releases a new update)
- It should ask you to allow the website to access ADB Keys. Click Ok.
If the website somehow doesn't work, try using Google Chrome.
- Select your Pixel 5. If it's not showing up click add device.
- Click on the edit symbol (pen) in the box where the selected build is shown.
- Make sure Wipe Device, Disable Verity and Disable Verification are checked.
- Install and boot the phone when it's finished.
Patch & flash boot.img
- Download and install the Magisk Canary App from GitHub.
- Download the factory image from here and extract boot.img from it.
(Inside the downloaded zip-file is another zip file containing the boot image)
- Copy the extracted boot.img to your phone and open the magisk app.
- Click on Install -> Select and Patch a File and let it do its magic.
- Copy the magisk-patched boot image that should be found in your phones download folder back to your PC.
- Reboot into fastboot mode as i explained earlier and flash the patched boot image.
(fastboot flash boot magisk_patched.img)
Then reboot the device.
Now root should be working. If it bootloops and says your phone has to be factory reset, do it.
If for some reason you still get an AVB-Error and end up stuck in fastboot mode just flash the stock image and try to patch it again.
This is my first post on here and i didn't have much time but i'm glad if it helped at least one person.