Tech / AI

How To Root a Pixel XL, 2, 2XL, 3, & 3XL

Online Tech Tips is reader-supported. We may earn a commission when you buy through links on our site. Learn more.

Rooting your Android device lets you access many of the features that aren’t provided by default on your device. These features include access to root-only apps, custom versions of the operating system, and custom recoveries to flash various files.

It’s totally possible to root a Pixel XL, 2, 2XL, 3, and 3XL to enjoy a number of root-only features on these devices. The following are the procedures on how to gain root on these phones.

Table of Contents
    How To Root a Pixel XL, 2, 2XL, 3, & 3XL image - root-pixel-phones-featured

    Before you go ahead and perform the procedures, please keep in mind these will erase all the data on your device. Make sure to have a backup of your files before you root your device.

    Root a Pixel XL & Install a Custom Recovery On It

    This should work to root the Pixel XL running Android 9.0.

    • Download Fastboot and extract it on your computer.
    • Download both IMG and ZIP versions of TWRP recovery. Save the IMG version in the Fastboot folder where fastboot.exe is located and transfer the ZIP version to your phone.
    • Download the Magisk ZIP and transfer it to your phone.
    • On your phone, go to Settings > Developer options and enable both OEM unlocking and USB debugging.
    Root a Pixel XL & Install a Custom Recovery On It image - enable-usb-debugging
    • Connect your phone to your computer using a USB cable.
    • Open the Fastboot folder, hold down Shift, right-click anywhere blank, and select Open command window here.
    Root a Pixel XL & Install a Custom Recovery On It image 2 - open-command-window
    • Type in the following command and hit Enter.

      adb reboot bootloader
    Root a Pixel XL & Install a Custom Recovery On It image 3 - adb-reboot-bootloader
    • Enter the following command to unlock your bootloader.

      fastboot flashing unlock
    Root a Pixel XL & Install a Custom Recovery On It image 4 - fastboot-flashing-unlock
    • Confirm the prompt on your phone.
    • Type in the following command to reboot your device.

      fastboot reboot
    Root a Pixel XL & Install a Custom Recovery On It image 5 - fastboot-reboot
    • When your phone boots back up, go to Settings > Developer options and enable USB debugging. Then connect the phone to your computer.
    • Type in the following command replacing twrp.img with your IMG file name and hit Enter.

      fastboot boot twrp.img
    Root a Pixel XL & Install a Custom Recovery On It image 6 - boot-twrp
    • Unplug your phone from your computer.
    • Tap on Install and flash the TWRP ZIP version.
    Root a Pixel XL & Install a Custom Recovery On It image 7 - install-zip-from-recovery-1
    • Select Reboot followed by Recovery.
    Root a Pixel XL & Install a Custom Recovery On It image 8 - reboot-recovery
    • Tap on Install and flash the Magisk ZIP file.
    • Tap on Reboot and select System.

    Your phone is now rooted.

    Root a Pixel 2 & 2XL & Install TWRP Recovery On It

    There are three stages to root a Pixel 2 and 2XL.

    Unlock Bootloader:

    • Download Fastboot and extract it to your computer.
    • Head to Settings > Developer options on your phone and enable USB debugging and OEM unlocking.
    Root a Pixel XL & Install a Custom Recovery On It image - enable-usb-debugging
    • Plug-in your phone to your computer via a USB cable.
    • Open the Fastboot folder, hold down Shift, right-click anywhere blank, and select Open command window here.
    Root a Pixel XL & Install a Custom Recovery On It image 2 - open-command-window
    • Type in the following command and hit Enter.

      adb reboot bootloader
    Root a Pixel XL & Install a Custom Recovery On It image 3 - adb-reboot-bootloader
    • Use the following command to unlock your bootloader.

      fastboot flashing unlock
    Root a Pixel 2 & 2XL & Install TWRP Recovery On It image 4 - fastboot-flashing-unlock-1
    • Confirm the prompt on your phone.

    Install TWRP Recovery:

    • Download both ZIP and IMG versions of TWRP for Pixel 2 or Pixel 2 XL. Place IMG in the Fastboot folder and transfer ZIP to your phone.
    • Run the following command in a Command Prompt window to boot into TWRP. Make sure to replace twrp.img with your actual file name.

      fastboot boot twrp.img
    Root a Pixel 2 & 2XL & Install TWRP Recovery On It image 5 - boot-twrp-1
    • Once in TWRP, select Install and install the TWRP ZIP file.
    Root a Pixel XL & Install a Custom Recovery On It image 7 - install-zip-from-recovery-1

    Root a Pixel 2 & 2XL Using Magisk:

    1. Download the factory image for your phone and extract it.
    2. Transfer boot.img to your phone.
    3. Install and open Magisk Manager on your phone.
    4. Tap on Install followed by Install.
    Root a Pixel 2 & 2XL & Install TWRP Recovery On It image 7 - install-magisk-1
    • Choose Select and Patch a File.
    Root a Pixel 2 & 2XL & Install TWRP Recovery On It image 8 - patch-file-magisk-1
    Root a Pixel 2 & 2XL & Install TWRP Recovery On It image 9 - adb-reboot-bootloader-1
    • Flash the patched boot file with the following command. Replace boot.img with the actual file name.

      fastboot flash boot boot.img
    Root a Pixel 2 & 2XL & Install TWRP Recovery On It image 10 - flash-boot
    • Reboot your device with the following command.

      fastboot reboot
    Root a Pixel 2 & 2XL & Install TWRP Recovery On It image 11 - fastboot-reboot-1
    • Launch Magisk Manager and you’ll be rooted.

    Root a Pixel 3 & 3XL & Install a Custom Recovery On It

    Unlock Bootloader:

    • Open Settings > Developer options on your phone and turn on both USB debugging and OEM unlocking.
    Root a Pixel XL & Install a Custom Recovery On It image - enable-usb-debugging
    • Connect the phone to your computer via a USB cable.
    • Download and extract Fastboot.
    • Open the Fastboot folder, hold down Shift, right-click anywhere blank, and select Open command window here.
    Root a Pixel XL & Install a Custom Recovery On It image 2 - open-command-window
    • Enter the following command and hit Enter.

      adb reboot bootloader
    Root a Pixel XL & Install a Custom Recovery On It image 3 - adb-reboot-bootloader
    • Run the following command to unlock the bootloader.

      fastboot flashing unlock
    Root a Pixel 3 & 3XL & Install a Custom Recovery On It image 4 - fastboot-flashing-unlock-2
    • Follow the on-screen instructions on your phone.

    Install TWRP Recovery & Gain Root Access:

    • Download both ZIP and IMG versions of TWRP for Pixel 3 or 3 XL. Transfer ZIP to your phone and keep IMG in the Fastboot folder.
    • Download Magisk Installer ZIP and copy it to your phone.
    • Enable USB debugging on your phone from Settings > Developer options.
    • Connect your phone to your computer over a wired connection.
    • Launch a Command Prompt window and enter the following command. Replace twrp.img with your IMG file name.

      fastboot boot twrp.img
    Root a Pixel XL & Install a Custom Recovery On It image 6 - boot-twrp
    • Tap on Install and install TWRP ZIP file.
    Root a Pixel XL & Install a Custom Recovery On It image 7 - install-zip-from-recovery-1
    • Tap on Reboot followed by Recovery.
    Root a Pixel 3 & 3XL & Install a Custom Recovery On It image 7 - reboot-recovery-1
    • Tap on Install and flash the Magisk Installer ZIP file.
    • Tap on Reboot and then System.
    • Open the Magisk app and you should be rooted.

    Unroot a Pixel XL, 2, 2XL, 3, & 3XL

    • Download the factory image for your phone and extract it to your computer.
    • Turn off your phone.
    • Press and hold down Volume Down and Power and your phone will boot into the bootloader mode.
    • Connect your phone to your computer via USB.
    • Open the factory image folder, hold down Shift, right-click anywhere blank, and select Open command window here.
    Root a Pixel XL & Install a Custom Recovery On It image 2 - open-command-window
    • Type the following command and ensure your phone appears in the list.

      fastboot devices
    Unroot a Pixel XL, 2, 2XL, 3, & 3XL image 2 - fastboot-devices
    • Run the following command to flash the stock firmware.

      flash-all.bat
    Unroot a Pixel XL, 2, 2XL, 3, & 3XL image 3 - flash-all
    • Reboot your phone into the bootloader as described above.
    • Run the following command to relock the bootloader.

      fastboot flashing lock
    Unroot a Pixel XL, 2, 2XL, 3, & 3XL image 4 - fastboot-flashing-lock
    • You’re now unrooted.