How to unlock the bootloader and root the Google Pixel 4a

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’Magisk to root the device after unlocking the bootloader.


Google Pixel 4a XDA Forums

Buy Google Pixel 4a from Amazon USA || Best cases for the Pixel 4a

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.

  1. Go to System settings -> About phone -> tap on ‘Build number’ several times until Developer options is enabled
  2. Back out into settings and go to System -> Advanced -> Developer Options -> Enabled ‘OEM Unlocking’
  3. Unplug your phone if it’s plugged into anything and power it off
  4. Boot into the Fastboot interface by holding Power + Vol Down
  5. Plug the phone into your PC and open Terminal/Shell/Command Prompt/PowerShell (depends on the OS)
  6. Type fastboot flashing unlock on the terminal and follow the prompt on your device to unlock the bootloader (Note that this step will factory reset the device)
  7. 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.

  1. Download the factory firmware corresponding to the installed version of the stock ROM and extract the boot image from the archive
  2. Copy the boot.img to your device
  3. Install Magisk manager (grab it from the release section of the project’s GitHub repo)
  4. Open Magisk manager -> select ‘Install’ -> ‘Select and Patch File’ -> select your boot.img file
  5. The patched boot image should be found inside your Download folder

Step 3 – Flash the patched boot image

  1. Copy the magisk_patched.img to your pc
  2. Reboot your device back into fastboot (see Unlock section above)
  3. Open a terminal in the directory your patched boot img file is and type fastboot flash boot magisk_patched.img
  4. 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.

  1. Download and install the MagiskHide Props Config module from the Magisk Module repo
  2. Reboot
  3. Open a Terminal app on your phone and type ‘su -c props’
  4. Select ‘Force BASIC key attestation’
  5. 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’
  6. 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:

Guide: Unlock/Root/Safetynet for Pixel 4a

    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.

About author

Skanda Hazarika
Skanda Hazarika

DIY enthusiast (i.e. salvager of old PC parts). An avid user of Android since the Eclair days, Skanda also likes to follow the recent development trends in the world of single-board computing.

We are reader supported. External links may earn us a commission.