How to unlock the bootloader and root the Google Pixel 4a
It’s been a few weeks since Google unveiled the long-anticipated Google Pixel 4a and the company has already released a beta build of Android 11 for the smartphone. The factory images and the kernel sources for the Pixel 4a have been published as well, which are just the right ingredients required by the modding enthusiasts to start playing with the device. If you specifically bought this phone for tinkering, then you would be glad to know that XDA Recognized Developer Zackptg5 has managed to achieve root on the Google Pixel 4a. The developer has also put together a nice elaborate guide that utilizes XDA Senior Recognized Developer topjohnwu’s Magisk to root the device after unlocking the bootloader.
Before we get into how to root the Pixel 4a, remember to take an off-device backup. That’s because the rooting process requires wiping all the data on your phone, including the files on the internal storage. Your banking apps as well as popular games like Pokémon Go will also likely to stop working after rooting due to SafetyNet attestation failure, but we do have a temporary workaround for this issue.
How to root the Google Pixel 4a
Step 1 – Unlock the bootloader
It is important to note the steps described below are intended for the carrier unlocked variant of the Pixel 4a. Most of the U.S. carriers like to disallow bootloader unlocking, making it impossible to root your phone.
- Go to System settings -> About phone -> tap on ‘Build number’ several times until Developer options is enabled
- Back out into settings and go to System -> Advanced -> Developer Options -> Enabled ‘OEM Unlocking’
- Unplug your phone if it’s plugged into anything and power it off
- Boot into the Fastboot interface by holding Power + Vol Down
- Plug the phone into your PC and open Terminal/Shell/Command Prompt/PowerShell (depends on the OS)
fastboot flashing unlockon the terminal and follow the prompt on your device to unlock the bootloader (Note that this step will factory reset the device)
- The bootloader is now unlocked!
Step 2 – Patch the stock boot image using Magisk Manager
While you can find a pre-patched boot image for the Pixel 4a on our forums, make sure to verify its origin. Any pre-patched boot image you download should match the installed software build version, otherwise you may face serious anomalies. We always recommend you to patch the boot image yourself.
- Download the factory firmware corresponding to the installed version of the stock ROM and extract the boot image from the archive
- Copy the boot.img to your device
- Install Magisk manager (grab it from the release section of the project’s GitHub repo)
- Open Magisk manager -> select ‘Install’ -> ‘Select and Patch File’ -> select your boot.img file
- The patched boot image should be found inside your Download folder
Step 3 – Flash the patched boot image
- Copy the magisk_patched.img to your pc
- Reboot your device back into fastboot (see Unlock section above)
- Open a terminal in the directory your patched boot img file is and type
fastboot flash boot magisk_patched.img
- You’re now rooted!
(Optional) Step 4 – Passing SafetyNet on your Google Pixel 4a
Bypassing the hardware attestation method for SafetyNet might not be an easy task, but the following workaround should do the job for the time being.
- Download and install the MagiskHide Props Config module from the Magisk Module repo
- Open a Terminal app on your phone and type ‘su -c props’
- Select ‘Force BASIC key attestation’
- This will make your device appear to be a different one in some instances and by default, this is Nexus 5. Zackptg5 prefers it to look like a newer device that doesn’t have hardware attestation (like the Google Pixel 3a). So choose: ‘Pick from fingerprints list’ -> ‘Google’ -> ‘Google Pixel 3a’
- Reboot and verify you should hopefully pass SafetyNet!
If you are looking for more details on the process, check out the following thread in our forums:
Amazon launched pre-orders early, so the phone has already been back-ordered for weeks. You can still try your luck and see if you can buy one and have it delivered to you in the distant future. Amazon also has three bundled case options available as well.