How to Root the Nexus 6P or Nexus 5X on Windows, Mac, or Linux—The Foolproof Guide
This year, Google released two Nexus phones to glowing reviews, and as we've grown to expect, the Android community wasted no time in coming up with a root method for both. In fact, legendary root developer Chainfire even devised an entirely new "systemless" method for rooting that should make updating a bit less complicated, along with a few other benefits.
- Don't Miss: All the Android Terminology You Need to Know
The new method roots your device without modifying Android's system partition at all—hence the systemless root moniker. This means that fewer of Android's built-in security measures need to be bypassed in order to gain root access, and in turn, early reports even indicate that Android Pay works with this new method.
Provided you have a PC, Mac, or Linux machine, rooting your shiny new toy is a relatively simple process. There are quite a few steps involved, though, but I'll go over each of them in as much detail as possible to make sure everything goes off without a hitch.
Rooting an Android 6.0 Marshmallow device requires that you install a modified boot image, which means you'll need to unlock your device's bootloader. The process of unlocking your bootloader will wipe all data on your phone, so make sure you have any important files backed up on an separate storage device.
Additionally, you'll need to connect your phone to your computer to run a few commands. Considering that the Nexus 5X and 6P are among the first devices to ship with a USB type C connector, and most computers still use a USB type A connector, this means that you will likely need a USB-C to USB-A cable. For a list of these types of cables that fully comply with the new USB-C standard, head to this link.
To begin, you'll need to grab a copy of the latest Android SDK. From your computer, head to the official site to download the file for your particular operating system.
The installation process will vary depending on your operating system. Windows users can simply launch the EXE file and follow the provided instructions to install the full Android SDK, which will be saved in the C:\Program Files (x86)\Android\ folder. Linux and Mac users will have to extract the contents of the ZIP to a folder that can be accessed easily. Take note of this folder's location, as you will need to copy some files here later.
From here, if you're using a Linux or Mac machine, open a terminal window and change directories to the /android-sdk-linux/tools/ or /android-sdk-macosx/tools/ folder that you just extracted. Next up, type android sdk (Linux) or ./android sdk (Mac) to launch the SDK Manager.
After that, you'll need to download the Platform Tools package if you're using a Linux or Mac computer. Select the "Android SDK Platform-tools" option, then click the install button to take care of that.
Next up, for your computer to be able to fully interact with your Nexus, you'll have to make sure you have the ADB and Fastboot drivers installed on your system.
If you own a Windows PC, you can download the drivers at this link. Just run the file, then follow the prompts, and you'll be good to go.
If you're a Linux user, download and extract this ZIP file, then run the script with Terminal.
For Mac users, the process of installing the proper drivers is a bit more involved. Please see our guide on the topic for more information.
It's very important that you download the proper root files for your device and Android version. To make sure you're using the right files, open your phone's Settings menu, then scroll down and select "About phone." From here, make a note of the Build number listed at the bottom of the screen.
Next, if you're using a Nexus 5X, download the following files to your computer, making sure that the build number shown here matches the one on your phone:
- Nexus 5X modified boot image (build numbers MDB08I, MDB08L, & MDB08M)
- TWRP recovery v22.214.171.124 for Nexus 5X (any build number)
If you're rooting a Nexus 6P, download the following files instead—but again, make sure the build numbers match up:
- Nexus 6P modified boot image (build numbers MDB08K, MDB08L, & MDB08M)
- TWRP recovery v126.96.36.199 for Nexus 6P (any build number)
Then, regardless of your phone model or build number, download the SuperSU ZIP and transfer the file over to your phone:
- SuperSU v2.56 ("systemless" version)
From here, you'll need to enable Android's hidden "Developer options" menu so that you can then turn on a single option. Check out our full guide to see how to unlock it, if it's not already. In the "Developer options" menu, tap the "OEM unlocking" entry to enable it, then press "OK" when prompted to verify your choice.
From here, you'll need to put your phone into bootloader mode. Start by powering your device completely off. When the screen goes black, press and hold the volume down and power buttons simultaneously. Within a few seconds, you'll see Android's bootloader menu (depicted below). From here, connect your phone to your computer using a USB data cable.
With the prep work out of the way, you're ready to get down to business. To begin, open a command prompt window, then change directories until you arrive at the /android-sdk/platform-tools/ folder. Windows users can simply open the C:\Program Files (x86)\Android\android-sdk\platform-tools\ folder, then hold down the shift button and right click any empty space, and choose "Open command window here."
Next, type in the following command and press enter:
- fastboot devices
If this returns a series of letters and numbers, that means your device is connected properly and you're good to go. If it does not return any characters, there's a problem with your drivers, so revisit Step 2 or see our full troubleshooting guide here.
Now you're ready to unlock your device's bootloader, which will allow you to flash images manually. So enter the following command to begin:
- fastboot flashing unlock
At this point, you'll see a menu on your phone asking if you'd like to unlock your bootloader. Use the volume keys to highlight "Yes" on this menu, then press the power button on your phone to confirm your choice. Once you've done that, your phone will automatically wipe all of its data, then reboot into bootloader mode again.
When you're done here, leave your phone in bootloader mode and keep the command prompt window open, since we'll be using both again later.
Next, copy the boot.img and twrp.img files that you downloaded in Step 3, then paste them into the /android-sdk/platform-tools folder on your computer. Again, the exact location of this directory will vary depending on your operating system, but Windows users can find it in C:\Program Files (x86)\Android\android-sdk\platform-tools. Note that you may have to provide administrator credentials to paste the files into this folder.
Next, switch over to the command prompt window that you opened in Step 6. From here, type in the following commands, pressing enter after each and waiting 30 seconds between commands:
- fastboot flash boot boot.img
- fastboot flash recovery twrp.img
Next, press your phone's volume down button twice to highlight the "Recovery mode" option on the bootloader menu, then press the power button to select it. From here, your device should boot directly into TWRP. At this point, you'll see a menu asking to make TWRP your permanent recovery, so swipe the slider at the bottom of the screen to do just that.
When that process is finished, you'll be taken to TWRP's main menu. Tap the "Install" button here and use the file browser to select the SuperSU-2.56.zip file that you downloaded in Step 3, then swipe the slider at the bottom of the screen to flash the file.
When that's finished, tap the "Reboot System" button in the bottom-right corner. At this point, TWRP will say that "Your device does not appear to be rooted." This is because TWRP hasn't been updated to detect the new "Systemless" version of SuperSU, so ignore this message and tap the "Do not install" button.
When you get back up, your device should be fully rooted. To verify this, download an app called Root Checker from developer joeykrim.
Once you've installed the app, simply open it up and tap "Verify Root." From here, tap "Grant" when prompted to give the app Superuser access, and if everything went off without a hitch, you'll see a message saying "Congratulations! Root access is properly installed on this device!"
The best part about this new root method is that (so far), Android Pay seems to work without a hitch, and applying OTA updates shouldn't be as difficult as it was with previous root methods. In the future, provided you didn't make any significant changes to the system partition using root access, you should only have to flash the stock boot image with the fastboot flash boot boot.img command to get your device ready for a system update.
One downside, though, is that you will lose root access if you perform a factory reset. But getting it back shouldn't be much of an issue, since you'll only have to flash the SuperSU ZIP again in TWRP to re-root.
What are your thoughts on this new systemless root method? Let us know in the comment section below, or drop us a line on Android Hacks' Facebook or Twitter, or Gadget Hacks' Facebook, Google+, or Twitter.