Prerequisites to root Nexus 6 Nexus 6P:
- Download and install Android SDK. Follow this guide to properly install and configure Android SDK.
- Enable USB debugging on your device. Follow this guide to know how to enable USB debugging.
- Backup sensitive data such us apps, contacts and messages. Following this guide will erase your device’s data.
- Install USB drivers for Nexus 6. For Nexus 6P, choose the option to install USB drivers when installing Android SDK.
Root Nexus 6 is a 2 step process –
- Unlocking Bootloader & Obtaining Root.
Unlocking Bootloader
Step 1: Put your device into bootloader mode. To do so, switch off your device by holding Volume Down and Power button. You can also put your device into bootloader mode by tying in following command in CMD or Terminal.
[quote]adb reboot bootloader[/quote]
Step 2: If you used the button combination to put the device into Bootloader mode then type in the following to check if your device is connected properly. If you device is connected properly, the command will display you device’s serial number. If it doesn’t show your device’s serial number, reinstall the drivers.
[quote]fastboot devices[/quote]
Step 3: Type the following in CMD or Terminal. This step will wipe everything off your device.
[quote]fastboot oem unlock[/quote]
Step 4: You will be prompted with a warning message. Use the volume keys to highlight Yes and select it using the Power button. The bootloader will now be unlocked.
Step 5: Reboot your device using the following command. Do not skip this step.
[quote]fastboot reboot[/quote]
Step 6: Your device will reboot and you will be presented with a screen showing the android logo and a progress bar. This will take up to 10 minutes to complete.
Step 7: Close the CMD window.
Obtaining Root
This method was come up by Chainfire. This method is for those who only want to root the device and keep the firmware as close to stock as possible.
Step 1: Download this zip file.
Step 2: Extract the zip file.
Step 3: Put your device into bootloader / fastboot mode. To do so, switch off your device by holding Volume Up, Volume Down and Power button.
Step 4: Connect your device to the computer via a USB cable.
Step 5: Browse the recently extracted .zip file and run .bat or .sh file. Follow the on screen instructions.
- Windows: Run root-windows.bat
- Linux: chmod +x root-linux.sh and then run root-linux.sh
- Mac OSX: chmod +x root-mac.sh and run root-mac.sh
Step 6: You obtained root.
[quote bcolor=”#3ea3c1″ arrow=”yes”]
Note: You can stop here if you only want to obtain root. Read further if you want to flash a custom recovery. A custom recovery enables you to flash custom ROMs.
[/quote]
Installing Custom Recovery
Step 1: Put your device into bootloader mode. To do so, power off your device by holding Volume Down and Power buttons simultaneously. You can also put your device into bootloader mode by tying in following command in CMD or Terminal.
[quote]adb reboot bootloader[/quote]
Step 2: Download the latest version of TWRP recovery for Nexus 6 from here.
Step 3: Rename the recovery file you have downloaded to recovery.img. Make sure you don’t rename it to recovery.img.img. Put the recovery file on your desktop.
Step 4: If you are running Windows, open CMD and type in the following command.
[quote]cd Desktop[/quote]
If you are using Linux or OSX, open Terminal and type in the following command.
[quote]cd ~/Desktop[/quote]
Step 5: Now we flash the recovery. Run the following command.
[quote]fastboot flash recovery recovery.img[/quote]
Step 6: Restart you device by selecting Restart Bootloader by using volume key and tapping the Power button. After the bootloader loads, use the volume key to select Recovery Mode and tap the Power button.
Step 7: After the bootloader reloads, you will be presented with the newly installed TWRP recovery.
Rooting your Nexus 6P is a 3 step process
- Unlocking Bootloader, Flashing Custom Recovery & Obtaining Root.
Unlocking Bootloader
Step 1: Put your device into bootloader mode. To do so, switch off your device by holding Volume Down and Power button. You can also put your device into bootloader mode by tying in following command in CMD or Terminal.
[quote]adb reboot bootloader[/quote]
Step 2: If you used the button combination to put the device into bootloader mode then type in the following to check if your device is connected properly. If you device is connected properly, the command will display you device’s serial number. If it doesn’t show your device’s serial number, reinstall the drivers.
[quote]fastboot devices[/quote]
Step 3: Type the following in CMD or Terminal. This step will wipe everything off your device.
[quote]fastboot oem unlock[/quote]
Step 4: You will be prompted with a warning message. Use the volume keys to highlight Yes and select it using the Power button. The bootloader will now be unlocked.
Step 5: Reboot your device using the following command. Do not skip this step.
[quote]fastboot reboot[/quote]
Step 6: Your device will reboot. After you have unlocked the bootloader, each time you reboot your device you will be presented with a warning that says “You device software can’t be checked for corruption. Please lock the bootloader.” This is completely normal when you have unlocked the bootloader. You cannot remove this warning as long as the bootloader is unlocked, it will stay there.
Step 7: Close the CMD window.
Installing Custom Recovery
Step 1: Put your device into bootloader mode. To do so, power off your device by holding Volume Down and Power buttons simultaneously. You can also put your device into bootloader mode by tying in following command in CMD or Terminal.
[quote]adb reboot bootloader[/quote]
Step 2: Download the latest version of TWRP recovery from here. If you are using Android N Developer Preview, download the modified boot.img from here.
Step 3: Put the downloaded recovery image file ( .img ) on your desktop. If it is inside a compressed file, extract it. Rename it to ‘recovery.img’. Make sure you don’t rename it to ‘recovery.img.img’.
Step 4: Flash the recovery using the following command.
[quote]fastboot flash recovery.img[/quote]
Step 5: Restart you device by selecting Restart Bootloader by using volume key and tapping the Power button. After the bootloader loads, use the volume key to select Recovery Mode and tap the Power button. You can now safely disconnect your device from the computer.
[quote bcolor=”#3ea3c1″ arrow=”yes”]
Note: When TWRP boots up you will be asked whether or not to allow system modifications or keep it to read-only. Choose to allow system modifications.
[/quote]
[quote bcolor=”#3ea3c1″ arrow=”yes”]
Note: If TWRP offers you to flash SuperSU to give obtain root, don’t flash it as it will cause problems. You will be asked this when you try to reboot out of TWRP. Skip it.
[/quote]
Obtain Root
Step 1: Download the latest SuperSU flashable .zip package from here. For Android N, visit this thread.
Step 2: Connect your device to the computer and transfer the downloaded SuperSU .zip file to your SD Card.
Step 3: Without disconnecting the device, type the following command in the CMD or Terminal. Or, you can go into TWRP by turning off your device and then pressing and holding Volume Down and Power button at the same time.
[quote]adb reboot recovery[/quote]
Step 4: When your device boots into recovery mode, disconnect your device from the computer.
Step 5: Flash the SuperSU package. To do so, tap on Install > select the SuperSU .zip file > Swipe to start flashing.
Step 6: After you have flashed it, wipe cache/dalvik and then tap reboot system button.