yashsingh1/xdaforums huggingface dataset:
[Nexus 6P General] wayne8821212:
Back up restore and pin/patterns

Thank you so much! I went through 2 cycles of formatting userdata (losing my backups) and reflashing the lastest Android version bootloader, boot, radio, system, cache etc., re-rooting backing up again etc. LOL.....I should have researched more thoroughly! Thanks to you the cycle will be broken!

---------- Post added at 07:55 AM ---------- Previous post was at 07:40 AM ----------

I use Heisenberg's instructions http://xdaforums.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928 in step 10 to un-root for flashing upgrade and step 11 to un-root and completely wipe user data. You can also use the various tools if you don't like setting up directories containg image files and fastboot. I have a word file and copy and paste the appropriate fast boot commands.
[Nexus 6P General] AndyinHD:
Just wanted to add my two cents for others who find this thread and need help...I had backed up my Pure Nexus 6.0 rom (everything except cache and efs) then tried out Beanstalk 6.0.1. When I went to restore my PN 6.0 backup it would just hang in bootloop. The way I finally fixed it was to wipe and do a clean install of PN 6.0 in TWRP, then flashed the 6.0 vendor, immediately restore data only from my PN backup, then delete all 5 locksettings and gatekeeper files mentioned in this thread and it booted just fine with all my data that I had in my backup. It sure is a pain, but hopefully can be resolved in a future TWRP update!
[Nexus 6P General] xSilas43:
This was because you went from 6.0.1 to 6.0.0 which have different vendor img.
[Nexus 6P General] AndyinHD:
That's not the specific problem noted here. This appears to be an issue with lock screen security and how it's saved in the twrp backup, causing boot loops if you try to restore a ROM that was backed up with fingerprint security in use.

Both my pure nexus 6.0 backup and my Beanstalk 6.0.1 backup had vendor and vendor.img saved as part of the backup, and it still froze.

Also, restoring either one and attempting to flash the vendor separately did not fix the boot loop. Only when I removed lock screen security files did the phone finally reboot on either ROM, with no other vendor flashing needed.
[Nexus 6P General] xSilas43:
As I also stated earlier this may not be the case because for me, everytime this works. If I backup the vendor partition with my backup and restore it aswell I have no issues with lock screen settings. I also have fingerprint and a pin set up, have done over 20 restores with this method. I'm not exactly sure what the problem with TWRP is but it's very peculiar.
[Nexus 6P General] mobileman88:
Do the only thing to delete for a restore to work is the lock settings file shown in the op?
[Nexus 6P General] xSilas43:
There are a few basically all the locksettings you see in that folder.
[Nexus 6P General] mobileman88:
The OP only says to delete /data/system/locksettings.db though
[Nexus 6P General] Gizmoe:
That's all I have deleted and it works.
[Nexus 6P General] xSilas43:
Same, but some people have to delete all of them.
[Nexus 6P General] :
Thanks for this solution. Had me baffled and seriously pissed me off. lol.

Sent from San Antonio Tx- Nexus 6p
[Nexus 6P General] kingmikel:
You are welcome! It was a pita when I first ran into it. I'm glad someone was able to figure out how to fix it for us.
[Nexus 6P General] Pain-N-Panic:
So since I'm about to root and go flash crazy tonight let me make sure I have this straight. As long as I disable all screen security features in the present rom BEFORE flashing a new rom, I'll be good?
[Nexus 6P General] drothenberger:
The issue in this thread has more to do with TWRP backups then flashing a new ROM. If you make a backup before flashing the new ROM and you want to be absolutely safe, you should remove the security settings before making the backup. If you don't, you will have go remove the file mentioned in the OP after restoring the backup. That has worked for me, but some people in the thread have reported problems booting even after removing the file.

If you're flashing a new ROM, you will likely wipe data before flashing, which will delete the security settings, so I don't think you need to worry about removing the security settings first.
[Nexus 6P General] SchmilK:
Doing this allowed me to boot up successfully, but I did have a bunch of weird problems, like some apps having messed up data, Terraria said my player was created in a newer version, Gmail asked what account I wanted to use, Android File Transfer (on mac) transferred files rreeeaaallllly slow. Using adb push instead was really fast.
[Nexus 6P General] mbting:
does this affect just a system and boot restore (without data)
[Nexus 6P General] luigidk:
Deleting the file during restore while in TWRP is a great relief !

