How To Guide Rooting the Google Pixel 6a

Search This thread
Rooting the Pixel 6a is just about as easy as any other factory unlocked pixel, but because so many people have had issues with unlocking their bootloaders, I figured I'd post my exact personal steps I took when a Pixel 6a came into my tech shop to be rooted, and I discovered the current bug with Rooting

What You'll Need:
- June 2022 Firmware OTA Update Installed at least: Do this on device. Do Not download the OTA update from google's firmware website.
- ADB/Fastboot/Google Drivers for Windows: I use this to install- ADB 15sec Installer
- Magisk Manager APK: Github - Magisk Github Releases
- Firmware Matching Currently Installed: Google FW page - Google Official Firmware Downloads - you need this for the boot.img file
- A Windows Computer
- A USB-C cable to connect to your phone to the computer

OEM Unlock Bug
With early units sold by Google, they're shipping with a bug where OEM Unlock stays grayed out. Here's the only way I got around this issue
1.) Log out of any Google Account on the device
2.) Connect to Wifi, check for updates without your sim card in the device. There is a bug where it will potentially download the update for your carrier sim
3.) At minimum, you should get the June 2022 security patch update. Run the update and remember which update it is for when you download the firmware to get boot.img
4.) When the update is finished, Factory Reset your device either from settings or Android recovery
5.) Go through Android setup without sim card in, and don't connect to wifi, finish setup without logging into a google account or anything
6.) When setup is done, connect to wifi and put your sim back in.
7.) Pay attention in your notifications for "Preparing your Device" notification.
8.) When that notification pops up, enable Developer options (tap build number a bunch of times)
9.) OEM Unlock should be possible to enable now. Also enable USB Debugging

Pre-Root Setup
1.) Install Magisk Manager from Github
2.) Use 7zip (or any other ZIP opening program) to extract the boot.img from your firmware download from google
-- the boot.img is inside another zip file that's in the download from google. very easy to get
3.) Put the Boot.img on your phones internal storage
4.) Open Magisk Manager, and select your Boot.img from internal storage. Patch the boot.img to make it a rooted boot.img
5.) With your phone connected to the computer, move the magisk_patched.img from sdcard/downloads to your computer
6.) If USB debugging is properly enabled, now you can open CMD and reboot to bootloader with
Code:
adb reboot bootloader

Unlocking the bootloader
1.) With the device connected, OEM Unlock enabled, and booted to bootloader, you can unlock the bootloader with the following command
Code:
fastboot flashing unlock
-- If nothing changes on your phone screen, use Device Manager to make sure the device is recognized via google drivers: vid here on that - Quick Fastboot Drivers Install Tutorial
2.) On your phone, use the volume keys to select Unlock Bootloader, then hit the power button, device should reboot back to bootloader
3.) flash the boot partition with the magisk patched boot.img
Code:
fastboot flash boot magisk_patched.img
4.) Now you can reboot back into your device and you should be rooted!
Code:
fastboot reboot

Congrats! Now you're bootloader unlocked and rooted! GrapheneOS is already available if you want a degoogled rom, haven't seen another rom pop up yet
all done from there

updating your device when rooted
I do not have a pixel 6a specifically for this right now to confirm this will work, but on every other device with OTA's, this has been my process.
1.) Download your OTA using the system update part of Settings
2.) When it pops up and is ready to restart to finish installing the update, DO NOT CLICK RESTART IN SETTINGS/SYSTEM UPDATE
3.) Go to Magisk Manager, and select Install next to Magisk
4.) Select "Install to Inactive Slot (After OTA)
5.) When its done patching the boot partition, hit restart in Magisk
Your OTA Update is now rooted
 
Last edited:

frank93

Senior Member
Oct 16, 2010
132
53
Berlin
Google Pixel 6a
these instructions sound like "the usual process", but for the 6a isn’t there something to patch regarding vbmeta as well?

(never had a phone that "needed" this, but in my understanding it "should" be necessary with the 6a? won’t have time to try out myself before the weekend, just asking ..)
 
