[GUIDE][HOW-TO]Crack android pattern lock!

Search This thread

Helloworld294

Senior Member
Feb 25, 2012
1,281
354
Vancouver
I dirty flashed, as well as clean flashed Fulmics but the issue is still there.
The only solution seemz to be flashing the kdz. I've been trying that all night long. LGUP is giving me some error that it couldn't load my phone model in my laptop's C drive.
LG Flash Tool 2014 can't establish connection to the server even though the internet is working perfectly fine.
The odds are totally against me today.

It shouldn't be there if you clean flash. Wipe /data and /system then flash the ROM. If that doesn't work, then there's a problem with the ROM, not your phone. Try lineageOS, just to test things out.

Sent from my Samsung Galaxy S7 Edge using XDA Labs
 

Hassaan Masroor

Senior Member
Jul 1, 2014
136
15
Lahore
It shouldn't be there if you clean flash. Wipe /data and /system then flash the ROM. If that doesn't work, then there's a problem with the ROM, not your phone. Try lineageOS, just to test things out.

Sent from my Samsung Galaxy S7 Edge using XDA Labs

I formatted the whole phone from TWRP where you type 'yes' and format.
Ok, I'll download that now but I need to be on Fulmics.
I extracted its zip but couldn't find the gatekeeper files in data/system that's why they didn't get replaced when I clean flashed.
Will I still get the files if the lockscreen issue resolves on Lineage and then I clean flash Fulmics back?
 

Helloworld294

Senior Member
Feb 25, 2012
1,281
354
Vancouver
I formatted the whole phone from TWRP where you type 'yes' and format.
Ok, I'll download that now but I need to be on Fulmics.
I extracted its zip but couldn't find the gatekeeper files in data/system that's why they didn't get replaced when I clean flashed.
Will I still get the files if the lockscreen issue resolves on Lineage and then I clean flash Fulmics back?

Gatekeeper file should always regenerate when you clean flash a new ROM after wiping data. It only generated when you create a lockscreen (pattern or pin etc.). Try another ROM. I'm pretty sure it's FulmicsROM bug, nothing is wrong with your phone.

Sent from my Samsung Galaxy S7 Edge using XDA Labs
 

Hassaan Masroor

Senior Member
Jul 1, 2014
136
15
Lahore
Gatekeeper file should always regenerate when you clean flash a new ROM after wiping data. It only generated when you create a lockscreen (pattern or pin etc.). Try another ROM. I'm pretty sure it's FulmicsROM bug, nothing is wrong with your phone.

Sent from my Samsung Galaxy S7 Edge using XDA Labs

I really wish that's the case.
Downloading LineageOS in progress.
Will report back when done.
Thanks a lot.

EDIT: LineageOS brought back the lockscreen. I backed up its 2 gatekeeper files plus 3 lock settings files (locksettings.db, locksettings.db-shm, locksettings.db-wal) and pasted then in the data/system of Fumlics. Lock screen showed up and unlocked with the pattern I set in LineageOS.
Now I head to the settings to see if I can change the pattern but again FC when I choose lock screen/fingerprint settings.
So now I wipe the cache, dalvik and system. Sparing the data partition as the lock settings files were on it. I flash Fulmics and end up still on the same spot.

Now I'm 100 percent sure only kdz flashing can repair it. Or maybe someone with a rooted G5 can share these 5 files with me (probably they're different from LineageOS's files as LG has this unique knock code feature as well which others don't offer)

Anyways, thanks for pointing me in the right direction. :)
 
Last edited:

zerosys

Senior Member
Apr 9, 2012
180
46
I have two questions guys:
1. Is there any chance to "see" the actual pattern, maybe with information stored in one of the files?
2. Is there any chance to find out at which time the pattern was changed last? Maybe "last edited" at one of the files, or maybe this information is stored somewhere?
 

arunhoneya

New member
Mar 15, 2018
1
0
hi, I have moto g5 plus. My mobile is switched off and when I turn it on it asks me to enter the pattern. I have forgotten the pattern, can you please help me with this. I can do a donation if it works. Thanks
 

sandroj

Senior Member
Aug 8, 2014
118
40
41
Roha
Moto G
Teclast X98 Air 3G
The method in OP will only work if you have already enabled ADB in settings. Even then I'm doubtful if you can use it on Moto G5 plus. Most probably you will need to factory reset in which case you will loose current data.

Sent from my X98 Air 3G using Tapatalk
 

CoCoGirl886

Senior Member
Mar 26, 2011
138
18
Yes, the thing is deleting gatekeeper file on older android versions would have regenerated a new fresh gatekeeper file on boot. But newer android (6.0+) does not allow for that to protect the phone. That said, instead of deleting the file, it's recommended to just change extension to .bak or change file permissions.


To fix YOUR issue, all you need to do is dirty flash your ROM (Fulmics).

Sent from my Samsung Galaxy S7 Edge using XDA Labs

