[GUIDE] Unlock/Root/Flash for Nexus 6P

Search This thread

ambivalentSoul

New member
Jan 23, 2020
2
0
"If it returns a version number for Android Debug Bridge then you're good to go."

What if it doesn't return a version number? I followed the steps; turned on the bootloader on my Nexus 6p. Downloaded the angler files, then opened up the cmd prompt from the same folder. But when I send the command adb devices it doesn't list any devices. I'm very noob at this. Any help is appreciated. Thank you!
 

Warren_Orange

Senior Member
Jun 2, 2011
1,209
174
Hi.

I am new to the Nexus 6p. I have stock Oreo with a password and fingerprint. I have just unlocked and installed TWRP 3.3.3-0. When I first loaded TWRP it asked me to decrypt data, but I just cancelled it as I thought it wasn't needed. I take it this is wrong?

I want to install Magisk and backup my ROM via TWRP.
 
Last edited:

Warren_Orange

Senior Member
Jun 2, 2011
1,209
174
^^^^^

I have now tried to go back into twrp but I get the Android on its back saying 'no data'. So the twrp flash never stuck.

I am under some confusion whether I need to format userdata or not. I would prefer not to but if it needs doing it needs doing.

I am going to flash twrp again and use my passcode when it firsts boot. If that does not work I will have to wipe userdata.

Would removing my fingerprint before flashing twrp help?

Twrp is 3.3.1-0
OS is latest stock Oreo.
 
Last edited:

wedel219

Member
Feb 22, 2015
8
0
The Bronx
Hi, there.

I just tried to root my 6P and flash SuperSU 2.82, and I'm stuck on the Google screen.

I've looked through the thread, and even tried searching through it, and most of the remedies for this seem to be: use Magisk.

If that's what I have to try next, so be it, but I wanted to describe my scenario to see if anyone can help me simply resolve things.

I factory reset my phone, but the OS only went back to 8.1.0. I got the phone in August of 2016, so I don't know why the factory reset wouldn't restore me to Nougat.

However, I proceed, with perhaps reckless abandon. I flashed TWRP 3.4.0.0 and then tried to install SuperSU 2.820201705271822.zip.

And now I'm stuck. It bootloops unless I force it into the bootloader, and then I can access recovery and TWRP, but if I try to turn the phone off, it just starts bootlooping again.

How do I get out of this mess? I'm sorry if it's all laid out in here, somewhere. I did look through a good few hundred posts, but didn't find what I'm hoping is a simple solution to this. That, and I'd just like to know what actually went wrong, so I can learn something from this fiasco.

UPDATE: I can get into TWRP, but there are no directories on my sdcard except for TWRP. Did I blitz my OS altogether? That would explain why it's stuck on the Google screen.

Also, in cmd, my phone is only recognized by adb while in recovery. If I am in the bootloader itself, the "list of devices attached" is blank. Is that information at all helpful to someone wiser than I am?

NO ROOT: I ran 'adb shell su' from cmd, and it says "su: not found," so my attempt at root was clearly unsuccessful.

Thanks.
 
Last edited:

Einwod

Senior Member
Mar 1, 2011
4,260
2,132
63
Lardos, Rhodes, Greece.
Hi, there.

I just tried to root my 6P and flash SuperSU 2.82, and I'm stuck on the Google screen.

I've looked through the thread, and even tried searching through it, and most of the remedies for this seem to be: use Magisk.

If that's what I have to try next, so be it, but I wanted to describe my scenario to see if anyone can help me simply resolve things.

I factory reset my phone, but the OS only went back to 8.1.0. I got the phone in August of 2016, so I don't know why the factory reset wouldn't restore me to Nougat.

However, I proceed, with perhaps reckless abandon. I flashed TWRP 3.4.0.0 and then tried to install SuperSU 2.820201705271822.zip.

And now I'm stuck. It bootloops unless I force it into the bootloader, and then I can access recovery and TWRP, but if I try to turn the phone off, it just starts bootlooping again.

How do I get out of this mess? I'm sorry if it's all laid out in here, somewhere. I did look through a good few hundred posts, but didn't find what I'm hoping is a simple solution to this. That, and I'd just like to know what actually went wrong, so I can learn something from this fiasco.

UPDATE: I can get into TWRP, but there are no directories on my sdcard except for TWRP. Did I blitz my OS altogether? That would explain why it's stuck on the Google screen.

Also, in cmd, my phone is only recognized by adb while in recovery. If I am in the bootloader itself, the "list of devices attached" is blank. Is that information at all helpful to someone wiser than I am?

NO ROOT: I ran 'adb shell su' from cmd, and it says "su: not found," so my attempt at root was clearly unsuccessful.

Thanks.

I suggest you download the last factory image and using the flash.all bat file, restore the device to the last available updates. Then try Magisk. I found Magisk much better for root than SuperSU which is now sadly way behind and no longer developed.
 
Last edited:

wedel219

Member
Feb 22, 2015
8
0
The Bronx
I suggest you download the last factory image and using the flash.all bat file, restore the device to the last available updates. Then try Magisk. I found Magisk much better for root than SuperSU which is not sadly way behind and no longer developed.

Unfortunately, ADB doesn't recognize my phone except in recovery. From what I understand, I need to run flash-all via ADB from the bootloader menu. That's not an option, since whatever I did has made my device unrecognizable from the cmd prompt, unless I'm in TWRP.

Should I just grab the latest OTA* and try flashing that normally via TWRP?

*Or should I grab an OTA older than July 2018, since I don't want to get hamstrung again by that Huawei has rescinded OEM unlocking?
 

Spannaa

Recognized Contributor / Themer
Sep 13, 2010
7,124
15,906
Cardiff
Huawei Nexus 6P
Google Pixel 3
Unfortunately, ADB doesn't recognize my phone except in recovery. From what I understand, I need to run flash-all via ADB from the bootloader menu. That's not an option, since whatever I did has made my device unrecognizable from the cmd prompt, unless I'm in TWRP.

Should I just grab the latest OTA* and try flashing that normally via TWRP?

*Or should I grab an OTA older than July 2018, since I don't want to get hamstrung again by that Huawei has rescinded OEM unlocking?
Connect your device to your pc via usb, boot into bootloader mode and then run flash-all.bat from a command window on your pc in the folder containing the files from the unzipped factory zip.

ADB only works when your device is booted to system or recovery. it doesn't work if you're booted to bootloader.
Likewise, fastboot only works when your device is booted to bootloader, it doesn't work if you're booted to system or recovery.

Then install magisk
 

wedel219

Member
Feb 22, 2015
8
0
The Bronx
Connect your device to your pc via usb, boot into bootloader mode and then run flash-all.bat from a command window on your pc in the folder containing the files from the unzipped factory zip.

ADB only works when your device is booted to system or recovery. it doesn't work if you're booted to bootloader.
Likewise, fastboot only works when your device is booted to bootloader, it doesn't work if you're booted to system or recovery.

Then install magisk

Hi, there. Thanks for the advice.

What I wound up doing to bring it back to life was flashing the last Android 6 OTA via TWRP.

I'm getting the "your device is corrupt" message, but everything seems to be working.

The reason I went with 6.1.0 instead of a more recent (or the most recent) OTA is because most of the root guides are from when the phone was released. Now, this might elicit an eye roll, and I understand, and I'm sorry for doing so, but I was curious if I followed one of the old root guides since I'm on an old OS version:
  1. Would it work?
  2. Will it remain in effect if I were to flash a more recent OTA?
    • And should I even flash an OTA if I'm rooted (no, right?)

I realize this is probably obstinate of me that I'm not just updating to 8.1.0 and using Magisk, but part of me wants to understand how this whole process actually works and explore different methods of achieving root. If anyone would be willing to humor both my ignorance and my curiosity, I'd love to bend your ear.

Thanks.
 

Spannaa

Recognized Contributor / Themer
Sep 13, 2010
7,124
15,906
Cardiff
Huawei Nexus 6P
Google Pixel 3
Hi, there. Thanks for the advice.

What I wound up doing to bring it back to life was flashing the last Android 6 OTA via TWRP.

I'm getting the "your device is corrupt" message, but everything seems to be working.

The reason I went with 6.1.0 instead of a more recent (or the most recent) OTA is because most of the root guides are from when the phone was released. Now, this might elicit an eye roll, and I understand, and I'm sorry for doing so, but I was curious if I followed one of the old root guides since I'm on an old OS version:
Would it work?
Will it remain in effect if I were to flash a more recent OTA?
And should I even flash an OTA if I'm rooted (no, right?)



I realize this is probably obstinate of me that I'm not just updating to 8.1.0 and using Magisk, but part of me wants to understand how this whole process actually works and explore different methods of achieving root. If anyone would be willing to humor both my ignorance and my curiosity, I'd love to bend your ear.

Thanks.
The "your device is corrupt" message is because your bootloader is unlocked.

The rest - it's up to you, but I don't really see the point of installing an ancient factory image and rooting it using an obsolete method (SuperSU) then updating to the last factory image and re-rooting using Magisk.

If you must do it your way, the necessary info (including the risks involved) is in the forums, so spend some time searching and reading before you proceed.

Sent from my Pixel 3 using XDA Labs
 

wedel219

Member
Feb 22, 2015
8
0
The Bronx
The "your device is corrupt" message is because your bootloader is unlocked.

The rest - it's up to you, but I don't really see the point of installing an ancient factory image and rooting it using an obsolete method (SuperSU) then updating to the last factory image and re-rooting using Magisk.

If you must do it your way, the necessary info (including the risks involved) is in the forums, so spend some time searching and reading before you proceed.

Sent from my Pixel 3 using XDA Labs

The reason I installed 6.1.0 is because my battery was tanking on 8.1.0 and I was curious if rolling back the version would make a difference.

Idling, it does. However the battery still tanks with regular app use, so it's clearly time to change the battery. I have a replacement.

As for rooting it through outdated means, there probably is no sense to it. After I replace the battery I'll flash an updated OTA and try rooting with Magisk.

Thanks again.
 

Spannaa

Recognized Contributor / Themer
Sep 13, 2010
7,124
15,906
Cardiff
Huawei Nexus 6P
Google Pixel 3
The reason I installed 6.1.0 is because my battery was tanking on 8.1.0 and I was curious if rolling back the version would make a difference.

Idling, it does. However the battery still tanks with regular app use, so it's clearly time to change the battery. I have a replacement.

As for rooting it through outdated means, there probably is no sense to it. After I replace the battery I'll flash an updated OTA and try rooting with Magisk.

Thanks again.
Battery replacement is essential on the 6P.

Finding a good one and fitting it without breaking anything will give you another few years.

I still use mine as a backup and as a camera.

Sent from my Pixel 3 using XDA Labs
 

wedel219

Member
Feb 22, 2015
8
0
The Bronx
Battery replacement is essential on the 6P.

Finding a good one and fitting it without breaking anything will give you another few years.

I still use mine as a backup and as a camera.

Sent from my Pixel 3 using XDA Labs

I bought what seems to be an OEM battery. Testing the voltage, it says it's 3.79V and it's rated for 3.82. So, I'm hoping that bodes well.

I just took the OTA that Google prompted me to download, so I'm running 8.0.0 as of now. I'm going to look at Magisk and try to root.
 

Spannaa

Recognized Contributor / Themer
Sep 13, 2010
7,124
15,906
Cardiff
Huawei Nexus 6P
Google Pixel 3
I bought what seems to be an OEM battery. Testing the voltage, it says it's 3.79V and it's rated for 3.82. So, I'm hoping that bodes well.

I just took the OTA that Google prompted me to download, so I'm running 8.0.0 as of now. I'm going to look at Magisk and try to root.
Update to the last before Rooting - it's 8.1.0 (OPM7.181205.001, Dec 2018)

Careful not to break the top glass camera lens cover when you fit the battery - it's easy to do if you don't heat it enough for the glue to soften properly.

Sent from my Pixel 3 using XDA Labs
 

wedel219

Member
Feb 22, 2015
8
0
The Bronx
Update to the last before Rooting - it's 8.1.0 (OPM7.181205.001, Dec 2018)

Careful not to break the top glass camera lens cover when you fit the battery - it's easy to do if you don't heat it enough for the glue to soften properly.

Sent from my Pixel 3 using XDA Labs

I'm on 8.1.0, but I'll double check to make sure I'm on the last available update.

I ordered two backup pieces of the camera glass. It was as cheap to buy two as to buy one, and my original is scratched up anyway from four years of use.

My screen is cracked, however, so I'm betting that opening the device is going to exacerbate that. As such, I bought a new screen that is on its way. Here's hoping it's the real deal. :)
 

Warren_Orange

Senior Member
Jun 2, 2011
1,209
174
Hi.

I want to relock my bootloader. I am running stock Android but have twrp installed.

What is the easiest way?

edit - I managed to do it - Phew.
 
Last edited:

Warren_Orange

Senior Member
Jun 2, 2011
1,209
174
Ok, so I had the exact same issue as g_oral, and I found where the problem lies.
What happened to me was I was following the steps from Heisenberg to the letter to flash a stock image, go back to factory, and lock the bootloader. However, when I was done flashing everything, I would try to boot into recovery and it would "bootloop" with the "resting android" icon blinking. That would be, the phone would not boot into recovery. I could go back to fastboot, I reflashed everything again and nothing... Then, I flashed TWRP again (as did g_oral) and I was able to enter into that recovery. I then rebooted the phone without doing anything else, and it would get stuck in the little colorful dots of google and not boot. I then booted back into TWRP and wiped the cache/dalvik partitions and rebooted. BINGO! I was able to boot into the system again. So then I went back and re-flashed stock recovery and FINALLY I was able to get into stock recovery, lock bootleader and be done.
The problem is in the step of "fastboot erase cache". That somehow currupts the cache or something. IT SHOULD BE DELETED FROM THE STEP-BY-STEP GUIDE.

Tl;dr
Do not follow the erase cache command in the guide!!

This was very helpful in returning my Nexus 6P back to stock. At the end guide No. 10 - "fastboot flash recovery twrp". Boot into twrp and wipe dalvik and cache. Boot in OS. Then reboot to bootloader and "fastboot flashing lock". Reboot and it will then wipe the Nexus 6P, returning everything to stock.

Heisenberg mentioned "On 7.1.2 and above you'll also need to boot into TWRP recovery and wipe cache and dalvik cache." but I was not sure exactly what it meant being a bit of a newb. I was thinking "how can you boot into twrp when you have just restored stock recovery??". But you have to flash TWRP again to do the cache wipes.
 

Mr.Conkel

Senior Member
Oct 10, 2020
241
73
London
Nexus 7 (2013)
OnePlus 5T
I'm going to be purchasing this device very soon and was wondering if it mattered which Model of the Nexus 6P I received mattered. I'm getting the 128GB Gold version. Are all models bootloader unlockable? I'm trying to make sure before spending $170 on this device if I'm unable to unlock bootloader I don't want the device.

Thanks in advance for any replies hope to hear back soon, Cheers :)
 

Einwod

Senior Member
Mar 1, 2011
4,260
2,132
63
Lardos, Rhodes, Greece.
I'm going to be purchasing this device very soon and was wondering if it mattered which Model of the Nexus 6P I received mattered. I'm getting the 128GB Gold version. Are all models bootloader unlockable? I'm trying to make sure before spending $170 on this device if I'm unable to unlock bootloader I don't want the device.

Thanks in advance for any replies hope to hear back soon, Cheers :)

First rule for using these forums is: DO NOT CROSS POST. You are posting the same question in multiple threads, STOP IT.
To answer your question, the bootloader for Nexus 6P is easy to unlock. Start from the beginning in this thread and read through the early posts to begin with. You'll find lots of information and most everything you need to get your new device the way you want it.
 

Mr.Conkel

Senior Member
Oct 10, 2020
241
73
London
Nexus 7 (2013)
OnePlus 5T
First rule for using these forums is: DO NOT CROSS POST. You are posting the same question in multiple threads, STOP IT.
To answer your question, the bootloader for Nexus 6P is easy to unlock. Start from the beginning in this thread and read through the early posts to begin with. You'll find lots of information and most everything you need to get your new device the way you want it.

Thanks for your advice and sorry about that. I was just trying to make sure I didn't buy the wrong model because I know for other devices like this one unlock methods can vary
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 572
    Heisenberg's How-To Guide For Beginners
    Nexus 6P
    fi5txJk.png

    Intro

    This thread will serve as a location for basic how-to guides for the Nexus 6P. I'm going to start off with a couple of the more obvious ones and go from there. If anyone has any suggestions for additions please feel free to let me know.

    If you're unsure about something please read the FAQ section in post #3 before creating a post to ask a question.

    Prerequisites


    Always update your phone to the latest build available before starting the unlocking/rooting process. This guide is always current/correct as per the requirements of the most recent build available.

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

    Google have finally decided to allow us to install adb & fastboot without needing to install the entire Android SDK. Hurrah! What does this mean for you? Much less mucking around. Grab the appropriate version for your OS:

    Platform tools for Windows | Google USB driver for Windows
    Platform tools for Linux
    Platform tools for Mac
    Main Page

    Simply download and extract the archive (and follow the linked instructions for the Google USB Driver for Windows). Once you've extracted the download you should have a platform-tools folder, within that folder you should see fastboot and adb. 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 devices
    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.

    Please see older method for installing adb/fastboot here:

    You must have Java installed and up to date in order to use the SDK Manager, please ensure that this is taken care of before installing the SDK.

    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.


    Go here to 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 devices
    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.


    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.

    z7e6jQa.jpg

    Quick 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 reboot recovery
    You can also use an app called Quick Boot to boot into the recovery directly from Android (root required).

    z7e6jQa.jpg

    Index

    Post #1
    1.
    How To Unlock Your Bootloader
    2. How To Install A Custom Recovery On Your Device
    3. How To Decrypt Your Data Partition
    4. How To Make A Nandroid Backup With TWRP Recovery
    5. How To Make An EFS Backup With TWRP Recovery
    6. How To Root

    Post #2
    7.
    How To Install A ROM with TWRP Recovery
    8. How To Install A Custom Kernel With TWRP Recovery
    9. How To Update To A New Build Of The Stock ROM
    10. How To Flash The Factory Images (Return To Stock)
    11. How To Flash The Factory Images (Return To Stock But Leaving Internal Storage Intact)
    12. How To ADB Sideload an incremental OTA update package.
    13. How To ADB Sideload a full OTA update package.
    14. How To Update To Android 7.0 Nougat

    FAQ can be found in post #3!

    z7e6jQa.jpg

    1. How To Unlock Your Bootloader

    • 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.
    • Power off your phone then boot into the bootloader (power + volume down).
    • Connect your phone to your PC via usb cable.
    • 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).
    • Check your fastboot connection by issuing this command:

      Code:
      fastboot devices

      It should return your device serial number, if not you need to make sure your drivers are installed correctly.​
    • Once you've confirmed your fastboot connection issue the unlock command:

      Code:
      fastboot flashing unlock
      This will erase all user data from the device!
    • 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.
    • Allow the process to complete and then issue this command:

      Code:
      fastboot reboot
    • Allow everything to go ahead and once finished you can disconnect your usb cable.

    Note: After unlocking your bootloader, each time your phone boots up you'll be greeted with a warning that says "Your device software can't be checked for corruption. Please lock the bootloader". This is nothing to worry about, it's normal to see this when you have an unlocked bootloader. You can't remove it, as long as your bootloader is unlocked it will stay there.

    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 10 of this guide for full instructions on how to return to stock.


    z7e6jQa.jpg

    2. How To Install A Custom Recovery On Your Device

    Prerequisites:
    unlocked bootloader (section 1).

    • Download the latest TWRP Recovery.
    • Make sure you check the md5 of the file to verify its integrity (where possible).
    • Place the file in your fastboot folder (this is where fastboot.exe is located on your PC).
    • Boot into the bootloader. 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)
    • Use the volume keys to scroll and power key to select the Reboot Bootloader option. 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.
    When TWRP boots up you'll be asked whether you want to allow system modifications or to keep it read-only, choose to allow system modifications, there's no benefit to keeping it read-only.

    On Nougat you need to flash SuperSU after booting into TWRP otherwise TWRP won't stick (see section 6).

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


    z7e6jQa.jpg

    3. How To Decrypt Your Data Partition

    This is no longer necessary as long as you use TWRP 2.8.7.1 or newer, unless you are using the Android N developer preview, in which case you must decrypt.

    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.

    • Boot into the bootloader and connect your phone to your PC via usb cable.
    • 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 will erase all user data from the device!
    • Once the process has completed you can either reboot normally:
      Code:
      fastboot reboot
      Or you can reboot back to the bootloader in order to undertake another task:
      Code:
      fastboot reboot-bootloader

    z7e6jQa.jpg

    4. 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/boor boxes, and swipe to backup. The process will take a few minutes.

    Note: If you happened to forget to remove lockscreen security (PIN/Pattern/Fingerprint) before creating your backup, and you cannot get into your OS after restoring, you can do the following to fix the issue. Boot into TWRP and use the built in file manager to delete /data/sytem/locksettings.db. This should be enough to get you into your OS again. If it isn't you can also try deleting /data/system/locksettings.db-shm and /data/system/locksettings.db-wal. If this still doesn't fix your issue you can delete /data/system/gatekeeper.password.key and /data/system/gatekeeper.pattern.key.

    z7e6jQa.jpg

    5. How To Make An EFS Backup With TWRP Recovery

    An EFS backup is very important to have, if your EFS partition becomes corrupt you will have no IMEI, and therefore will not be able to use the phone as a phone. Making an EFS backup is insurance against this catastrophic event. Without a backup, restoring your EFS can be extremely difficult or impossible. 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, make sure only the EFS box is selected, and swipe to backup. The process will take a few seconds. Keep a copy of the backup on your phone and also keep another copy somewhere safe.

    z7e6jQa.jpg

    6. How To Root

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

    • Download the latest root version (Magisk, SuperSU) of your choosing to your phone:
      Magisk Stable
      Magisk Beta
      SuperSU Stable
      SuperSU Beta
    • Boot into TWRP recovery and enter the install menu.
    • Navigate to where you have the root zip stored on your internal storage and select it.
    • Swipe to install.
    • Once the zip has installed 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 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. You do have root, ignore this every time it comes up.

    z7e6jQa.jpg

    FAQ can be found in post #3!

    aDlDoZJ.jpg

    Donate To Me
    250
    FAQ can be found in post #3!

    7. 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. You'll also need to find out what build your ROM is based on and download the vendor image for that build, you'll find the latest in my index here.
    • 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 internal storage and select it. You can hit the "add more zips" button now to queue up your gapps package to be flashed after the ROM zip.
      • 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.​
      • Hit the home button once everything has finished installing.
    • Install the appropriate vendor image.
      • Select the install option from the TWRP home screen.
      • Click the "install image" button in the bottom-right corner.
      • Navigate to where you have the vendor image stored on your internal storage and select it.
      • You'll now be asked which partition to flash the image to, select vendor.
      • Swipe to install.
    • Once you've installed all necessary zips/images you'll have an option to wipe cache/dalvik and an option to reboot system, hit the reboot system button and you'll boot into your new ROM.

    z7e6jQa.jpg

    8. How To Install A Custom Kernel With TWRP Recovery

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

    A custom kernel can open up a new level of control over your device, such as overclocking/underclocking, undervolting, changing governors, changing I/O schedulers, adjusting colour calibrations, adjusting sound calibrations, and many other options.

    • Download a kernel that is compatible with your current ROM.
    • Check the md5 to verify its integrity.
    • Enter TWRP recovery.
    • Select the install option from the TWRP home screen.
    • Navigate to the kernel and select it.
    • Swipe to install.
    • You'll have an option to wipe cache/dalvik and an option to reboot system, hit the reboot system button.

    Once your phone has booted up you can use a kernel tuning app to change governors, I/O scheduler, clock speed, and other options. Some of the popular kernel apps are Kernel Auditor, Trickster Mod, No Frills, Kernel Tuner, and many more.

    z7e6jQa.jpg

    9. How To Update To A New Build Of The Stock ROM

    Prerequisites:
    unlocked bootloader (section 1).

    This method does not wipe your data, so you will keep your apps and settings. You should have no problems, however, if you experience problems you may need to perform a factory reset and flash again. Make a backup first and transfer it to your PC.

    • Download the latest build via the appropriate factory images for your model (Nexus 6P/Angler) here.
    • Unzip the angler-xxxxxx-factory-xxxxxxxx (x's replace variables) into a directory on your PC (for this guide we'll use C:\angler\).
    • Once unzipped you should have a folder named angler-xxxxxx (x's replace variables). Open it and move the following files to a new directory named C:\angler\images\:
      • bootloader-angler-angler-xx.xx.img
      • radio-angler-angler-xx.xx.img
      (Please note that radio and bootloader naming changes from build to build so the filenames and below commands will change with them)
    • Within C:\angler\angler-xxxxxx\ you'll see another zip archive named image-angler-xxxxxx, unzip the contents of that zip into the C:\angler\images\ folder we created before. Now within C:\angler\images\ you should have the following files:
      • android-info.txt
      • boot.img
      • bootloader-angler-angler-xx.xx.img
      • cache.img (not present on Android 7.1.2 and above)
      • radio-angler-angler-xx.xx.img
      • recovery.img
      • system.img
      • userdata.img
      • vendor.img
    • Boot into the bootloader and connect your phone to your PC via usb cable.
    • 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 these commands to flash:
      Code:
      fastboot flash bootloader C:\angler\images\bootloader-angler-angler-xx.xx.img
      fastboot reboot-bootloader
      fastboot flash radio C:\angler\images\radio-angler-angler-xx.xx.img
      fastboot reboot-bootloader
      fastboot flash boot C:\angler\images\boot.img
      fastboot erase cache
      (above command is unnecessary on Android 7.1.2 and above)
      fastboot flash cache C:\angler\images\cache.img
      (above command is unnecessary on Android 7.1.2 and above)
      fastboot flash recovery C:\angler\images\recovery.img
      fastboot flash system C:\angler\images\system.img
      fastboot flash vendor C:\angler\images\vendor.img
      On 7.1.2 and above you'll also need to boot into TWRP recovery and wipe cache and dalvik cache.
    • Once all operations are complete you can reboot the device.
    • You'll have to flash SuperSU again now, plus add any mods that you previously had.

    z7e6jQa.jpg

    10. How To Flash The Factory Images (And Return To Stock)

    Prerequisites:
    unlocked bootloader (section 1).

    This section will explain how to return the phone to be like it was when it came out of the box. This will wipe everything from the phone. If you wish to flash the factory images without wiping your personal data from the internal storage please move on to the next section.

    • Go to Settings/Backup & Reset and perform a factory data reset. This will remove all of your user data from the device (apps, settings, photos, music, etc).
    • Download the appropriate factory images for your model here.
    • Unzip the angler-xxxxxx-factory-xxxxxxxx (x's replace variables) into a directory on your PC (for this guide we'll use C:\angler\).
    • Once unzipped you should have a folder named angler-xxxxxx (x's replace variables). Open it and move the following files to a new directory named C:\angler\images\:
      • bootloader-angler-angler-xx.xx.img
      • radio-angler-angler-xx.xx.img
      (Please note that radio and bootloader naming changes from build to build so the filenames and below commands will change with them)
    • Within C:\angler\angler-xxxxxx\ you'll see another zip archive named image-angler-xxxxxx, unzip the contents of that zip into the C:\angler\images\ folder we created before. Now within C:\angler\images\ you should have the following files:
      • android-info.txt
      • boot.img
      • bootloader-angler-angler-xx.xx.img
      • cache.img (not present on Android 7.1.2 and above)
      • radio-angler-angler-xx.xx.img
      • recovery.img
      • system.img
      • userdata.img
      • vendor.img
    • Boot into the bootloader and connect your phone to your PC via usb cable.
    • 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 these commands to flash:
      Code:
      fastboot flash bootloader C:\angler\images\bootloader-angler-angler-xx.xx.img
      fastboot reboot-bootloader
      fastboot flash radio C:\angler\images\radio-angler-angler-xx.xx.img
      fastboot reboot-bootloader
      fastboot flash boot C:\angler\images\boot.img
      fastboot erase cache
      (above command is unnecessary on Android 7.1.2 and above)
      fastboot flash cache C:\angler\images\cache.img
      (above command is unnecessary on Android 7.1.2 and above)
      fastboot flash recovery C:\angler\images\recovery.img
      fastboot flash system C:\angler\images\system.img
      fastboot flash vendor C:\angler\images\vendor.img
      On 7.1.2 and above you'll also need to boot into TWRP recovery and wipe cache and dalvik cache.

      If you wish to you can also relock the bootloader with this command:
      Code:
      fastboot flashing lock
      (This command will wipe all user data from the device)
      Important: do not lock the bootloader unless you have first flashed the stock images. Locking the bootloader while you have a custom recovery installed can result in a brick. Please also note that the locking procedure will wipe all user data from the device.
    • Once all operations are complete you can reboot the device.

    z7e6jQa.jpg

    11. How To Flash The Factory Images (Return To Stock But Leaving Internal Storage Intact)

    Prerequisites:
    unlocked bootloader (section 1).

    This section will explain how to return the phone to be like it was when it came out of the box, except it will not wipe any of your personal data (photos, music, etc) from the internak storage.

    • Download the appropriate factory images for your model here.
    • Unzip the angler-xxxxxx-factory-xxxxxxxx (x's replace variables) into a directory on your PC (for this guide we'll use C:\angler\).
    • Once unzipped you should have a folder named angler-xxxxxx (x's replace variables). Open it and move the following files to a new directory named C:\angler\images\:
      • bootloader-angler-angler-xx.xx.img
      • radio-angler-angler-xx.xx.img
      (Please note that radio and bootloader naming changes from build to build so the filenames and below commands will change with them)
    • Within C:\angler\angler-xxxxxx\ you'll see another zip archive named image-angler-xxxxxx, unzip the contents of that zip into the C:\angler\images\ folder we created before. Now within C:\angler\images\ you should have the following files:
      • android-info.txt
      • boot.img
      • bootloader-angler-angler-xx.xx.img
      • cache.img (not present on Android 7.1.2 and above)
      • radio-angler-angler-xx.xx.img
      • recovery.img
      • system.img
      • userdata.img
      • vendor.img
    • Boot into TWRP recovery and enter the wipe menu, select advanced wipe, check only the data box and swipe to wipe.
    • Go to the TWRP main menu and enter the reboot menu, select bootloader. The phone will now boot into the bootloader, once it has you can connect your phone to your PC via usb cable.
    • 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 these commands to flash:
      Code:
      fastboot flash bootloader C:\angler\images\bootloader-angler-angler-xx.xx.img
      fastboot reboot-bootloader
      fastboot flash radio C:\angler\images\radio-angler-angler-xx.xx.img
      fastboot reboot-bootloader
      fastboot flash boot C:\angler\images\boot.img
      fastboot erase cache
      (above command is unnecessary on Android 7.1.2 and above)
      fastboot flash cache C:\angler\images\cache.img
      (above command is unnecessary on Android 7.1.2 and above)
      fastboot flash recovery C:\angler\images\recovery.img
      fastboot flash system C:\angler\images\system.img
      fastboot flash vendor C:\angler\images\vendor.img
      On 7.1.2 and above you'll also need to boot into TWRP recovery and wipe cache and dalvik cache.

    z7e6jQa.jpg

    12. How To ADB Sideload an incremental OTA update package.

    Prerequisites:
    Completely stock setup (the only modification allowed on the phone is the unlocked bootloader).

    • Download the appropriate OTA zip from my index. OTA updates must be taken in order so you must select the right zip. For example, if you're currently on the MMB29Q build you must select the MMB29Q --> MHC19I zip. The filename will be quite long so to make things easier you can rename it to something easier. For the purposes of this guide let's say we'll rename it to "ota.zip". Place the file in your fastboot folder on your PC.
    • Boot into the bootloader, use the volume buttons to scroll the options and use the power button to select recovery mode.
    • Once the phone has booted into the stock recovery (you should see Andy Android with an exclamation mark) hold power and tap volume up to get into the recovery menu. Use the volume buttons to scroll and use the power button (you might need to hold it) to select "apply update from adb".
    • On your PC navigate to your fastboot folder, hold shift and right-click your mouse, select "open command prompt here". Issue the following command:
      Code:
      adb sideload ota.zip
    • Wait for the operation to complete (it'll tell you once it's finished) and once it's all done you can reboot your phone, the first boot might take a while.

    z7e6jQa.jpg

    13. How To ADB Sideload a full OTA update package.

    Prerequisites:
    Completely stock setup (the only modification allowed on the phone is the unlocked bootloader).

    • Download the OTA zip that you want to upgrade to from my index. You don't need to be on any specific build prior to flashing a full OTA package. You can only move to a higher build though. The filename will be quite long so to make things easier you can rename it to something easier. For the purposes of this guide let's say we'll rename it to "fullota.zip". Place the file in your fastboot folder on your PC.
    • Boot into the bootloader, use the volume buttons to scroll the options and use the power button to select recovery mode.
    • Once the phone has booted into the stock recovery (you should see Andy Android with an exclamation mark) hold power and tap volume up to get into the recovery menu. Use the volume buttons to scroll and use the power button (you might need to hold it) to select "apply update from adb".
    • On your PC navigate to your fastboot folder, hold shift and right-click your mouse, select "open command prompt here". Issue the following command:
      Code:
      adb sideload fullota.zip
    • Wait for the operation to complete (it'll tell you once it's finished) and once it's all done you can reboot your phone, the first boot might take a while.

    z7e6jQa.jpg

    14. How To Update To Android 7.0 Nougat

    Prerequisites:
    unlocked bootloader (section 1).

    This method does not wipe your data, so you will keep your apps and settings. You should have no problems, however, if you experience problems you may need to perform a factory reset and flash again. Make a backup first and transfer it to your PC.

    • Download the Nougat factory images for your model (Nexus 6P/Angler) here.
    • Unzip the angler-xxxxxx-factory-xxxxxxxx (x's replace variables) into a directory on your PC (for this guide we'll use C:\angler\).
    • Once unzipped you should have a folder named angler-xxxxxx (x's replace variables). Open it and move the following files to a new directory named C:\angler\images\:
      • bootloader-angler-angler-xx.xx.img
      • radio-angler-angler-xx.xx.img
      (Please note that radio and bootloader naming changes from build to build so the filenames and below commands will change with them)
    • Within C:\angler\angler-xxxxxx\ you'll see another zip archive named image-angler-xxxxxx, unzip the contents of that zip into the C:\angler\images\ folder we created before. Now within C:\angler\images\ you should have the following files:
      • android-info.txt
      • boot.img
      • bootloader-angler-angler-xx.xx.img
      • cache.img
      • radio-angler-angler-xx.xx.img
      • recovery.img
      • system.img
      • userdata.img
      • vendor.img
    • Boot into the bootloader and connect your phone to your PC via usb cable.
    • 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 these commands to flash:
      Code:
      fastboot flash bootloader C:\angler\images\bootloader-angler-angler-xx.xx.img
      fastboot reboot-bootloader
      fastboot flash radio C:\angler\images\radio-angler-angler-xx.xx.img
      fastboot reboot-bootloader
      fastboot flash boot C:\angler\images\boot.img
      fastboot erase cache
      fastboot flash cache C:\angler\images\cache.img
      fastboot flash recovery C:\angler\images\recovery.img
      fastboot flash system C:\angler\images\system.img
      fastboot flash vendor C:\angler\images\vendor.img
      You can skip flashing the recovery if you wish, but even if you do the stock recovery may be patched on the first boot anyway. So you'll need to flash TWRP and SuperSU again if you need/want those, as well as any other system modifications you may have had.

      Note: Do not flash the userdata.img
    • Once all commands/flashes are complete you can reboot the device:
      Code:
      fastboot reboot
    • You'll have to flash SuperSU again now, plus add any mods that you previously had.

    z7e6jQa.jpg

    FAQ can be found in post #3!

    aDlDoZJ.jpg

    Donate To Me
    129
    Frequently Asked Questions

    1. How do I 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:
    [/INDENT]
    [INDENT]adb reboot bootloader[/INDENT]
    [INDENT]
    You can also use an app called Quick Boot to boot into the bootloader directly from Android (root required).​

    2. How do I 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:
    [/INDENT]
    [INDENT]adb reboot recovery[/INDENT]
    [INDENT]
    You can also use an app called Quick Boot to boot into the recovery directly from Android (root required).​

    3. When issuing the fastboot flashing unlock command it doesn't work, I only get a list of possible commands. What's going on?

    This is usually due to having an outdated adb/fastboot setup. If you installed adb/fastboot by any means other than via the Android SDK this is probably the cause. Visit the prerequisites section in the beginning of this guide to properly install adb/fastboot and ensure that it's up to date.​

    4. After unlocking the bootloader I get a message that says "Your device software can't be checked for corruption. Please lock the bootloader". What's going on? Can I get rid of it?

    This is nothing to worry about, it's normal to see this when you have an unlocked bootloader. You can't remove it, as long as your bootloader is locked it will stay there.​

    5. How do I take an OTA or update if I have root or other system modifications on the stock ROM?

    You can't take an OTA update while you have root or any system modifications. You'd need to use fastboot to flash the system, boot, and recovery images. It's much easier to just flash the newer build with fastboot, see section 9 of this guide for full instructions.​

    6. Does taking an OTA update wipe my user data?

    No, it doesn't.​

    7. Do I need to make an EFS backup?

    Yes. Absolutely yes. An EFS backup is extremely important, if your EFS partition becomes corrupt your IMEI will disappear and you will not be able to use the phone as a phone. Without a backup it can be extremely difficult (or impossible) to restore your EFS.​

    8. Do I need to flash the userdata.img from the factory images?

    You should never flash the userdata image. It doesn't take into consideration the storage capacity of the device and always allocates 32gb of storage. This is ok for the 32gb model, but for the 64gb and 128gb models you'll end up with much less storage capacity than you should have. If you wish to wipe your internal storage you'd use the following command instead:​
    Code:
    [/INDENT]
    [INDENT]fastboot format userdata[/INDENT]
    [INDENT]
    28
    I know the older kernel boot img's work but that wasn't good enough for me and my nexus finally arrived. so i went ahead and made ones (systemless and normal) from the mdb08m kernel. Most people are requesting this in the supersu thread (and i'm pretty sure others have provided these as well) but I feel those requests and those willing to provide are better served in the device specific forum. This seems like a great thread to provide such images for the nexus6p, of course ultimate decision up to @Heisenberg
    Angler MDB08M Modified Boot Img - requires SuperSu 2.50+ (re-uploaded, tested, 11/11)
    Angler MDB08M Modified Systemless Boot Img - requires SuperSu 2.56