Android How to

Complete guide to unlock bootloader Nexus 6p

nexus-6p

Warning : By attempting any of the processes listed this thread you accept full responsibility for your actions. I will not be held responsible if your device stops working, catches on fire, or turns into a hipster and claims to have been modified before it was cool. This Article is for those who are well aware of the system process.

Prerequisites:

You’ll need a working adb/fastboot environment on your PC to get through some of these guides.

Please do not install adb/fastboot via any means other than the Android SDK, using other tools (like Minimal adb & fastboot) can lead to an outdated setup and various problems with flashing. You’ve been warned, other tools will not be supported in this thread.

Download the Android SDK, which will give you most updated version of adb and fastboot. Scroll to the bottom of the page and find Other Download Options>SDK Tools Only, and grab the right version for your OS. While it’s downloading create a folder in C:\ called SDK (C:\SDK). Once you’ve downloaded the zip you can extract it into your C:\SDK folder. Navigate to C:\SDK\android-sdk-windows and open SDK Manager.exe. In SDK Manager you need to install the following packages:

Tools > Android SDK Tools, Android SDK Platform-tools
Extras > Android Support Library, Google USB Driver

Once you have installed those, inside C:\SDK you should see some new folders, one of them will be called platform-tools, within that folder you should see fastboot.exe and adb.exe. I’ll refer to this as your fastboot folder/directory or working folder/directory during this guide. To make sure adb is correctly installed, open a command prompt from within your fastboot folder (hold shift + right click, select open command prompt here) and issue this command:

Code : adb version
If it returns a version number for Android Debug Bridge then you’re good to go.

You can test adb by connecting your device to your PC while booted into Android (making sure that adb/usb debugging is enabled in Settings>Developer Options) with the screen unlocked and issuing this command:

code : adb services
It should return your device serial number, if so, adb is working.

You can test fastboot by connecting your device to your PC while booted into the bootloader (power + volume down) and issuing this command:

Code: fastboot devices
It should return your device serial number, if so, fastboot is working.

Tips

How to boot into the bootloader:
Power off your device. Once it’s powered off hold power + volume down and the phone will boot into the bootloader. You can also use the following adb command:

Code : adb reboot bootloader
You can also use an app called Quick Boot to boot into the bootloader directly from Android (root required).

How to boot into recovery:
Boot into the bootloader (see above), use the volume keys to scroll through the options and use the power button to select the recovery mode option. You can also use the following adb command:

Code: adb boot recovery

How To Unlock Your Bootloader

  1. Go into Settings/About Phone, scroll down and click on ” build number ” continuously until you see a toast notification telling you that you’ve enabled Developer Options. Go back to your Settings menu and enter Developer Options, scroll down and click on the “Enable OEM Unlock ” checkbox, also make sure you enable USB Debugging while you’re in the Developer Options menu.
  2. Power off your phone then boot into the bootloader (power + volume down).
  3. Connect your phone to your PC via usb cable.
  4. Open a command prompt from within your fastboot folder (navigate to where you have fastboot.exe located on your PC, shift + right click anywhere within that folder, select open command prompt here).
  5. Check your fastboot connection by issuing this command :
    Code : fastboot devices
    it should return your device serial number, if not check the drivers installation again
  6. Once you have confirmed fastboot connection, issue the unlock commnd.
    code : fastboot unlocking flash
    This will erase all user data from Device
  7. You should now see a screen on your phone asking you to confirm this action, use the volume keys to scroll and the power key to confirm if you’re sure you want to go ahead.
  8. Allow the process to complete and then issue this command:
    code : fastboot reboot
  9. Allow everything to go ahead, once finished, diconnect cable.

Important: do not relock your bootloader unless your phone is fully stock. You must flash the factory images first in order to remove root and custom recovery (if you have them), if this precaution isn’t taken you may end up with a brick. Please see section 9 of this guide for full instructions on how to return to stock.

How To Install A Custom Recovery On Your Device

Prerequisites: unlocked bootloader (section 1).

  1. Download TWRP Recovery.
  2. Make sure you check the md5 to verify its integrity (where possible).
  3. Place the file in your fastboot folder (this is where fastboot.exe is located on your PC).
  4. Open a command prompt from within your fastboot folder (navigate to where you have fastboot.exe located on your PC, shift + right click anywhere within that folder, select open command prompt here), enter this command :
    code : fastboot flash recovery <filename>.img
    (The recovery filename in the command will change depending on which recovery you’re flashing)
  5. Use the volume keys to scroll and power key to select the Reboot Bootloader option.
  6. Once the phone has booted back into the bootloader you can use the volume keys to scroll and the power key to boot into your newly flashed recovery. It’s now safe to disconnect your usb cable.

Do not flash the version of SuperSU that TWRP offers to flash for you in order to give you root, it is not compatible and will cause problems. When using TWRP before you’ve actually flashed SuperSU 2.50+, when you attempt to reboot out of TWRP it will tell you that it’s detecting that you don’t have root and it will offer to root for you, skip past this.

How To Decrypt Your Data Partition

This is no longer necessary as long as you use TWRP 2.8.7.1 or newer

Prerequisites: unlocked bootloader (section 1).

TWRP recovery cannot decrypt your data partition at this stage. In order for TWRP to be able to read/write on your data partition (to root or create a nandroid backup) you will need to format it, a format will remove encryption.

  1. Boot into the bootloader and connect your phone to your PC via usb cable.
  2. Open a command prompt from within your fastboot folder (navigate to where you have fastboot.exe located on your PC, shift + right click anywhere within that folder, select open command prompt here), enter this command :
    Code : fastboot format userdata
    ( Please note this step will erase all Data from the device )
  3. Once the process has completed, you can reboot normally
    code : fastboot reboot

How To Make A Nandroid Backup With TWRP Recovery

Prerequisites: unlocked bootloader (section 1), TWRP recovery (section 2).

Warning: before you make a backup with TWRP you must remove all lockscreen security. If you do not do this you will not be able to unlock your device after restoring your backup (entering your pin will result in an “incorrect pin” message), you’ll be forced to perform a factory reset to boot into Android. To remove lockscreen security go to Settings>Security>Screen Lock and set it to swipe/none.

A nandroid backup is a very important thing to have before installing any custom software on your device. It’s basically a backup of your stock system that you can fall back on if anything goes wrong or if you just want your stock ROM back. You can also use the backup tool to create a backup of your favourite ROM set up exactly the way you like it. The backup you create can be easily restored using the restore tool in TWRP recovery.

Boot into TWRP and select the backup option from the TWRP home screen, check the system/data/boot boxes, and swipe to backup. The process will take a few minutes.

How To Root Your Stock Rom

Prerequisites: unlocked bootloader (section 1), TWRP recovery, modified boot.img (below).

  1. If you’re on the MDA89D build you must update to at least the MDB08K build first (see section 9 for details on flashing the factory images to update). If you’re on the MDB08K build or higher you can proceed.
  2. Go to this thread and download the appropriate modified boot.img (angler-xxxxxx-boot.zip). The modified K boot.img is compatible with the K, L and M builds. Please note that for traditional root method you need to download from the attachments in post #1, or if you wish to you can try the new systemless root method, which needs a different modified boot.img (details and downloads in post #2 of the linked thread). @mrRobinson has also provided some modified boot.img’s for various builds in the following posts:
    MDB08M
    MMB29N
  3. Download SuperSU to your phone, as stated above there are now two types :
    SuperSU for traditional root method
    SuperSU for systemless root method
  4. Extract the zip and place the file in your fastboot folder (this is where fastboot.exe is located on your PC).
  5. Boot into the bootloader and connect it to your PC via usb cable.
  6. Open a command prompt from within your fastboot folder (shift + right click, select open command prompt here), and enter the following commands :
    code : fastboot flash boot boot.img
  7. Once the flash has finished you can use the volume keys to scroll and power key to select the Reboot Bootloader option.
  8. Boot into TWRP recovery and enter the install menu.
  9. Navigate to where you have SuperSU stored on your internal storage and select it.
  10. Swipe to install.
  11. Once you’ve installed SuperSU you’ll have an option to wipe cache/dalvik and an option to reboot system. Wipe the cache/dalvik, hit the back button, and hit the reboot system button. That’s it.

Do not flash the version of SuperSU that TWRP offers to flash for you in order to give you root, it is not compatible and will cause problems. When using TWRP before you’ve actually flashed SuperSU 2.50+, when you attempt to reboot out of TWRP it will tell you that it’s detecting that you don’t have root and it will offer to root for you, skip past this.

How To Install A ROM with TWRP Recovery

Prerequisites: unlocked bootloader (section 1), TWRP recovery (section 2).

  • Installing a ROM is a pretty straight forward and easy process. Before you install anything you should make a nandroid backup (instructions above).
  • Download a ROM and appropriate Gapps package and place on your device.
  • Boot into your custom recovery.
  • Perform a full wipe.
    – Select the wipe option from the TWRP home screen.
    – Select advanced wipe.
    – Check the system, data, cache, and dalvik cache options.
    – Swipe to wipe.
  • Install the ROM.
    – Select the install option from the TWRP home screen.
    – Navigate to where you have the ROM zip stored on your sd card and select it.
    – Swipe to install.
    Most ROMs will run an installer script at this point but some ROMs have what is called an Aroma Installer which allow you to choose some install options before the script runs.
    – You will also need to install the appropriate gapps package directly after installing the ROM.
  • Once you’ve installed all necessary zips you’ll have an option to wipe cache/dalvik and an option to reboot system. Wipe the cache/dalvik, hit the back button, and hit the reboot system button.

Source : XDA Forum

About the author

Profile photo of Rakesh Bhatia

Rakesh Bhatia

Leave a Comment

Powered by keepvid themefull earn money