As a strategic move, Google decided to ditch their Nexus series and came up with an all-new lineup of Pixel devices. The current gen flagship of this pixel range comprises of Pixel and Pixel XL. Both the smartphones are manufactured abiding by the stringent guidelines set by Google. These devices receive the latest security patches related to Google every month, bug fixes and software updates directly from Google, making sure you always have the latest and the greatest.
Being a Google device, it surely attracts a lot of attention from the developer community, meaning you’ll have access to a ton of custom ROM, custom kernels, and mods/tweaks. However, most of the mods and tweaks which involve the modification of system require root access and installing any custom ROM or custom Kernel will require you to have a custom recovery. However it should be noted that unlocking the bootloader, which is a primary and mandatory step involved in the rooting process could open up the device to a lot of vulnerabilities and rooting a device could make the device stop receiving OTA updates pushed by the manufacturer.
Unlike most devices which require flashing of images, Pixel devices need to be rooted by writing the boot image using a fast-boot command. Before starting off with the rooting process make sure you’ve the latest device drivers which can be downloaded from here, also make sure you’ve adb and fast-boot installed system wide, follow this link to install.
Enable USB debugging:
Enable USB debugging on the device by going to the settings app and open the about phone page. Tap the build number 7 times to enable developer options for the device, then go back and select developer options. Here you should find a checkbox for USB debugging make sure this checkbox is ticked and connect the device to the PC and check adb by typing
This should open a popup prompt on the device confirming your permission, accept the permission and the command prompt console should show the serial number of the connected device.
Unlocking the bootloader of a Pixel
- Firstly reboot the device to bootloader, turn the device off and then hold the power button and the volume up combination till the device reboots to bootloader mode.
- Verify stable connection by opening the command prompt and typing
- This should return the serial number of the device. Now type the following to initiate the Unlocking process.
fastboot oem unlock
This will initiate the process and follow the instructions on the device screen to unlock the bootloader.
- Use fastboot command to reboot the device to system.
Rooting Pixel device:
- As mentioned above, Pixel devices need to be rooted by writing the boot image to the device using fast-boot instead of flashing and image as in regular case.
- Download the zip for Pixel from here or for Pixel Xl from here and unzip the folder to get the boot-to-root.img file. This method was developed by the legendary Chainfire who’s also the man behind SUPERSU.
- Copy the above file to a convenient folder and open command prompt from that folder by right clicking and selecting open command prompt here.
- Reboot the device to boot-loader by holding Vol down and power-button together and test the connection by typing the following.
This should return the device serial number.
- Now the device is ready to be written with the new modified custom boot image which would root the device. Once you confirm connection with the device and enough juice in the device battery initiate the writing of boot image by the following command.
fastboot boot boot-to-root.img
- At this stage, be very patient as the device will reboot several times before the Android system finally boots up.
- When the device finally boots up it should be successfully rooted.
It is very important to have a custom recovery installed on any rooted device as it lets you backup and recover the device in case of any fatality. TWRP is one of the most used recoveries with the only noteworthy competition being CWM.
Flashing using fast-boot:
- This is normally the most used and most trusted method.
- Reboot the device to bootloader by holding the Vol up and power button till the device boots to fast-boot mode. Open command prompt in the folder that contains the downloaded recovery file. Verify connection by typing
- On verifying connection flash the recovery by using
fastboot boot twrp-3.0.2-0-alpha2-fastboot-sailfish.img
- This should reboot the device to TWRP, now go to install and select the zip to start the installation process. Swipe right to confirm installation.
- Choose the SuperSU zip to install root.
- On successful installation it is recommended to go to the wipe page and wipe cache and art cache for smooth operation and to avoid any bugs.
Rooting a Pixel device voids the warranty and if not done properly, it can cause boot-loops and system crash.