To save time and effort here is the magisk patched boot.img for June 2022 patch level, Carrier Unlocked 6a from the Google Store. Make SURE you are on build SD2A.220601.003 before flashing! ;)
As this thread ages, not everyone will have the June 2022 update. That's why I suggested/put the steps in to do it themselves with matching firmware to what their device is on.

To get the `OEM Unlock` option in Developer Options to work, it's simpler to just manually flash 12.1.0 (SD2A.220601.004, Jun 2022, Verizon, Verizon MVNOs) and then wipe.

Even though it's label as Verizon, it should work for all carriers.
This DID NOT work for me. That's why I wrote this up the way I did.

Hello, if we have already unlocked the bootloader, we just have to do this: start cmd then fastboot flash boot magisk_patched.img then restart the phone?
If you're bootloader is already unlocked, you just have to flash the patched magisk boot img, correct. I wrote this up for those having issue with not having the ability even if it is an unlocked from google device

these instructions sound like "the usual process", but for the 6a isn’t there something to patch regarding vbmeta as well?

(never had a phone that "needed" this, but in my understanding it "should" be necessary with the 6a? won’t have time to try out myself before the weekend, just asking ..)

Correct, these are basically the usual steps. There's nothing regarding vbmeta flashing in this case of just rooting stock firmware. You only need to do that with ROMs (GSI's mainly)
 
  • Like
Reactions: frank93 and jejemc

binary**#

Senior Member
Mar 20, 2014
120
91
28
new delhi
www.droidwin.com
3.) flash the boot partition with the magisk patched boot.img
Code:
fastboot flash boot magisk_patched.img
Just a heads up. As already told by ctfrommn, it's always a better approach to first boot the magisk patched boot file. And if everything works well and good, you could then Direct Install it via Magisk.
Although directly flashing should also work, but its always better to be on the safer side.
 
  • Like
Reactions: ctfrommn

stormcrank

Member
Jul 28, 2022
16
12
Correct, these are basically the usual steps. There's nothing regarding vbmeta flashing in this case of just rooting stock firmware. You only need to do that with ROMs (GSI's mainly)

I followed your steps to a T. Still can't unlock. I'm convinced there is a fault with my device itself at this point.
 
Just a heads up. As already told by ctfrommn, it's always a better approach to first boot the magisk patched boot file. And if everything works well and good, you could then Direct Install it via Magisk.
Although directly flashing should also work, but its always better to be on the safer side.

I may not be very active on XDA, but have been rooting and rom'ing devices since the palm pre, first android phone was the droid x. I've never heard of this step, its never been needed. Its an extra pointless step that is just tethered root. You don't need to do it. As long as you don't download a random Boot.img, like the one for some reason attached to a reply on this thread and get it yourself from the firmware matching your device OR flashing Magisk via TWRP/Lineage Recovery with adb sideload, there's no reason to fastboot boot the boot.img.
 

ctfrommn

Senior Member
May 25, 2011
7,430
10,768
Minnesota
You may have never run into an issue flashing a boot image but I've built thousands of roms and kernels and have learned the hard way more than once to measure twice, cut once.

That said, as long as you're simply patching a stock boot.img it's likely not an issue.
 

Voxilli

Member
Aug 14, 2015
12
0
Nice work, Kaptinboxxi. Everything worked fine. How should we handle updates after rooting? Will a security patch break root? If so, what is the best process to root it again?
 

Lughnasadh

Senior Member
Mar 23, 2015
5,136
5,975
Google Nexus 5
Huawei Nexus 6P
You can also do the "Install to Inactive Slot" method in Magisk to update and keep root. This has been a bit of a hit and miss for some people on the Pixel 6 series, though. The misses may be in large part be due to people having modified their partitions or not restoring the necessary images while being on a custom kernel.

 
  • Like
Reactions: tirges and ctfrommn

Voxilli

Member
Aug 14, 2015
12
0
You can also do the "Install to Inactive Slot" method in Magisk to update and keep root. This has been a bit of a hit and miss for some people on the Pixel 6 series, though. The misses may be in large part be due to people having modified their partitions or not restoring the necessary images while being on a custom kernel.

