Last month, Google launched its first midrange offerings in a long time dubbed as the Pixel 3a and the Pixel 3a XL. It looks like a decent device in the midrange market offering modest specs and the pixel experience at not so premium price. Rooting Google Pixel 3a/ 3a XL will help you install custom ROMs, Custom Kernels and similar. While there are many other ways by which you can root an Android device, using Magisk to root Android is the best way as of now. Read ahead to know how to root your Pixel 3a/3a XL using Magisk.
- Rooting may be a pretty complex task for some. Make sure to take a complete backup of your device before proceeding. Guide: Guide to Backup Android Device Without Root
- Make sure you have enough charge left on your device. A minimum of 70% is recommended.
- Make sure you have the latest ADB and Fastboot tool installed on your Mac/Windows/Linux PC.
- Enable USB Debugging and OEM unlock in Developer Options.
- Toggle on Advanced Reboot in the Developer Options. (Optional but recommended)
Rooting your device will require you to unlock your bootloader. In most cases, this will effectively void your device warranty. That said, unlocking bootloader and rooting are complex processes and may not always produce the desired results. Know what you are doing and always have a backup before proceeding. The author or ThemeFoxx cannot be held responsible in case anything unexpected happens to your device. Remember, you are warned.
Steps To Unlock The Bootloader Of Pixel 3a and Pixel 3a XL
- Power Off your phone and boot into the bootloader mode by holding the power and volume down button simultaneously.
- Connect your phone to your PC using a data transmission or USB cable.
- Go to the location where ADB and Fastboot tools are installed on your PC. Open a PowerShell window there, by holding the shift key while you tap the right mouse button. Mac and Linux users can right-click in an empty space inside the folder and select Open in Terminal.
- Now type the following command to ensure that your phone and PC are connected successfully. This command should return your phone’s model number. If does not, ensure that your phone and PC are connected properly.
For macOS or Linux users, the command will be this.
Note to remember the syntax for Mac and Linux commands as rest of the commands in this guide will be according to Windows but you can always use them according to your requirements by making small changes in accordance to the syntax given above.
- Reboot your Pixel 3a or Pixel 3a XL into fastboot mode using the following command.
adb reboot bootloader
- If the command returns the device ID, your connection is perfect. Now, unlock the bootloader of your phone by typing the following command.
fastboot flashing unlock
- Once you enter the above command, your phone’s screen should turn on displaying certain commands. You have to use your volume up and down key to select “Unlock the bootloader” command. Once selected, press the power button to confirm.
- Once the bootloader is unlocked, you will get back to the bootloader mode. Now, type the following command to reboot your phone normally.
And you are done with unlocking the bootloader of your Pixel 3a or 3a XL. You can disconnect your phone from your PC.
Steps To Root The Pixel 3a Or The Pixel 3a XL
Getting the Stock Boot Image
- Visit Google’s firmware download page for Pixel devices and download the appropriate firmware file according to your device.
- Once downloaded, extract the firmware zip file using any archive manager and look for another archive which has a name starting with bonito [For Pixel 3a] or sargo [for Pixel 3a XL].
- Extract this archive as well and look for the stock image file. It will be named as boot.img.
- Transfer this stock image file to your phone’s internal storage.
Patching the Stock Boot Image
- Download the latest Magisk Manager APK file from the link appearing below and sideload it in your phone.
- Once installed, open the Magisk Manager app.
- Open the Magisk Manager app from your phone and tap on the menu icon from the top left corner of your display. It is in the shape three bars placed horizontally.
- Tap on “Settings” followed by a tap on the “Patched Boot Output Format” option and select “.img.”
- From the home screen of the Magisk Manager app, tap on “Install” followed by a tap on “Install” again and then select “Patch Boot Image File.”
- Now, navigate to the location where you have stored the file that you downloaded in step 4 and tap on it. The patching procedure should continue.
- Now, connect your phone with your PC and transfer the ‘patched_boot.img’ file from the phone’s internal storage to the folder where the fastboot tools are installed.
Root Pixel 3a/Pixel 3a XL with Magisk Patched Boot Image
- Open PowerShell window in the fastboot folder like you did while unlocking the bootloader.
- Use the following adb command to reboot it into bootloader mode as before.
adb reboot bootloader
- Flash the patched boot image file to your device with this command.
fastboot flash boot patched_magisk.img
Congratulations! You just successfully unlocked the bootloader and rooted your Pixel 3a or the Pixel 3a XL.
Recommended: Best Magisk Modules for Android 
This is the easiest way to unlock the bootloader and root the Pixel 3a or the Pixel 3a XL. I hope this article works the way it is intended to be. Let us know about your experience trying out the methods mentioned in this article in the comments section down below. In case I missed mentioning anything or if there is some topic which you want me to cover, please let me know in the comments section down below.