FORUMS
Remove All Ads from XDA

[TOOL][TWRP ZIP][MM] Lock screen fix for encrypted devices

4,447 posts
Thanks Meter: 10,962
 
By steadfasterX, Recognized Developer on 13th November 2016, 09:25 PM
Post Reply Email Thread
About
If you encrypt your device and set a screen lock protection with a PIN or password some ROMs have a bug which prevents unlocking your screen again. This flashable ZIP will fix this by
  1. disabling the gatekeeper libraries which are not working as expected
  2. deleting the not working protection PIN/password so you can set a new one

See the full details and description in the "Technical details" post

This will not touch your device encryption password/PIN!
The presented ZIP here is a result of a long finding process I made in cyanogenmod forum
( wayback archive )

Requirements
  • This is for encrypted devices only!
  • This is for CM or CM based ROMs only. this may not apply to all CM based ROMs, e.g. exodus seems to be not affected.
  • You need to have TWRP installed. Therefore you need an unlocked device as well.

Guide
  1. Download zip
  2. Boot into twrp
  3. Transfer the zip to your device
  4. ensure you have decrypted data partition in twrp!!!!!!! If you skip this step it will not work.
  5. Flash the zip
  6. Reboot
  7. Whenever asked for a password just press ENTER!!!!!
  8. Goto settings and set a new PIN/password
  9. Reboot
  10. Enjoy

Known issues
This is just a workaround for a problem need to be solved in the ROM(s) and may be/is fixed in a future release of your favorite ROM.

Download

Open the download section



XDA:DevDB Information
Lock screen fix for encrypted devices, Tool/Utility for the LG G4

Contributors
steadfasterX
Source Code: https://github.com/steadfasterX/lge_...lock_fixer_enc


Version Information
Status: Stable
Current Stable Version: 1.0
Stable Release Date: 2016-11-25

Created 2016-11-13
Last Updated 2017-12-18
The Following 5 Users Say Thank You to steadfasterX For This Useful Post: [ View ]
 
 
13th November 2016, 09:25 PM |#2  
steadfasterX's Avatar
OP Recognized Developer
Thanks Meter: 10,962
 
Donate to Me
More
Technical details
Q: What exactly happens when flashing this ZIP?

Answer:
  1. moving: /system/vendor/lib/hw/gatekeeper.msm8992.so --to--> /system/vendor/lib/hw/gatekeeper.msm8992.so.disabled
  2. moving: /system/vendor/lib64/hw/gatekeeper.msm8992.so --to--> /system/vendor/lib64/hw/gatekeeper.msm8992.so.disabled
  3. creating dir: /data/system/gk_backup
  4. moving:/data/system/gatekeeper.*.key --to--> /data/system/gk_backup/
  5. moving: /data/system/locksettings.db* --to--> /data/system/gk_backup/

1 and 2 are required so you can setup a PIN/password without problems!
3 is just for having a local backup of the current settings
4 and 5 will reset your password/pin/pattern settings of your lock screen. This is required so you can unlock your device again.

After flashing you will reboot and you should have to swipe only to unlock your screen. If you still see a PIN/password lock just press ENTER to unlock.
Now when you set a new pin/password it will just work! The reason is that the gatekeeper libraries are disabled now. While trying to set a new pin/password and you gets asked for the current pin/password just press ENTER as well. Then set a new one and enjoy.

Btw: I highly recommend to use snooperstopper app! It allows you to setup different protection passwords for screen unlock and device unlock. Besides this you can setup there a maximum amount of unlock faults until the device just reboots! That means if a user tries to hack your screen lock and fails that amount of time you set the device will reboot and is encrypted so even harder to "break". I really like that

Again: This is just a workaround for a problem need to be solved in the ROM(s) and may be/is fixed in a future release of your favorite ROM.

Q: Is the setting permanent?

Yes and no.
Yes because it will still works after rebooting
No because you have to re-apply this after you upgrading your ROM

Again: This is just a workaround for a problem need to be solved in the ROM(s) and may be/is fixed in a future release of your favorite ROM.



.
The Following 3 Users Say Thank You to steadfasterX For This Useful Post: [ View ]
13th November 2016, 09:25 PM |#3  
steadfasterX's Avatar
OP Recognized Developer
Thanks Meter: 10,962
 
Donate to Me
More
Reserved
The Following User Says Thank You to steadfasterX For This Useful Post: [ View ]
15th November 2016, 01:11 AM |#4  
Member
Thanks Meter: 3
 
More
Support for rom stock or rom cook ?
15th November 2016, 09:23 AM |#5  
steadfasterX's Avatar
OP Recognized Developer
Thanks Meter: 10,962
 
Donate to Me
More
Quote:
Originally Posted by langtudaik

Support for rom stock or rom cook ?

If you use an app to display this thread please open in a browser because somehow this thread is not displayed correctly in the XDA app
25th November 2016, 04:45 PM |#6  
steadfasterX's Avatar
OP Recognized Developer
Thanks Meter: 10,962
 
Donate to Me
More
Announcement

Finally and thanks to @androidJoeLi I can release the tool to the public.
See OP for the download link.

Have fun





.
The Following User Says Thank You to steadfasterX For This Useful Post: [ View ]
2nd January 2017, 08:13 PM |#7  
Member
Thanks Meter: 24
 
More
The SnooperStopper functionality was added to the CM-14.1 branch:
Quote:

[1/2] base: support separate encryption/lockscreen passwords This adds the necessary infrastructure for allowing users to opt-in to a distinct device encryption passphrase. The passwords are still tied together by default. This makes it possible to use a complex encryption passphrase without losing the convenience of a very simple lockscreen pin. This feature can be combined with a forced reboot after a chosen number of failed unlocking attempts to prevent brute-forcing by requiring the entry of the encryption password instead.

Sources: [1/2] base: support separate encryption/lockscreen passwords, [2/2] settings: support setting a separate encryption password.

Does anybody know if the encryption already works on the CM-14.1 branch for the G4 device?
2nd January 2017, 09:18 PM |#8  
steadfasterX's Avatar
OP Recognized Developer
Thanks Meter: 10,962
 
Donate to Me
More
Quote:
Originally Posted by deep_attention

The SnooperStopper functionality was added to the CM-14.1 branch:
Sources: [1/2] base: support separate encryption/lockscreen passwords, [2/2] settings: support setting a separate encryption password.

Does anybody know if the encryption already works on the CM-14.1 branch for the G4 device?

Afaik nobody cares about encryption so I was surprised to see that change. Maybe it's worth to give 14.1 anoyher try but I see so many other issues with N which prevents me on doing so..

Sent from my LG-H815 using XDA Labs
23rd January 2017, 12:58 PM |#9  
marn3us's Avatar
Senior Member
Thanks Meter: 181
 
More
Hey @steadfasterX I think I have a small problem with your tool.

Today I experienced the PIN problem when restoring a backup so I tried flashing your tool but it failed because it couldn't mount /system and /data... Can this be caused by the fact that I am using F2FS?

Thanks in advance
23rd January 2017, 01:29 PM |#10  
steadfasterX's Avatar
OP Recognized Developer
Thanks Meter: 10,962
 
Donate to Me
More
Quote:
Originally Posted by marn3us

Hey @steadfasterX I think I have a small problem with your tool.

Today I experienced the PIN problem when restoring a backup so I tried flashing your tool but it failed because it couldn't mount /system and /data... Can this be caused by the fact that I am using F2FS?

Thanks in advance

well:
  1. which TWRP version?
  2. can you mount /system and /data manually in TWRP?
  3. pls upload the recovery.log after flashing this (howto is in FAQ #4-A of the TWRP thread)
28th January 2017, 01:17 PM |#11  
sejmand's Avatar
Senior Member
Flag Karlsruhe
Thanks Meter: 59
 
More
Don't know if I'm in the right thread...

Since the first time I flashed cm14.1 I got a softbrick when I used a lockscreen pattern.
So I use an alternative lockscreen app...
My device/h815 is not encrypted selinux is strikt...
Is this bug fixed?

(Please deleted the post if wrong or too noobish...)
Attached Thumbnails
Click image for larger version

Name:	IMG_20161211_215659.jpg
Views:	294
Size:	253.8 KB
ID:	4020239   Click image for larger version

Name:	Screenshot_20170128-141144~01.png
Views:	290
Size:	88.0 KB
ID:	4020242   Click image for larger version

Name:	Screenshot_20170128-141154.png
Views:	288
Size:	171.1 KB
ID:	4020243  
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes