/Pixel 3 Root and Bootloader Unlock with Magisk
Pixel colors

Pixel 3 Root and Bootloader Unlock with Magisk

Like all the previous Pixel devices and Nexus devices, the new Pixel 3 and Pixel 3Xl are the easiest devices to unlock the bootloader, root, and install custom ROMs and kernels. Both the devices can be now rooted with Magisk. Unlocking the bootloader of the Pixel 3 series takes seconds, and getting your device up and running with Magisk takes minutes. If you’ve ever unlocked the bootloader of and rooted a Google Nexus, Google Pixel, or OnePlus device, you shouldn’t have any issues unlocking your Pixel 3 and installing Magisk.

Special thanks to XDA Recognized Developer topjohnwu, the lead developer of Magisk, for all the work that he does. Without him, this wouldn’t have been possible. Please consider supporting him on Patreon. Follow him on Twitter for teasers of his upcoming work.

Unlock the Google Pixel 3’s Bootloader:

Note: Unlocking the bootloader will wipe all the data from your device. This includes all media saved to the device’s internal storage such as pictures, videos, music, documents, etc. Backup any important files to your PC or cloud storage before proceeding.

  • Open the Settings app.
  • Go to System.
  • Tap on About phone.
  • Scroll down and tap on Build number 7 times until it says you’re now a developer.
  • Go back one page and near the bottom of the list, you should see “Developer options.”
  • Without scrolling down, you should see an “OEM unlocking” option. Enable it. For security purposes, it may ask you to input your lock screen PIN/password if you have one set.
  • Scroll down a bit until you see “USB debugging.” Enable it.

 

Pixel 3 Root

 

  • Plug in your Pixel 3 into your PC. Follow these steps to set up ADB and Fastboot on your PC. If you only have access to a Chromebook, you can follow this guide to set up ADB and Fastboot on Chrome OS.
  • Make sure your PC recognizes your Pixel 3 by opening up a command prompt/Power Shell/Terminal in the same directory where you saved the ADB and Fastboot binaries and entering the following command depending on your OS:

Windows Command Prompt:

adb devices

Windows Power Shell:

.\adb devices

macOS/Linux Terminal:

./adb devices

(For the rest of this tutorial, please use the same command prefixes depending on your OS.)
If you see your device’s serial number and it says “authorized,” then you’re good to go. If this is your first time setting up ADB for this device, then you may see a prompt on your phone to enable USB Debugging for your PC. Grant it permission. If you’re having trouble getting your Windows PC to recognize your device, try installing the latest Google USB Drivers.

  • Now, reboot to the bootloader menu. You can either do this by holding the power and volume down buttons while booting up, or by entering the following ADB command:
    adb reboot bootloader
  • Once you’re on the bootloader menu, you’ll now have to switch to using fastboot command to communicate with your device. To unlock the Pixel 3’s bootloader, enter the following command:
    fastboot flashing unlock
  • You should now see text on screen warning you about the potential risks of unlocking the bootloader. On the screen next to the power and volume buttons, you should see some text. Press the volume up key until it says “unlock the bootloader.” Once it says this, press the power button.

    Pixel 3 Root
    Image Credit: XDA
  • The phone will unlock the bootloader and reboot back to the bootloader menu. This time, the bootloader will show a red warning icon and “unlocked” text.
  • Now, reboot your phone back to the Android 9 Pie OS. You can do this by sending the following fastboot command:
    fastboot reboot
  • Congratulations, your Google Pixel 3 or Google Pixel 3 XL now has an unlocked bootloader! You’ll see a warning message that your phone’s bootloader is unlocked on every boot, but don’t worry about that as it doesn’t affect your day-to-day use.
Google Pixel 3 Root with Magisk:

Note: The following instructions were written before the release of a custom recovery such as TWRP. As such, the only way to install Magisk is by flashing a patched boot image from the bootloader. Thus, the stock boot images that I am providing will be outdated when the next software release is available with an updated boot image. I will update these instructions once TWRP is available so the instructions are build number-agnostic.

With an unlocked bootloader, you can now boot modified boot images. For Magisk to work, you’ll need to patch the Pixel 3’s boot image. Fortunately, the Magisk Manager app can take care of that for you. We tested this on topjohnwu’s and my own Google Pixel 3 XL, and on Dees_Troy’s Google Pixel 3 and can confirm that Magisk works on both devices.

  1. Since your device has been wiped, you’ll need to go back and re-enable Developer Options and then re-enable USB Debugging. Make sure your Pixel 3 is still recognized by your PC.
  2. Download the stock boot image for the Google Pixel 3 or Google Pixel 3 XL. Please take note of which device you’re using and that the build number of the boot image matches what you’re running. You can check your current build number by going to Settings –> System –> About Phone and scrolling down until you see the Build number field. Take note of that value.
    1. Download Google Pixel 3 (“blueline”) stock boot image for build number PD1A.180720.030.
    2. Download Google Pixel 3 XL (“crosshatch”) stock boot image for build number PD1A.180720.030.
  3. Move the stock boot image to a folder on your device’s internal storage. The download folder is fine.
  4. Install the latest Magisk Manager beta APK from here. Open up Magisk Manager and go to settings. Change the update channel to “beta.” This may not be necessary, but some users are having issues if they don’t do this.
  5. Tap “Install.”
  6. Tap “Install” again, though you won’t be installing the zip file that it’s showing you.
  7. Tap “Patch Boot Image File.”
  8. Select the stock boot image file that you saved earlier.
  9. You should see a bunch of text on the screen showing you the progress of Magisk Manager patching the stock boot image. Once it’s done, press close. Magisk Manager should save the file as “patched_boot.img” to the Download directory so just leave it like that.

    Pixel 3 Root
    Image Credit: XDA
  10. Move the patched_boot.img file from your device to your PC. To make things easier, move the file to the same directory where your ADB and Fastboot binaries are located.
  11. Reboot to the bootloader menu again.
  12. (Optional: If you want to skip the test boot, go to step 14.) On the bootloader, enter the following fastboot command to temporarily boot the patched Magisk boot image:
    fastboot boot patched_boot.img
  13. After a few seconds, your phone should exit the bootloader menu and reboot to the Android Pie OS. If successful, you should be able to open up Magisk Manager and see what version of Magisk is installed. The two green checkmarks up top are a good sign you’re on the right path. Now we need to actually install Magisk so we don’t have to run this fastboot command before each boot!
  14. Let’s flash the patched Magisk boot image to the boot partition. Enter the following command on the bootloader screen:
    fastboot flash boot patched_boot.img

    Pixel 3 Root
    Image Credit: XDA
  15. (Optional) Since the Google Pixel 3 and Pixel 3 XL support A/B partitions, you can also flash the patched boot image to the inactive slot. Just replace the “boot” in the above command with either “boot_a” or “boot_b”, whichever is the opposite of the slot that it previously flashed to in step 14.
  16. Reboot back to the Android Pie OS and check the status of your root by opening up Magisk Manager.
What’s next?

Now that you are done with the Pixel 3 Root, you can install a lot of fun stuffs on your device. As the device is just launched, there are not many Mods, Custom ROMs and Kernels available. Be sure to visit the XDA page to know all about Pixel 3 Root and Bootloader Unlock.

Recommended: Disable Gesture Navigation on Google Pixel 3.

Pixel 3 Development.

Pixel 3XL Development.

Source: XDA | Mishaal Rahman