How to unlock the Nexus 6P or Nexus 5X bootloader

Your new Nexus 6P or Nexus 5X comes from the factory with a locked bootloader. While unlocking it is trivial, it's important to remember that an unlocked bootloader is very unsecure, and makes your personal data more vulnerable should someone get your phone in their hands. If you're not the type of person who wants to flash ROMs or system images or the like, it's probably best to leave it locked. That's for you to decide.

Should you decide to unlock your bootloader, remember that doing so will erase all the user data on your phone and return it to the out-of-box state. Still with us? Cool. Here's how to do it.

You'll need a working installation of fastboot on your computer. Yes, you need a computer to unlock the bootloader. We recommend that you install the Android SDK and the official Google USB driver if you're using Windows, but there are toolkits and bundles available if you'd rather go that way. You'll find more information about that in the forums. We're going to go with the premise that you've downloaded and installed the Android SDK for your computing platform, and any needed drivers for Windows computers.

Next, you'll need a suitable cable. In this case, suitable means one end needs to be USB Type-A to plug into your computer, and the other needs to be USB Type-C to plug into your phone. For the Nexus 6P and 5X, we recommend you use the one that came in the box.

OEM unlocking

USB Debugging

Now you need to give permission for the bootloader to be unlocked. And to make things easy, enable USB debugging on your phone. Go to settings, About phone and find the entry labeled build number. Tap it five times, read the pop up telling you that you're a developer now, then go back to the main settings page. Near the bottom, you'll see a new entry labeled Developer options. Tap it to get in there, and toggle the switch to allow OEM unlocking, then enable USB debugging.

Authorization, please

Now connect all the things together, and fire up the command line on your Windows computer or a terminal program on your Mac or Linux computer. Make sure your phone is unlocked and the screen is on, because you'll be asked to authorize the computer and give it permissions to communicate with your Nexus 6P over a wire. Once that's done and sorted, it's time to do some typing.

On your computer, at the command prompt type:

adb devices

If everything is good, you'll see the phone's serial number in your command line window. If not, you probably have a PATH issue. See the tutorial about setting up the SDK for help if you're using a full SDK installation, or ask in the developers support thread if you're using some sort of toolkit. As a workaround, you can navigate to the folder with the adb and fastboot executable files and work from there. If you do this on a Mac or Linux computer, remember your dot and slash: "./adb devices" for example.

adb devices

Once you have things sorted, it's time to reboot to the bootloader:

adb reboot-bootloader

When you get to this stage, you will need to use fastboot to communicate instead of adb. If you're working out of the folder where the fastboot command is located, remember that dot and slash if you're using a Mac or Linux computer. Try this command to see if everything is working:

fastboot devices

See the serial number like we did with the adb command? If so, you're good to go. If not, you need to troubleshoot. If you're using Windows and having issues, chances are it's the driver. In any case, hit the forums and work out why things aren't communicating if you need to.

fastboot devices

Up until now, things are the same here as they have always been with Nexus phones. But the command to actually unlock the bootloader has changed. When you're ready, at your command line, type:

fastboot flashing unlock

Remember — this will erase everything on your phone and restore it to the way it came out of the box.

You'll need to confirm this action on your phone's screen, using the volume and power keys. Follow the instructions on your screen.

Let it do it's thing, and when it's done send one more command to make things final:

fastboot reboot

After recovery erases everything and you've booted back to Android (at the device setup screen) you can unplug your cable and use your phone normally.

If you ever decide to relock your bootloader, you can do so with this command:

fastboot flashing lock

Remember, if you need to unlock your bootloader again, things will get erased again.


That's it. Your bootloader is now unlocked, and you can flash both official and unofficial firmware to your Nexus. In fact, you'll be reminded that your bootloader unlocked each and every time you start your phone. Stay safe, and choose wisely!

Jerry Hildenbrand
Senior Editor — Google Ecosystem

