Related
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.
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.
Okay guys i run the newest version of freedom OS no CB but the only thing is i tried putting in a layer i got stuck and now i have a bootloop, but oh you think: why not just wipe your old rom and put a new one on it. Well i can't because it wiped my pattern and now it's asking for a pin but i don't have a pin for my twrp and now i am just stuck.
please help me i am stressing out here.
jamesblunt1 said:
Okay guys i run the newest version of freedom OS no CB but the only thing is i tried putting in a layer i got stuck and now i have a bootloop, but oh you think: why not just wipe your old rom and put a new one on it. Well i can't because it wiped my pattern and now it's asking for a pin but i don't have a pin for my twrp and now i am just stuck.
please help me i am stressing out here.
Click to expand...
Click to collapse
You can enter the pattern by translating it into numbers
The dots correspond to the following numbers:
1 2 3
4 5 6
7 8 9
So for example if your pattern was L shape then pin will be 14789
vjendra said:
You can enter the pattern by translating it into numbers
The dots correspond to the following numbers:
1 2 3
4 5 6
7 8 9
So for example if your pattern was L shape then pin will be 14789
Click to expand...
Click to collapse
Already tried that didn't work.
jamesblunt1 said:
Already tried that didn't work.
Click to expand...
Click to collapse
Then, head to Advanced > File Manager, and go to the /data/system folder. Scroll down and find the two files with the .key extension. Delete both of them (by tapping on the file and then tapping the “Delete” button). Then, delete all the files containing the word locksettings.
password.key
pattern.key
locksettings.db
locksettings.db-shm
locksettings.db-wal
TWRP-pinreset
Once you’ve deleted all the key and locksettings files, reboot your system. If it asks you to install SuperSU, choose “Do Not Install”.
You may be prompted for a PIN before your phone finishes booting.
vjendra said:
Then, head to Advanced > File Manager, and go to the /data/system folder. Scroll down and find the two files with the .key extension. Delete both of them (by tapping on the file and then tapping the “Delete” button). Then, delete all the files containing the word locksettings.
password.key
pattern.key
locksettings.db
locksettings.db-shm
locksettings.db-wal
TWRP-pinreset
Once you’ve deleted all the key and locksettings files, reboot your system. If it asks you to install SuperSU, choose “Do Not Install”.
You may be prompted for a PIN before your phone finishes booting.
Click to expand...
Click to collapse
Can't because it is encrypted it won't show me those options.
jamesblunt1 said:
Can't because it is encrypted it won't show me those options.
Click to expand...
Click to collapse
Then I will suggest you use the method 2 from the following unbrick guide:
http://forum.xda-developers.com/oneplus-3/how-to/guide-mega-unbrick-guide-hard-bricked-t3405700
Happened to me too.. had to reflash firmware through fastboot lol
mharis05 said:
Happened to me too.. had to reflash firmware through fastboot lol
Click to expand...
Click to collapse
Uhhm if i try to do the adb sideload it says install failed. So do you maybe have suggestion.
vjendra said:
Then I will suggest you use the method 2 from the following unbrick guide:
http://forum.xda-developers.com/oneplus-3/how-to/guide-mega-unbrick-guide-hard-bricked-t3405700
Click to expand...
Click to collapse
Uhhm if i try to do the adb sideload it says install failed. So do you maybe have suggestion.
jamesblunt1 said:
Uhhm if i try to do the adb sideload it says install failed. So do you maybe have suggestion.
Click to expand...
Click to collapse
You can avoid using sideload I believe by flashing stock firmware using fastboot.
If you really are stuck and can't decrypt data you can format it and decrypt it in fastboot.
!!! all your data will be wiped !!!
command:
Code:
fastboot format userdata
https://forums.oneplus.net/threads/encrypted-oneplus-3.452572/
http://forum.xda-developers.com/oneplus-3/how-to/unencrypt-oxygenos-loosing-data-t3412228
jamesblunt1 said:
Uhhm if i try to do the adb sideload it says install failed. So do you maybe have suggestion.
Click to expand...
Click to collapse
If you use method 2 then you will have to do nothing. Everything will be easy peasy...
jamesblunt1 said:
Uhhm if i try to do the adb sideload it says install failed. So do you maybe have suggestion.
Click to expand...
Click to collapse
In experience sideload works best with stock recovery. If you use the above method that I told, you will not need to do anything..the tool will do everything
{
"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
Hello dev's! Unfortunately, in January, my brother passed away, and I have been tasked with trying to get into his phone and recover any important images really to pass along to his wife and daughter. Needless to say, I don't know his PIN code - and I am down to 2 guesses before the phone is wiped. So here I am.
Pardon my lack of technical language here but my brother did install Team Win Recovery Project 3.1.1-0 so I have been able to get to "recovery mode". Unfortunately, his partition is encrypted and I have been unable to guess that password either.
Because his drive is encrypted, I can't get into /data to remove any .key files. I have successfully been able to figure out how to sideload zip files via ADB that are supposed to bypass the PIN screen but I have had no luck. The google "find my phone" method is not working probably because the phone isn't connecting to a network.
I have read through an alpha security post about a malicious charger hack but I don't see where to download that tool.
So - does anyone know of any possible application or ZIP file I can sideload that will either help remove the decryption password or completely and successfully bypass the PIN?
Can I update TWRP to a newer version in hopes that the encryption is removed?
Any help is appreciated!
FWIW, my brother was on these forms as Colomonster - and I know that he loved tinkering with his phone daily.
There's no efficient way of breaking the data partition if it's encrypted, sorry.
Any old version of twrp might do the trick and then in /data/system folder delete these files ( if they are there )
password.key
pattern.key
locksettings.db
locksettings.db-shm
locksettings.db-wal
@catsruul I figured this would be the case but it does look like I get inifinite guesses, so there’s always that
@cpt.macp thanks for this tip! Can I downgrade via sideloading? I’ll have to look up a tutorial.. thanks!
You said any important photos correct?
https://support.google.com/accounts/troubleshooter/6357590?hl=en
I assume that your brother used Google Photos and any photos he took were most likely backed up to that. You can talk to Google about retrieving said data, you will need to prove things of course though. You will need to get a court order issued, that is if it is even approved, and everything else required should be on that page. Best of luck! Sorry to say but if the /data is encrypted you are pretty much screwed, although TWRP should decrypt in when it enters recovery so idk. That webpage is your best shot imo.
thanks @ZVNexus for the tip. I do have access to his Google account but because my brother was a super sleuth, he didn't have his images automatically upload to his photo drive. the photos that are there are few and from 2015
With access to his account, I do see his "activity", which I am not even sure he knew was being tracked (oh Google!) and I see that he used things like
Code:
Used com.android.gallery3d
and
Code:
Used org.cyanogenmod.snap
both of which look like photo apps.
you mentioned that TWRP should decrypt when I enter recovery.. what do you mean by that? if it is encrypted then it should always ask for a password right?
I wonder if this app is available anywhere for download and use.
HTML:
https://alephsecurity.com/2017/03/26/oneplus3t-adb-charger/
Lonoshea said:
thanks @ZVNexus for the tip. I do have access to his Google account but because my brother was a super sleuth, he didn't have his images automatically upload to his photo drive. the photos that are there are few and from 2015
With access to his account, I do see his "activity", which I am not even sure he knew was being tracked (oh Google!) and I see that he used things like
Code:
Used com.android.gallery3d
and
Code:
Used org.cyanogenmod.snap
both of which look like photo apps.
you mentioned that TWRP should decrypt when I enter recovery.. what do you mean by that? if it is encrypted then it should always ask for a password right?
I wonder if this app is available anywhere for download and use.
HTML:
https://alephsecurity.com/2017/03/26/oneplus3t-adb-charger/
Click to expand...
Click to collapse
I meant that even if the chip was encrypted TWRP should have let you touch the data partition. My phone is also encrypted but TWRP allows me to touch those partitions. Strange. Hopefully others can help.
Lonoshea said:
Hello dev's! Unfortunately, in January, my brother passed away, and I have been tasked with trying to get into his phone and recover any important images really to pass along to his wife and daughter. Needless to say, I don't know his PIN code - and I am down to 2 guesses before the phone is wiped. So here I am.
Pardon my lack of technical language here but my brother did install Team Win Recovery Project 3.1.1-0 so I have been able to get to "recovery mode". Unfortunately, his partition is encrypted and I have been unable to guess that password either.
Because his drive is encrypted, I can't get into /data to remove any .key files. I have successfully been able to figure out how to sideload zip files via ADB that are supposed to bypass the PIN screen but I have had no luck. The google "find my phone" method is not working probably because the phone isn't connecting to a network.
I have read through an alpha security post about a malicious charger hack but I don't see where to download that tool.
So - does anyone know of any possible application or ZIP file I can sideload that will either help remove the decryption password or completely and successfully bypass the PIN?
Can I update TWRP to a newer version in hopes that the encryption is removed?
Any help is appreciated!
Click to expand...
Click to collapse
I'm confused: if the partition is encrypted, you will generally be asked for a password during the boot process. If you're unable to enter the correct password (which AFAIK has unlimited tries), the phone simply won't boot. So you will never arrive at the lockscreen where you're supposed to enter the PIN (which offers a number of tries before wiping). With an encrypted partition, entering the recovery will prompt you for the same password you're supposed to enter during the boot process. Again, unlimited tries. As long as you're unable to do that the partitions will be 'invisible'. You can still wipe/partition them and that will remove the encryption as well as all of your data. But it seems the device you're working on works differently?
Either way: in order to gain access, you will need to either know the PIN directly (if the phone boots without a boot password) or gain access to the encrypted partition through TWRP, allowing you to remove the files responsible for the PIN lock. I'm sorry for your loss, but if it would work in any other way it simply wouldn't be secure for any Android user out there who is using encryption. Even google shouldn't be able to decrypt the phone, though it's theoretically possible they do have some kind of backdoor.
At this point, your best bet is probably trying to brute force the partition password. That would probably take a very long time, but I'm sure there's tools and organizations specializing in that sort of work.