Oneplus 3 pattern at boot not changing - OnePlus 3 Questions & Answers

So i was on Lineage OS on my op3 when i changed my pattern from 3x3 to 4x4, it asked me a question to ask for the pattern on boot so i enabled it.After some time i wanted to revert back to stock but after i flashed the rom again at boot a pattern window popped up but there was no option for 4x4 only 3x3 so i went back to Lineage and tried to change the pattern back to 3x3 (Even tried to remove it).But the pattern on boot did not change.I even flashed a different custom os(Ressurection Remix) in hope of changing the pattern but got no success.So my question is basically what else to do?

noob_siddhant said:
So i was on Lineage OS on my op3 when i changed my pattern from 3x3 to 4x4, it asked me a question to ask for the pattern on boot so i enabled it.After some time i wanted to revert back to stock but after i flashed the rom again at boot a pattern window popped up but there was no option for 4x4 only 3x3 so i went back to Lineage and tried to change the pattern back to 3x3 (Even tried to remove it).But the pattern on boot did not change.I even flashed a different custom os(Ressurection Remix) in hope of changing the pattern but got no success.So my question is basically what else to do?
Click to expand...
Click to collapse
You will need to go into twrps file manager and delete the lockscreen settings which are stored in data/system the files are gatekeeper.password.key , gatekeeper.pattern.key , locksettings.db , locksettings.db-shm , locksettings.db-wal once you have deleted each of those files just reboot and there will be no security login at all , if I've been helpful please leave a thumbs up on my post I truly appreciate it....

Xceeder said:
You will need to go into twrps file manager and delete the lockscreen settings which are stored in data/system the files are gatekeeper.password.key , gatekeeper.pattern.key , locksettings.db , locksettings.db-shm , locksettings.db-wal once you have deleted each of those files just reboot and there will be no security login at all , if I've been helpful please leave a thumbs up on my post I truly appreciate it....
Click to expand...
Click to collapse
I deleted all the files still nothing happened only the pattern after boot is gone

noob_siddhant said:
I deleted all the files still nothing happened only the pattern after boot is gone
Click to expand...
Click to collapse
It sounds like a feature that was on lineage OS are you sure you checked all the settings for a 4x4 grid as deleting the files I posted basically resets your login details so you can start again , I'm out of ideas buddy but I'll keep my eyes open for a similar issue and if I find the solution I'll msg you back as soon as possible ....
P.s you might of enabled a 4x4 grid by changing the LCD density or DPI ...

Related

[HOW TO][GUIDE] VPN Without Security Lockscreen

I dont know how many other people out there use androids built in vpn, but i hate the fact that you are required to use a security screen (pattern, pin, password) to do so. I have found a way to bypass this if you are rooted. This has only been tested on the stock kk rooted ota. However i would think it is the same on almost any stock based rom.
This assumes you already have your vpn and a security screen setup and working.
Go to the market and download a root capable data base (db) editor. I use SQLite Editor which is a paid app, but im sure there are free ones too.
Open the db editor. SQLite Editor sorts it by the app (in this case Android System) the data base is associated with, others may not work this way and may require you to navigate to the db file directly (/data/system/locksettings.db).
Open locksettings.db and select the locksettings directory. Look for the line that says "lockscreen.password_type". Under the value colum it will show some random number. Select the line and edit the value to be 0 (zero). Save if required by your db app, and restart your phone.
When it reboots you should no longer have a security lock screen only the swipe up screen. When you go to settings - more - vpn, it will still say you need to setup a security lock. Hit CANCEL, and it will show you your list of setup vpn's. Select one and connect. Boom working vpn with no pattern, pin, password screen required.
To undo this just go to settings - security - screenlock, and setup a new lock pattern, pin, or password.
You can also disable the swipe up lock screen by editing the "lockscreen.disabled" value in the locksettings.db to be a 1 instead of a 0.
good write up, thank you sir.
Where did you get stock kk rooted?
Sent from my HTC One
I was already unlocked and s-off, so i ruu'd took the kk ota and then rooted it. But i believe santod has his thread in development where you can download the stock rooted kk rom.
an alternative method
An add-on alternative update for relevancy. Using Samsung Note 3 4.3 MJ7 stock rooted.
Firstly, thanks OP for a nice clear guide for all on how to do this theoretically.
This is an alternative for those who aren't able to purchase SQLite Editor:
1. get a good freeware SQLite editor like for example SQLite Studio @ w w w sqlitestudio.pl
2. copy following files from your phone to the PC using some form of file explorer or whatever methods you can think of
/data/system/locksettings.db
/data/system/locksettings.db-shm
/data/system/locksettings.db-wal
3. open up the editor, load the locksettings.db and modify like what OP has mentioned
4. you will notice that the new saved DB is going to be a single file instead so just replace this file back into your phone and delete the OTHER files
5. reboot and done.
:highfive:
Alternative method
found it on another forum
The process does not require rooting its more like a bug
worked on my i9300 with 4.3 firmware
1. Add a VPN
2. Lock the device with a pin
3. Enter the pin wrong 5 times
4. Press OK to the message that pops up
5 Press Forgot Pin
6. Sign into your Google Account
7. Select pin lock
8. Press cancel.
and now u got unlocked screen with working vpns
the method works, but after I reboot, when I enter VPN screen is aks me for "password for credential storage"... how can I solve? thanks in advance
Hirishiolo said:
the method works, but after I reboot, when I enter VPN screen is aks me for "password for credential storage"... how can I solve? thanks in advance
Click to expand...
Click to collapse
Yeah i have the same issue (nexus 10 rooted 4.4.3 stock)
Hit cancel, and it should bypass it.
cmlusco said:
Hit cancel, and it should bypass it.
Click to expand...
Click to collapse
it should.... but it does not for me (Sony Xperia Z1 with CM11 4.4.3)
schickel said:
it should.... but it does not for me (Sony Xperia Z1 with CM11 4.4.3)
Click to expand...
Click to collapse
same for me, it does not work
ebackbone said:
An add-on alternative update for relevancy. Using Samsung Note 3 4.3 MJ7 stock rooted.
Firstly, thanks OP for a nice clear guide for all on how to do this theoretically.
This is an alternative for those who aren't able to purchase SQLite Editor:
1. get a good freeware SQLite editor like for example SQLite Studio @ w w w sqlitestudio.pl
2. copy following files from your phone to the PC using some form of file explorer or whatever methods you can think of
/data/system/locksettings.db
/data/system/locksettings.db-shm
/data/system/locksettings.db-wal
3. open up the editor, load the locksettings.db and modify like what OP has mentioned
4. you will notice that the new saved DB is going to be a single file instead so just replace this file back into your phone and delete the OTHER files
5. reboot and done.
:highfive:
Click to expand...
Click to collapse
Thank you :good:
ebackbone said:
An add-on alternative update for relevancy. Using Samsung Note 3 4.3 MJ7 stock rooted.
Firstly, thanks OP for a nice clear guide for all on how to do this theoretically.
This is an alternative for those who aren't able to purchase SQLite Editor:
1. get a good freeware SQLite editor like for example SQLite Studio @ w w w sqlitestudio.pl
2. copy following files from your phone to the PC using some form of file explorer or whatever methods you can think of
/data/system/locksettings.db
/data/system/locksettings.db-shm
/data/system/locksettings.db-wal
3. open up the editor, load the locksettings.db and modify like what OP has mentioned
4. you will notice that the new saved DB is going to be a single file instead so just replace this file back into your phone and delete the OTHER files
5. reboot and done.
:highfive:
Click to expand...
Click to collapse
i have followed your tutorial and the OP's but when i edit locksettings.db there is no such line "lockscreen.password_type"
i am on kk 4.4.2
vadimo said:
i have followed your tutorial and the OP's but when i edit locksettings.db there is no such line "lockscreen.password_type"
i am on kk 4.4.2
Click to expand...
Click to collapse
My locksettings.db is empty as well. Does anybody know why?
Geilerzucker said:
My locksettings.db is empty as well. Does anybody know why?
Click to expand...
Click to collapse
on mine one its not empty
Hirishiolo said:
same for me, it does not work
Click to expand...
Click to collapse
i also followed the tutorial now and same as you guys, doesnt work
worked for me initially on samsung mega (jellybean), but after reboot i'm getting the 'enter password for creditial storage' issue and pressing cancel doesn't solve it.
is there any other solution?
In 4.4 there is no such file
Code:
/data/system/locksettings.db
.. any ideas?
Clauu said:
In 4.4 there is no such file
Code:
/data/system/locksettings.db
.. any ideas?
Click to expand...
Click to collapse
Try a different file manager.
It failed like that for me with ES File Explorer,
but worked when I used SM File Browser.
---------- Post added at 10:53 AM ---------- Previous post was at 10:42 AM ----------
vadimo said:
i have followed your tutorial and the OP's but when i edit locksettings.db there is no such line "lockscreen.password_type"
Click to expand...
Click to collapse
Tap on the "QUERY *" button to see the file contents.
---------- Post added at 11:11 AM ---------- Previous post was at 10:53 AM ----------
pajenn said:
worked for me initially on samsung mega (jellybean), but after reboot i'm getting the 'enter password for creditial storage' issue and pressing cancel doesn't solve it.
Click to expand...
Click to collapse
What I do here: just type something.. anything, doesn't matter. At least one character.
Then on the next screen, where it asks to set up a lockscreen, just Cancel.
This seems to be necessary once per boot -- any password, different time or the same, works.
After that it lands me on the VPN manager screen, all functional.
Well I kind of messed up. I tried to open with SQLite but it would give me an error 14. So i decided to try to open just like that using ES Explorer and edit it like regular note(SQL is totally different I had no idea). Anyways i didnt edit anything but now i cant set a pin or any type of security on my phone. When i try to set up a pin it still shows a swipe and when i try again my Note 3 freezes and get an error message saying settings stopped responding.
Any idea on how to fix this? Im rooted and im running the latest firmware 4.4.2 if that helps.

Pattern unlock after TWRP restore

Nexus 5X
TWRP 2.8.7.2
- Backup included: Boot, System, Vendor, Vendor image, Data, Recovery & EFS
- Stock ROM rooted
I created this backup because I wanted to try out the Pure Nexus ROM. Followed instructions before flashing (wipe data system etc..) everything was working fine but I later decided that I wanted to revert back for the time being. Booted into recovery, wiped data, system and so on before restoring backup. Once restored and at the lockscreen I placed my finger on the fingerprint scanner and was prompted for a pattern. Tried the only pattern I always use multiple times but it didnt work (as well as others) and it never locked me out. Did some reading online, followed an article on how to bypass-androids-pattern-lock-screen-access-its-files-from-pc, when i typed in adb shell rm /data/system/gesture.key I got this error "rm: can't remove '/data/system/gesture.key': No such file or directory. Don't know what to do from here.
Any help would be much appreciated.
bobcee said:
Nexus 5X
TWRP 2.8.7.2
- Backup included: Boot, System, Vendor, Vendor image, Data, Recovery & EFS
- Stock ROM rooted
I created this backup because I wanted to try out the Pure Nexus ROM. Followed instructions before flashing (wipe data system etc..) everything was working fine but I later decided that I wanted to revert back for the time being. Booted into recovery, wiped data, system and so on before restoring backup. Once restored and at the lockscreen I placed my finger on the fingerprint scanner and was prompted for a pattern. Tried the only pattern I always use multiple times but it didnt work (as well as others) and it never locked me out. Did some reading online, followed an article on how to bypass-androids-pattern-lock-screen-access-its-files-from-pc, when i typed in adb shell rm /data/system/gesture.key I got this error "rm: can't remove '/data/system/gesture.key': No such file or directory. Don't know what to do from here.
Any help would be much appreciated.
Click to expand...
Click to collapse
Hmmm. Try to follow this steps:
1: boot into TWRP
2: Mount /system ; /data and others
3: Go to Advanced-File Manager
4: Go to /data/system/
5: If exist the gesture.key file, copy it in your internal/external memory (in case of bootloop)
6: Delete the gesture.key file from /data/system/
7: Reboot and view if the pattern is removed
Giovix92 said:
Hmmm. Try to follow this steps:
1: boot into TWRP
2: Mount /system ; /data and others
3: Go to Advanced-File Manager
4: Go to /data/system/
5: If exist the gesture.key file, copy it in your internal/external memory (in case of bootloop)
6: Delete the gesture.key file from /data/system/
7: Reboot and view if the pattern is removed
Click to expand...
Click to collapse
Hey thanks for the reply, im up to step 5 at the moment currently looking in data/system and cannot find a gesture.key in there. The only .key files present are:
1. gatekeeper.password.key and
2. gatekeeper.pattern.key
There is also locksettings.db, locksettings.db-shm and locksettings.db-wal. Im guessing they are to do with the lockscreen?
Im under the impression that the TWRP restore somehow created a 'ghost' pattern that doesnt seem to exist, hence its not accepting any pattern that i try and is also not limiting the number of tries. (sorry for the terminology im learning haha).
bobcee said:
Hey thanks for the reply, im up to step 5 at the moment currently looking in data/system and cannot find a gesture.key in there. The only .key files present are:
1. gatekeeper.password.key and
2. gatekeeper.pattern.key
There is also locksettings.db, locksettings.db-shm and locksettings.db-wal. Im guessing they are to do with the lockscreen?
Im under the impression that the TWRP restore somehow created a 'ghost' pattern that doesnt seem to exist, hence its not accepting any pattern that i try and is also not limiting the number of tries. (sorry for the terminology im learning haha).
Click to expand...
Click to collapse
Hmmm... Try (via TWRP) to follow this steps:
1: Go to /data/system/
2: Copy in your internal/external sd card these files: gatekeeper.password.key and gatekeeper.pattern.key
3: After you have pasted this files, return to /data/system/
4: Delete (from /data/system) gatekeeper.password.key and gatekeeper.pattern.key
5: Reboot
6: If the nexus will stuck in bootloop, restore these files.
Edit: locksettings.db.... I need to verify this file... I'll give you an update about this file asap.
Giovix92 said:
Hmmm... Try (via TWRP) to follow this steps:
1: Go to /data/system/
2: Copy in your internal/external sd card these files: gatekeeper.password.key and gatekeeper.pattern.key
3: After you have pasted this files, return to /data/system/
4: Delete (from /data/system) gatekeeper.password.key and gatekeeper.pattern.key
5: Reboot
6: If the nexus will stuck in bootloop, restore these files.
Edit: locksettings.db.... I need to verify this file... I'll give you an update about this file asap.
Click to expand...
Click to collapse
Hi again, so i tried the following steps and it booted up all fine and didnt ask me for a pattern! However when i try to change the sceen lock it crashes and says "unfortunately, settings has stopped". But atleast i can get into the phone now! Thanks so much for the help.
bobcee said:
Hi again, so i tried the following steps and it booted up all fine and didnt ask me for a pattern! However when i try to change the sceen lock it crashes and says "unfortunately, settings has stopped". But atleast i can get into the phone now! Thanks so much for the help.
Click to expand...
Click to collapse
Good! Now, if you find the clean version (without patterns) of these files, you are ok. You're welcome.
I've got the same problem, and the same solutions works (thanks @Giovix92)
But at the end of the process, I can not put another pattern or something else
So my phone is open to everybody => that's bad
Does some can provide a know gesture with both files (gatekeeper.password.key and gatekeeper.pattern.key) ?
please @bobcee , did you find a way ?
PS : my device is a Nexus 5X, under rooted MMB29Q
greee said:
I've got the same problem, and the same solutions works (thanks @Giovix92)
But at the end of the process, I can not put another pattern or something else
So my phone is open to everybody => that's bad
Does some can provide a know gesture with both files (gatekeeper.password.key and gatekeeper.pattern.key) ?
please @bobcee , did you find a way ?
PS : my device is a Nexus 5X, under rooted MMB29Q
Click to expand...
Click to collapse
You're welcome. You should get a nandroid backup of another Nexus 5X without pattern. Then use nandroid manager to manage the system.img file and extract the two files. Then reboot into TWRP and replace these files. And you are done.
boot Twrp run file manager
only delete locksettings.db in /data/system/locksettings.db
reboot and it works!
Heisenberg wrote:
"Note: If you happened to forget to remove lockscreen security (PIN/Pattern/Fingerprint) before creating your backup, and you cannot get into your OS after restoring, you can do the following to fix the issue. Boot into TWRP and use the built in file manager to delete /data/sytem/locksettings.db. This should be enough to get you into your OS again. If it isn't you can also try deleting /data/system/locksettings.db-shm and /data/system/locksettings.db-wal. If this still doesn't fix your issue you can delete /data/system/gatekeeper.password.key and /data/system/gatekeeper.pattern.key."
Giovix92 said:
You're welcome. You should get a nandroid backup of another Nexus 5X without pattern. Then use nandroid manager to manage the system.img file and extract the two files. Then reboot into TWRP and replace these files. And you are done.
Click to expand...
Click to collapse
Seems complicated, I really don't know where to get such files :crying:
And I think a pattern is now mandatory on Marshmallow setup, no ?
---------- Post added at 05:26 PM ---------- Previous post was at 05:05 PM ----------
I just find another way !
First I've asked for a device lock on android manager website https://www.google.com/android/devicemanager
Then after unlocking my Nexus 5X with the given password, I was able to change (parameters/security) to a new pattern.
Great !
glehel said:
boot Twrp run file manager
only delete locksettings.db in /data/system/locksettings.db
reboot and it works!
Heisenberg wrote:
"Note: If you happened to forget to remove lockscreen security (PIN/Pattern/Fingerprint) before creating your backup, and you cannot get into your OS after restoring, you can do the following to fix the issue. Boot into TWRP and use the built in file manager to delete /data/sytem/locksettings.db. This should be enough to get you into your OS again. If it isn't you can also try deleting /data/system/locksettings.db-shm and /data/system/locksettings.db-wal. If this still doesn't fix your issue you can delete /data/system/gatekeeper.password.key and /data/system/gatekeeper.pattern.key."
Click to expand...
Click to collapse
You should only delete gatekeeper.password.key and gatekeeper.pattern.key and you'll be able to enter in your phone. Isn't needed to delete locksettings.db and other.
---------- Post added at 05:02 PM ---------- Previous post was at 05:00 PM ----------
greee said:
Seems complicated, I really don't know where to get such files :crying:
And I think a pattern is now mandatory on Marshmallow setup, no ?
---------- Post added at 05:26 PM ---------- Previous post was at 05:05 PM ----------
I just find another way !
First I've asked for a device lock on android manager website https://www.google.com/android/devicemanager
Then after unlocking my Nexus 5X with the given password, I was able to change (parameters/security) to a new pattern.
Great !
Click to expand...
Click to collapse
Good! I explain the process: When you unlock the bootloader, all your files will be deleted because the operation works as the factory reset. In fact: Unlock BL=Factory reset. Doing a factory reset=Restore ALL system files.
Giovix92 said:
You should only delete gatekeeper.password.key and gatekeeper.pattern.key and you'll be able to enter in your phone. Isn't needed to delete locksettings.db and other.
---------- Post added at 05:02 PM ---------- Previous post was at 05:00 PM ----------
Good! I explain the process: When you unlock the bootloader, all your files will be deleted because the operation works as the factory reset. In fact: Unlock BL=Factory reset. Doing a factory reset=Restore ALL system files.
Click to expand...
Click to collapse
I just tried it and it was good as I wrote.
glehel said:
I just tried it and it was good as I wrote.
Click to expand...
Click to collapse
Bho. Sincerely, I had a Nexus 5X, hardbricked by a error of locking bl (CM11, my mistake), now i have a cheap SM-G350 aka Core Plus with CM11. I remember that is needed only delete these files, and not locksettings. But, if you say that lock... should be deleted, ok man )
greee said:
Seems complicated, I really don't know where to get such files :crying:
And I think a pattern is now mandatory on Marshmallow setup, no ?
---------- Post added at 05:26 PM ---------- Previous post was at 05:05 PM ----------
I just find another way !
First I've asked for a device lock on android manager website https://www.google.com/android/devicemanager
Then after unlocking my Nexus 5X with the given password, I was able to change (parameters/security) to a new pattern.
Great !
Click to expand...
Click to collapse
I was not able to set a pattern lock after deleting the 2 files. But i just wanted to get into the phone so that i could backup apps using titanium backup. I factory reset, which fixed the patten lock issue, and restored my apps.
Did you already tried this??
The easy way to fix that issue:
1) Restore from Nandroid Backup
2) Go into ADB and use the following commands:
rm /data/system/locksettings.db
rm /data/system/*.key
Or delete them via the TWRP Filemanager
3) Boot and voila!
Note, it is recommended for you to restore your pin code afterwords.
Vulkaistos said:
Did you already tried this??
The easy way to fix that issue:
1) Restore from Nandroid Backup
2) Go into ADB and use the following commands:
rm /data/system/locksettings.db
rm /data/system/*.key
Or delete them via the TWRP Filemanager
3) Boot and voila!
Note, it is recommended for you to restore your pin code afterwords.
Click to expand...
Click to collapse
He already deleted these files by my steps, he don't need to redelete it.
Ooh didnt saw that
Gesendet von meinem Nexus 5X mit Tapatalk
Vulkaistos said:
Ooh didnt saw that
Gesendet von meinem Nexus 5X mit Tapatalk
Click to expand...
Click to collapse
Ohh my bad xD
glehel said:
boot Twrp run file manager
only delete locksettings.db in /data/system/locksettings.db
reboot and it works!
Heisenberg wrote:
"Note: If you happened to forget to remove lockscreen security (PIN/Pattern/Fingerprint) before creating your backup, and you cannot get into your OS after restoring, you can do the following to fix the issue. Boot into TWRP and use the built in file manager to delete /data/sytem/locksettings.db. This should be enough to get you into your OS again. If it isn't you can also try deleting /data/system/locksettings.db-shm and /data/system/locksettings.db-wal. If this still doesn't fix your issue you can delete /data/system/gatekeeper.password.key and /data/system/gatekeeper.pattern.key."
Click to expand...
Click to collapse
This has worked well for me. i was able to bypass pattern security screen and reset a new one without any problems.
Thanks
For me, when deleting the "*.key" files I cannot set a new pattern as the system config craches.
When deleting "locksettings.db" I can set a new pattern but I lost the smart lock features.
I did not find any other sollution until now.
Will just Titanium Backup everything and format the phone.

Strange pin needed after restore of Nandroid backup with TWRP

Guys,
my OP3 is bootloader unlocked, rooted and encryption switched off.
Standard system was OOS 3.1.2. I installed the update to 3.2.1 via TWRP zip and found some bugs, so I decided to use the [ROM] [6.0.1] Unofficial CyanogenMod 13
from Grarak. Did a full wipe installed and all is ok. Now comes the strange thing:
I wanted to restore the original backup and it worked. When I rebooted, the system asks me for the SIM card sim and then the system says:
"for the new start of the device you need to enter the pin"
The ony pin I ever used for the card and not knowingly for the device doesn't work.
Neitehr 0000 nor 1234 works. Which means I can't restore the nand backup.
Does anyone have an idea what this behaviour is and how to work around?
That is normal before doing a Nandroid u have to delete the pin, there exist a way around it deleting ur pin keys in trwp, its listed on this site somewhere
Bradl79 said:
That is normal before doing a Nandroid u have to delete the pin, there exist a way around it deleting ur pin keys in trwp, its listed on this site somewhere
Click to expand...
Click to collapse
found the thread. but unfortunately didn't find the corresponding workaround. can you remember where this was?
OK found it in the OnePlus 3 Forum.
This works:
HOW TO FIX
------------------------
Simply boot into TWRP and enter your PIN (if you've set one) to decrypt the stroage. If you don't have TWRP (for whatever reason) you can do so via ADB too but ONLY if you've connected your phone to your PC beforehand and also accepted it's fingerprint on the phone itself.
Delete (or rename) the following files inside /data/system (note that probably not all of them exist for you, simply delete those you can find):
password.key
pattern.key
locksettings.db-wal
locksettings.db-shm
locksettings.db
Reboot the phone and (if you've set a PIN) enter it to decrypt the storage one more time. After that you can simply unlock your phone with a swipe.
Go into Settings > Security and set your preferred unlock method again, Android will ask you if you want to set a boot-time code too. Select whatever you want here, it's a nice security addition but can be annoying sometimes.
Enjoy your phone again!
ihobahobby said:
found the thread. but unfortunately didn't find the corresponding workaround. can you remember where this was?
OK found it in the OnePlus 3 Forum.
This works:
HOW TO FIX
------------------------
Simply boot into TWRP and enter your PIN (if you've set one) to decrypt the stroage. If you don't have TWRP (for whatever reason) you can do so via ADB too but ONLY if you've connected your phone to your PC beforehand and also accepted it's fingerprint on the phone itself.
Delete (or rename) the following files inside /data/system (note that probably not all of them exist for you, simply delete those you can find):
password.key
pattern.key
locksettings.db-wal
locksettings.db-shm
locksettings.db
Reboot the phone and (if you've set a PIN) enter it to decrypt the storage one more time. After that you can simply unlock your phone with a swipe.
Go into Settings > Security and set your preferred unlock method again, Android will ask you if you want to set a boot-time code too. Select whatever you want here, it's a nice security addition but can be annoying sometimes.
Enjoy your phone again!
Click to expand...
Click to collapse
Thanks for sharing I wasn't aware and had to wipe my phone twice.
ihobahobby said:
found the thread. but unfortunately didn't find the corresponding workaround. can you remember where this was?
OK found it in the OnePlus 3 Forum.
This works:
HOW TO FIX
------------------------
Simply boot into TWRP and enter your PIN (if you've set one) to decrypt the stroage. If you don't have TWRP (for whatever reason) you can do so via ADB too but ONLY if you've connected your phone to your PC beforehand and also accepted it's fingerprint on the phone itself.
Delete (or rename) the following files inside /data/system (note that probably not all of them exist for you, simply delete those you can find):
password.key
pattern.key
locksettings.db-wal
locksettings.db-shm
locksettings.db
Reboot the phone and (if you've set a PIN) enter it to decrypt the storage one more time. After that you can simply unlock your phone with a swipe.
Go into Settings > Security and set your preferred unlock method again, Android will ask you if you want to set a boot-time code too. Select whatever you want here, it's a nice security addition but can be annoying sometimes.
Enjoy your phone again!
Click to expand...
Click to collapse
Where in twrp do I have to enter the pincode ? After I choose to restore ? Is that all or do have to delete the files also when I have twrp ?
magnum73 said:
Where in twrp do I have to enter the pincode ? After I choose to restore ? Is that all or do have to delete the files also when I have twrp ?
Click to expand...
Click to collapse
Good question. I did also look for the pin entry, but haven't found. Was also not necessary maybe because I had switched off encyption earlier. I just deleted the namend files (which were for me only the locksetting files).
After that rebooted to system and everything works fine. Once you did that, better create a new backup without the fingerprint installed and you're safe next time.
Can u back it up and then do a restore from ur nandroid and restore files, I use multi fingerprints and have my gf on there also I hate resetting things up
I know this is what I need to do. I just can't find these files anywhere. Guess I have to start from scratch.
?
ihobahobby said:
found the thread. but unfortunately didn't find the corresponding workaround. can you remember where this was?
OK found it in the OnePlus 3 Forum.
This works:
HOW TO FIX
------------------------
Simply boot into TWRP and enter your PIN (if you've set one) to decrypt the stroage. If you don't have TWRP (for whatever reason) you can do so via ADB too but ONLY if you've connected your phone to your PC beforehand and also accepted it's fingerprint on the phone itself.
Delete (or rename) the following files inside /data/system (note that probably not all of them exist for you, simply delete those you can find):
password.key
pattern.key
locksettings.db-wal
locksettings.db-shm
locksettings.db
Reboot the phone and (if you've set a PIN) enter it to decrypt the storage one more time. After that you can simply unlock your phone with a swipe.
Go into Settings > Security and set your preferred unlock method again, Android will ask you if you want to set a boot-time code too. Select whatever you want here, it's a nice security addition but can be annoying sometimes.
Enjoy your phone again!
Click to expand...
Click to collapse
THANK YOU SO MUCH! I just got stuck between ROMs and used my nandroid backup but could not get past the lock screen.

[GUIDE | FIX] PIN/PATTERN/PASSWORD not recognised after TWRP restore

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hello folks,
this is regarding a question that does seem to pop up just ever and ever again, with the respective developer teams, developers and tester over in the ROM and development section, seemingly, having to answer it always and again. By this the respective question has been answered at least a hundred times by people like e.g. Captain_Throwback, j to the 4n, nkk71, topjohnwu, LeeDrOiD, Llabtoofer and many other I'm - to keep the matter brief at this point - gonna leave uncredited. If anyone wants me to credit im personally please let me know via PM. I'll in such a case add his/her name to the credits section below.
What I did was just carrying together the needed information. All of it has been written prior to this, on various threads. Always by one the above mentioned and/or others. Anyway I'll give the steps again in this short tutorial as I think it is of importance to many to be able to find a solution to their problem right at the top of a quick thread. In addition such guides were really helpful to me in the past, learning about how Android works. Thus I decided to open up yet another thread.
If you - just like me - have set a lock pattern or password on your device, and you did a TWRP backup as long as the pattern has been set, you might - especially restoring different ROMs - be confronted by a little problem where after the HTC 10 boots up you cannot unlock it even if you enter the correct lock pattern/pin/password.
Well then this thread is about how you can fix it.
Method 1 - TWRP FileManager
boot to recovery
reboot to bootloader
reboot to recovery
In TWRP, go to "Advanced" > "File Manager"
In TWRP File Manager, go to /data/system folder
Find and delete the following files:
Code:
locksettings.db-wal
locksettings.db-shm
locksettings.db
Reboot the phone/tablet back into the ROM. Now you should be able to just swipe the lock screen and get into the launcher screen. You can then set a new lock from the Settings, if you want.
Method 2 - TWRP Terminal
boot to recovery
reboot to bootloader
reboot to recovery
In TWRP, go to "Advanced" > "Terminal"
Type the following commands:
Code:
cd /data/system
rm -f locksettings*
rm -f *.key
Method 3 - TWRP Flash of "lockjscreen_removed_signed.zip
Download the zip provided by @JohnFawkes in Post #5
Place downloaded zip onto your device
boot to recovery
reboot to bootloader
reboot to recovery
In TWRP, flash the downloaded zip
THANKS TO ALL DEVELOPERS AND DEVELOPER TEAMS, AS WELL AS THEIR TESTERS!
THEY FOUND OUT AND PRESENTED US WITH THE SOLUTION.
​
XDAevDB Information
PIN/PATTERN/PASSWORD not recognised after TWRP restore
Contributors
All referred to in Credits, 5m4r7ph0n36uru (OP Leader)
Shouldn't only deleting locksettings.db suffice?
It might do. But it'd be much safer to delete all, as it then works on all kind of devices
Sent from my htc_pmeuhl using XDA Labs
5m4r7ph0n36uru said:
hello folks,
this is regarding a question that does seem to pop up just ever and ever again, with the respective developer teams, developers and tester over in the rom and development section, seemingly, having to answer it always and again. By this the respective question has been answered at least a hundred times by people like e.g. Captain_throwback, j to the 4n, nkk71, topjohnwu, leedroid, llabtoofer and many other i'm - to keep the matter brief at this point - gonna leave uncredited. If anyone wants me to credit im personally please let me know via pm. I'll in such a case add his/her name to the credits section below.
What i did was just carrying together the needed information. All of it has been written prior to this, on various threads. Always by one the above mentioned and/or others. Anyway i'll give the steps again in this short tutorial as i think it is of importance to many to be able to find a solution to their problem right at the top of a quick thread. In addition such guides were really helpful to me in the past, learning about how android works. Thus i decided to open up yet another thread.
If you - just like me - have set a lock pattern or password on your device, and you did a twrp backup as long as the pattern has been set, you might - especially restoring different roms - be confronted by a little problem where after the htc 10 boots up you cannot unlock it even if you enter the correct lock pattern/pin/password.
Well then this thread is about how you can fix it.
method 1 - twrp filemanager
boot to recovery
reboot to bootloader
reboot to recovery
in twrp, go to "advanced" > "file manager"
in twrp file manager, go to /data/system folder
find and delete the following files:
Code:
locksettings.db-wal
locksettings.db-shm
locksettings.db
reboot the phone/tablet back into the rom. Now you should be able to just swipe the lock screen and get into the launcher screen. You can then set a new lock from the settings, if you want.
method 2 - twrp terminal
boot to recovery
reboot to bootloader
reboot to recovery
in twrp, go to "advanced" > "terminal"
type the following commands:
Code:
cd /data/system
rm -f locksettings*
rm -f *.key
thanks to all developers and developer teams, as well as their testers!
They found out and presented us with the solution.
​
xda:devdb information
pin/pattern/password not recognised after twrp restore
contributors
all referred to in credits, 5m4r7ph0n36uru (op leader)
Click to expand...
Click to collapse
this really really saved my life!!!! :d:d:d
You can add this to OP if you want. But you can just flash this zip and it will delete the files automatically
Or you could just take password or swipe pattern off phone before doing full nandroid. That's what I did haven't had to restore yet, but I'm sure might work. ?
I managed to get phone unlocked using this method. However, when i try to add new pattern lock, same thing happened. The pattern saved is not the pattern i registered.
zhuhang said:
I managed to get phone unlocked using this method. However, when i try to add new pattern lock, same thing happened. The pattern saved is not the pattern i registered.
Click to expand...
Click to collapse
Flash the zip above my last post. Works like a charm
I am running into a similar issue after updated my HTC 10 to Oreo. After installing the system update it rebooted itself twice, then asked me for a lock screen pattern and I put in mine (and I am absolutely sure it's correct) but it rejected it, saying I have 29 more attempts before device data is deleted.
I don't have TWRP installed, is factory reset the only option? and will a factory reset take it back to the original Android 7 or the new Oreo 8?
Hello 5m4r7ph0n36uru, can you tell me...
If I follow your guide, eill this delete everything on my phone, photos, messages.
My problem is that I forgot the pattern required after restarting phone.
Thank you kindly, Dusty.
Dustymone said:
Hello 5m4r7ph0n36uru, can you tell me...
If I follow your guide, eill this delete everything on my phone, photos, messages.
My problem is that I forgot the pattern required after restarting phone.
Thank you kindly, Dusty.
Click to expand...
Click to collapse
There is no mentioning about losing data at all in the OP and the commands only show that they delete lockscreen password files so no you will not lose data.....
mattie_49 said:
Flash the zip above my last post. Works like a charm
Click to expand...
Click to collapse
I did flashed that zip and setup the password to phone and rebooted to twrp, there again i could see the pattern on twrp.
Thank you very much it has worked on my LG G6 H870 !! with Orangefox as recovery
Scenario: Let's say I have a smartphone with both configured, PIN and Pattern. Default would be Pattern, backup method would be PIN. And I don't know the PIN.
Question: Is it possible to remove only the .key files (using TWRP) that are responsible for the PIN but keep the Pattern protection active? After reboot, there would still be the Pattern protection but when switching to PIN, the (new) PIN would be empty.?
Or alternatively, would it also be feasible to REPLACE only the .key files that are responsible for the (unknown) PIN with other .key files of a known PIN and at the same time, keep the default Pattern protection intact?
IrenePappel said:
Scenario: Let's say I have a smartphone with both configured, PIN and Pattern. Default would be Pattern, backup method would be PIN. And I don't know the PIN.
Question: Is it possible to remove only the .key files (using TWRP) that are responsible for the PIN but keep the Pattern protection active? After reboot, there would still be the Pattern protection but when switching to PIN, the (new) PIN would be empty.?
Or alternatively, would it also be feasible to REPLACE only the .key files that are responsible for the (unknown) PIN with other .key files of a known PIN and at the same time, keep the default Pattern protection intact?
Click to expand...
Click to collapse
Once you remove the PIN and Pattern you will be able to boot into the system and set up the PIN and Pattern however you'd like. No need to mess with the files directly.
5m4r7ph0n36uru said:
boot to recovery
reboot to bootloader
reboot to recovery
In TWRP, go to "Advanced" > "File Manager"
In TWRP File Manager, go to /data/system folder
Find and delete the following files:
Code:
locksettings.db-wal
locksettings.db-shm
locksettings.db
Reboot the phone/tablet back into the ROM. Now you should be able to just swipe the lock screen and get into the launcher screen. You can then set a new lock from the Settings, if you want.
Click to expand...
Click to collapse
You save me from a factory reset, i flash the aicp_zl1_p-14.0-WEEKLY-20190627.zip update and i was getting blackscreen after putting pin, now works ok
My problem is weird
After rooting,I have kept a lockscreen pattern,then it shows incorrect pattern even I drawn correctly. I flashed that above zip and lock was bypasses,then I tried again keeping PIN lock,same problem again,shows incorrect PIN even I entered correct pin
Neelakanta tech said:
After rooting,I have kept a lockscreen pattern,then it shows incorrect pattern even I drawn correctly. I flashed that above zip and lock was bypasses,then I tried again keeping PIN lock,same problem again,shows incorrect PIN even I entered correct pin
Click to expand...
Click to collapse
This is what I would do personally, and do frequently when using multirom when on N firmware and restore a backup that has a pin.
From the xda HTC 10 twrp FAQ.
"while still in TWRP, use the TWRP File Manager to navigate to /data/system and delete all the locksettings.* files (such as locksettings.db, etc). When you reboot, the password will be gone."
I find that just deleting the single locksettings.db file is enough for me to remove the pin/password or pattern, and keeps the fingerprints stored. This way I can still use my fingerprints to log into apps, but have no pin or anything to unlock phone.
Yup,I have enabled pattern now,my pattern and pin working fine. I got a Zip file named enable_encryption from Realme unofficial developers. Then I flashed it in TWRP , my problem fixed
Neelakanta tech said:
Yup,I have enabled pattern now,my pattern and pin working fine. I got a Zip file named enable_encryption from Realme unofficial developers. Then I flashed it in TWRP , my problem fixed
Click to expand...
Click to collapse
always risky flashing zip for another device.
glad it worked though

Need a little help, please ....

I rebooted in to recovery (B partition) from custom ROM , ran Migrator Magisk module twice (as directions say-second run does FDR), booted into A partition of my Pixel XLto flash new ROM and for some reason EVERYTHING is encrpyted (do not have screen lock or pin applied) ..... I remember seeing something like this when I first got the device but cant recall how to deal with it.
Every attempt to adb sideload, adb push , etc not working ....
C.Hatfield said:
I rebooted in to recovery (B partition) from custom ROM , ran Migrator Magisk module twice (as directions say-second run does FDR), booted into A partition of my Pixel XLto flash new ROM and for some reason EVERYTHING is encrpyted (do not have screen lock or pin applied) ..... I remember seeing something like this when I first got the device but cant recall how to deal with it.
Every attempt to adb sideload, adb push , etc not working ....
Click to expand...
Click to collapse
So, I take it you were trying to 'migrate' to another ROM?
My suggestion is this, use this guide: https://forum.xda-developers.com/pixel-xl/how-to/guide-pixel-xl-android-9-0-pie-unlock-t3825866/
- Start fresh
- Do #4 'wipe data'
was just using the magisk migrator module - it backed up all my files on 1st run, then 2nd run it did FDR .... I would REALLY prefer not wiping my internal/sdcard ..... everything is still there but encrypted, unusable for the moment - hoping there is a workaround bc Ihave sooo much data that I havent backed up externally/cloud for a month or 3 .... got nothing I can boot from as well as no access to ALL the tons of stuff stored on my phone to flash .... was thinking to use Factory image but removing the [-w] from the bat file ..... would that work to keep my data integrity ?
Honestly, im wondering how things got encrypted when the process (xc for what im unsure the mod did extra besides FDR) is practically, if not identical, to the normal protocol for wiping>flashing for PIXEL XL
C.Hatfield said:
was just using the magisk migrator module - it backed up all my files on 1st run, then 2nd run it did FDR .... I would REALLY prefer not wiping my internal/sdcard ..... everything is still there but encrypted, unusable for the moment - hoping there is a workaround bc Ihave sooo much data that I havent backed up externally/cloud for a month or 3 .... got nothing I can boot from as well as no access to ALL the tons of stuff stored on my phone to flash .... was thinking to use Factory image but removing the [-w] from the bat file ..... would that work to keep my data integrity ?
Click to expand...
Click to collapse
...would that work to keep my data integrity ? Yes
will the modded flash-all.bat actually work with all the contents of the internal drive being encrypted?
I only ask bc of all the research Ive been doing for the last 4 hours, I had no idea that the current TWRP [3.2.3.1] made decryption on PIe possible .... I not ref to the PIN/lockscreen/Fingerprint decrypt either > more like decrypting the System partition like with Shamu/N6
**Also** found this during my harried research:
Encrypting does not completely delete the files, but the factory reset process gets rid of the encryption key. As a result, the device has no way it can decrypt the files and, therefore, makes data recovery extremely difficult.
C.Hatfield said:
will the modded flash-all.bat actually work with all the contents of the internal drive being encrypted?
I only ask bc of all the research Ive been doing for the last 4 hours, I had no idea that the current TWRP [3.2.3.1] made decryption on PIe possible .... I not ref to the PIN/lockscreen/Fingerprint decrypt either > more like decrypting the System partition like with Shamu/N6
**Also** found this during my harried research:
Encrypting does not completely delete the files, but the factory reset process gets rid of the encryption key. As a result, the device has no way it can decrypt the files and, therefore, makes data recovery extremely difficult.
Click to expand...
Click to collapse
Yes!
Yes, twrp-3.2.3-1 decrypts.
"**Also** found this during my harried research:
Encrypting does not completely delete the files, but the factory reset process gets rid of the encryption key. As a result, the device has no way it can decrypt the files and, therefore, makes data recovery extremely difficult."
Where did you find that? Link please.
Homeboy76 -
Very much appreciate the feedback !! This is the longest downtime I've experienced, likely-ever but I just couldn't make another move until I was certain it was the correct one.
Here is the link where I found the above info you asked about:
https://android.stackexchange.com/questions/149219/android-decrypt-sd-card-after-factory-reset?rq=1
C.Hatfield said:
Homeboy76 -
Very much appreciate the feedback !! This is the longest downtime I've experienced, likely-ever but I just couldn't make another move until I was certain it was the correct one.
Here is the link where I found the above info you asked about:
https://android.stackexchange.com/questions/149219/android-decrypt-sd-card-after-factory-reset?rq=1
Click to expand...
Click to collapse
Edit: Wrong link, it happens.
this is what it shows me:
It is in the default factory reset state ( like a new device ). You can't decrypt the device even if you wish to as the encryption password (generated from a combination of user lock screen PIN and encryption algorithm ) is lost
From Android's Factory Reset Does Not Wipe Your Data: Here's The Solution
Encrypting does not completely delete the files, but the factory reset process gets rid of the encryption key. As a result, the device has no way it can decrypt the files and, therefore, makes data recovery extremely difficult.
C.Hatfield said:
this is what it shows me:
It is in the default factory reset state ( like a new device ). You can't decrypt the device even if you wish to as the encryption password (generated from a combination of user lock screen PIN and encryption algorithm ) is lost
From Android's Factory Reset Does Not Wipe Your Data: Here's The Solution
Encrypting does not completely delete the files, but the factory reset process gets rid of the encryption key. As a result, the device has no way it can decrypt the files and, therefore, makes data recovery extremely difficult.
Click to expand...
Click to collapse
Yes, if you use this url: https://www.techtimes.com/amp/artic...oes-not-wipe-your-data-heres-the-solution.htm but that is not the url that was in your previous post. This is, https://android.stackexchange.com/questions/149219/android-decrypt-sd-card-after-factory-reset?rq=1
I think it is out dated: Android's Factory Reset Does Not Wipe Your Data: Here's The Solution By Anu Passary | May 27, 2015 11:07 PM EDT
hey homeboy76 tried the flash-all bat [-w removed] and the process went through w/o any issues but it immediately rebooted itself and within 30 seconds landed on the stock recovery & it said file may be corrrupt, TRY AGAIN or FDR ....
Do I have any other recourse to save my 100 GBs of data ??? or do I onlly have the unmoddded flash-all -w to do at this point ?
C.Hatfield said:
hey homeboy76 tried the flash-all bat [-w removed] and the process went through w/o any issues but it immediately rebooted itself and within 30 seconds landed on the stock recovery & it said file may be corrrupt, TRY AGAIN or FDR ....
Do I have any other recourse to save my 100 GBs of data ??? or do I onlly have the unmoddded flash-all -w to do at this point ?
Click to expand...
Click to collapse
Did you check the SHA256 of the March 2019 factory image?
I don't think it would hurt to try again. If it doesn't work you can try FDR or flash-all with [ -w] both will erase your internal storage.
Homeboy76 said:
Did you check the SHA256 of the March 2019 factory image?
I don't think it would hurt to try again. If it doesn't work you can try FDR or flash-all with [ -w] both will erase your internal storage.
Click to expand...
Click to collapse
Soooo, check this out .... I finally got a flash-all {no -w] to work and my phone booted - buuuuut it is STILL ENCRYPTED .... opening the root//file explorer I was horrified to see that everything is still encrypted .... it's soooo bizarre. apps from PS are restoring but I cannot get screenshots to save nor can I move any files from my laptop to my Pixel Xl. I wanted screeenshots so bad to show/post this bizarreness but -no- ....
I havent tried to boot into recovery yet or anything else .... so I dont even have root to look any deeper into the partitions. I was wondering if Titanium Backup would run and populate with proper app names, etc
Any more ideas from this unprecedented point bro >? BTW, the SHA256 was good/clean/proper.
BTW, when you flash a factory image, which facking partition (A or B) -should it- be flashed to or flashed "from" - I've let myself get quite confused >???? I have researched & read sooo much, my brain hurts (& is literally fried) .... I figured I would ask you so I could possibly get some firsthand clarification.
C.Hatfield said:
Soooo, check this out .... I finally got a flash-all {no -w] to work and my phone booted - buuuuut it is STILL ENCRYPTED .... opening the root//file explorer I was horrified to see that everything is still encrypted .... it's soooo bizarre. apps from PS are restoring but I cannot get screenshots to save nor can I move any files from my laptop to my Pixel Xl. I wanted screeenshots so bad to show/post this bizarreness but -no- ....
I havent tried to boot into recovery yet or anything else .... so I dont even have root to look any deeper into the partitions. I was wondering if Titanium Backup would run and populate with proper app names, etc
Any more ideas from this unprecedented point bro >? BTW, the SHA256 was good/clean/proper.
BTW, when you flash a factory image, which facking partition (A or B) -should it- be flashed to or flashed "from" - I've let myself get quite confused >???? I have researched & read sooo much, my brain hurts (& is literally fried) .... I figured I would ask you so I could possibly get some firsthand clarification.
Click to expand...
Click to collapse
I can't help you with the file encrypted problem. I've never read about anything like the problem you're having with encryption. TB might work. If your files are backed up on your computer, FDR.
https://forum.xda-developers.com/showpost.php?p=79273902&postcount=481
@C.Hatfield, continuing the discussion...
Topics
1) Forced encryption
2) Output of ls /data/misc/vold/*
3) Advanced approach
VR25-
First, I'll start with a sincere Thank You - I know you're busy with school & life, so I appreciate that you take the time to create such beneficial tools like Migrator. Having used Android OS since it's inception, I've learned a whole lot & seen a whole lot buuut not this craziness. I was unable to get any actionable help within the 2 weeks that I held out doing a full FDR ....
alas, I finally relented & did a full FDR with a full on flash-all.bat & ironically, it was only a couple hours before your response. I didn't read the response until now because I was afraid you'd posted an A, B, C unencryption method for me - in a small way, I'm glad it isn't that lol ....
As for the "did you..." questions you asked in Migrator thread, I followed my usual protocol & did not vary at all, except running the Migrator script 2x's before trying to install new ROM.

Categories

Resources