In this step-by-step guide, I will instruct you on how to unlock the bootloader, install TWRP recovery, disable forced-encryption (optionally), and simultaneously root the Huawei Nexus 6P (codename: angler).
Released in 2015, the Nexus 6P was the last device from Google’s Nexus lineup. And like any other Nexus phone, it is very flexible when it comes to software modification, primarily because the bootloader is easily unlockable. The phone also received official support for TWRP soon after its launch. This means you can also easily root it.
Both TWRP and Root are two tools that can open the gateway to tons of possibilities when it comes to software modding. You can install custom ROMs, kernels, mods like ViPER4Android, use root applications, and do much more.
The process of rooting the Nexus 6P is extremely plain and simple. The first step is to unlock the phone’s bootloader, which will allow you to flash the phone’s partitions. The second step is to install TWRP recovery by flashing the recovery image via fastboot. Then the third step is optional, where you can disable forced-encryption. And finally, the fourth step is to flash the Magisk/SuperSU root package via TWRP to root your Nexus 6P.
I will be taking you through all these steps in detail. So with any further ado now, let us get to the instructions.
Also Recommended: A Possible Fix for Nexus 6P’s Bootloop Issue
- All the data on your phone will be erased during this process, including the installed apps, contacts, messages, as well as, everything on the internal storage. So, make sure that you take a complete backup before you proceed. You can take a look at our detailed guide here on how to backup.
- Charge your Nexus 6P to at least 60% battery to avoid any kind of interruptions during the process.
- Download the latest Google USB drivers from here and install them on your Windows PC. If you’re working on a macOS/Linux PC, you will not need any drivers.
- Download the platform tools (ADB and fastboot) package and install it on your PC using the instructions here.
- When asked to launch the command-line on your PC, do the following:
- On Windows: Go to the folder on your PC where the Android platform-tools are installed (e.g. C:\platform-tools). Then hold the SHIFT key on the keyboard and right-click on any empty space inside that folder. Finally, select ‘Open PowerShell window here’.
- On macOS/Linux: Launch the ‘Terminal’ and change its directory using the ‘cd’ command to the folder where the platform-tools are installed. For instance, if the tools are installed in Documents/platform-tools’, then the command should be:
- Nexus 6P TWRP Recovery: twrp-3.3.1-0-angler.img
- Rooting Packages:
Unlock the Bootloader
In order to perform any sort of modification (like installing TWRP or rooting in this case), you must first unlock your Nexus 6P’s bootloader. Thanks to Google, this is really simple.
Step 1: First, go to ‘Settings’ > ‘System’ > ‘About phone’ on your phone. Then scroll down and find the ‘Build number’ section. Tap continuously on it for five (5) times until you see the ‘You’re now a developer!’ message. You have just enabled the hidden Developer options on your phone.
Step 2: Now, go to ‘Settings’ > ‘System’ > ‘Developer options’ and turn on the ‘OEM unlocking’ toggle. Select ‘ENABLE’ when prompted to finally enable OEM unlocking on your Nexus 6P.
Step 3: With OEM unlocking enabled, you can now unlock the bootloader via fastboot. To do this, power off your phone completely. Then boot it into Bootloader Mode by holding the Volume Down and Power buttons together. Once your Nexus 6P is in Bootloader Mode, connect it to the PC via a USB cable.
Step 4: Now launch the command-line window on your PC and execute the following command to ensure that your PC can recognize your Nexus 6P over fastboot:
The command should return your device’s unique ID. If it doesn’t, then make sure that you have installed the proper USB drivers on your PC (Check the ‘Prerequisites’ section’ above).
Step 5: To finally unlock the bootloader on your Nexus 6P, enter the following fastboot command:
fastboot flashing unlock
As soon as you enter the command, you will be prompted by a confirmation message on your phone’s screen. Use the Volume keys of your phone to move the selector to ‘YES’ and then press the power button to confirm the selection.
Your phone’s bootloader should be unlocked now. From now onwards, you should see the bootloader unlocked warning message on the screen whenever you reboot the phone. Do not worry, this is completely normal and you can safely ignore it.
Install TWRP Recovery
Now that the bootloader is unlocked, you can flash the partitions and install TWRP recovery on your Nexus 6P.
Step 1: First, download the TWRP recovery image for the Nexus 6P from the ‘Downloads’ section. Copy the download .img file to the folder where the Android platform-tools are installed (e.g. ‘C:\platform-tools’ on Windows or ‘Documents/platform-tools’ on macOS/Linux).
Step 2: Connect your phone to the PC while it is in Bootloader Mode.
Step 3: Now launch the command-line window on your PC and enter the following command to verify the device-PC connection over fastboot:
Step 4: Now, flash the TWRP recovery image to your Nexus 6P by entering the command mention below.
fastboot flash recovery twrp-3.3.1-0-angler.img
Step 5: TWRP has now been installed on your phone. For carrying on the rooting procedure, you will need to boot your Nexus 6P into TWRP recovery mode. To do this, simply tap either of the Volume buttons until ‘Recovery Mode’ shows up on the bootloader screen. Then press the power button to confirm.
When your phone boots into TWRP for the first time, it should prompt you with the ‘Unmodified System Partition’ screen prompting you whether to allow modifications or keep the /system partition read-only.
Decrypt the Data Partition via TWRP
Earlier, TWRP didn’t support proper decryption of the /data partition, which means that it couldn’t mount the internal storage. This was a problem only with older builds of TWRP. But since you’ve installed and are using TWRP v3.3, this shouldn’t be a problem. However, if you plan on flashing custom ROMs, you might want to consider decrypting your phone’s data partition.
This is actually very simple. Simply, go to the ‘Wipe‘ menu of TWRP recovery and press ‘Format Data‘. Input ‘yes‘ in the provided field and press the enter button of the keyboard. The recovery will completely format the data partition and decrypt it.
Once the formatting finishes, go to ‘Reboot’ and press the ‘Recovery’ button. This will reboot your phone back into TWRP.
Root Huawei Nexus 6P using Magisk/SuperSU
Till now, you have unlocked the bootloader, install TWRP custom recovery, and decrypted the data partition on your phone. Well now, you’re now at the part that requires the least amount of effort, that is, flashing the root package via TWRP to root your Nexus 6P.
- First, download the root package of your choice from the ‘Downloads’ section, on your PC. Although you can still use SuperSU, I would personally recommend using Magisk, since it is more efficient, works on the latest Android version, and is still under active development.
- Once you have downloaded the zip package, connect your Nexus 6P to the PC while it is in TWRP recovery. Your PC should recognize your phone instantly and mount its internal storage. If it doesn’t do that automatically, go to the ‘Mount’ menu in TWRP and verify that MTP is enabled.
- Now transfer the downloaded root zip package (let’s say Magisk-v20.4.zip) to your Nexus 6P’s internal storage. Once transferred, disconnect the phone from the PC.
- Then go to the TWRP main screen and press the ‘Install’ button. Navigate to your phone’s internal storage and select the root package (e.g. Magisk-v20.4.zip). Finally, swipe the button on the screen to flash the file and root your Nexus 6P.
When the flashing process finishes, hit the ‘Reboot System’ button to boot your phone into the system (OS).
Your phone should now be rooted. To verify, go to the app drawer and launch the Magisk Manager or SuperSU application (depending on what you flashed).
You also now have TWRP recovery installed on your Nexus 6P. Which means you can use it flash custom ROMs, kernels, and even mods. You can also use it to take NANDroid backups of the complete OS, which can really be helpful especially when switching ROMs.
That’s it! If you have any questions regarding the instructions mentioned here or feel stuck at any point, feel free to let me know.