PSA TWRP Backups and Lockscreen Security - Nexus 6P General

I ran into this last night, so I wanted to post this so others don't run into as well. Yesterday I was going to flash a few rows to try them out, so I made a backup in TWRP. Later when I restored the backup, it asked for my pin once the phone booted. I entered in my pin, but it said it was the wrong one. I tried restoring the backup again, but same error kept occurring. Eventually I had to do a factory reset. I'm guessing that there is no way to restore a pin, pattern, etc. So before you make a backup, be sure to turn off any lock screen security measures so you don't run into the same problem!
Problem
If you have a TWRP backup and you had a secure lock screen, when you restore it will not be the same pin/pattern/password. You will not be able to get past the lock screen.
Also if you try to restore a back up from one phone to another, it can render the fingerprint scanner useless until you factory reset. You'll get red text on your lockscreen that states "Fingerprint hardware not available"
Solution
Restore your backup. Then while still in TWRP go delete /data/system/locksettings.db
This should let you swipe to unlock your phone. Your fingerprints will still be saved and can be used once you set up a secure lock screen
Problem
If you made a backup of one Nexus 6P, and got a new Nexus 6P and restored the old phone's backup, then it may be a little different to fix.
Solution
To clear fingerprint/Nexus Imprint data, delete/move to backup:
Code:
/data/fpc/ # this seems to be related to inability to add/remove imprints, perhaps the hardware ID, I haven't checked the contents of global.db
For each user (e.g. 0), delete/move to backup:
Code:
/data/system/users/0/fpdata/
/data/system/users/0/settings_fingerprint.xml # You can actually rename fingerprints without problems, this file seems to just reference the hardware storage
Thanks to @mikexda for providing us with a solution.
Thanks to @jparnell8839 for providing the feedback on restoring backups.
Thanks to @myshen for providing a solution for when you restore a backup to a new 6P

I just ran into the same thing! Caused a great deal of grief! Oh well!

Are your phones encrypted?

tech_head said:
Are your phones encrypted?
Click to expand...
Click to collapse
no my phone is not encrypted

Just tested this out and had the same problem. It does work OK if you remove security before the backup. For those keeping track, I am encrypted.

midas69 said:
Just tested this out and had the same problem. It does work OK if you remove security before the backup. For those keeping track, I am encrypted.
Click to expand...
Click to collapse
So when you say remove security, you mean Screen lock = None, yes?

m0h1t said:
So when you say remove security, you mean Screen lock = None, yes?
Click to expand...
Click to collapse
Think its PIN, Password, and or Finger Print.

scoot05redss said:
I just ran into the same thing! Caused a great deal of grief! Oh well!
Click to expand...
Click to collapse
Tell me about it... I was frustrated as hell!
tech_head said:
Are your phones encrypted?
Click to expand...
Click to collapse
My phone is not encrypted.
midas69 said:
Just tested this out and had the same problem. It does work OK if you remove security before the backup. For those keeping track, I am encrypted.
Click to expand...
Click to collapse
Looks like it doesn't matter whether you are encrypted or not.
m0h1t said:
So when you say remove security, you mean Screen lock = None, yes?
Click to expand...
Click to collapse
Yes precisely! So as long as you remove it before the backup you are fine. Any back ups that had lock screen security will be useless and you will be unable to get back in.

Now what about the people that will miss this thread? I know I almost did. Going to forward this in the root guide and hope to see it there.

I've made this thread a sticky temporarily.

One should do their homework before messing with devices.
Sticky will help, I hope!

Bummer. Do we know what's breaking it and what needs to be fixed, e.g. TWRP or something else?

sirxdroid said:
Bummer. Do we know what's breaking it and what needs to be fixed, e.g. TWRP or something else?
Click to expand...
Click to collapse
Looks like twrp which I'm sure they are looking at...

Interesting. Curious, if you restore a back up and re-enable the fingerprint, do you have to set it up again or does it save that info? Might lead credence to Jerry's paranoia about fingerprints not really being secure.

nrfitchett4 said:
Interesting. Curious, if you restore a back up and re-enable the fingerprint, do you have to set it up again or does it save that info? Might lead credence to Jerry's paranoia about fingerprints not really being secure.
Click to expand...
Click to collapse
From my experience, once you disable the lock screen security, the finger prints are deleted and you would have to set them up again. So there would be no way for them to survive a back up.

Ok, I just restored from a nandroid TWRP Backup and I re-entered my pattern fine? Maybe it's a pin issue?

You can't use your Google account to reset the PIN?

Syystole said:
Ok, I just restored from a nandroid TWRP Backup and I re-entered my pattern fine? Maybe it's a pin issue?
Click to expand...
Click to collapse
So, at this point, it looks like the pattern restores fine but the pin won't and will lock you out. Can we confirm this?

jackdubl said:
So, at this point, it looks like the pattern restores fine but the pin won't and will lock you out. Can we confirm this?
Click to expand...
Click to collapse
Strange because the pattern really is a PIN, it gets converted into a PIN anyway from what I recall.

Pattern fails also. Found out yesterday the hard way.

Related

[Q] Phone Forgot Unlock Code?

Okay, I know this is going to sound more awkward by the time I explain it, but I assure you that I am pretty lost here.
I set a numeric password on my phone, as I do with most of my stuff, so if something happens to it, my personal info doesn't get obtained so easily. Anyways, today I woke up and used my phone a bit and it was alright, but it restarted and when it came back to XDAndroid again, I tried to unlock it, but the phone wouldn't unlock, which I found as odd. I retyped the password about 10 different times, to avail. I know I didn't mess it up when I entered it in, because I was unlocking it just fine earlier. Any chance this could be a bug or something?
Might have to blast out data.img.
I haven't set any such lock, so no clue if it is a bug or something else...
arrrghhh said:
Might have to blast out data.img.
I haven't set any such lock, so no clue if it is a bug or something else...
Click to expand...
Click to collapse
Its the first time it's ever happened to me, so I thought i'd throw it out there and see if anyone knew anything about it, though I figured i'd be relying on making a new data.img, unless I wanted to get fancy and edit the data.img to find the unlock code, but that would just be no fun.
Thank you for Titanium Backup
QuentinX5 said:
Its the first time it's ever happened to me, so I thought i'd throw it out there and see if anyone knew anything about it, though I figured i'd be relying on making a new data.img, unless I wanted to get fancy and edit the data.img to find the unlock code, but that would just be no fun.
Thank you for Titanium Backup
Click to expand...
Click to collapse
Heh, indeed.
It's a crappy workaround to get the phone working again. I doubt it's a bug, I'm betting something else is going on. No clue tho, let me know if you figure out a way to reproduce it!
arrrghhh said:
Heh, indeed.
It's a crappy workaround to get the phone working again. I doubt it's a bug, I'm betting something else is going on. No clue tho, let me know if you figure out a way to reproduce it!
Click to expand...
Click to collapse
Well it happened from the phone resetting itself after being dropped, so I don't know exactly such a way to reproduce it except by randomly resetting the phone by unmean means, but will most definitely does.
I had something similar happen to me quite a few times before I realized I was using Titanium Backup to restore previous settings, it would restore the unlock code but it wouldn't take affect until after a reboot. By the time I rebooted I forgot I had just restored from a backup.
rpierce99 said:
I had something similar happen to me quite a few times before I realized I was using Titanium Backup to restore previous settings, it would restore the unlock code but it wouldn't take affect until after a reboot. By the time I rebooted I forgot I had just restored from a backup.
Click to expand...
Click to collapse
That still wouldn't make a difference, because I've used the same password even from backups, so it wouldn't change regardless. I've rebooted quite a few times, still haven't deleted the data.img because I had some stuff I need to get off beforehand, but have no way of retrieving it if I am locked out of my phone.
perhaps somehow in some strange way the unlock code was corrupted, do you still have a copy of the data.img?
ryannathans said:
perhaps somehow in some strange way the unlock code was corrupted, do you still have a copy of the data.img?
Click to expand...
Click to collapse
Yeah, it's on my PC somewhere. I backed it up because there was stuff on it I never got to take off.
if you would like to investigate further, try to find a data.img editor or you might even be able to use a hex editor to search for your lock number, if your can find it, something weird is going on, if you can't it probably got corrupted or it is encrypted. I have no idea how the code is stored, otherwise I'd be glad to help further
ryannathans said:
if you would like to investigate further, try to find a data.img editor or you might even be able to use a hex editor to search for your lock number, if your can find it, something weird is going on, if you can't it probably got corrupted or it is encrypted. I have no idea how the code is stored, otherwise I'd be glad to help further
Click to expand...
Click to collapse
I would honestly hope for security sake that the PIN code isn't stored in clear text .
arrrghhh said:
I would honestly hope for security sake that the PIN code isn't stored in clear text .
Click to expand...
Click to collapse
Same here. If only Android worked like Windows Mobile where I could just use a registry editor on it... :X

[Q] Forgot Google password,locked Photon>

i have been looking and tried,but havent found the solution i need to get into my phone without a factory reset.forgot password to google email and im stuck.anyone know o a solution that can be used to help me get back into my phone?
spdraycr1018 said:
i have been looking and tried,but havent found the solution i need to get into my phone without a factory reset.forgot password to google email and im stuck.anyone know o a solution that can be used to help me get back into my phone?
Click to expand...
Click to collapse
Did you setup a secondary email account and/or cell# when you setup your account?
If so, just go to gmail on the web and resest your password using one of those.
My wife set this up, but with no backup plan incase something like this happened. So now I'm stuck trying to get in
Short answer NO
spdraycr1018 said:
My wife set this up, but with no backup plan incase something like this happened. So now I'm stuck trying to get in
Click to expand...
Click to collapse
Short answer No, this is one of the security features, otherwise anyone could change anyone's password.
Even if you want to take off the primary account you have to do a Factory reset. unless you have root.access With mobiles you have to treat it the same as your PC, Backup everything.
Sorry
Dang, this sucks. Ok, thanks. This phone has a sim card installed. Wonder if I could swap into another of the same phone and use that card to enter phone and get all information I need out before I factory reset...
spdraycr1018 said:
Dang, this sucks. Ok, thanks. This phone has a sim card installed. Wonder if I could swap into another of the same phone and use that card to enter phone and get all information I need out before I factory reset...
Click to expand...
Click to collapse
seems possible if you are rooted and have a custom recovery.
Nah not rooted. Got in touch with Google and they put me in contact with the group they use for issues like this. A lot of useful info but there's nothing they can do because my wife only used the gmail to access the play store and nothing else. So basically we are sol and have to factory reset the phone. Gonna look through and find out how to do it
stop stealing phones
If it were stolen, I could just factory reset and get in. But maybe your little brain is too small to read and understand all of the words that I have written. But thanks for your useful tip!! :good:
spdraycr1018 said:
If it were stolen, I could just factory reset and get in. But maybe your little brain is too small to read and understand all of the words that I have written. But thanks for your useful tip!! :good:
Click to expand...
Click to collapse
haha yeah just joking bro, sorry to offend, needed to get to ten posts and i have a ****ty sense of humor

How to bypass the pattern lock - nothing dodgy!

Hi, I've got an old Z Ultra that I'd like to use as a tablet. It's the perfect size and spec for me. I can use it for browsing at home and then slip it in my pocket if I wanna take it with me.
There's a problem though - there's a screen lock on it and I can't for the life of me remember the pattern. Surprisingly, there's no backup PIN or recovery option.
So, I know this sounds really dodgy, but I really want to bypass the lock WITHOUT deleting the data. It'll have all my old text messages from my late father and I can't bear to just wipe them.
Any suggestions?
daaabs said:
Hi, I've got an old Z Ultra that I'd like to use as a tablet. It's the perfect size and spec for me. I can use it for browsing at home and then slip it in my pocket if I wanna take it with me.
There's a problem though - there's a screen lock on it and I can't for the life of me remember the pattern. Surprisingly, there's no backup PIN or recovery option.
So, I know this sounds really dodgy, but I really want to bypass the lock WITHOUT deleting the data. It'll have all my old text messages from my late father and I can't bear to just wipe them.
Any suggestions?
Click to expand...
Click to collapse
Is the bootloader unlocked or locked?
Bootloader locked
If you had it connected to wifi or a sim inserted with google logged in then maybe it pops up here https://www.google.com/android/devicemanager
Guide here: https://www.ifixit.com/Guide/Android+Device+Manager+-+Bypass+Screen+Lock+on+any+Android+Device/34600
If not signed in to google or able to connect to wifi or sim..bad luck. You can try hack it with some recovery software
Try dr.phone as mentioned here: https://www.androidphonesoft.com/resources/forget-lock-password-android.html
Its a dodgy software but perhaps worth a try if you have a spare computer to mess around with.
Bootloader unlocked
You can boot a twrp recovery and backup the file mmssms.db and mmssms.db-journal in /data/user_de/0/com.android.providers.telephony
You can also first make a nandroid backup in twrp and then extract the database from the backup as mentioned here:
https://forum.xda-developers.com/cr...de-extract-restore-contacts-sms-call-t3259492
And here is some more random guides compiled in a thread:
https://forum.xda-developers.com/showthread.php?p=49666433

Question Spy/malware removal

Is there any kind that actually works? I keep fishing around on Google play and everything is either old, doesn't work, or is full of sh*t, or a combination of all 3.
Welcome to XDA
If you're running Android 9 or higher simply do a factory reset. There are no known rootkits that can worm out of the user partition, once that data is wiped so is the malware.
Don't reload it again after the factory reset.
blackhawk said:
Welcome to XDA
If you're running Android 9 or higher simply do a factory reset. There are no known rootkits that can worm out of the user partition, once that data is wiped so is the malware.
Don't reload it again after the factory reset.
Click to expand...
Click to collapse
Thank you for the welcome. Sorry bout the late reply. I don't suppose there's another way is there? Im literally fresh out the box, I've never done a factory reset.
Michael Romanov said:
Thank you for the welcome. Sorry bout the late reply. I don't suppose there's another way is there? Im literally fresh out the box, I've never done a factory reset.
Click to expand...
Click to collapse
You're welcome. The other way is to find the malware and delete it completely.
blackhawk said:
You're welcome. The other way is to find the malware and delete it completely.
Click to expand...
Click to collapse
Which would be how? Would I need a app or something for the pc? And if so do you have any recommendations? I have the mixsilver file manager on my phone (pixel 6 "Not pro"). Would there be a way I could find it thru there? Also my device is not rooted. So would I need to root? I'm sorry if this gets on your nerves. If so tell me, won't hurt my feelings. I'm literally a noob at this stuff. I've been trying to teach myself and just do trial and error but im getting in over my head and don't wanna accidentally brick my phone or worse.
What makes you sure you have spy/malware? Or do you mean adware?
Cheers
Tom
With Avast or AVG Antivirus you can do a pretty good scan of your apps, even system apps if you want.
For Factory reset see here https://support.google.com/pixelphone/answer/4596836
or go here on a PC (you need your Pixel connected by usb to the PC then): https://pixelrepair.withgoogle.com/carrier_selection
tom1807 said:
What makes you sure you have spy/malware? Or do you mean adware?
Cheers
Tom
Click to expand...
Click to collapse
Chrome ****tin out 3 gigs of data a day. I have unlimited so it's not that big of a deal but still.....and some of the options I had in settings like "permissions, enable/disable, clear data/cache" that I know for a fact I had not too long ago are now greyed out or nonexistent. Also sometimes when I bring up "location" thru the settings menu everything is supposed to be "off" but there's 2 or 3 that look like they are switching back to say "off" as soon as the page shows. 1 of them outright takes several seconds to display any "on or off" setting at all. I've found a "Verizon" system app on my phone, some kind of Samsung telephony thing. And it seems like I can input a change to settings or something and when I look at my phone in the morning everything I had set up is back to it's previous settings.
psi78 said:
With Avast or AVG Antivirus you can do a pretty good scan of your apps, even system apps if you want.
For Factory reset see here https://support.google.com/pixelphone/answer/4596836
or go here on a PC (you need your Pixel connected by usb to the PC then): https://pixelrepair.withgoogle.com/carrier_selection
Click to expand...
Click to collapse
Thank you. Umm.....stupid question but I've never done a full reset before so.....how and would I need to move my apps to another storage or could I just go back thru the play store and redownload? And any paid apps and subscriptions?
It probably explains all that in those links doesn't it?
Just do factory reset and you are okay.. Then start using phone as new..
Michael Romanov said:
Chrome ****tin out 3 gigs of data a day. I have unlimited so it's not that big of a deal but still.....and some of the options I had in settings like "permissions, enable/disable, clear data/cache" that I know for a fact I had not too long ago are now greyed out or nonexistent. Also sometimes when I bring up "location" thru the settings menu everything is supposed to be "off" but there's 2 or 3 that look like they are switching back to say "off" as soon as the page shows. 1 of them outright takes several seconds to display any "on or off" setting at all. I've found a "Verizon" system app on my phone, some kind of Samsung telephony thing. And it seems like I can input a change to settings or something and when I look at my phone in the morning everything I had set up is back to it's previous settings.
Click to expand...
Click to collapse
For what it's worth, the Verizon system app comes with the phone in case you use a Verizon sim.
If you end up clean flashing or factory resetting, I would not restore any apps from backups. I would reinstall everything fresh or you could just be putting the malware back on your phone, if that indeed is what you have.
Michael Romanov said:
Thank you. Umm.....stupid question but I've never done a full reset before so.....how and would I need to move my apps to another storage or could I just go back thru the play store and redownload? And any paid apps and subscriptions?
It probably explains all that in those links doesn't it?
Click to expand...
Click to collapse
Just redownload them. Google remembers your bought apps or subscriptions in your Google account, so as long as you use the same email/account for logging in to Playstore after Factory reset you're good.
Your contacts normally are also synced to your Google Account, so you get them back also then.
psi78 said:
Just redownload them. Google remembers your bought apps or subscriptions in your Google account, so as long as you use the same email/account for logging in to Playstore after Factory reset you're good.
Your contacts normally are also synced to your Google Account, so you get them back also then.
Click to expand...
Click to collapse
Thank you. I was worried it wasn't gonna remember me.
Lughnasadh said:
For what it's worth, the Verizon system app comes with the phone in case you use a Verizon sim.
If you end up clean flashing or factory resetting, I would not restore any apps from backups. I would reinstall everything fresh or you could just be putting the malware back on your phone, if that indeed is what you have.
Click to expand...
Click to collapse
But that's the thing. I don't use Verizon I use sprint which is part of t mobile. That's why I just don't get it.
Michael Romanov said:
But that's the thing. I don't use Verizon I use sprint which is part of t mobile. That's why I just don't get it.
Click to expand...
Click to collapse
It comes with the phone by default just in case you do use Verizon. Basically that app helps give the phone Verizon support, of sorts. It's disabled by default if you don't use Verizon so there's really nothing to worry about with that app.
Lughnasadh said:
It comes with the phone by default just in case you do use Verizon. Basically that app helps give the phone Verizon support, of sorts. It's disabled by default if you don't use Verizon so there's really nothing to worry about with that app.
Click to expand...
Click to collapse
Man thank you. There's stuff on here that I don't understand and I've been thinking it's something I've downloaded or whatever. I'm new to all of this.

Andriod 10 Won't Recongnize correct pattern

since the bootloader is locked,
it seems theres no way to unlock the phone anymore.
I have used this pattern for more than 3 years
so it can not be wrong.
It got corrupted. Could be a single event upset in the data partition. If it reoccurs after a factory reset either the firmware has been corrupted or there's been a hardware failure.
Malware is also a possibility.
blackhawk said:
It got corrupted. Could be a single event upset in the data partition. If it reoccurs after a factory reset either the firmware has been corrupted or there's been a hardware failure.
Malware is also a possibility.
Click to expand...
Click to collapse
I haven't reset yet, trying to find ways to save data
but it's miui with locked bootloader
so it seems theres no way
sigh
ccaye said:
I haven't reset yet, trying to find ways to save data
but it's miui with locked bootloader
so it seems theres no way
sigh
Click to expand...
Click to collapse
That's one reason I don't set device locks.
also tried to clear the data cache but with stock recovery
it seems no way to do it
blackhawk said:
That's one reason I don't set device locks.
Click to expand...
Click to collapse
yeah i agree
after search on google found out there are alot ppl exprienced same bug as i had
but on xda seems like no one had this before
it seems the bug happens on various brand
should just unlocked the bootloader once i have the phone
ccaye said:
yeah i agree
after search on google found out there are alot ppl exprienced same bug as i had
but on xda seems like no one had this before
it seems the bug happens on various brand
should just unlocked the bootloader once i have the phone
Click to expand...
Click to collapse
That would make the phone less secure. You still would have the issue of file encryption to deal with.
Androids rarely crash but it happens.
A drop or near lighting strike can also destroy data. Redundantly and regularly backing up critical data is the only sure way to prevent data lose.
blackhawk said:
That would make the phone less secure. You still would have the issue of file encryption to deal with.
Androids rarely crash but it happens.
A drop or near lighting strike can also destroy data. Redundantly and regularly backing up critical data is the only sure way to prevent data lose.
Click to expand...
Click to collapse
true but i more worry about app's data
some apps just way too hard to back up and restore
i was going to try use EDL method to pull the file out
and reflash the phone then put the file back in
but i haven't try it
ccaye said:
true but i more worry about app's data
some apps just way too hard to back up and restore
i was going to try use EDL method to pull the file out
and reflash the phone then put the file back in
but i haven't try it
Click to expand...
Click to collapse
If a data critical app doesn't allow for import/export of its data, I don't use it.
I use Poweramp and especially Color Note because of this. Text and Gmail are cloud backup. Less data critical apps don't concern me. I never install any social media, shopping or banking apps.
I make installable copies of all my app; no Playstore needed for a reload. Everything I need for a full reload is on my SD card, that in turn is redundantly backed up. Current load on this device will be 3 yo this June. I don't upgrade or update the firmware and rarely any of the apps.
The result is a very stable, fast Android that needs minimal maintenance.... more playtime, less downtime.

Categories

Resources