[FIX] Can't Unlock your Phone after full restore from TWRP.!!!!

Search This thread

[email protected]

Senior Member
Nov 12, 2016
98
84
Rajkot
HAD A FULL BACKUP OF YOUR CURRENT ROM!?

BRICKED YOUR PHONE AND TRIED TO RESTORE.?

SOMEHOW WENT TO RECOVERY AND RESTORED EVERYTHING.!?

HOPED EVERYTHING TO BE FINE BUT BOOM. WHATthe**** CANT UNLOCK YOUR PHONE. SAYS WRONG PIN EVERY TIME. CANT USE FINGERPRINT ALSO. HARD LUCK.!?

Generally this problems occurs because you had done your backup after setting up the pin or fingerprint or pattern.
TWRP otherwise restores everything superfine with every app and data and settings restored but sometimes when rebooted users can't unlock there phone with pin or pattern and can't even use their fingerprints. Common bug of restoring pattern of TWRP.

THOUGH its recommended that do your backup whithout any screen lock. And while restoring uncheck 'cache' and recovery.

BUT THERE'S A 100% WORKING FIX FOR THIS ::

1. TRY 3 TO 4 TIMES THE PIN AND FINGERPRINT. IF DOESNT UNLOCKS REBOOT ONCE AND THEN TRY.

2. IF THAT FAILS. 'POWER OFF' YOUR PHONE.
BOOT TO TWRP RECOVERY. (Pressing power button and volume up button at once)

3. IF PROMPTED ALLOW MODIFICATIONS.
DONT DO ANYTHING. GO STRAIGHT TO ADVANCED.

4. NOW HEAD TO FILE MANAGER.
(normally opened in the main folder '/', if not select storage internal). HEAD TO '/data/system' folder. Scroll down.

5. FIND FILES WITH .key EXTENSIONS AND CLICK ON THEN (generally two files). AND 'DELETE' THEM.

6. NOW FIND AND DELETE ALL FILES WITH KEYWORD 'locksettings'

AFTER DELETING. JUST REBOOT TO SYSTEM.
NOW YOU COULD BE ABLE TO UNLOCK YOUR PHONE WITHOUT any PIN or PATTERN or FINGERPRINT.

just SWIPE UP. Phone got restored to original state.

NOW SET UP FINGERPRINT AND NEW PIN IN THE SETTINGS.

* for me while setting up new pin and FINGERPRINT. The settings apps stopped closed suddenly. I opened it again and i found fingerprint and lock already set up.
Locked the screen and unlocked with my old pin and fingerprint.

DO GIVE A THUMBS UP IF YOU FOUND THE POST HELPFUL...!!!!!!!:p
 

Attachments

  • TWRP-pinreset1.png
    TWRP-pinreset1.png
    57.2 KB · Views: 10,493

widagdag

Senior Member
Sep 30, 2012
76
19
Sukabumi
or, flash mandatory firmware depends on rom you've restored (cm13 or cm14 firmware)
this tricks worked for me, whenever im restoring my full backup of RR MM and then i flash CM 13 firmware
 

geekychandu

Senior Member
Oct 16, 2015
442
91
HAD A FULL BACKUP OF YOUR CURRENT ROM!?

BRICKED YOUR PHONE AND TRIED TO RESTORE.?

SOMEHOW WENT TO RECOVERY AND RESTORED EVERYTHING.!?

HOPED EVERYTHING TO BE FINE BUT BOOM. WHATthe**** CANT UNLOCK YOUR PHONE. SAYS WRONG PIN EVERY TIME. CANT USE FINGERPRINT ALSO. HARD LUCK.!?

Generally this problems occurs because you had done your backup after setting up the pin or fingerprint or pattern.
TWRP otherwise restores everything superfine with every app and data and settings restored but sometimes when rebooted users can't unlock there phone with pin or pattern and can't even use their fingerprints. Common bug of restoring pattern of TWRP.

THOUGH its recommended that do your backup whithout any screen lock. And while restoring uncheck 'cache' and recovery.

BUT THERE'S A 100% WORKING FIX FOR THIS ::

1. TRY 3 TO 4 TIMES THE PIN AND FINGERPRINT. IF DOESNT UNLOCKS REBOOT ONCE AND THEN TRY.

2. IF THAT FAILS. 'POWER OFF' YOUR PHONE.
BOOT TO TWRP RECOVERY. (Pressing power button and volume up button at once)

3. IF PROMPTED ALLOW MODIFICATIONS.
DONT DO ANYTHING. GO STRAIGHT TO ADVANCED.

4. NOW HEAD TO FILE MANAGER.
(normally opened in the main folder '/', if not select storage internal). HEAD TO '/data/system' folder. Scroll down.

5. FIND FILES WITH .key EXTENSIONS AND CLICK ON THEN (generally two files). AND 'DELETE' THEM.

6. NOW FIND AND DELETE ALL FILES WITH KEYWORD 'locksettings'

AFTER DELETING. JUST REBOOT TO SYSTEM.
NOW YOU COULD BE ABLE TO UNLOCK YOUR PHONE WITHOUT any PIN or PATTERN or FINGERPRINT.

just SWIPE UP. Phone got restored to original state.

NOW SET UP FINGERPRINT AND NEW PIN IN THE SETTINGS.

* for me while setting up new pin and FINGERPRINT. The settings apps stopped closed suddenly. I opened it again and i found fingerprint and lock already set up.
Locked the screen and unlocked with my old pin and fingerprint.

DO GIVE A THUMBS UP IF YOU FOUND THE POST HELPFUL...!!!!!!!:p



Saved me from installing freshly again
 

biratlama

Member
Apr 26, 2016
23
3
I was using latest aosip...then i decided to change to Nitrogen os...
I wiped everything needed and then flashed Nitrogen os...
I was using a pattern lock in the aosip and when the Nitrogen os starts..it asks for pattern..but the previous pattern doesn't work...
when i again flash the aosip the same pattern works..but it doesn't work in nitrogen os
I tried to delete the keys from data/system but there are no keys there(in nitrogen os)
what shall i do? help guys....i can only use
 

sarabeshsab

Member
Dec 31, 2014
11
0
Madurai
ME TOO

I was using latest aosip...then i decided to change to Nitrogen os...
I wiped everything needed and then flashed Nitrogen os...
I was using a pattern lock in the aosip and when the Nitrogen os starts..it asks for pattern..but the previous pattern doesn't work...
when i again flash the aosip the same pattern works..but it doesn't work in nitrogen os
I tried to delete the keys from data/system but there are no keys there(in nitrogen os)
what shall i do? help guys....i can only use

I myself also have this problem kindly tell a fix guys
 

simona70

Senior Member
Jun 11, 2013
220
29
Livorno
I restored with TWRP /system and /data (no error), cleared devlick/art and cache, reboot and now I can't enter in "Security settings". What can I do?
 

simona70

Senior Member
Jun 11, 2013
220
29
Livorno
Flash the same ROM without wiping anything.
If you had.


Yes... I have not thinked the more obvious thing!!!! Thanks!!!!! Install exact rom (I have) and reinstall xposed and supersu and all shoud be lilke before.

---------- Post added at 05:37 PM ---------- Previous post was at 04:42 PM ----------

MMM all ok but... /modem damaded (no sim read)... anymore twrp and /modem restore solved this second derivated problem.
 

Frenzi2012

Senior Member
Apr 25, 2015
512
129
Buenos Aires
Xiaomi Poco X3 NFC
I was using latest aosip...then i decided to change to Nitrogen os...
I wiped everything needed and then flashed Nitrogen os...
I was using a pattern lock in the aosip and when the Nitrogen os starts..it asks for pattern..but the previous pattern doesn't work...
when i again flash the aosip the same pattern works..but it doesn't work in nitrogen os
I tried to delete the keys from data/system but there are no keys there(in nitrogen os)
what shall i do? help guys....i can only use

@sarabeshsab i think your phone is encrypted (MIUI encrypt by defaul /DATA and /internalSD) . NitrogenOS not support encryption (maybe in lasted build yes), you need to format data button on TWRP, this erase all DATA and Internal SD and disable partition encryption, (make backup to PC first, pictures and docs, etc). Now you be able to install NOS 8.
 

smukamuka

Senior Member
Jun 6, 2013
80
9
I followed this guide 'cause when I've restored a twrp backup my fingerprints didn't work (PIN did).
Removed them, added again, but not working.

Following this guide, deleting all these files didn't work.
Removing instead locksettings.db only*worked!
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 52
    HAD A FULL BACKUP OF YOUR CURRENT ROM!?

    BRICKED YOUR PHONE AND TRIED TO RESTORE.?

    SOMEHOW WENT TO RECOVERY AND RESTORED EVERYTHING.!?

    HOPED EVERYTHING TO BE FINE BUT BOOM. WHATthe**** CANT UNLOCK YOUR PHONE. SAYS WRONG PIN EVERY TIME. CANT USE FINGERPRINT ALSO. HARD LUCK.!?

    Generally this problems occurs because you had done your backup after setting up the pin or fingerprint or pattern.
    TWRP otherwise restores everything superfine with every app and data and settings restored but sometimes when rebooted users can't unlock there phone with pin or pattern and can't even use their fingerprints. Common bug of restoring pattern of TWRP.

    THOUGH its recommended that do your backup whithout any screen lock. And while restoring uncheck 'cache' and recovery.

    BUT THERE'S A 100% WORKING FIX FOR THIS ::

    1. TRY 3 TO 4 TIMES THE PIN AND FINGERPRINT. IF DOESNT UNLOCKS REBOOT ONCE AND THEN TRY.

    2. IF THAT FAILS. 'POWER OFF' YOUR PHONE.
    BOOT TO TWRP RECOVERY. (Pressing power button and volume up button at once)

    3. IF PROMPTED ALLOW MODIFICATIONS.
    DONT DO ANYTHING. GO STRAIGHT TO ADVANCED.

    4. NOW HEAD TO FILE MANAGER.
    (normally opened in the main folder '/', if not select storage internal). HEAD TO '/data/system' folder. Scroll down.

    5. FIND FILES WITH .key EXTENSIONS AND CLICK ON THEN (generally two files). AND 'DELETE' THEM.

    6. NOW FIND AND DELETE ALL FILES WITH KEYWORD 'locksettings'

    AFTER DELETING. JUST REBOOT TO SYSTEM.
    NOW YOU COULD BE ABLE TO UNLOCK YOUR PHONE WITHOUT any PIN or PATTERN or FINGERPRINT.

    just SWIPE UP. Phone got restored to original state.

    NOW SET UP FINGERPRINT AND NEW PIN IN THE SETTINGS.

    * for me while setting up new pin and FINGERPRINT. The settings apps stopped closed suddenly. I opened it again and i found fingerprint and lock already set up.
    Locked the screen and unlocked with my old pin and fingerprint.

    DO GIVE A THUMBS UP IF YOU FOUND THE POST HELPFUL...!!!!!!!:p
    10
    locksettings.db is the only file you need to delete.
    This happens to me with every backup, even i set up the pin a long time before backup.

    Sent from my Redmi Note 3 using XDA-Developers mobile app
    1
    Or flash AgniToolbox from Recovery and select the option to reset the lock.
    1
    I'm also experiencing the issue that TWRP cannot decrypt my data. I did a clean (without restore) install of LOS 16 20190612 for Dipper (Mi8) (and some previous versions). Immediately after putting a PIN, TWRP shows that the pass code is wrong, even tried with pattern. The described instructions didn't work for me. Tried with both TWRP 3.3.0-0 and 3.3.1-0.
    After deleting the files, TWRP still askes for a password. The only workaround for now is to put screen lock on "none" when I want to go into TWRP.
    What is going wrong on my phone?
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone