It was not easy to get root access on Google Pixel and Pixel XL phones due to changes in both system internal and Android Nougat. The situation is same with the second generation Pixel 2 and Pixel 2 XL. However, the recent development shows that users can unlock bootloader, get root access and install TWRP recovery on their Pixel 2 or Pixel 2XL.
In this guide, we show you how to unlock bootloader and root 2nd Gen Google Pixel 2 and Pixel 2 XL. Thanks to the XDA contributor ‘nathanchance’ for the simple workaround to root the new Pixel 2 (walleye) and Pixel 2 XL (taimen) using Magisk Manager. All you need Magisk Manager installed on your device and patched boot.img file.
Read on to know how to unlock bootloader, create patched boot.img file from factory image using Magisk Manager and root 2nd Gen Pixel 2 and Pixel 2 XL. Before start, note that rooting your phone should do with extreme care; otherwise you will end-up with a bricked device.
This guide requires ADB and Fastboot driver setup on your PC. Also proper USB driver for Pixel 2/Pixel 2 XL should be installed on the PC.
Important: Backup whole data you have on your phone before proceeding with the below steps.
1. Download USB driver for Pixel 2/Pixel 2 XL [here] and install it on your computer.
2. Download ADB and Fastboot file [here] and unzip it to a folder.
3. Enable USB Debugging and OEM Unlock options on your phone by going to Developer options (to enable Developer Options, go to Settings > About phone > and tap on the build number seven times).
4. Connect your phone to your PC, then go to the folder containing the ADB and Fastboot files and open a command window from there.
5. Issue the below command to boot your phone into bootloader mode:
adb reboot bootloader
6. The next step is unlocking the bootloader. You can choose either “Standard unlock” or “Critical unlock”.
[A critical unlock allows you to directly flash bootloader files. Otherwise, you will get an error]
7. To unlock bootloader, issue the below command:
fastboot flashing unlock
OR (if you want critical unlock)
fastboot flashing unlock_critical
8. You phone will factory reset and reboot. Your Pixel phone’s bootloader is now unlocked. You are ready to get root access on the device.
Disclaimer: Follow the instruction at your own risk. We will not be liable if any damage occurs to your device and/or its components. It is recommended for technically talented users only.
1. Download Magisk Manager from the official thread [here] and install it on your device.
2. Grab boot image file to patch (get it from latest version of factory image by unzipping it) and push it to your device with the below command:
adb push <path_to_file> /sdcard/Download
3. Now, open Magisk Manager and tap on ‘Install’ button.
4. Tap ‘Install’ at the first prompt, and then choose ‘Patch Boot Image File’. A file manager will pop up. Select the boot image you have just saved on your device and let Magisk Manager patch it.
5. Now, you need to pull the patched boot.img file. To do so use the below command:
adb pull /sdcard/MagiskManager/patched_boot.img
6. Save the patched_boot.img inside the ADB and Fastboot folder, and issue the below command to reboot your phone into bootloader mode:
adb reboot bootloader
7. Now issue the below command to flash the patched boot image file:
fastboot flash boot patched_boot.img
8. Finally, issue the below command to reboot your phone:
Open Magisk Manager and your device should be rooted. Any question? Leave it in the comment section below. (Source – XDA)