Otherwise, if you are using Android Pay - cards are disabled when you remove fingerprint security. Some cards even require having to call the card issuer in order re-enable it for Android Pay.

So leaving the fingerprint unlock in place for a nandroid backup- is much easier than re-enabling all the cards in Android Pay!
[Nexus 6P General] mobileman88:
regretted not copying out my nandroid. phone was hung while upgrading to new release. rebooted it and it says encryption incomplete, restore to factory. all nandroids lost

less learnt... for MM, always copy out the nandroids.
[Nexus 6P General] hibby50:
Ouch that's rough. At least we can learn from it thanks for sharing
[Nexus 6P General] mobileman88:
Yep. My last full backup was about 5 weeks ago. So I lost that much data.
[Nexus 6P General] slick97477:
So far i am not sure how this is possible, However i made a backup without turning off my security first, and really thought i was gonna have to start over(before i knew you could delete these files), took a chance and went ahead and restored my backup, surprisingly my pin and my fingerprints are intact. I have no clue how that happened but it is. I didnt delete anything through twrp, simply restored the backup and viola everything is back even my pin and fingerprints. Only thing i didnt restore was vendor.img and the other one with vendor in it.
[Nexus 6P General] kingmikel:
You my friend are one lucky bastard! It has caused many headaches for those of us who could not get back into our phones without a factory reset
[Nexus 6P General] slick97477:
I will be perfectly honest I don't know how it happened but just in case it was a glitch I have wiped and restored it, and it works with all the security there.

Sent From My Nexus 6P

Pure Nexus Rom, Elemental X Kernel 1.04
[Nexus 6P General] slick97477:
The only differences I can see is that I deselected both items in the backup that had vendor in the name. I don't know if that is what caused it to work, but I tested it further by making another backup the same way. Upon restoring it the security was there.

Sent From My Nexus 6P

Pure Nexus Rom, Elemental X Kernel 1.04
[Nexus 6P General] wezman2k:
is this still an issue w/ the latest twrp 2.8.7.2?
[Nexus 6P General] galaxys:
Yes...
[Nexus 6P General] wezman2k:
I attempted a TWRP recovery w/ Pure Nexus 01/09 and I didn't run into this issue. I had an 8 character password w/ 2 fingerprints. Hmm.
[Nexus 6P General] uncle.bob:
I just want to add that i have the same problem, deleting locksettings.db fix it
[Nexus 6P General] kingmikel:
Do you mind sharing what you backed up and restored? And did you flash anything else before you restored? I'm trying to see what it could be that causes the issues.
[Nexus 6P General] wezman2k:
I did two backups, one w/ the saved security info (9 character code) and one without just in case I had trouble.

1. Backed up boot, system, and data w/ TWRP. Then I went and removed the security settings and did another.

2. Factory wipe in TWRP

3. Restored first backup w/ saved security info just to see if it worked... and it did, so I deleted the one w/ security info removed.

I was just curious to see if it worked or not... it's kind've a pain to have to remove that stuff because I have an exchange account saved in there that gets removed automatically any time I disable the screen PIN.
[Nexus 6P General] Barsky:
Thought I just did myself in on this one. I used the files from the stock image to fix it

fastboot erase cache

fastboot flash cache C:\angler\images\cache.img

fastboot flash vendor C:\angler\images\vendor.img
[Nexus 6P General] gqukyo:
Was it that only passcodes with more 8 characters or more the issue? Cuz I had issues restoring before when the phone first came out. However, over the past week, I restored a few times with a backup with my usual 4 character passcode and fingerprints and it restored fine. I always used the same passcode and it didn't work previously but worked fine now... Weird...
[Nexus 6P General] wezman2k:
just edited my post to clarify -- my passcode was 9 digits.
[Nexus 6P General] Yamakasinge:
My phone was encrypted + finger print but I removed the security pattern. How do I do, I restored and I am stuck on boot ?
[Nexus 6P General] Worst1C4:
hmm
[Nexus 6P General] bballs91:
Chroma ROM - Fingerprint + Pattern security and it restored without problems. Seems pattern does work with some roms when restored.. Phone is encrypted btw.
[Nexus 6P General] galaxy s4 nutjob:
Used the tip to get back in but now my lock screen is gone how do I get it back
[Nexus 6P General] bossei:
This works but this is not a very secure option as unless you encrypt the entire backup anyone can now get into your phone with the backup. Encrypt your backup.
[Nexus 6P General] xSilas43:
Like I posted a few pages earlier they have been restoring fine for me since I started backing up vendor partition, on various roms, With pin and fingerprint.

I believe in the settings app, there should be one called lockscreen or something and you just have to remake it.
[Nexus 6P General] p2im0:
I've now been randomly locked out of my phone twice due to invalid PIN.

I don't think it's a ROM specific issue but I'd pull the phone out of my pocket and it was immediately obvious something was up, screen was on with PIN pad displayed. Told me I need to type my pin before accessing my device. I typed in my PIN and it gave me the 30 second lockout timer, after a single (correct) attempt.

Luckily I was able to use my wifes phone to find this thread to remember the path, delete the .db file and get back in. My android pay info was wiped (credit cards) but otherwise phone was untouched. It happened again a week later. Been 2 weeks now without any recurrences, but scares me a bit.

I like to keep my device encrypted even for the false sense of security (someone can get in using the same method if they find out I have TWRP).
[Nexus 6P General] kingmikel:
If your phone is encrypted and you have a passcode to turn it on, will deleting those files through TWRP delete that passcode requirement as well?
[Nexus 6P General] bagarwa:
I will just throw in my personal experience.

I have Nexus 6P, Stock Android 6.0.1, SuperSu v2.67, franco kernel r9, Xposed v80. I have a pattern lock, smart lock and fingerprint unlock enabled. I never removed those before making nandroid. I backup Boot, System, Data, Vendor. And I restore those four when I need to restore. I done such restore three times now. I didn't have a bootloop or didn't get any unlock error after restore. Pattern to unlock the phone stayed the same and fingerprint unlock works too.
[Nexus 6P General] mobileman88:
Yes. That is supposed to work
[Nexus 6P General] p2im0:
Yes, that's the only way I got back into my phone. Has not happened again since my post, thankfully.
[Nexus 6P General] galaxys:
This thread should have a happy ending with the latest TWRP 3.0.0.0 release! ;):)
[Nexus 6P General] :
Not fixed in 3.0.0.
[Nexus 6P General] dray:
I tried this and it worked but would not persist after reboots so I ended up wiping and flashing stock image.
[Nexus 6P General] markus2801:
OK, now i throw in mine:

I'm on Nexus 6P, Android 6.0.1 .

Had the same issue but I can't solve this problem, cause I don't have this file to delete... Anyone else?

Gesendet von meinem Nexus 6P mit Tapatalk
[Nexus 6P General] xSilas43:
You have the file or you won't have a pin/ any lock screen settings , what directory did you check?
[Nexus 6P General] markus2801:
I checked the directory from the first post

Gesendet von meinem Nexus 6P mit Tapatalk
[Nexus 6P General] xSilas43:
Any way you could post a picture? cause it definitely will be there, if not, you will just have to wipe data.
[Nexus 6P General] Gizmoe:
Are you mounting data while in recovery and then going to

/data/system/locksettings.db
[Nexus 6P General] markus2801:
Sorry, can't check it now. Did factory reset and deleted backup :/

Gesendet von meinem Nexus 6P mit Tapatalk
[Nexus 6P General] bossofindy:
When doing a dirty flash do I need to remove security
[Nexus 6P General] SchmilK:
Nope. Just dirty flash as normal.
[Nexus 6P General] Ok_Kaleidoscope5109:
My phone has lockscreen password (require on boot) + fingerprint. Today I made a TWRP backup and later restored it and I no longer can decrypt via password in TWRP. Did it change to something else??!?!
[Nexus 6P General] xSilas43:
I would try reflashing the latest twrp in fastboot, if not you may just have to format data
[Nexus 6P General] Pain-N-Panic:
None of these issues would arise if you just remove all lockscreen security prior to making a nandroid. I guess it can be easy to forget, fortunately for me I never have and I've never had issues restoring nandroids. Hopefully there's a patch to TWRP sooner rather than later that can properly backup and restore lockscreen security settings!
[Nexus 6P General] nldxda:
I want to make a nandroid before I install multirom on my 6P..

I know to remove fingerprint data and disable all screen security but I'm not sure which elements to actually backup and then restore in TWRP..

Boot

System

System Image

Vendor

Vendor Image

Data

Cache

Recovery

EFS

Anybody willing to explain to me which options I should backup and which ones to restore if I need to actually restore??
[Nexus 6P General] nadiros:
Just use the defaults that TWRP chooses.

Boot - System - Data

That's all you need for a regular backup and restore
[Nexus 6P General] nldxda:
Thanks I'll give this a try..
[Nexus 6P General] Shemploo:
Also, try using your google account password that you tied to the phone, I called google and told them I had this issue, they suggested I try that, and it worked.
[Nexus 6P General] xSilas43:
MAKE sure you have at least one backup of your EFS on your computer, this will help restore phone function if ever lost, and IIRC is related to your imei.
[Nexus 6P General] nldxda:
OK will do, thx
[Nexus 6P General] psyonicus:
Hello all.

For the life of me, I cannot remember where I read this, and the changelog doesn't specifically says anything, but I read somewhere that the recently released TWRP version 3.0.2-0 complete solves this problem and therefore eliminates the need of having to remove pin/password/pattern security before doing a nand backup. Can someone please confirm if this is the case?
[Nexus 6P General] meekrawb:
I read the same thing in the official TWRP thread. Ran a backup today without disabling my password(encrypted) and then restored it . Everything works as it should.
[Nexus 6P General] GroovyGeek:
Heidelberg should update the guide then, still says to remove security before nandroid, at least as of a few days ago.
[Nexus 6P General] Silvers91:
Restored a backup today via TWRP version 3.0.2-0 and I can't get pass my lock screen, says that pattern is incorrect.. So I guess that it doesn't solve the issue.
[Nexus 6P General] mko000:
Did you make the backup with TWRP 3.0.2-0 as well?
[Nexus 6P General] Harry Pothead:
Had the same problem today with a TWRP 3.0.2.0 backup, this fix in their update seems to be hit and miss.
[Nexus 6P General] Silvers91:
Yeah

Btw I'm on a Nexus 5x
[Nexus 6P General] shag_on_e:
I was able to successfully restore a backup made with TWRP 3.0.2.0 that had fingerprint lock screen security. Running the latest Dirty Unicorns weekly 4-23-16. I've only restored once since flashing the newest TWRP, but I was able to unlock with no problem.
[Nexus 6P General] Jonnyredcorn:
Thank you [MENTION=3950897]mikexda[/MENTION] and [MENTION=7016955]kingmikel[/MENTION] for the workaround for us idiots that forget to disable security. I was so frustrated yesterday trying to figure out why I couldn't send or receive text messages. I made a backup and restored one of my old backups to see if that fixed it, it didn't, so when I restored my backup I just made, I realized my mistake when my PIN wouldn't work(AT&T had a service outage yesterday that affected a lot of peoples SMS capabilities). I was pissed and thought I was screwed until I found this post, ahhh relief.....so thank you!

I posted the /data/system/locksettings.db workaround over in www.reddit.com/r/Nexus6p for them over there. They were the ones who informed me the SMS issue was with AT&T and wasn't my device right before I was about to restore the factory images. Saved me more headache. I gave [MENTION=7016955]kingmikel[/MENTION] and [MENTION=3950897]mikexda[/MENTION] credit over there as well. Hopefully someone will find it useful as I did.
[Nexus 6P General] kingmikel:
It was all [MENTION=3950897]mikexda[/MENTION], I just opened the thread. But I'm glad it has helped! :highfive:
[Nexus 6P General] SacredDeviL666:
man you saved hours of time waste and frustration with your work around....

Thank you :):good:
[Nexus 6P General] Milly7:
Ran into this issue as well on the HTC M10. Followed the procedure and it booted but smart lock options were missing. Is this common or specific problem with this procedure on that device?
[Nexus 6P General] David522d:
THANK YOU.
[Nexus 6P General] zamula:
Go to Trust agents setting in security and make sure smart lock is checked.
[Nexus 6P General] ManikandanGuru:
Thank you so much.

This helped for my Secondary ROM in my MultiROM TWRP.

It's the same procedure except the location of the secondary ROM.

delete the same file. /sdcard/multirom/(your ROM Name)/data/system/locksettings.db
[Nexus 6P General] jparnell8839:
[MENTION=7016955]kingmikel[/MENTION] something you may want to update the OP with, if you restore a nandroid from a different device (i.e., you make a nandroid backup, RMA your 6P, and restore that backup on the new 6P), your fingerprint reader will not work, even once you set up another security method. You'll get red text on your lockscreen that states "Fingerprint hardware not available". At this point, your only real option is to backup your apps/settings, factory reset, and restore apps/settings (to anyone else reading this, I use TBU to backup user apps/data and key system settings, then create an update.zip that can be flashed from recovery, except for SMS/call logs, which I use Super Backup).
[Nexus 6P General] kingmikel:
Thanks for the heads up! Do you know if the finger print scanner will work on the new phone if your backup didn't have a finger print saved? I'll get it updated in a moment
[Nexus 6P General] jparnell8839:
That I do not know. If anybody is willing to do a restore from one of my nandroids, we could find out. I'll do a clean factory reset and just backup the system, boot, and vendor. The only reason I know about the restore to different device is because I had to RMA my first 6P, but I'm a cautious feller that always has a backup on a cloud service no older than a week.

If I had to harbor a guess, I'd say that there's a hash somewhere involving some hardware identifier that Android checks for.
[Nexus 6P General] mobileman88:
I am in the process of testing this. Fingerprint reader totally dead when the twrp is restored to the 2nd device. Doing another backup workout fingerprints now to test
[Nexus 6P General] mobileman88:
Seems like this is quite true. Once fingerprints have been used, even deleting/disabling it does not seem to allow the restored backup to configure finger prints again. I have 2 sets of 6P. Let's say A & B.

1. Backup A with Fingerprint and restore to B

Result : Fail

Delete Locksettings

Result : Able to unlock and set pattern lock but setting fingerprint will always not be able to register new fingers, use current fingers or delete earlier registered fingers

2. Backup A without Fingerprint and restore to B

Result : Fail

Delete Locksettings

Result : Able to unlock and set pattern lock but setting fingerprint will always not be able to register new fingers at all

3. Backup A without any security of pattern lock or Fingerprint and restore to B

Result : Fail

Delete Locksettings

Result : Able to unlock and set pattern lock but setting fingerprint will always not be able to register new fingers although it says no fingers registered. Keeps saying "Unable to complete registration".

Seems like as what a few other members have encountered. all TWRP restores to a new device will result in the fingerprint reader being totally useless. Will have to do restores with Titanium Backup on a newly setup 6P till someone figures this out.
[Nexus 6P Accessories] mdmogren:
I totally thought it would, but no such luck...
[Nexus 6P Accessories] dwswager:
It's 2A at 14.5V and 2.4A at 5V. No 3A output mode.

The only 3A capable USB chargers are the 2 that Google sell and an old captive micro b one that Asus supplied with a transformer model.
[Nexus 6P Accessories] mdmogren:
Thanks for the info
[General Topics] jeniffermendieta:
He leido, de pies a cabezas los foros y los desarrolladores de xda se limitan a decir sunshine 25$, hace mucho tiempo muchos por no decir todos los lei quejarse por las diferentes seguridad q las compañias ponen a los sistemas para que no pueden modificarlos. Y criticaban sus costos y monopolios. Ahora uds hacen lo mismo con sunshine, claro ahora como uds son los q estan al otro lado recibiendo los dolares son felices y apoyan que el conocimiento y las modificaciones del smarphone tengan precio. Como siempre la doble cara del ser humano. Lastima.
[General Topics] sd_shadow:
please use English on XDA-Developers
[General Questions and Answers] durb4him:
I bought an alcatel onetouch pixi glitz tracfone. I know it is a terrible cheap phone, but it was all I could afford. I have a T-mobile data plan that I want to use it on. However I have tried 3 different unlock sites and all have given me a message saying it is unable to be unlocked. I read on another forum that sometimes rooting and loading a custom ROM can sometimes unlock it in the process. However, after looking all over the web, I can't even find instructions for SU. Is this phone so crappy yay no one cares or what?:p
[General Questions and Answers] pissinguoff247:
Any luck? Thinking of running out and grabbing one of these as a cheap mp3 player to leave in the car, would love to strip it down. What have you tried? King/Kingo? Vroot? Are those still legit methods?
[General Questions and Answers] durb4him:
I haven't really tried anything because with no stock (that I can find) I am a little hesitant to try anything...lol