UPDATE 1: Added ‘new’ steps to Root Google Pixel 6/Pro running Android 13 [due to Anti Rollback Mechanism, we will now be flashing the patched boot to both the slots].
In this guide, we will show you the steps to root your Google Pixel 6/Pro device via the Magisk patched boot.img. When it comes to software optimization, there’s no denying the fact that the offerings from Pixel are right there at the top. The cleanest stock OS experience coupled with a guaranteed three years of software upgrade and having the best camera quality, there’s no hidden secret as to why these devices are so popular.
Along the same lines, Pixel devices have always been known to be the most active players in custom development. And the shades of this is already visible in the newest release as well. You could now gain administrative rights over your Pixel 6 device by rooting it via the Magisk patched boot.img file. And this guide will show you how to do just that. Follow along for the detailed instructions.
Benefits and Risks of Rooting Pixel 6/Pro
Once you root your device, you will be in a position to flash a plethora of mods. These include the likes of Magisk Modules, Substratum Themes, Xposed Framework via LSPosed, Viper4Android among others. Along the same lines, you could also flash a custom kernel and implement your desired CPU profile. However, such tweaks do comes in with a few risks as well.
To begin with, rooting requires you to unlock the bootloader- which will wipe of all the data and could nullify the warranty as well. Likewise, SafetyNet will be triggered which will result in your inability to use banking apps (though you could still pass SafetyNet in Rooted Android 12). So if all that’s well and good, then let’s get started with the steps to root your Google Pixel 6/Pro device via the Magisk patched boot.img file.
How to Root Google Pixel 6/Pro via Magisk Patched Boot.img [Video]
The below instructions are listed under separate sections for ease of understanding. Make sure to follow in the exact same sequence as mentioned. Droidwin and its members wouldn’t be held responsible in case of a thermonuclear war, your alarm doesn’t wake you up, or if anything happens to your device and data by performing the below steps.
If you are on Android 13, then please go through this section first.
STEP 1: Install Android SDK
First and foremost, you will have to install the Android SDK Platform Tools on your PC. This is the official ADB and Fastboot binary provided by Google and is the only recommended one. So download it and then extract it to any convenient location on your PC. Doing so will give you the platform-tools folder, which will be used throughout this guide.
STEP 2: Enable USB Debugging and OEM Unlocking
Next up, you will also have to enable USB Debugging and OEM Unlocking on your device. The former will make your device recognizable by the PC in ADB mode. This will then allow you to boot your device to Fastboot Mode. On the other hand, OEM Unlocking is required to carry out the bootloader unlocking process.
So head over to Settings > About Phone > Tap on Build Number 7 times > Go back to Settings > System > Advanced > Developer Options > Enable USB Debugging and OEM Unlocking.
STEP 3: Unlock Bootloader on Pixel 6/Pro
Next up, you will also have to unlock the device’s bootloader. Do keep in mind that doing so will wipe off all the data from your device and could nullify its warranty as well. So if that’s all well and good, then please refer to our detailed guide on How to Unlock Bootloader on Google Pixel 6/6 Pro.
STEP 4: Get Pixel 6/Pro Stock Boot.img
- Next up, get hold of the stock firmware for your Pixel device from the official site: Pixel 6 | Pixel 6 Pro
- Make sure to download the same version that is currently installed on your device. To check the same, head over to Settings > About Phone > Build Number.
- Once downloaded, extract it to any convenient location on your PC.
- Then go to the Images folder and you should get the stock boot.img file. Copy it and then transfer it to your device.
STEP 5: Patch Boot.img via Magisk
- Download and install the Magisk Canary App version 23016 onto your device. (this build includes fixes for vbmeta/verity, so you would no longer need manually to bypass vbmeta/verity check. See STEP 7 for more).
- Then launch it and tap on the Install button next to Magisk.
- After that, choose ‘Select and Patch a File’, navigate to the stock boot.img file, and select it.
- Then tap on the Let’s Go button situated at the top right.
- The boot.img file will now be patched and placed under the Downloads folder on your device. You should transfer this file to the platform-tools folder on your PC. We will now be using this file to root your Pixel 6 device.
STEP 6: Boot to Fastboot Mode
- Now connect your device to the PC via USB cable. Make sure USB Debugging is enabled.
- Then head over to the platform-tools folder, type in CMD in the address bar, and hit Enter. This will launch the Command Prompt.
- Type in the following command in the CMD window to boot your device to Fastboot Mode
adb reboot bootloader
- To verify the Fastboot connection, type in the below command and you should get back the device ID.
- Now if you are on Android 13, then skip STEP 7 and 8 and jump over to this section. On the other hand, Android 12 users could refer to the below steps 7 and 8 to root their Pixel 6/Pro.
STEP 7: Boot Pixel 6/Pro using Magisk patched Boot.img
As of now, you cannot directly flash the boot.img file to root your Pixel 6/Pro. If you end up doing so, then you will get the “Can’t load Android system. Your data may be corrupted” error message. To avoid this from happening, you will first have to boot your device via the Magisk patched boot.img and then permanently root your Pixel 6 using the Direct Install method.
fastboot boot magisk_patched.img
STEP 8: Permanent Root Pixel 6/Pro via Direct Install
After executing the above command, your device will be booted to the OS with a temporary root. Here’s how to make it permanent:
- To begin with, launch the Magisk Manager App.
- Then tap on Install > Direct Install and tap Let’s Go situated at the top-right.
- Once done, hit the Reboot button situated at the bottom right.
- That’s it, your device will now boot to the rooted OS.
So with this, we round off the guide on how you could root your Pixel 6/Pro device via Magisk patched boot.img. If you have any queries concerning the aforementioned steps, do let us know in the comments section below. We will get back to you with a solution at the earliest.
How to Root Google Pixel 6/Pro on Android 13
Beginning with Android 13, Google has introduced the Anti Rollback Protection for the Pixel 6 series. Earlier, if anything went wrong on one slot, then your device would use the second slot to boot to the OS. However, since your second slot would still be having Android 12, it would end up triggering the Anti Rollback mechanism and your device might end up in a bricked state. To prevent that from happening, you should first install the Android 13 firmware to both the slots, using the instructions given here- Install Android 13 in Both Slots on Pixel 6A/6/Pro to Prevent Brick. Once that is done, you may then refer to the below steps to root your Pixel 6/Pro running Android 13.
- To begin with, carry out the STEPS 1 to 6 as listed above.
- Then execute the below command to flash the Magisk patched boot file to Slot A
fastboot flash boot_a magisk_patched.img
- Next up, use the below command to flash the Magisk patched boot file to Slot B
fastboot flash boot_b magisk_patched.img
- Finally, use the following command to boot your device to the rooted OS:
FAQ 1: Losing Root After a Reboot? Try this!
Some users have reported that the root isn’t able to survive a reboot. Right after they perform a Direct Install, the root disappears. If you are also in the same boat, then there’s a workaround that you could try, however, it involves a complete device wipe. So take a backup beforehand and then refer to the below steps:
- Right after you have disabled the DM-Verity verification using the command given in STEP 7, execute the below command to wipe your device
- Once that is done, boot your device via the patched boot.img and then use Magisk’s Direct Install method, as explained in STEP 8 and 9.
FAQ 2: What About Disabling AVB and DM Verity
UPDATE 1 (16th December 2021): The latest Magisk Canary version 23016 has added the fixes for vbmeta header patching. As a result, you would no longer need to disable verity/verification. Just use the latest Magisk version and then directly skip to STEP 8. till, for the sake of knowledge, I’m listing out the steps on how you could disable the DMVerity and AVB on your Pixel 6/Pro:
- Head over to the folder where you have extracted the firmware file.
- Then copy the vbmeta.img file from there and transfer it to the platform-tools folder.
- Now open the CMD window inside this platform-tools folder and execute the below command to flash the vmbeta file:
fastboot flash --disable-verity --disable-verification vbmeta vbmeta.img
- As soon as you execute the above command, AVB and DM Verity would be disabled.
- You may now proceed ahead with Step 7 of this guide to root your Pixel 6/Pro via Magisk patched boot.img.
- How to Update Rooted Android 11 Pixel to Android 12
- Downgrade Pixel From Android 12 to Android 11 using Android Flash Tool
- How to Fix Slot Unbootable Load Error on Pixel Devices
- How to Flash Firmware on Pixel via Android Flash Tool