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.

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.

Before You Begin

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.

Step 1: Install the Android SDK on Your Computer

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.

Step 2: Install the ADB & Fastboot Drivers on Your Computer

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.

Windows Users:

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.

Linux Users:

If you're a Linux user, download and extract this ZIP file, then run the script with Terminal.

Mac Users:

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.

Step 3: Download the Neccesary Files

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:

If you're rooting a Nexus 6P, download the following files instead—but again, make sure the build numbers match up:

Then, regardless of your phone model or build number, download the SuperSU ZIP and transfer the file over to your phone:

Step 4: Enable OEM Unlocking on Your Phone

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.

Step 5: Put Your Phone into Bootloader Mode

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.

Step 6: Unlock the Bootloader

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.

Step 7: Move the Boot Image & TWRP to the Platform-Tools Folder

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.

Step 8: Flash the Modfied Boot Image & TWRP

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

Step 9: Make TWRP Your Permanent Recovery

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.

Step 10: Flash the SuperSU ZIP to Root

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 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.

Step 11: Verify Root

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!"

More Information About Systemless Root

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.


I did everything that you said, but when I boot my phone, I dont have root and i get a message from SuperSU Installer, ,it says "tap to install super SU and root your device. Is that the systemless? Thanks.

I'm pretty sure you can only install the systemless version of SuperSU through recovery right now, so that pop-up has to be offering to install the regular version. There are really only two requirements for systemless root—installing the properly-modified boot image, and flashing the right version of the SuperSU ZIP. So if you're sure you have the right modified boot image installed, try booting back into TWRP and flashing the SuperSU v2.56 beta ZIP again. If TWRP asks you to install SuperSU again after you reboot, make sure to tap "Do Not Install" and you should be all good.

when i put it in revovery mode a warning message popped up quickly then started the phone up. now it says Mount, decrypt data, and wants me to enter a password but i dont know what for. i have the same blue background as you do so i think i installed it. but idk what to do about this password thing

I have the same thing happening now . . .ugh. Any solutions or ideas? Thanks!

I have the same problem here! Anyone knows how to solve it?

I have a bootloop after this... -.-
Do you have any solutions???

Thanks for the tutorial. However, how can I proceed with Build number MMB29M on my 6p?

my phone doesnt pass the google colorful intro any suggestions?

I forgot to transfer supersu on my phone and started the procedure and almost finished it till super su installation.

Did all the steps up until transferring SuperSU onto my phone, forgot this part. When TWRP asked me if I wanted to install SuperSU I swiped for it to instal. :/

My Nexus5X has been stuck on the loading screen for over 15hrs and when I try and put it into fastboot mode it tells me my phone is corrupt, and to go here:

Which I did, but I can't do a flash on my phone since I can't get it into fastboot mode.. everytime I do it shows me the message telling me my phone is corrupt and at is disconnects from my pc.

Help? :(
Since I unlocked my phone I don't think the warranty will cover it.. just got it a couple days ago ! Sigh.

Okay, this is gonna be a 2-part reply. Here's part 1:

You can still get to the bootloader menu, and now that your bootloader is unlocked, that means you can flash the factory images to restore the stock firmware.

Getting into the bootloader menu with a softbrick like you've got here will be a little different, though. First, force a hard reboot by holding down your power button for about 10 seconds. Then, as soon as the screen goes black, let go of the power button and hold the volume down button instead. This should take you directly to the bootloader menu.

From here, you'll need to download the factory images for your device and save them to your computer. You can get those from this link, but they'll be zipped up in a series of nested archives. So you'll have to use a program like 7-Zip to extract them, but make sure to extract all of the contents of all the archives.

Once you do that, you'll be left with a series of IMG files—these make up the stock firmware for your device, and you can flash them just like you did with TWRP and the modified bootloader in Steps 7 & 8.

The one that I would flash first is the system image, since the version of SuperSU that TWRP installed was installed to your system partition. It'll be named something like "system-bullhead-xxx.img"—rename it to simply "system.img" and copy it over to the platform-tools folder on your computer.

Part 2:

From there, open a command window in the platform-tools folder and type "fastboot devices" to make sure you're connected. If so, type "fastboot flash system system.img" and hit enter to flash the stock system image and overwrite SuperSU.

Once that's finished, you can type "fastboot reboot" to restart your device and see if it boots up successfully. I'm pretty sure it will, but if it doesn't, just use that power/volume down button combo to put it back into bootloader mode.

Next (again, this is only if flashing the system image didn't work), I would try flashing the stock boot image to overwrite the modified boot image you installed from this tutorial. It'll be in that archive you extracted, and it'll be named something like "boot-bullhead-xxx.img". Again, rename it to simply "boot.img" and copy it over to your platform-tools folder.

This time, send "fastboot flash boot boot.img" as the command. When it's done, try rebooting again by sending the "fastboot reboot" command.

I'm 99% sure that should get you back up and running, but if it doesn't, let me know.

followed these steps and stilling having problems

My nexus 5x build number is MMB29K.
Is there a different boot image file I need to use (Step 3)?


HI, I follow these directions for my Nexus 6p and everything worked perfectly...except now i cant seem to open my camera. Did i do something wrong along the way?


I don't see how that could be related to rooting. Have you tried clearing data on the camera app and rebooting?

In step 6 and 8, the author forgot that this was a pc AND MAC tutorial.

"fastboot devices", "fastboot flashing unlock", "fastboot flash boot boot.img" and "fastboot flash recovery twrp.img" will return "FASTBOOT: COMMAND NOT FOUND" if used in terminal on a Mac.

These are the PC commands. On Mac, type "./fastboot devices" - and the same for the other commands. Hopefully the author updates the article to add this.

I also have Build MMB29M. How do I proceed?

How do you do this with a different build number? I got MHC19Q.

I also have MHC19Q and would like help please

The boot number for my Nexus 6P is MTC19T. Will this method still work, and where can I get the modified boot image?

Share Your Thoughts

  • Hot
  • Latest