yashsingh1/xdaforums huggingface dataset:
[Nexus 6P General] tf2manu994:
If we wanted, could we just go to step 4, and not do the rest? I.e just root stock and leave it as is?

Is that safe?

If it is, can I flash a rom on later?

Thanks :)

(I know the device isn't out yet, just getting prepared for it.)
[Nexus 6P General] Heisenberg:
No, because you need a custom recovery in order to flash SuperSU, and you need an unlocked bootloader to flash a custom recovery. Why not just unlock the bootloader?
[Nexus 6P General] tf2manu994:
Ah you misunderstood me, I mean like do all steps upto 4, and then not do the rest?

Sorry for misunderstanding :o
[Nexus 6P General] Heisenberg:
Ahh ok, now I understand. Yes of course, they're not actually steps that all need to be completed, they're just numbered sections. So if all you want to achieve is to root your stock ROM then you only need to follow steps 1-4.
[Nexus 6P General] Fentadroid:
Hemm sorry but are we talking about a phone that doesn't exist? :)
[Nexus 6P General] Heisenberg:
It certainly does exist, it just hasn't been released yet. And as it says in the OP these processes remain virtually unchanged from model to model in the Nexus line.
[Nexus 6P General] Fentadroid:
I hope that too!!! :)
[Nexus 6P General] gamzekal:
Great Job:D

Thanks for your Hardwork:good:
[Nexus 6P General] just4747:
I've unlocked and flashed TWRP and modified boot, but I can't get the Beta SuperSU installed. I downloaded it in the phone's browser and it saved to sdcard\download but can't find it in TWRP to flash. I've formatted data and checked again but still not finding any files in sdcard.
[Nexus 6P General] lUnorthodoxFoxl:
Went through all the steps up to reboot after backup in TWRP and now I get google process gapps has stopped.
[Nexus 6P General] Heisenberg:
Since formatting have you downloaded SuperSU again?
[Nexus 6P General] just4747:
???

The guide says to download it at the beginning only:

Download SuperSU.

Enter TWRP recovery via the bootloader menu.

Enter the wipe menu and format (not wipe) data.

Go back to the home screen and enter the install menu.

Navigate to where you have SuperSU stored on your internal storage and select it.

Swipe to install.

EDIT: I think I got it. Did the data wipe again, booted into Android and downloaded SuperSU again, rebooted to TWRP again and was able to see and flash the zip.

Thanks!
[Nexus 6P General] rgao007:
This is so weird. I installed the 6P MultiTool v0.3, thinking that I may as well give it a try, and unlocking the bootloader through there surprisingly worked. I really appreciate the help you gave, though.
[Nexus 6P General] ridobe:
I have the same problem. Everything is up-to-date.
[Nexus 6P General] Heisenberg:
That's my fault, I'll edit the guide to perform the format before downloading the zip. Bit of an oversight on my part there.

Can you confirm which command the toolkit uses please?
[Nexus 6P General] VAVA Mk2:
Is anyone else having issues just unlocking the bootloader? The command fastboot flash unlocking does not work for me! Just updated to the latest SDK and platform tools as well.

EDIT: Nevermind got it!
[Nexus 6P General] rgao007:
I didn't remember if there was a command or not, so I tried running the program again but it gave me a fail message since my bootloader was already unlocked. There wasn't any visible command there. If I relock and unlock again, I'll lose my data. Really sorry, but I think you should ask someone whose bootloader isn't already unlocked to report back what command it uses.
[Nexus 6P General] Heisenberg:
No worries, thanks for looking into it. I'm just trying to work out why using fastboot to manually unlock isn't working for a couple of people. My inkling was that it was due to outdated adb/fastboot.
[Nexus 6P General] Heisenberg:
Can you please post exactly what you did to fix the issue you were facing?
[Nexus 6P General] mrRobinson:
If you don't want to lose your data encryption to root you can boot to TWRP and adb sideload the beta supersu apk from your computer. Just another option since I see the only one currently presented kills data encryption.
[Nexus 6P General] bigdave79:
I would check that those people having trouble are definitely rebooting into bootloader before trying to use fastboot commands. It seems as though from one earlier post the guy was talking about enabling USB debugging in developer settings, etc. He many have still been booted into android while trying to issue the fastboot commands. Some folks may not realize USB debugging (adb commands) and enabling OEM Unlock (fastboot commands) are two quite different things and you don't have to enable one to do the other.
[Nexus 6P General] Heisenberg:
Good point, I guess I just assume people are actually following the instructions.
[Nexus 6P General] Trainstation:
I'm unable to open the SDK Manager.exe

A console like window pops up and closes quickly.

I'm on windows 10 if that helps.

A quick google shows that it maybe because I don't have Java. Is that correct?
[Nexus 6P General] Heisenberg:
I may not be the best person to troubleshoot this as I only use a Linux OS. I only write these guides for Windows as that's what most people use. Anyway, which version of Windows do you have installed? Which adb/fastboot package did you download from the Android Developer site? Have you tried installing Java and trying again?
[Nexus 6P General] mehappyz:
I was following the guide and I installed TWRP. However, whenever I boot into TWRP, I'm getting error messages:

E: Find_file: Error opening '/sys/class/backlight'

E: Unable to mount '/data'

E: Unable to recreate /data/media folder.

Updating partition details...

E: Unable to mount '/data'

...done

E: Unable to mount storage.

E: Unable to mount /data/media during GUI startup.

Full SELinux support is present.

E: Unable to mount /data/media/TWRP.twrps when trying to read settings file.

E: Unable to mount '/data'

MTP Enabled

E: Unable to mount '/data'

Also, Internal Storage is listed as 0MB.

Further, anytime I try to backup or anything I get a mess of errors that it was "Unable to mount '/data'".

I've flashed back to the factory image and re-followed the steps exactly and I'm still getting the same issue. Anyone have any ideas?
[Nexus 6P General] Heisenberg:
Did you flash the modified boot.img and reboot back to the bootloader before flashing TWRP?
[Nexus 6P General] mehappyz:
Yes, flash modified boot.img -> Reboot Bootloader -> flash TWRP -> Reboot Bootloader -> Enter Recovery
[Nexus 6P General] Trainstation:
I am on Windows 10

I am 100% sure I followed your directions correctly up until trying to open the sdk manager.exe

I do not have any sort of Java software installed on my computer. I'll try to install the Java toolkit and see if that is what the issue is.
[Nexus 6P General] Soulfly3:
Quick question for [MENTION=4153349]Heisenberg[/MENTION]

When making an EFS backup, does the "security" have to be turned off, like it does when backing up system/data/cache ?

I would think it is completely unrelated, and having security on shouldnt affect it whatsoever... But when dealing with something as vital as EFS, might as well be safe than sorry.

Thanks!
[Nexus 6P General] Pyrres:
Any idea can we already use TWRP Manager install. My TWRP got lost at some point and I have working root but no custom recovery and at this moment I dont have suitable computer at hand so this or any other workaround that allows me to install with just the phone would be ideal. Is it doable and/or do I have to reroot after that? My phone is rooted with Nexus toolkit and what I believe roots using the older method not the systemless method.
[Nexus 6P General] Heisenberg:
I don't believe it should matter whether security is on or off as you're not backing up anything that has anything to do with that.

You could probably use TWRP Manager, but I wouldn't recommend it, I've seen it cause major issues for people in the past. Perhaps try out Flashify? I've used that on other devices and it was always rock solid. Flashing a recovery won't affect your root at all.
[Nexus 6P General] Soulfly3:
Figured as much.

But since I don't want to risk it, I'll likely turn off the security just to be certain. Only get one crack at the EFS backup, not like I'll test it afterwards
[Nexus 6P General] Pyrres:
If this works you have saved my day! So is there some thing that I should not do that might remove my custom recovery? Just wondering where mine went :confused:

EDIT: It worked flawlessly! Flashed TWRP and after that the kernel I wanted. Still confused how I lost my recovery :/. Is there a proper way to enter custom recovery or something else so it would not revert back or some setting I have to enable.
[Nexus 6P General] Heisenberg:
I'm still not sure why some people are having TWRP disappear on them, so your guess is as good as mine.
[Nexus 6P General] Pyrres:
Yeah but just checking that there is not some special new way to enter recovery that came with 6.0.x etc :). Its still the same but so much has changed under the hood so quite a lot to digest. For example the systemless root, doze settings, app standby and whatnot plus the extra difficulty to root non Nexus devices if not rooting before 6.0.x update if I understand correctly.
[Nexus 6P General] Barsky:
Got my Nexus 6p yesterday. Your guide to unlock bootloader, install twrp and root went Smooooothly for me (outside of one stupid thing I did, but recovered from...all me :)

Thanks for your work
[Nexus 6P General] EFEXR:
I'm following the guide and so far the process is going smooth with no trouble whatsoever. The question I have is, I made a Nandroid backup & an EFS backup, are these backups suppose to be .zip files? because my backups are not .zip files they are just folders when I transfer them to my PC.
[Nexus 6P General] E30Nova:
No I flashed the recovery fine and when booting into recovery from bootloader, it worked fine. But when I rebooted into system and then tried to go into recovery, I got that error.

Someone else posted after me with the fix, though. I read the guide wrong, I guess, and since I was trying to do systemless root, whenever twrp asked if I wanted to allow it to modify files or keep it read only, I chose read only. As soon as I selected the option to let it modify files, I was able to get into recovery any time I wanted.

Rookie mistake, I know, but thanks for the help!
[Nexus 6P General] force70:
Lol, thats normal they are not supposed to be zip files

Sent from my Nexus 6P, Note 5, Note 4 or Nexus 6
[Nexus 6P General] reubdogg:
I was able to load a custom rom (screw'd) but when I tried flashing a kernal (Kylo) it got stuck on the boot animation. How do I fix that? Do I need to wipe everything and reflash?
[Nexus 6P General] hello2ew:
With regards to flashing factory image without wiping internal storage, in addition to wiping data, is it safe to wipe system as well via TWRP?
[Nexus 6P General] Heisenberg:
Perfectly safe, unnecessary, but safe.
[Nexus 6P General] Scartozzi:
happy new year to everyone...today i'm gonna flash cataclysm, elemental x kernel and root so i'm gonna do a backup first(already made an efs backup)...the question is do i have to backup everything(like vendor and vendor image)?
[Nexus 6P General] wangyuetian:
So I had the same experience. Dont worry too much about it. Just go to cmd(in platform-tools folder, shift+right click, go to cmd) and try "fastboot devices", you will be able to see your device and serial number.
[Nexus 6P General] Soulfly3:
just follow the directions exactly as they are on the first page
[Nexus 6P General] reubdogg:
I have followed the instructions to unlock bootloader, install twrp, root and install a custom rom but I'm having a weird issue. When I installed the betterbatterystats app as a system app, then reboot, it just hangs on the boot animation. I tired wiping cache & dalvik, fixing permissions, nothing worked. I was forced to do a clean wipe and reflash. I tried this 2 times and each time the same thing.

I tried flashing a kernal (kylo) and same thing, stuck on boot animation. Had to wipe and reflash again.

I also tried rebooting in safe mode, but same thing, it hangs on boot animation.

Any ideas why it's doing this? How do I fix this? I'm afraid to flash anything now.
[Nexus 6P General] Barsky:
I have also been losing root periodically. Then I reboot and it is fine.

I used seamless, accidentally let twrp install root and then fixed it by flashing the proper root over it. Wonder if that initial mistake of letting twrp install it root is causing this.
[Nexus 6P General] runawaybayeh:
, Heisenberg , okay I just went for it and all is good just wanted to let you know. After that initial hiccup of the phone, on boot showing the red triangle and the corrupt message it hasn't come back . I am rooted. I have the usual yellow triangle and lock your bootloader message . all is good thank you very much
[Nexus 6P General] Pain-N-Panic:
Thanks for this tut Heisenberg. Just got my N6p yesterday, coming from the N5. I rooted my N5 as soon as I got it and never actually ran factory images on it again haha. It was nice to have this refresher course on rooting since I haven't had to do it in two years! The N5 never gave me an issue and I have flashed 99% of the roms out there for that device. I hope/expect the 6p to do the same!
[Nexus 6P General] mbutandola:
Check that you have java installed and that it's up to date. Otherwise SDK manager won't open up

Envoyé de mon Nexus 6P en utilisant Tapatalk
[Nexus 6P General] Pain-N-Panic:
Quick question. In the Nandroid Backup section of this tutorial it states to check the vendors when making a backup. I was reading through the TWRP thread and everyone in there was saying to NOT backup the vendors as it will cause issues when trying to restore. Can anyone elaborate?
[Nexus 6P General] force70:
I dont back it up and have not had any issues restoring as of yet

Sent from my Nexus 6P, Note 5, Nexus 6 or Note 4
[Nexus 6P General] Pain-N-Panic:
Good to know. Thanks for the reply!
[Nexus 6P General] force70:
I do keep a twrp flashable of the current vendor on my device though, always a good idea.

Sent from my Nexus 6P, Note 5, Nexus 6 or Note 4
[Nexus 6P General] will.bates94:
Okay so I'm flashing back to stock, and i'm at the flash system step... its been writing 'system' for the last hour or so.... Do i wait or is it hung up? Followed instructions to the tee.

EDIT: Fixed, just reran the steps and it didnt hang up the second time around.
[Nexus 6P General] doritopope:
How would I go about rooting the phone while preserving the content/settings on the device?

Having already used the phone for quite awhile, don't really have the luxury of rooting a clean phone and unlocking the bootloader will clear all user data.
[Nexus 6P General] Badger50:
You no can do unless you unlock the bootloader and then root. You could backup your internal storage on your computer and then transfer it back after you root. However, all your app data will be gone unless you back that up with some app that doesn't need root.
[Nexus 6P General] pagyn:
When I unlock my boot-loader on the 6p, will it wipe all of my data (contacts, app data, photos, etc., etc.)? Some say it will and others say it will not. If so, what is the best way to create a complete backup of all data so I can restore after unlocking and rooting?
[Nexus 6P General] Badger50:
It will wipe everything!!! Read the guide in the OP. Backup your photos and whatever files you have on the computer, google has your contact data taken care of, your app data.....again, go look in the play store that will do the trick. I just don't know what they are.
[Nexus 6P General] Heisenberg:
You can't, you need to unlock the bootloader which will wipe the device, there's no way around that.

It does wipe the phone, whoever says it doesn't is flat out wrong. Just copy your photos etc to your PC and then copy them back afterwards.
[Nexus 6P General] Shockz:
For section 12 why does it say to go into twrp and wipe the data partition if the section is for returning to stock without losing data? Is that different from the user data partition?
[Nexus 6P General] inasm:
I ****ed up. I let TWRP install SuperSU, which caused the error message "your device is corrupt" to appear, and to not boot past the coloured dots animation.

From other comments, it seemed like I should use boot.img to get root the proper way to fix this, but I do not know which build I am on, and I do not want to break my phone further by using the wrong file. I am fairly sure I am on 6.0.1, but the build I have no clue about.

What is the safest thing for me to do? I thought about doing a factory reset, but I assume that means going back to 6.0.0, which I'd rather not do, and just guessing which boot.img I need seemed even worse.
[Nexus 6P General] Shockz:
No just download the latest factory image from Google and use fastboot to flash the images. It will put you on the latest firmware.
[Nexus 6P General] Heisenberg:
Data is separate to userdata, wiping data with TWRP removes apps and settings.
[Nexus 6P General] Shockz:
Ahh okay, just making sure. Thanks!
[Nexus 6P General] Pain-N-Panic:
Happily rooted. Thanks for the awesome tut Heisenberg!
[Nexus 6P General] AngryDucks:
hey maybe its not needed as i have not really seen it mentioned. but due to having a clean install of windows 10, i had to go through and reinstall my SDK, which worked out fine. however the SDK manager would not launch, took a little bit before it dawned on me, and thought maybe it should be mentioned, in case any other first timers come across this thread. the sdk manager, will not launch, if you dont have the Java SE kit also downloaded. not sure if OP considers this important enough for adding to the directions, but figured i'd throw it out there in case anybody was having an issue.
[Nexus 6P General] Heisenberg:
Yeah a few people have had issues with being able to access SDK Manager due to not having up to date Java installed, I'm gonna go ahead and add this information to the OP.
[Nexus 6P General] 83097markcynt:
I'm on my third Nexus, already having 4 and 5 and now the 6P. In the past I've always used either Skipsoft or Wugfresh to do the various tasks in the guides in the OP. Using the guides I have unlocked my bootloader, installed TWRP, rooted, installed and tried many various ROMs, and now returned to stock, all successfully.

Thank You for your time and effort in making this guide.
[Nexus 6P General] wilflare:
once again, thank you so much!

just to check!

if I want to do a "clean install", do I simply flash back the nandroid backup that I have?

do I need to worry about the "system image", "vendor image" that I did not back up?
[Nexus 6P General] Heisenberg:
No need to worry about those.
[Nexus 6P General] syintiphic:
Hey HaXoReD, this is some good testing and investigative work. Thanks for sharing.

I could be wrong but is it necessary to back up all the things you listed for your original nandroid? On this device and other devices I usually just back up system, data, and boot for a typical nandroid. I do back up the EFS partition as well but that is usually done just the first time. As far as backing up the vendor image I thought I read in one of the 6P threads that you don't have to back up the vendor image. The only time the vendor image is needed, and it should only be flashed from the factory images, is when the build version changes (i.e. you want to ensure the vendor image build number is the same as your ROM build number, stock or custom). I'm going to have to go back and see if I can find this. I know this wasn't the intent of what you were testing but just thought I would put it out there.

Regarding reflashing of the bootloader image (do you actually mean boot.img?), I think you are correct that this would need to be reflashed if you have systemless root because from what I understand systemless root patches the boot.img automatically, thus there is no longer a need to use a modified boot.img to gain root. Please correct me if you did indeed reflash the bootloader image and that actually helped solve your problem. Those with more experience than me may be able to chime in and add more details on this.

One thing that I'm pondering now is if you could use osm0sis' unsu.zip to revert the "stock" boot.img or is it just for going between different versions of supersu? Anyone have any thoughts on this? I'm going to read up on this a bit more tomorrow.

Cheers.
[Nexus 6P General] synnyster:
So I after flashing TWRP and booting into it for the first time, it asks to keep the system partition read only and I accidently swiped to allow write access. After flashing systemless root I couldn't get android pay to work. So it looks like I should have selected "Keep Read Only" in TWRP. What do I have to do now to fix it so I can use android pay? Do I need to flash a stock image and then reroot?
[Nexus 6P General] a1exus:
sorry if this is slightly off topic, I used systemless method to get root, yet my Android pay isn't working( any ideas why?
[Nexus 6P General] adrman:
See if /su/xbin_bind exists. If it does, delete it and reboot.
[Nexus 6P General] a1exus:
root@angler:/ # ls /sbin/xbin*

/sbin/xbin*: No such file or directory

1|root@angler:/ #
[Nexus 6P General] adrman:
"/su/xbin_bind" not "sbin"
[Nexus 6P General] hello2ew:
Hi with regards to flashing a factory image without wiping the internal memory, is it possible to flash all the components except for the recovery.img if I wish to keep my TWRP recovery?
[Nexus 6P General] a1exus:
Ahh, sorry about that) any cons for doing that?
[Nexus 6P General] adrman:
Well yeah. If what I actually quoted exists, your AP won't work.
[Nexus 6P General] mobileman88:
that's what I did to flash from 6.0 to 6.0.1 .

Not sure if it will work too when updating to the latest Jan 2016 updates

https://developers.google.com/android/nexus/images?hl=en

angler-mmb29p-factory-25ed9560
[Nexus 6P General] a1exus:
It is there, how would that effect root? Or anything else other then Android Pay?
[Nexus 6P General] adrman:
You should read the SuperSU threads, especially the WIP thread. There's a very good explanation there in the first few posts.
[Nexus 6P General] synnyster:
I see that it exists for me but when I try to remove it in terminal it says permission denied.
[Nexus 6P General] adrman:
When it happened to me, I just used FX File Explorer from Android OS. You could try booting to twrp, mounting system, then deleting from the file manager there as well.
[Nexus 6P General] synnyster:
I downloaded ES File Explorer and deleted it that way.
[Nexus 6P General] 220volt:
Does anyone have boot.img for latest firmware that not have forced encryption?

Skickat från min Nexus 6P via Tapatalk
[Nexus 6P General] mobileman88:
good idea. was updating halfway when the phone hung and was extremely hot. rebooted it and it says encryption not complete, resetting to factory. everything was lost.
[Nexus 6P General] 220volt:
That's sucks!

You didn't have encryption before update?

Skickat från min Nexus 6P via Tapatalk
[Nexus 6P General] Heisenberg:
It's linked in section 7.
[Nexus 6P General] 220volt:
Does MMB29M work with MMB29P?

Skickat från min Nexus 6P via Tapatalk
[Nexus 6P General] Heisenberg:
Oh I'm sorry, I didn't realise there had been a later build released, my guess is no.
[Nexus 6P General] mobileman88:
I don't know if I had encryption before update. I was

- unlocked

- rooted with 2.66

- xposed v79

- ex kernel 1.03

running on MMB29M

Flashed boot.img, cache.img, vendor.img, system.img

Did a "fastboot reboot" after flashing.

Phone was extremely hot after 30 minutes so I decided to force reboot by "Powerbutton+VolUp" . Then it says it needs to reset to factory and I lost every darn thing. :(

Hope I don't do this again for my next update. Any tips to prevent this?

---------- Post added at 03:53 PM ---------- Previous post was at 03:51 PM ----------

[MENTION=4153349]Heisenberg[/MENTION]

Just did the following and nuked my phone :

http://xdaforums.com/showpost.php?p=64649770&postcount=2043

Any tip to prevent what happened? I just resetted everything without a nandroid as the virtual SD was wiped