This document will outline the steps that I took to root my Google Pixel 3 phone. It is a combination of multiple tutorials, with minor adaptations to address some issues during the root process.
- How to Unlock the Bootloader and Root the Google Pixel 3 with Magisk
- Rooting the Phone instructions from this site were very helpful!
- Magisk OTA Upgrade Guides
Make sure to backup your device! Unlocking the bootloader will wipe all user data from the device. Save all important data to a remote location before proceeding.
adb --version # Android Debug Bridge version 1.0.41 # Version 30.0.4-6686687 # Installed as /home/alexander/Android/Sdk/platform-tools/adb fastboot --version # fastboot version 30.0.4-6686687 # Installed as /home/alexander/Android/Sdk/platform-tools/fastboot
I was only able to root my phone with the Android 9 Pie OS. Using Android 10, the rooting process was unsuccessful (with or without twrp)!
- Open the Settings app.
- Go to About phone.
- Tap on the Build number menu item until a message appears saying that you are now a developer.
- Go back one page and open the System > Developer options menu.
- Enable the OEM unlocking option.
- Enable the USB debugging option.
- Plug your phone into your computer and ensure that the device is detected with
$ adb devices # List of devices attached # 8A4X0LMZF device
- Reboot the phone to the bootloader menu.
You can hold the power and volume down buttons while booting up your phone, or alternatively run the command:
adb reboot bootloader
- In the bootloader menu, use the
fastbootcommand to unlock the bootloader.
fastboot flashing unlock
- Some text on your phone should now display potential risks of unlocking the bootloader. Continue unlocking the bootloader by pressing the volume up key until it says Unlock the bootloader. Press the power button to confirm.
- The bootloader will unlock and reboot back to the bootloader menu. A red warning icon and unlocked text will appear.
- Reboot the phone back to the Android operating system by running the command:
- Your phone now has an unlocked bootloader! You will see a warning message that your phone is unlocked on every boot. This is something that cannot be removed or hidden.
You can skip this step if your phone is already running Android 9.
- Since the device is wiped, re-enable Developer Options and USB Debugging. Ensure that the device is still recognized by the computer through
- Reboot the phone back into the bootloader menu.
- Download an Android 9 factory image from the Google image repository, “blueline” for Pixel 3
I used 9.0.0 (PQ3A.190801.002, Aug 2019) as it was the latest Android 9 image, all newer images belonging to Android 10.
# Download the factory image archive wget https://dl.google.com/dl/android/aosp/blueline-pq3a.190801.002-factory-f3d66c49.zip # Ensure the checksum matches the google provided value. # f3d66c498994c7ca8c63a97f74bbd2634db7f91e1e114e7924cb721a149ddd2b sha256sum blueline-pq3a.190801.002-factory-f3d66c49.zip
- Unzip the verified archive and run the
flash-all.shscript to downgrade your device.
unzip blueline-pq3a.190801.002-factory-f3d66c49.zip cd blueline-pq3a.190801.002 # Begin the flash process ./flash-all.sh
- Your device is now downgraded to Android 9. Proceed to rooting the phone using Magisk and TWRP.
TWRP is a custom recovery that allows you to use the Magisk installer script. You will not need to install TWRP, as after upgrading to Android 10, TWRP will no longer function. Magisk is a suite of open source tools for in-depth Android customization that provides root access, functionality to modify read-only file systems on your device, and basic root hiding functionality and system integrity check spoofing.
Re-enable Developer Options and USB Debugging, ensuring that the computer can recognize the device through
Download the TWRP image (
.imgfile) for the Google Pixel 3 from the TWRP blueline repository. I used the latest
twrp-3.3.0-0-blueline.imgwith no issues. The twrp team forbids linking directly to files, and must be accessed through their HTML pages. Verify the checksums and PGP signatures.
Download the latest Magisk release and sync it to the phone. I used Magisk-v20.4.zip.
# Sync the Magisk file to the phone's Download folder adb push Magisk-v20.4.zip /sdcard/Download/Magisk-v20.4.zip
Reboot your phone to the bootloader menu.
Once the phone is on the bootloader screen, temporarily boot into TWRP using the TWRP boot image:
fastboot boot twrp-3.3.0-0-blueline.img
Your phone should exit the bootloader menu and reboot to TWRP recovery. If this step fails, double check that you are running Android 9.
Tap on Install.
Magisk-v20.4.zipfile saved in the Download folder. Tap on it and use the slider to install it.
Reboot back to the OS and check the status of the root by opening up Magisk Manager.
These instructions are taken directly from the Magisk OTA Upgrade Guides.
It is reccomended to disable the switch for Automatic system updates within Developer Options so OTA updates will not install without your acknowledgement.
When an OTA is available:
- Open up Magisk Manager.
- Select Uninstall.
- Select Restore Images.
- Do not reboot or you will have Magisk uninstalled. This will restore partitions modified by Magisk back to stock from backups made at install in order to pass the pre-OTA block verifications.
- Apply the OTA update as you would normally (Settings > System > System Update).
- After the installation finishes, do not press the “Restart Now” or “Reboot” button! Instead, go to Magisk Manager, select Install, and Install to Inactive Slot.
- Reboot when prompted by Magisk Manager. Your phone should now be updated to the latest OTA and you should still have root.
There are a few tutorials online suggesting that Magisk can be installed directly on an Android device running Android 10 by having Magisk patch an Android 10 image prior to flashing. These tutorials have not worked for me.
TWRP is not supported on Android 10 so therefore does not need to be installed on the device.
Enable the Magisk Manager Systemless hosts, Magisk Hide functions in the settings.
Do not change the bootloader settings (lock/unlock), as this will wipe your device user data again.