Wish i had seen this thread earlier :(.. but if I have already deleted the gatekeeper files, is there anything I can do to pass the encryption? I don't get a force closed error when trying to create a new pin/pattern password, but it just won't save and remains on the swipe to unlock option. My fingerprint unlock still works, but it doesn't let me access the data/apps of the phone (I have Android 7.1.1).

When booting into trwp, it makes me type a password that I don't have. Before I deleted the gatekeeper files, my twrp had a pattern unlock which was the same my android system password. So essentially I can't access any of my files in twrp either. Is there anything I can do to boot back up without losing any data?

Thanks in advance!!
 

deathnote08

Member
May 9, 2013
21
1
Help me pls. I manually deleted "gesture.key" and "password.key" via twrp when i deleted it it has a red line says your kernel does not support something like that but it still deleted because i can see that the "gesture.key" and "password.key" vanishes. Then i restarted my phone but still it wants to confirm my gmail. My phone is SGY-5360 samsung HELP please. THANK YOU!
 

NAxAshirogi

New member
Oct 28, 2018
1
0
I found more simple method to do so on my Galaxy Nexus 4.1.1 ParanoidAndroid 1.99 ROM.

Code:
adb shell
su
rm /data/system/locksettings.db
rm /data/system/locksettings.db-wal
rm /data/system/locksettings.db-shm
reboot

And you're done :)

Funciono en mi Samsung J2 Prime!!! CAPO, IDOLO, GENIO!!!
Anote anote amigeroooo japishhh ;)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 204
    Dislcaimer: this is for educational purposes only,you shall not use this on other people phones without permission under any circumstances,and am not responsable to any misuse of this hack

    ok so not long ago i had a problem with a locked android device with a pattern and i managed to unlock it using adb,so here's how in case you were stuck one day with a locked device.

    the device needs to have usb debugging enabled in case usb debugging isn't enabled and you have cwm you can run the same instructions from cwm,root is not required (though it will be so better if the device was rooted)

    this was tested on:gingerbread,ice cream sandwich and jelly bean.

    both method are through adb.

    method 1:
    Code:
    adb shell
    cd /data/data/com.android.providers.settings/databases
    sqlite3 settings.db
    update system set value=0 where name='lock_pattern_autolock';
    update system set value=0 where name='lockscreen.lockedoutpermanently';
    .quit

    -AND/OR-

    method 2:
    Code:
    adb shell rm /data/system/gesture.key

    and that's a video showing how method 2 is done (thanks to melvinchng) : http://www.youtube.com/watch?v=tVJ7T2oC_Zs&feature=player_embedded

    you can try both of them,here is how i managed to remove the lock:
    1- run the first method.
    2-reboot
    3-run the second method
    4-reboot

    NOTES:
    -in the first method each line is a seperate command so click enter after typing each line.
    -in the second method type all the command and then press enter.
    -after running both methods and rebooting you may see the pattern lock,that doesn't necessarily mean it doesn't work,just try any random pattern and it may unlock then remove the pattern from settings.
    -this may and may not work,it may work on some devices and don't on others,so all you can do is trying it but i can't assure it will work.
    a small donation would be much appreciated thank :) (check my signature)
    22
    i have better method than bot the above ones


    look for smudges on the phone ;)
    16
    I don't know whether this method can use on neither:
    Rooted
    Installed Busybox
    Rom Version Older or Newer than CM7


    This method require ADB Debugging On & A PC & A tool Provided
    I found this trick a long time ago
    I come for sharing ;)

    Download the By-pass security Hack.7z
    Primary Step for all method:
    1. Extract it to anywhere using 7-zip.
    2. Open SQLite Database Browser 2.0.exe in SQLite Database Browser.
    3. Run pull settings.db.cmd inside By-pass security Hacks folder to pull out the setting file out of your phone.
    4. Drag settings.db and drop to SQLite Database Browser 2.0.exe program.
    5. Navigate to Browse data tab, At table there, click to list down the selection & selete secure
    Instruction To Remove Pattern Lock:
    1. Now, find lock_pattern_autolock, Delete Record
    2. Close & save database
    3. Run push settings.db.cmd and reboot your phone :)
    Instruction To Remove PIN Lock:
    1. Now, Find Or Create lockscreen.password_type, double-click & change it's value to 65536, Apply changes!
    2. Now, find lock_pattern_autolock, Delete Record, If doesn't exist, Ignore
    3. Close & save database
    4. Run push settings.db.cmd and reboot your phone :)
    Instruction To Remove Password Lock:
    1. Now, find lockscreen.password_salt, Delete Record
    2. Now, find lockscreen.password_type, Delete Record
    3. Close & save database
    4. Run push settings.db.cmd and reboot your phone :)
    11
    Easier way to force unlock

    I found more simple method to do so on my Galaxy Nexus 4.1.1 ParanoidAndroid 1.99 ROM.

    Code:
    adb shell
    su
    rm /data/system/locksettings.db
    rm /data/system/locksettings.db-wal
    rm /data/system/locksettings.db-shm
    reboot

    And you're done :)
    4
    The exploit/workaround has nothing to do with root. The issue is some OEMs grant the adb shell root access instead of restricting it to a lower permission user. When the adb shell is granted root access someone is then able to access the /data permission which is normally blocked off from any user besides root.

    So you could encounter this exploit by using a phone with USB debugging enabled where the OEM grants the adb shell root access. Or, on a custom ROM where the kernel is granting the adb shell root access. Having your phone rooted just makes it easier where, even if adb was protected with a lower permission user, you could still "su" to root once in a shell and wreck havoc.

    Summary:
    1. Without a rooted phone if your phone grants the adb shell root access (this is something an OEM mistakenly would have done) then you can access this exploit
    2. With a rooted phone you can type "su" after getting a shell via "adb shell" and then execute the exploit