That's what I've done with my OnePlus 7T for the last three years. Any repercussions for doing it this way versus patching the kernel?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    fastboot boot <nameofpatchedbootimage>

    This will give you temporary root after you boot up. If you decide you don't want to be rooted then just reboot and you will be unrooted.

    If after running the command and booting up you decide you want to stay rooted, then do "Direct Install" in the Magisk app and you will be "permanently" rooted.
    Many thanks for the reply. Slainte!
  • 13
    Rooting the Pixel 6a is just about as easy as any other factory unlocked pixel, but because so many people have had issues with unlocking their bootloaders, I figured I'd post my exact personal steps I took when a Pixel 6a came into my tech shop to be rooted, and I discovered the current bug with Rooting

    What You'll Need:
    - June 2022 Firmware OTA Update Installed at least: Do this on device. Do Not download the OTA update from google's firmware website.
    - ADB/Fastboot/Google Drivers for Windows: I use this to install- ADB 15sec Installer
    - Magisk Manager APK: Github - Magisk Github Releases
    - Firmware Matching Currently Installed: Google FW page - Google Official Firmware Downloads - you need this for the boot.img file
    - A Windows Computer
    - A USB-C cable to connect to your phone to the computer

    OEM Unlock Bug
    With early units sold by Google, they're shipping with a bug where OEM Unlock stays grayed out. Here's the only way I got around this issue
    1.) Log out of any Google Account on the device
    2.) Connect to Wifi, check for updates without your sim card in the device. There is a bug where it will potentially download the update for your carrier sim
    3.) At minimum, you should get the June 2022 security patch update. Run the update and remember which update it is for when you download the firmware to get boot.img
    4.) When the update is finished, Factory Reset your device either from settings or Android recovery
    5.) Go through Android setup without sim card in, and don't connect to wifi, finish setup without logging into a google account or anything
    6.) When setup is done, connect to wifi and put your sim back in.
    7.) Pay attention in your notifications for "Preparing your Device" notification.
    8.) When that notification pops up, enable Developer options (tap build number a bunch of times)
    9.) OEM Unlock should be possible to enable now. Also enable USB Debugging

    Pre-Root Setup
    1.) Install Magisk Manager from Github
    2.) Use 7zip (or any other ZIP opening program) to extract the boot.img from your firmware download from google
    -- the boot.img is inside another zip file that's in the download from google. very easy to get
    3.) Put the Boot.img on your phones internal storage
    4.) Open Magisk Manager, and select your Boot.img from internal storage. Patch the boot.img to make it a rooted boot.img
    5.) With your phone connected to the computer, move the magisk_patched.img from sdcard/downloads to your computer
    6.) If USB debugging is properly enabled, now you can open CMD and reboot to bootloader with
    Code:
    adb reboot bootloader

    Unlocking the bootloader
    1.) With the device connected, OEM Unlock enabled, and booted to bootloader, you can unlock the bootloader with the following command
    Code:
    fastboot flashing unlock
    -- If nothing changes on your phone screen, use Device Manager to make sure the device is recognized via google drivers: vid here on that - Quick Fastboot Drivers Install Tutorial
    2.) On your phone, use the volume keys to select Unlock Bootloader, then hit the power button, device should reboot back to bootloader
    3.) flash the boot partition with the magisk patched boot.img
    Code:
    fastboot flash boot magisk_patched.img
    4.) Now you can reboot back into your device and you should be rooted!
    Code:
    fastboot reboot

    Congrats! Now you're bootloader unlocked and rooted! GrapheneOS is already available if you want a degoogled rom, haven't seen another rom pop up yet
    all done from there

    updating your device when rooted
    I do not have a pixel 6a specifically for this right now to confirm this will work, but on every other device with OTA's, this has been my process.
    1.) Download your OTA using the system update part of Settings
    2.) When it pops up and is ready to restart to finish installing the update, DO NOT CLICK RESTART IN SETTINGS/SYSTEM UPDATE
    3.) Go to Magisk Manager, and select Install next to Magisk
    4.) Select "Install to Inactive Slot (After OTA)
    5.) When its done patching the boot partition, hit restart in Magisk
    Your OTA Update is now rooted
    5
    Im starting work on my custom kernel now so hopefully MVK for Bluejay will be ready in the coming days/weeks.
    4
    To save time and effort here is the magisk patched boot.img for June 2022 patch level, Carrier Unlocked 6a from the Google Store. Make SURE you are on build SD2A.220601.003 before flashing! ;)
    3
    Guys!! English!!! Please!!! :)
    You won't like this answer, but if you don't know what you're doing, you shouldn't be doing this.
    I'm done for tonight :)

    Somehow I got to the point where the security update got installed!!! I followed the ota with magisk guide and did not restart after it, went into the magisk, installed onto the secondary partition (or whatever it's called), rebooted.. and the phone completely froze.. I thought "that's it, this pixel has had a nice long 1wk long life :D".
    Held the power button for over 30 seconds, booted up, went to magisk, patched the boot.img file, flashed it, and nothing - still no security update installed.

    I want to offload the process of updating the phone to my wife, but I kinda like permanent root for acc control, etc
    I think you misunderstand me.

    When you flash the boot image with fastboot flash boot <boot image>, you're actually writing that binary to the /boot partition. If you do this with a patched image, Magisk does not have a backup.
    When you boot the boot image, with fastboot boot <boot image>, you're sending the binary to the device to load instead of what's written to /boot. If you boot a patched image, then perform Direct Install in Magisk, Magisk then creates a backup of the original image in /boot so as to be able to restore it later.

    Just reflash the stock June bootimage, take the new update and reflash the patched boot. The kernel didnt change between these 2 releases so the patched boot works on either.
    I would not recommend doing this. While the kernel may be the same, the boot image contains other components that are updated with almost every release, such as the Android security engine. It's OK to temporarily boot an older image, but I recommend always flashing the boot image that corresponds to the update.

    how reflash stock boot image if i dont have a backup? I need to flash it in bootloader mode?
    Download the factory update package (not the OTA) and extract boot.img from within it, then flash in bootloader: fastboot flash boot <boot image>
    Let me explain worse 😂: I download the boot.img directly from google, but then if I flash it in bootloader mode, I don't lose all the magisk modules on reboot? Don't risk the bootloop?
    Magisk operates via a kernel patch to grant root access. If you flash an unpatched boot image, you lose root, meaning Magisk is unable to load any modules. The only time this would cause a boot loop is if you updated via OTA, then flashed an older boot image; the system would see the mismatch and assume the update failed.
    2
    To save time and effort here is the magisk patched boot.img for June 2022 patch level, Carrier Unlocked 6a from the Google Store. Make SURE you are on build SD2A.220601.003 before flashing! ;)
    As this thread ages, not everyone will have the June 2022 update. That's why I suggested/put the steps in to do it themselves with matching firmware to what their device is on.

    To get the `OEM Unlock` option in Developer Options to work, it's simpler to just manually flash 12.1.0 (SD2A.220601.004, Jun 2022, Verizon, Verizon MVNOs) and then wipe.

    Even though it's label as Verizon, it should work for all carriers.
    This DID NOT work for me. That's why I wrote this up the way I did.

    Hello, if we have already unlocked the bootloader, we just have to do this: start cmd then fastboot flash boot magisk_patched.img then restart the phone?
    If you're bootloader is already unlocked, you just have to flash the patched magisk boot img, correct. I wrote this up for those having issue with not having the ability even if it is an unlocked from google device

    these instructions sound like "the usual process", but for the 6a isn’t there something to patch regarding vbmeta as well?

    (never had a phone that "needed" this, but in my understanding it "should" be necessary with the 6a? won’t have time to try out myself before the weekend, just asking ..)

    Correct, these are basically the usual steps. There's nothing regarding vbmeta flashing in this case of just rooting stock firmware. You only need to do that with ROMs (GSI's mainly)