If you ever plan on rooting your new Nexus 5X, the smart thing to do will be to unlock its bootloader straight away before setting it up. This is because unlocking the bootloader will wipe the internal storage of the handset clean, which means that you will have to setup your device again after that, and that is not something that most of you will be willing to do. The steps to unlock the bootloader of the Nexus 5X remains the same as previous Nexus devices, but you do need the very latest version of the ADB and fastboot binaries for the commands to work. So, ready to unlock the bootloader of your brand new Nexus 5X? Follow the steps below then. Step 1: Download the necessary fastboot files and drivers from below. Make sure to extract all the content from below inside a new folder called ‘nexus’ on your desktop.
ADB/Fastboot: Windows | Mac Windows 7/8.1 ADB drivers
Google updated the Fastboot and ADB binaries with Marshmallow, and the above files have been extracted from the latest Android SDK. So make sure to use them, and not the existing copies of ADB/Fastboot files if you have them on your PC. Step 2: On your Nexus 5X, head over to Settings -> About Phone and tap on build number 7 times. This will provide you with access to the hidden ‘Developer Options’ menu. Now, head over to Settings -> Developer Options and check the ‘Enable OEM Unlock’ option. Step 3: Switch off your Nexus 5X and boot it into bootloader mode by pressing the Volume down + Power button. Once your phone boots into bootloader/fastboot mode, connect it to your PC. Step 4: On your PC, open up a new command prompt or Terminal Window and then navigate to the ‘nexus’ folder on your desktop using the “cd” command. An example code can be found below: Alternatively, a simpler way for Windows users is to simply Shift + right click on the folder and select the ‘Open command window here’ option. Step 5: Verify that your Nexus 5X is properly being detected by your PC by issuing the below command: Mac owners will need to prefix a “./” before every fastboot command they execute, so for them the command to execute will be: If your device is not detected by fastboot for some reason, restart your PC and repeat Step 1-4 above. Step 6: Executing the below command will unlock the bootloader of your Nexus 5X. It will also wipe the internal storage of the device, so make sure that you have backed up all your important data on the handset. Confirm that you want to unlock the bootloader of your Nexus handset by selecting the ‘Yes’ option and confirming it by pressing the Power button. Step 7: Your phone will reboot during the procedure. One the bootloader is unlocked, reboot your Nexus 5X by running the following command: Mac owners, don’t forget to prefix a “./” before the command. With the bootloader unlocked, you will be easily able to gain root access, flash a custom recovery or a custom ROM down the line on your Nexus 5X without worrying about your installed apps and app data. Additionally, since unlocking the bootloader does not lead to any warranty issues or a particular feature on the Nexus 5X from working, there really is no harm in unlocking it right away.