How to Unlock Bootloader and Root the Google Pixel 2 and Pixel 2 XL

How to Unlock Bootloader and Root the Google Pixel 2 and Pixel 2 XL

Many enthusiasts expected that achieving root on the first-generation Google Pixel would be just as easy as rooting Google’s Nexus devices, but that didn’t turn out to be the case. Android Nougat’s A/B partition system created a lot of headache for developers in the beginning, and the Pixel’s incompatibility with the most common exploits only added to challenge. Needless to say, there was reason to worry about Pixel 2 and the Pixel 2 XL. But luckily, development seems to be moving along just fine.

In late October, an alpha port of TWRP was made available for the Pixel 2 and Pixel 2 XL. And this week, XDA Recognized Developer / Recognized Contributor nathanchance has released guides to unlocking, flashing, and rooting both phones.


Here’s how to get started:

Install Fastboot and ADB

  1. Unzip the folder on your hard drive.
  2. Go to the folder containing the ADB and Fastboot files and type “cmd” in the path bar at the top.
  3. A command prompt should open with the current folder showing on the prompt.
  4. Type the following commands:

    adb --versionfastboot --version

At this point, you should see some information appear. If that is the case, Fastboot and ADB have been successfully installed.

Unlock the bootloader of the Pixel 2 / Pixel 2 XL

The guide notes that unlocking your Pixel 2 or Pixel 2 XL’s bootloader will wipe the phone. It’s a good idea to make a backup of any important data in case something goes wrong.

  1. On your phone, open Settings, navigate to System then About phone, and tap on the build number seven times.
  2. The Developer Options will now be visible in the main settings page. Enter it and turn on USB debugging and OEM unlocking.
  3. Plug your phone into your computer, and type the following command in the Windows command terminal:
    adb reboot bootloader
  4. Next, decide if you want to do a standard unlock or critical unlock. A critical unlock allows you to directly flash bootloader files. Otherwise, you will get an error when you try to do so.
  5. Depending on what you decided in the previous step, run one of the following commands:
    fastboot flashing unlock


    fastboot flashing unlock_critical
  6. Follow the prompts on your device, and then reboot.

Root the Pixel 2 / Pixel 2 XL

  1. Download Magisk Manager from the official thread and install it.
  2. Grab a boot image to patch (you can choose either the one from the latest factory image or a custom kernel one) and push it to your device with this command:
    adb push <path_to_file> /sdcard/Download
  3. Open Magisk Manager and click the Install button.
  4. Click Install at the first prompt then choose Patch Boot Image File. A file manager will pop up.
  5. Select the boot image you want to patch and let Magisk Manager patch it.
  6. Pull it off your device with this command:
    adb pull /sdcard/MagiskManager/patched_boot.img
  7. Reboot into the bootloader:
    adb reboot bootloader
  8. Flash the boot image and reboot.Code:
    fastboot flash boot patched_boot.imgfastboot reboot
  9. Open Magisk Manager and your device should be rooted.

Check out the respective forum threads for the Pixel 2 and Pixel 2 XL for tips on unlocking, flashing factory images, and rooting.

XDA Forums Thread for Unlocking/Flashing/Rooting the Pixel 2 (walleye)
XDA Forums Thread for Unlocking/Flashing/Rooting the Pixel 2 XL (taimen)

About author

Idrees Patel
Idrees Patel

Idrees Patel is a smartphone enthusiast from India. He has been an Android user since the time he got the LG Optimus One in 2011. He has a bachelor's degree in Management Studies. The subjects in which he is interested are mobile processors, real-world UI performance, in-depth camera quality analysis, and many more. Contact him at [email protected]

We are reader supported. External links may earn us a commission.