yashsingh1/xdaforums huggingface dataset:
[Nexus 6P General] KrisDroid:
Nandroid Backup in OP

Just received my 6P two days ago and went through the instructions for unlocking, installing TWRP, Root, etc. on the OP. Great guide!

Most everything went well but I did encounter an issue with my Nandroid backup. I followed the instructions as close as possible (i.e. backed up system/boot/vendor/data) but I was never able to successfully restore the backup. It always boot looped on the Google screen with the unlocked padlock. Tried deleting the suggested files in the Nandroid post from TWRP but still no joy.

I ultimately had to use the Stock Rom update procedure to return to a working/ bootable phone.

So I did some experimentation and here is what I found, curious if others have done this with the similar results.

Instead of "System" on the TWRP backup screen I selected "System Image" and instead of "Vendor" I selected "Vendor image". That worked perfectly, and to my surprise I didn't have to remove any lock screen settings and all my fingerprint settings were preserved on the restore.

This was a great find for me since I didn't want to hassle with having to set none for the screen lock before doing the backup :). Curious if anyone else has experienced this.
[Nexus 6P General] Turt_mcgirt:
This guide is unbelievably helpful and essential. Thank you
[Nexus 6P General] jesssiii:
So you also backed up data along with the vendor and system images? I've seen it told not to do this and people reporting issues with it. Very interested to know more, going to Google it. Thanks for sharing.

---------- Post added at 16:38 ---------- Previous post was at 16:36 ----------

Also, I'd like to know if you flashed an aosp rom then tried restoring your other backup, if it would still go smoothly.
[Nexus 6P General] Heisenberg:
There's no reason why it shouldn't because whatever was previously there gets overwritten during the restore.
[Nexus 6P General] JoshuaMh:
Update with root

Followed your guide thoroughly for updating with root while keeping data, everything is great now. Much appreciated.

Only minor quarks I had were: 1. I got the "Corrupt data, device unsafe" red warning after updating and rebooting, but this went away after I reflashed SU and hasn't come back. 2. I went from always having a full bar coverage in my home to 2-3 bars, but this went back to normal after a couple hours and is always a full bar again. Perhaps the device needed to re-calibrate for the cell towers. Anyway, everything is perfect now and I've loving the improvements of MHC19I.
[Nexus 6P General] KrisDroid:
The guide indicated data should be included. I've always backed up data along with the other images. With out data it's not a full snapshot.
[Nexus 6P General] bebiriterbang:
Install latest twrp3.0.0.1, update march security, reinstall superSU.

But when i tried to flash elmentalX kernel, got problems with zip file. (downloaded zip elementalX from official web)

Help/ ^_^\
[Nexus 6P General] Einwod:
Download it again and check md5 to be sure the download is correct.
[Nexus 6P General] DJBhardwaj:
Check if the zip was properly downloaded, by opening it or using md5 checksum.

Happens a lot with incomplete/corrupted downloads. :good:
[Nexus 6P General] Firetribe:
I'm sorry if this has come up already, in fact I'm pretty sure it has come up already, but I cannot find anything - I'm on TWRP 3.0.0-1, and "Allow modifications" does not work for me. I could flash anything I wanted prior to the first boot, but now I can't access my storage. Shouldn't TWRP be able to decrypt data anyway?

Any help is much appreciated, this drove me mad with my nexus 9 already :-|:D
[Nexus 6P General] Grizonic:
I am also having this issue... :( did you solve it already? If so, how did you do it?

I followed the guide to have twrp and root and then installed the N preview them. I then tried going into recovery (as I lost root) and the broken android image was shown. Then I reinstalled twrp 3.0.0-1 via fastboot and now it gets stuck in the twrp splash screen.

Any ideas? Thanks!
[Nexus 6P General] SlimSnoopOS:
In the 5X TWRP thread, [MENTION=3878813]Gandalf[/MENTION] detailed these steps to restore with working password.

Edit: Reading this again, it looks like it applies only to stock.
[Nexus 6P General] KrisDroid:
Agree applies to a stock Nandroid backup.

However for me I want to be able to snapshot my phone in a Nandroid backup (do this every few weeks). I want this to be painless and I don't want to have to fuss with disabling lock screen, etc. So what is working for me is selecting "System Image", "Vendor Image", "boot", "data" in TWRP and it works perfectly. I can restore this backup and return to exactly the same state.
[Nexus 6P General] Eddie_Brock:
Thanks for the great guide [MENTION=4153349]Heisenberg[/MENTION] .

I went as far as unlocking my bootloader last night. Brand new phone, so I figured if I have to do a full reset, now is the time.

Unlocking went fairly smooth on my Win10 PC. I made sure to install Java 32bit and 64bit (to be sure). The only problem I had was the Android USB driver from bootloader, which simply required doing a manual driver install (which is detailed a few pages back, for anyone else).

Here is my question; Does it matter at all for TWRP & Root which build or baseband I am on?

I am currently on the stock firmware 6.0, and I have heard conflicting things about the latest build (MHC19I), so I was thinking I would wait until the next version.
[Nexus 6P General] SlimSnoopOS:
Nice. I haven't run many backups but I'll try that when I have time. How large of a file (in GB) does this produce?
[Nexus 6P General] Killerarl:
So I returned my Nexus 6P to stock using the instructions in the OP ... everything seemed to work fine, however when I finished and used fastboot reboot command ... my phone acted as if it were going to boot, but comes up with the "your device is corrupted and may not work properly" message and gets stuck on the black Google screen. Is this a bootloop? I am able to hold power and down vol to get into bootloader, but not able to do much else.

Any advice on how to get this working?
[Nexus 6P General] KrisDroid:
For me about 5gb
[Nexus 6P General] Einwod:
It should boot normally. Remember, you have gone back to complete stock (apart from not locking the bootloader) and it does take a few minutes for the animation to show. Be patient. Try again and if it still does not boot, go back and do the flashing to stock all over again. It will work, trust me.
[Nexus 6P General] Killerarl:
I actually downloaded the wrong stock IMG file it seems ... I downloaded the next newest IMG file and all seems right with the world so far!

Thanks for the input.
[Nexus 6P General] Xenotrumpet:
Sorry if this has been answered already, but searching didn't answer my question.

Does TWRP decryption wipe userdata? Can I flash it via fastboot, boot into it and decrypt /data while keeping it intact? I'm on N Preview by the way.
[Nexus 6P General] Heisenberg:
No your data won't be affected.
[Nexus 6P General] Heisenberg:
No, the baseband doesn't play a part in TWRP or root.
[Nexus 6P General] Xenotrumpet:
Tried to decrypt via TWRP 3.0.0-1, coming from full N Preview stock. I determined that the process hung up after at least 30 minutes and force rebooted it. Fortunately, my data remained intact. But after reflashing TWRP (stock recovery overwrote it), it hangs up on the splash screen.

Not sure where I went wrong. Let me know if you need any more details.
[Nexus 6P General] Heisenberg:
My apologies, it looks as though I completely misunderstood your question. I thought you meant TWRP decrypting on the fly to access the data. But I'm assuming you actually mean manually decrypting the data to keep it decrypted, right? Lucky your data is fine because that would have been a huge error on my part, sorry about that. If you're manually decrypting, your data will always be wiped. Is TWRP even able to format userdata? I'd just use fastboot to format the partition, but back it up first.
[Nexus 6P General] Xenotrumpet:
Yeah, I meant decrypting /data. At the moment I am 100% stock unrooted, which means encrypted. TWRP cannot format userdata on my end. Upon boot, it tried to decrypt /data. It asked for my pattern, I put it in, and it hung for over 20 minutes (I don't think I have that much stuff that needs that much time to decrypt). I tried again, and now TWRP won't boot. I can boot into system just fine otherwise.
[Nexus 6P General] Heisenberg:
Sometimes the encryption process is a bit iffy, I have no idea what causes this though. I can't think of why you can't get into TWRP, which version is installed?
[Nexus 6P General] Xenotrumpet:
Tried to install 3.0.0-1 via fastboot.
[Nexus 6P General] Heisenberg:
It installs but won't boot?
[Nexus 6P General] Xenotrumpet:
It booted the first time I installed, but after the decryption failed and stock recovery overwrote it, I had to reflash. This time it would not boot.
[Nexus 6P General] steviemch:
If i understand correctly you're trying to decrypt running the N preview? You need a modified boot img in order for TWRP 3.0.0.1 to decrypt N successfully. Link below.

http://xdaforums.com/showthread.php?t=3306684
[Nexus 6P General] Xenotrumpet:
Well that sucks. Thanks for your help!
[Nexus 6P General] steviemch:
No problem. Simply flash the boot img rather than the stock one and format data to decrypt. TWRP should stick after this.
[Nexus 6P General] Heisenberg:
Gah! Thankyou for picking up on this, I'm having a bad day apparently.

[MENTION=5450585]Xenotrumpet[/MENTION], sorry I didn't pick up on that.
[Nexus 6P General] Ofthecats:
I apologize in advance if this has been answered, but my app search function is missing and my browser keeps force closing. What googling I did hasn't resulted in anything conclusive...

I'm currently decrypted on a custom ROM and kernel, latest twrp. I would like to try android N preview encrypted, rooted, twrp latest installed.

I'd like to know what this will result in. From what I understand, my userdata should be preserved if I flash manually via fastboot. The phone should encrypt my sdcard, and that is all.

Will going encrypted cost me any functionality in twrp? Will I be able to use it to the same extent as when decrypted?

Thanks for your time
[Nexus 6P General] Heisenberg:
Your userdata will be preserved if you flash via fastboot. Your userdata partition would be encrypted during the first boot. Several people have had this hang though, and as there's no progress bar it's impossible to tell whether it's hanging or if it's just taking a long time. If you force reboot the phone while the operation is still taking place you'll lose your data. I'd suggest encrypting via the settings menu now, before you flash, I believe it's more reliable.

As long as you use the latest version of TWRP you will still have the exact same functionality. You do need to use a modified boot.img though, you'll find it here:

http://xdaforums.com/nexus-6p/general/stock-modified-boot-img-regular-root-t3306684

Thanks to [MENTION=5364757]steviemch[/MENTION] for pointing that out earlier.
[Nexus 6P General] steviemch:
No worries my friend, it happens to the best of us!
[Nexus 6P General] Ofthecats:
Thank you very much. I assumed encrypt through system would be reliable, so good to have that confirmed.

The modified boot is just to disable force encrypt? A custom kernel with force encrypt disabled would suffice too correct? Or would I flash the modified boot then custom kernel?
[Nexus 6P General] Heisenberg:
It disables the forced encryption, but also allows TWRP to access your data if you are encrypted. A custom kernel would also be fine, just make sure it's compatible with Android N. There's no need to flash the modified boot first if you're going to use a custom kernel.
[Nexus 6P General] Ofthecats:
Excellent, thanks again. Perhaps this information should be added to the guide? Also that going from encrypted to decrypted wipes userdata, but visa versa doesn't?

Awesome guide by the way
[Nexus 6P General] Heisenberg:
Yeah I'm going to be adding some stuff tomorrow.
[Nexus 6P General] Sunandroid:
I'm a liitle bit frustrated.

I'm trying to unlock my n6p since yesterday evening. I tried two different computers, one Win 10 (tried with usb-c to -c and -a to -c cable), which doesn't even recognize the device in bootloader. Adb works.

The other laptop is running linux mint 17.1 it recognizes the device (the "fastboot devices" list is not empty) but the "fastboot flashing unlock" command causes nothing.

Both laptops are running the sdk patform-tools 23.1 and no matter which one is connected, the device shows "connect usb data cable". I also tried rebooting the laptops, but that didn't help at all.

Device Info:

Variant: H1512

BL: angler-03.51

Build: MHC19I

(allow oem unlock is enabled in dev settings)

I even tried the Job_Box_v1.70 but this didn't work either.

Do you have any ideas (drivers, whatever) about how to unlock this device?
[Nexus 6P General] Heisenberg:
Forget the Windows machine, Linux is far easier to work with. Are you issuing the command locally from within the platform-tools folder (navigate to folder, right click, select open terminal here, then issue "./fastboot flashing unlock")? When you issue the "fastboot flashing unlock" command are you getting absolutely nothing or are you getting a list of possible commands?

PS. The device will always say "connect usb cable", that's normal even when you have a cable connected.
[Nexus 6P General] Sunandroid:
Yeah, I know. Linux :highfive:

The navigating to the location and then ./... did the trick. Dunno why tho. Shouldn't matter imo. Anyways, thanks a lot!

Edit: sorry, yeah, I got the help list. Not nothing.
[Nexus 6P General] Heisenberg:
If you don't issue the command locally from the folder you're using the version of fastboot from the distro (as opposed to the version from the downloaded SDK) which isn't updated to handle the new command, that's why it wasn't working.
[Nexus 6P General] Chkeh:
Sorry for the ridiculously late answer but I didn't find a solution for it no, I ended up just going back to full stock and starting it all over.
[Nexus 6P General] Grizonic:
No problem! I have been reading a bit and I think it's related to the fact that my phone is encrypted and to decrypt it I would need to clear my data. So I'm procrastinating :)
[Nexus 6P General] Chkeh:
Ah ye, I'm not even sure whether by phone is encrypted or decrypted as of now, I'm not sure whether the new version of twrp decrypts it by default or if it just manages to work anyway. Anyway that might have been cause of my problems aswell.

Cheers
[Nexus 6P General] jesssiii:
You only get decrypted if you purposely format user data either in twrp or Fastboot. Then to stay that way you must use a kernel that doesn't force encryption.
[Nexus 6P General] Chkeh:
I ran "fastboot format userdata" in fastboot recently but booted and rebooted a couple of times before I installed elementalx kernel, would that mean I'm still encrypted?
[Nexus 6P General] jesssiii:
Yes.
[Nexus 6P General] Chkeh:
That sucks, so the only way to actually get decrypted would need all of the data to get erased once again?
[Nexus 6P General] DJBhardwaj:
Yes, that's imperative.
[Nexus 6P General] Sr Vincenzo:
[MENTION=4153349]Heisenberg[/MENTION]

Hey there, i was just wondering if you could explain the how and why of needing to update vendor images. I'm just about ready to begin putting twrp and custom roms on my 6P, but i was just curious as to why this needs to be done and if there's any way around it.

Thanks for your time.
[Nexus 6P General] steviemch:
The vendor img contain proprietary device specific files that used to be stored in /system partition. Since the Nexus 9 I believe, they were moved to their own 'vendor' partition. No there's no way around it.
[Nexus 6P General] Sr Vincenzo:
I see, so when updating a custom rom do you need to flash the vendor img each and every time it's updated or is it only necessary for each build that google releases? (i.e. MMB29Q, MHC19I, etc etc)
[Nexus 6P General] DJBhardwaj:
For each build that Google releases.

If a custom ROM is based on MHC19I sources, the corresponding vendor should be flashed. If you're using a previous version of the same ROM, which was based off MMB29Q, you will need to flash the vendor for MMB29Q.
[Nexus 6P General] Sr Vincenzo:
Makes sense, i was under the impression that the img needed to be flashed every single time a update was released for the rom i would be installing. Thank you [MENTION=5364757]steviemch[/MENTION] and [MENTION=3998397]DJBhardwaj[/MENTION] ya'll have been extremely helpful.

Also, thank you [MENTION=4153349]Heisenberg[/MENTION] for the guide, hope to be on a custom rom soon!
[Nexus 6P General] steviemch:
If you're going to be flashing rom's soon (I personally recommend both PureNexus and Dirty Unicorns) you'll always be advised when the vendor img should be updated. The img can be flashed directly from TWRP so it's usually a quick and easy process. My only advice is to read, read and read before you start flashing to avoid any problems. Enjoy!
[Nexus 6P General] Sr Vincenzo:
That's funny, PureNexus was the rom i was researching (seems really nice) when i saw the vendor image info. But that's great to hear that they'll let people using the rom know when the img needs to be updated. I also saw that they created the flashable zips for them.

I do have another question, i've seen that when doing nandroid backups they advise you to remove lockscreen security, why is that?
[Nexus 6P General] bobdrad:
I bet I know what's going on. You have to run fastboot with sudo. sudo rewrites your $PATH to not include ".". So you have to explicitly state you want ./fastboot or you'll get the old /bin/fastboot.
[Nexus 6P General] Heisenberg:
The security information isn't properly backed up, so when you restore your backup and try your PIN it will be incorrect, you won't be able to get into Android.
[Nexus 6P General] Sr Vincenzo:
Huh that's a little strange, a little inconvenient too but I suppose if that's what it takes, it'll work haha
[Nexus 6P General] Tkun:
Hey, I broke my phone's screen today while lifting. Luckily I have Nexus Protect. But is there a way to return to stock without having to mess with the screen much or am I gonna have to return my phone along with all its information? Thanks!
[Nexus 6P General] Heisenberg:
You can fully return to stock with fastboot, see section 10 of this guide.
[Nexus 6P General] Tkun:
I wasn't sure if that very first step (going into settings, wiping data) was necessary to wipe all data, so I was hesitant to proceed. Now (after your response) I know it isn't necessary. Thanks!
[Nexus 6P General] Heisenberg:
You'd be formatting userdata anyway so you don't need to do that step.
[Nexus 6P General] explorer-10:
With the Nexus 6P having been rooted, unlocked and all, is there a workaround to getting Android Pay to work and also, aren't you guys worried about the blown hardware fuse at all?
[Nexus 6P General] brahmy:
Great tutorial

Thanks OP! I had my phone out of the mail, unlocked and rooted in under an hour by following the instructions carefully.

Only tripped up a bit when TWRP offered to install SuperSU itself... I said yes, ultimately it didn't work, I wasted 20 minutes before going back to your instructions and downloading and flashing the .zip.
[Nexus 6P General] mrRobinson:
If you use chainfire latest system less root android pay works. Don't expect that to last long though. And there is no blown fuse keep reading.
[Nexus 6P General] AriStar:
I tried this but am stuck. I run 'adb devices' but nothing comes up.
[Nexus 6P General] Aridon:
Doing that in Android or boot loader?

If Android make sure USB debugging is enabled, OEM unlock and when it's connected change charging only in notifications to ptp and save the computer as being allowed. Make sure you're in the proper directory in command prompt as well.

If in bootloader you're using the wrong command. Fastboot devices
[Nexus 6P General] AriStar:
yes trying for android. OEM unlock and usb debugging is enabled.

I just changed from charging only to Photo Transfer (PTP) but i didnt get any option to save the computer as being allowed.

Yes i'm in the correct directory, adb version gives me the version.
[Nexus 6P General] Aridon:
Disconnect, reconnect and change to ptp again. You should get a window pop up on device asking you to allow the connection and you can check the box to always allow that pc. Once done try again.

If you can't get that try a different usb port, do the SDK install again per instructions and or try a reboot on both devices.
[Nexus 6P General] AriStar:
no popup comes up, im running windows 10?
[Nexus 6P General] ridobe:
Do tell. When you say path, you mean other than the platform-tools folder?
[Nexus 6P General] effraie:
Well, you have to provide relative or absolute path to both platform-tools files and files you will flash. Obviously, you can save some typing by opening your terminal in platform-tools/ or your download folder, and you probably can add platform-tools/ to your shell's path, and then use it like if it was apt installed.
[Nexus 6P General] ridobe:
Ok. Gotcha. That's not my issue. $Path has been set for years to this folder. I swear, it's just that I'm not getting an updated fastboot file. I have no idea why the SDK refuses to update for me. Is there any chance I could get you to upload yours?
[Nexus 6P General] effraie:
i can upload you platform-tool, if you want. will this be enough ? (full android-sdk-linux is way too big)

https://www.dropbox.com/s/pf2frqtf32uc3e3/platform-tools.zip?dl=0
[Nexus 6P General] ridobe:
Thanks! I am going to give this a shot. I think all I need is fastboot. We shall see.
[Nexus 6P General] AriStar:
can anyone confirm that ANDROID SDK MANAGER i was only supposed to install

Android SDK Tools

Android SDK Platform-Tools

Android Support Library

Google USB Driver
[Nexus 6P General] ridobe:
So, I'm a complete no-go. What could be different? I tried with your fastboot. I tried from your platform-tools folder. Same thing. All adb and fastboot commands are present except the new one. As far as available libraries or binaries, I've never had trouble in the past. What gives?

I really appreciate your help, though. I'm beyond frustrated right now.
[Nexus 6P General] effraie:
I guess there is something wrong with your $path...
[Nexus 6P General] Heisenberg:
Is your phone unlocked and screen on when attempting this?
[Nexus 6P General] AriStar:
Okay so my nexus 6p is using MTP driver from microsoft, how can i change this to the correct dirver?

---------- Post added at 08:52 PM ---------- Previous post was at 08:51 PM ----------

Yeah, i messaged a friend he told me its a driver issue.

I check device manager my nexus 6p is actually using MTP drivers, any idea how I can change them?

---------- Post added at 09:04 PM ---------- Previous post was at 08:52 PM ----------

Okay finished step 1.

Now problems with step 2, it says TWPR recovery is not compatible?
[Nexus 6P General] Heisenberg:
If you're going to post in this guide thread, please actually follow the guide. At no point does it say to use TWRP Manager to flash TWRP, if you follow the instructions you'll see that you flash TWRP with fastboot.
[Nexus 6P General] kruykaze:
SOLVED!

I downloded the dropbox file and inside the folder I ran "sudo ./fastboot flashing unlock" . Using Arch as well

Thanks!
[Nexus 6P General] ^tyrant^:
Not quit sure what is going on with my phone today, but it has rebooted like 3 times while just sitting there doing nothing.. is there a way to figure out whats crashing it?
[Nexus 6P General] DJBhardwaj:
Take a log using ADB logcat: https://wiki.cyanogenmod.org/w/Doc:_debugging_with_logcat

Well, it's old school and I used it long-long back with Gingerbread. The method should however be the same. You can also search for windows toolkits to achieve this, just Google.
[Nexus 6P General] wilflare:
when I unlock the bootloader, does my phone get automatically decrypted? (since data is wiped)
[Nexus 6P General] Mesmurized:
No. Userdata partition must be formatted with fastboot or TWRP
[Nexus 6P General] Tkun:
Is there an ADB command to copy an entire folder from your phone to your PC? The closest commands I've found only pull individual files and not an entire folder.