If you are looking for my guide on a different Pixel, find it here:
Discussion thread for migration to 24.0+.
Note: Magisk prior to Canary 23016 does not incorporate the necessary fixes for Android 12+.
WARNING: YOU AND YOU ALONE ARE RESPONSIBLE FOR ANYTHING THAT HAPPENS TO YOUR DEVICE. THIS GUIDE IS WRITTEN WITH THE EXPRESS ASSUMPTION THAT YOU ARE FAMILIAR WITH ADB, MAGISK, ANDROID, AND ROOT. IT IS YOUR RESPONSIBILITY TO ENSURE YOU KNOW WHAT YOU ARE DOING.
Prerequisites:
Android Source - Setting up a device for development
Points of note:
Credits:
Thanks to @badabing2003 , @pndwal , @Displax , @Az Biker , @ipdev , @kdrag0n , @Didgeridoohan , and last but not least, @topjohnwu for all their hard work!
- Pixel 3
- Pixel 3XL
- Pixel 3a
- Pixel 3aXL
- Pixel 4
- Pixel 4a
- Pixel 4a (5G)
- Pixel 5
- Pixel 5a
- Pixel 6
- Pixel 6 Pro
Discussion thread for migration to 24.0+.
Note: Magisk prior to Canary 23016 does not incorporate the necessary fixes for Android 12+.
WARNING: YOU AND YOU ALONE ARE RESPONSIBLE FOR ANYTHING THAT HAPPENS TO YOUR DEVICE. THIS GUIDE IS WRITTEN WITH THE EXPRESS ASSUMPTION THAT YOU ARE FAMILIAR WITH ADB, MAGISK, ANDROID, AND ROOT. IT IS YOUR RESPONSIBILITY TO ENSURE YOU KNOW WHAT YOU ARE DOING.
Prerequisites:
- Latest SDK Platform Tools - if Platform Tools is out of date, you WILL run into problems!
- USB Debugging enabled
- Google USB Driver installed
- I recommend using Command Prompt for these instructions; some users have difficulty with PowerShell.
Make sure the Command Prompt is running from your Platform Tools directory!
Android Source - Setting up a device for development
- Follow these instructions to enable Developer Options and USB Debugging.
- Enable OEM Unlocking. If this option is grayed out, unlocking the bootloader is not possible.
- Connect your device to your PC, and open a command window in your Platform Tools folder.
- Ensure ADB sees your device:
Code:
adb devices
If you see "unauthorized", you need to authorize the connection on your device.
If you see the device without "unauthorized", you're good to go. - Reboot to bootloader:
Code:
adb reboot bootloader
- Unlock bootloader: THIS WILL WIPE YOUR DEVICE!
Code:
fastboot flashing unlock
- Install Magisk on your device.
- Download the factory zip for your build.
- Inside the factory zip is the update zip: "device-image-buildnumber.zip". Open this, and extract boot.img
- Copy boot.img to your device.
- Patch boot.img with Magisk: "Install" > "Select and Patch a File"
- Copy the patched image back to your PC. It will be named "magisk_patched-23xxx_xxxxx.img". Rename this to "master root.img" and retain it for future updates.
- Reboot your device to bootloader.
- Flash the patched image:
Code:
fastboot flash boot <drag and drop master root.img here>
- Reboot to Android. Open Magisk to confirm root - under Magisk at the top, you should see "Installed: <Magisk build number>
- Before you download the OTA, open Magisk, tap Uninstall, then Restore Images. If you have any Magisk modules that modify system, uninstall them now.
- Take the OTA update when prompted. To check for updates manually, go to Settings > System > System Update > Check for Update
- Allow the update to download and install. DO NOT REBOOT WHEN PROMPTED. Open Magisk, tap Install at the top, then Install to inactive slot. Magisk will then reboot your device.
- You should now be updated with root.
- Download the OTA.
- Reboot to recovery and sideload the OTA:
Code:
adb reboot sideload
Code:adb sideload ota.zip
- When the OTA completes, you will be in recovery mode. Select "Reboot to system now".
- Allow system to boot and wait for the update to complete. You must let the system do this before proceeding.
- Reboot to bootloader.
- Boot the master root image (See note 1):
Code:
fastboot boot <drag and drop master root.img here>
- Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
- Reboot your device. You should now be updated with root.
Please note that the factory update process expects an updated bootloader and radio. If these are not up to date, the update will fail.
The scripted commands should look like this:
Once this completes, you can reboot to bootloader and either boot your master patched image, or if you patched the new image, flash it at this time.
- Download the factory zip and extract the contents.
- Reboot to bootloader.
-
Compare bootloader versions between phone screen and bootloader.img build numberCode:
fastboot flash bootloader <drag and drop new bootloader.img here>
-
Compare baseband versions between phone screen and radio.img build numberCode:
fastboot flash radio <drag and drop radio.img here>
- Apply update:
Code:fastboot update --skip-reboot image-codename-buildnumber.zip
- Boot the master root image (See note 1):
Code:
fastboot boot <drag and drop master root.img here>
- Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
- Reboot your device. You should now be updated with root.
flash-all
script included in the factory zip. You will have to copy the script, bootloader image, radio image, and update zip into the Platform Tools folder; you will then have to edit the script to remove the -w
option so it doesn't wipe your device.The scripted commands should look like this:
Code:
fastboot flash bootloader <bootloader image name>
fastboot reboot bootloader
ping -n 5 127.0.0.1 > nul
fastboot flash radio <radio image name>
fastboot reboot bootloader
ping -n 5 127.0.0.1 > nul
fastboot update --skip-reboot <image-device-buildnumber.zip>
PixelFlasher by @badabing2003 is an excellent tool that streamlines the update process - it even patches the boot image for you.
The application essentially automates the ADB interface to make updating and rooting much easier. However, it is STRONGLY recommended that you still learn the "basics" of using ADB.
For instructions, downloads, and support, please refer to the PixelFlasher thread.
The application essentially automates the ADB interface to make updating and rooting much easier. However, it is STRONGLY recommended that you still learn the "basics" of using ADB.
For instructions, downloads, and support, please refer to the PixelFlasher thread.
- Follow the instructions on the Android Flash Tool to update your device. Make sure Lock Bootloader and Wipe Device are UNCHECKED.
- When the update completes, the device will be in fastbootd. Reboot to bootloader.
- Boot the master root image (See note 1):
Code:
fastboot boot <drag and drop master root.img here>
- Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
- Reboot your device. You should now be updated with root.
SafetyNet has been deprecated for the new Play Integrity API. More information here.
In a nutshell, Play Integrity uses the same mechanisms as SafetyNet for the BASIC and DEVICE verdicts, but uses the Trusted Execution Environment to validate those verdicts. TEE does not function on an unlocked bootloader, so legacy SafetyNet solutions will fail.
However, @Displax has modified the original Universal SafetyNet Fix by kdrag0n; his mod is able to force basic attestation instead of hardware, meaning that the device will pass BASIC and DEVICE integrity.
Mod available here. Do not use MagiskHide Props Config with this mod.
This is my configuration that is passing Safety Net. I will not provide instructions on how to accomplish this. Attempt at your own risk.
Zygisk + DenyList enabled
All subcomponents of these apps hidden under DenyList:
To check Play Integrity status:
In a nutshell, Play Integrity uses the same mechanisms as SafetyNet for the BASIC and DEVICE verdicts, but uses the Trusted Execution Environment to validate those verdicts. TEE does not function on an unlocked bootloader, so legacy SafetyNet solutions will fail.
However, @Displax has modified the original Universal SafetyNet Fix by kdrag0n; his mod is able to force basic attestation instead of hardware, meaning that the device will pass BASIC and DEVICE integrity.
Mod available here. Do not use MagiskHide Props Config with this mod.
This is my configuration that is passing Safety Net. I will not provide instructions on how to accomplish this. Attempt at your own risk.
Zygisk + DenyList enabled
All subcomponents of these apps hidden under DenyList:
- Google Play Store
- GPay
- Any banking/financial apps
- Any DRM media apps
- Universal SafetyNet Fix 2.3.1 Mod - XDA post
To check Play Integrity status:
- Play Integrity Checker - NOTE:
MEETS_STRONG_INTEGRITY
will ALWAYS fail on an unlocked bootloader.
Points of note:
- The boot image is NOT the bootloader image. Do not confuse the two - YOU are expected to know the difference. Flashing the wrong image to bootloader could brick your device.
- While the Magisk app is used for patching the boot image, the app and the patch are separate. This is what you should see in Magisk for functioning root:
- "Installed" shows the version of patch in the boot image. If this says N/A, you do not have root access - the boot image is not patched, or you have a problem with Magisk.
- "App" simply shows the version of the app itself.
- If you do not have a patched master boot image, you will need to download the factory zip if you haven't already, extract the system update inside it, then patch boot.img.
- If you prefer updating with the factory image, you can also extract and manually patch the boot image if desired.
- Some Magisk modules, especially those that modify read only partitions like /system, may cause a boot loop after updating. As a general rule, disable these modules before updating. You are responsible for knowing what you have installed, and what modules to disable.
Credits:
Thanks to @badabing2003 , @pndwal , @Displax , @Az Biker , @ipdev , @kdrag0n , @Didgeridoohan , and last but not least, @topjohnwu for all their hard work!
Last edited: