The Google Pixel 2 and the Pixel 2 XL can now be rooted using Magisk. If you’re one of those users who like to mod their smartphones, then having root can give you access to several cool and useful features.
To root the new Pixel phone, you will first need to unlock the bootloader. Unlocking the bootloader on the new Pixel 2 is pretty easy and if you know what you’re doing, it’ll take only a few minutes.
Generally, rooting an Android device requires TWRP recovery. But with a modified boot image, you can root your Pixel 2 by flashing the Magisk patched modified boot directly from Fastboot to your device. This way you can root your Pixel 2/2 xL without installing TWRP recovery.
How to root Pixel 2 and Pixel 2 XL with Magisk
Note: Make sure you take a complete backup of all important files on your Pixel 2 or Pixel 2 XL before attempting to root your device. Unlocking the bootloader will completely wipe all data on your Pixel phone, so a backup will come in handy.
- Unlock bootloader on your Pixel 2 / 2 XL:
- Setup ADB and Fastboot on your PC.
- Enable USB debugging and OEM Unlock on your Pixel device.
- Now go ahead and connect your Pixel 2 to the PC using a USB cable.
- Open a command prompt window on your PC.
- Type in the following command to boot your Pixel 2 into the bootloader mode:
adb reboot bootloader
└ You may get a request to authorize USB debugging on the device, accept it.
- Once your device is in bootloader mode, type the following command to unlock the bootloader:
fastboot flashing unlock
- You’ll get a confirmation screen on your Pixel 2. Press Volume Up button to highlight Yes and press Power button to select it. This will begin bootloader unlocking process, which shouldn’t last more than a couple of minutes.
- Once bootloader is unlocked, your device will reboot into bootloader mode. You need to boot into system now, either press Power button to reboot OR issue the following command:
fastboot reboot
- During reboot, your Pixel 2 will go through a factory reset and then finally boot into system.
- Get the correct boot image for your :
- Download the factory image for your Pixel phone variant from this page.
- Extract the factory image zip file on your PC. You’ll get a few files along with another .zip file inside. Extract/unzip the second .zip file and you’ll get a boot.img file.
- Transfer the boot.img file to your Pixel 2 or Pixel 2 XL.
- Patch boot.img with Magisk Manager app:
- Download the Magisk Manager APK, and install it on your Pixel phone.
- Open Magisk Manager app on your phone and tap on Install » select “Patch boot image file” » select the boot.img file you transferred to your device in Step 1.3 above to patch it with Magisk..
- Once Magisk successfully patches the boot.img file, it’ll export it to your phone’s internal storage inside the MagiskManager directory as patched_boot.img file.
- Flash patched_boot.img to your Pixel 2 or Pixel 2 XL:
- Copy the patched_boot.img from your phone to a separate folder on your PC.
- Connect your Pixel 2 phone to the PC.
└ Make sure USB debugging is enabled on the phone. - Now open a command window inside the folder where you saved the patched_boot.img file on your PC. To do that, “Shift + Right click” on any empty white space inside the folder and then select “Open command window here” from the context menu.
- Once command window is open, issue the following command to boot into bootloader mode:
adb reboot bootloader
- When your device boots into bootloader mode, issue the following command to install/flash the patched_boot.img file to your Pixel 2 or Pixel 2 XL:
fastboot flash boot patched_boot.img
- Once the file is flashed, issue the following command to reboot your phone:
fastboot reboot
Once your Pixel phone boots, download/install any root checker app from the Play Store to verify root access. Cheers!
Discussion