With the Pixel 3a and 3a XL, Google has tried something none else has before. Until now, the camera quality was the one aspect of a smartphone that was more or less directly proportional to the price of the device. The Pixel 3a and 3a XL changed that. And now you can change the Pixel 3a and 3a XL. Here is how you can unlock Pixel 3a bootloader and root Pixel 3a. The guide also applies to the Pixel 3a XL.
- A Pixel 3a or Pixel 3a XL.
- Download the latest SDK platform-tools for Windows, Mac, and Linux.
- Enable USB debugging and OEM unlocking from the Developer Options.
- Ensure that your device has at least 50% of the battery so that it does not run out of juice during the process.
- Also, make sure that you have backed up all your personal data, apps. Unlocking the bootloader will wipe the slate clean.
Unlock bootloader on Pixel 3a and Pixel 3a XL
- Power off your phone.
- Connect it to your PC via a USB cable and make sure the connection isn’t loose.
- Now go to the platform-tools folder on your PC.
- Type in cmd in the address bar and hit enter to open a command prompt window in the folder. Linux and Mac users can right-click in an empty space inside the folder and select Open in Terminal.
- Now check if your device is properly connected by typing the command given below and hit enter.
If you’re using Windows Powershell, the command will have to be this.
Similarly, for macOS or Linux users (some distros), the command will be this.
- If your device is connected, you will see your phone’s serial number and if you don’t, you should check if you have installed all the required drivers.
- Reboot your Pixel 3a or Pixel 3a XL into fastboot mode using the following command. Change the syntax accordingly as done before.
adb reboot bootloader
- Type the command below to unlock your bootloader if your device is detected. Remember this will wipe everything on your phone.
fastboot flashing unlock
- On your phone, you will be warned about unlocking the bootloader, press the Volume Up button to highlight Unlock the bootloader and the Power button to select it.
- Your device will reboot again in bootloader mode but you will see the text “unlocked” along with a red warning sign. Use this command then to reboot back to your OS and set up everything again.
Get the stock boot image
TWRP recovery isn’t yet available for either of the Pixel 3a and Pixel 3a XL. So even though Magisk has support for both these devices, you can’t simply flash the Magisk zip from TWRP. Magisk works by modifying the stock bootloader image and it does that when you flash it from TWRP. We can manually perform the actions TWRP would have done for us though, using Magisk Manager and fastboot.
You will need the stock boot image for your device first and it can be found in your device’s firmware archive. You can download it from Google’s firmware download page for Pixel devices. Make sure you download the appropriate firmware. For your convenience, we’ve included the latest firmware links for the devices below.
Pixel 3a XL
Once downloaded, open it using any archive manager. You’ll find another folder inside it, so open that too. In this folder, look for an archive which has a name starting with image-bonito or image-sargo.
Inside this archive, you’ll find several image files (files with a .img extension) and also a file named boot.img which is the stock bootloader image that we’re looking for.
Root Pixel 3a and Pixel 3a XL
Patch boot image
Transfer the stock boot image now to your device’s internal storage. Next, download & install the latest Magisk Manager. Launch the Magisk manager app.
On the Magisk Manager main screen, select Install > Install > Patch Boot Image File.
Now select the stock boot image file that you’ve moved to your device’s storage. Magisk will patch the file and when the process is complete, it will save the file as “magisk_patched.img” in your Downloads folder.
Root Pixel 3a and Pixel 3a XL
Transfer the patched boot image file from your Downloads folder to the platform-tools folder on your PC. With your phone connected to the PC via the USB cable, use the following adb command to reboot it into bootloader mode as before.
adb reboot bootoader
Flash the patched boot image file to your device with this command.
fastboot flash boot magisk_patched.img
Once flashed, reboot your Pixel 3a/XL and you should be able to use Magisk Manager.
>> Source Link