Jerry is an amateur woodworker and struggling shade tree mechanic. There's nothing he can't take apart, but many things he can't reassemble. You'll find him writing and speaking his loud opinion on Android Central and occasionally on Twitter.

  • Not messing with it this time around. The only thing I'd want is double tap to wake. Other than that I like it as is.
  • You can already get that on ElementalX kernel Up to you, but I already have TWRP, custom kernel, 9 apps rooted and Xposed Module to follow(alpha this weekend!!!!).
  • Me either last time I mess with it I got Nexus 5 startup loop :( RIP Posted via the Android Central App
  • You're better off. I double-tapped my 6P and it broke in half.
  • LoL Posted via the Android Central App
  • "fastboot flashing unlock" That's new. Have other fastboot commands changed too?
  • Nope, you still
    fastboot flash boot boot.img/
    fastboot flash recovery angler_twrp.img etc
  • that unlocked bootloader warning screen gets annoying pretty quickly
  • My friend unlocked his 5x and yes, it seems VERY annoying Posted via my amazingly smexy Nexus 6 running Mallows of the Marsh yo
  • You can get rid of it with eXperimental Kernel.
  • You can get rid of it pretty easily. I did on my Moto X. I can't remember the exact command I used though because it was awhile ago Posted via the Moto X Pure (2nd Gen.) running CM13 w/ Nova Prime & Xposed
  • Is this same for the 6 ? Posted via the Android Central App
  • I type fastboot oem unlock Posted via the Android Central App
  • Hmmm I see OEM unlock under developer settings. Difference? Posted via the Android Central App
  • If you cannot be bothered to read an article on how to do what you want to do, you shouldn't do it. In fact, go get an iPhone, your safer that way __________________________________________________________________________________-_________________________-____________________
  • Oh are we playing this game? You spelled "you're" wrong. And please try to be helpful. Posted via the Android Central App
  • Th at was helpful __________________________________________________________________________________-_________________________-____________________
  • No, it was you being an unnecessary prick
  • +1 Posted via my amazingly smexy Nexus 6 running Mallows of the Marsh yo
  • dick
  • On my 6P it is OEM unlocking.
  • Yes. There is a difference. Posted via the Android Central App
  • My phone is a champ. Really can't come up with a reason to opt in this time around.
  • I'm pretty sure you tap Build Number 7 times to unlock developer settings; not 5 Posted via the Android Central App
  • So will locking bootloader erase data? Getting mixed answers. Thanks Posted via the Android Central App
  • Yes!!!! Posted via the Android Central App
  • I wish I knew this before spending a whole day configuring my app's settings... =/
    Now if I lock again I'll lose it all.
  • Mskip has great toolkit over on xda.
  • Just re-locked bootloader today to do some testing. It does wipe device.
  • Thank you.
  • Going to leave mine as is for awhile. As mentioned above, not seeing much of a reason just yet to unlock this time around.
  • If you don't know how to do this already, then a Nexus isn't for you... Posted via the Android Central App
  • Some people aren't aware of the change from fastboot oem unlock to fastboot flashing unlock. Posted via Nexus 6P
  • Oh really. So how does one learn the first time when they've never done it before and want to learn. Everyone has to start somewhere. And there are people who've never had an android before. I know, it's blowing your tiny fanboy mind. I hate comment sections. Posted via the Android Central App
  • So there's something wrong with wanting a Nexus because it's a great phone with specs and features not found elsewhere, and lacks OEM add-on crap? Damn I sure wish I was as l337 as you.
  • I beg to differ; I personally wasn't born knowing how to do this. Did you?
    If you don't know how to do this already, it's just time to learn.
  • I just laughed out loud... After you guys sold all those shirts... :)
  • Hi everyone , I see a lot of negative comments regarding users that don't know how to do all this already so I was debating if I should even ask about this. I have been wanting to learn how to flash roms for a while now but I just never took the leap of faith because I always had phones like the note which isn't as easily rooted and what not. Can someone help a newb out? How exactly can I back up all the stuff on my phone without sd card on the 6p and where do I find roms to flash on the phone and is it as complicated as it all sounds ? What cool stuff can you do with the phone with rooting and flashing roms? Sorry, just a newb trying to learn the ways. Posted via the Android Central App
  • The negative comments are not for people who want to learn, those are always welcome. The best place to look it either in the forums for you device here or over on xda. I have not been to the nexus forums in awhile but I would guess the moderator has a sticky note with a step by step guide. If not, other people in there will be more helpful than those out here and you will get a better response. The nexus is very easy, and you will eventually get over to the xda-developers forums for roms and toolkits to make it super simple. I have rom'd every phone I have owned so I know it can be fun so enjoy it. Two pieces of advice. First read everything before you do it. Read and understand what is going to happen and how to fix it if it goes south on you. Read threads about problems that people had so you either do not repeat it or know how to fix it right away. The second is that no matter what happens, do not panic. The nexus is as easy to fix as just flashing the factory image. Wugs toolkit can do it practically without your help so nothing is ever really ruined. Good luck and pm me if I can direct you somewhere. __________________________________________________________________________________-_________________________-____________________
  • Thanks for the response , look forward to tinkering with it :) Posted via the Android Central App
  • wait... so my t-shirt that is shipping soon has it wrong!? :)
  • For Marshmallow only I believe...? :/
  • It's right for every other device. Don't worry its still a badass shirt. I love mine :) Posted via the Moto X Pure (2nd Gen.) running CM13 w/ Nova Prime & Xposed
  • it'd take the same amount of explaining either way when people ask... i've enjoyed the shirt and also did my part (maybe in a small way) to support Phil and crew.
  • "While unlocking it is trivial, it's important to remember that an unlocked bootloader is very unsecure, and makes your personal data more vulnerable should someone get your phone in their hands." How does an unlocked bootloader make it less secure? Shouldn't encryption protect any private data?
  • Believe it or not, encryption is not perfect, and an unlocked bootloader makes it much easier to exploit the flaws. Here's a great web site with pictures illustrating a cold-boot attack: In a cold-boot attack, you steal a phone which is still powered on, freeze the phone (literally, in a freezer), then reboot the phone ONCE, which would normally wipe out the RAM contents, but under this attack does not, because cold temperatures cause the contents of RAM storage to "stick" for longer than usual, even surviving a reboot. Then you flash a special recovery image (which you can do, since the phone is unlocked) and this recovery image is designed to find encryption keys stored in frozen RAM. Once you have the key, you can reboot the phone again as normal and enter in the key. It is important to note that a cold-boot attack is still possible against a locked phone: You simply need to physically remove the RAM and insert the RAM into another unlocked phone of the same model. But this approach requires special hardware (considering that the RAM is soldered onto the motherboard ... de-soldering of course heats up the chip which defeats the point of the cold-boot attack). Still, a sufficiently motivated and well-funded enemy could do it. By contrast, with an unlocked phone, no special hardware is required, other than a freezer.
  • If you're a person who can't read and follow instructions, of course you should leave your bootloader unlocked. Leave all the custom ROMS and firmware for those of us that can.
  • You have to manually unlock it, you probably mean they should leave it locked.
  • The Nexus 6P doesn't come with a USB C to USB A cable, dumbass. It comes with a USB C to USB C cable.
  • Quite the opposite dumbass it has both
  • This is so sad.