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

Search This thread

anonymous572

Senior Member
Jun 15, 2011
897
428
Mstislavl
Read all thread. Absolutly none of these methods won't work with my Galaxy Note 4.0.4 stock with root and debugging on. Tried almost everything.
 

surajkala

Senior Member
May 9, 2012
239
77
Guwahati
twitter.com
unable to unlock samsung galaxy 3

I have samsung I5800 / 5801 which got locked.. after many retries for Pattern lock

Although i have the username & password.. but my phone wont connect to net

I went thru this post.. but my issue is ..

the device is
1) Not rooted
2) USB debugging is off
3) wifi off
4) mobile data off
5) No CWM
6) Eclair 2.1

Please let me know.. how can i fix it.. without loosing any data .. Even i tries the method where u need to make a call to device and click back button.. but that doesn't work either

plz guide

NB: only last option i have is phone reset.. but in that case data will be lost
 

quietcblongs

Senior Member
Nov 8, 2009
117
0
For those having trouble with the first method, the rows may not be in the system table. For my EVO 4G, it was in the secure table. So just change the statement from "update system..." to "update secure..." and reboot after running the statements.
 

bearshark

New member
Oct 5, 2009
3
1
Thanks to HANAHEENO! My stupid noobness just flashed ParanoidAndroid 2.16 (my very first flashed ROM) and was laying in bed trying to unlock. I had the right code, but I suspect the phone was tilted a little and did not accept my pattern unlock. It went to Google's email and password unlock and of course, I didn't have data or wifi on.

I did a factory reset using bootloader and flashed PA 2.16 and GApps again. I'm not sure if this is the right thing to do, but it didn't work. Thought I was forever stuck, but I found this code and it worked. Thanks so much!!!


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 :)
 
  • Like
Reactions: januarawaluddin

Copper Green

Member
Dec 3, 2010
12
1
Bad to remove the files.. with CM10 it's the following:

Code:
/system/xbin/sqlite3 /data/data/com.android.providers.settings/databases/locksettings.db \
"UPDATE locksettings SET value=0 WHERE name LIKE 'lock_pattern_autolock';"

You need to restart the lock screen app nonetheless. I'm trying to figure out how.

For unlocking purposes you can just remove the battery, boot up and be happy again.
 

fireincairo

New member
Apr 4, 2009
2
0
Great post. I have one question: is it similar to unlock the password lock screen? I guess by using the statement "UPDATE locksettings SET value=0 WHERE name LIKE 'lock_pattern_autolock';" but instead of 'lock_pattern_autolock' maybe another parameter like 'lock_password_autolock'? Anyone has a clue?

And there's also an app lock screen too, i.e. when you are in the device and try to start an app, it will ask for a password defined by you previously. Is there a way to hack this?

And... most importantly, after setting the parameter to 0, if I change it back to 1, is the old password retained, so that the device owner will not notice a thing?

BR, fire
 

Ahish.s

Senior Member
Great post. I have one question: is it similar to unlock the password lock screen? I guess by using the statement "UPDATE locksettings SET value=0 WHERE name LIKE 'lock_pattern_autolock';" but instead of 'lock_pattern_autolock' maybe another parameter like 'lock_password_autolock'? Anyone has a clue?

And there's also an app lock screen too, i.e. when you are in the device and try to start an app, it will ask for a password defined by you previously. Is there a way to hack this?

And... most importantly, after setting the parameter to 0, if I change it back to 1, is the old password retained, so that the device owner will not notice a thing?

BR, fire

This should be used only for educational purposes or in situations where you are locked out of the device. Not for hacking or intruding someone's device.

Sent from my LG-P500 using Tapatalk 2
 
  • Like
Reactions: burdman

nosiyeas

New member
Nov 2, 2012
2
0
adb

after the process completed.wil the pattern will remain open forever?like if any patterm i put will unlock it?
 

neim81094

Senior Member
Nov 8, 2012
279
36
Brooklyn
This would've been awesome if this was for an old itouch tweak that somehow for corrupted and wouldn't let me access ny devices without restoring it(Android lock plugin)
Though thanks for the find!

Sent from my SGH-T999
 

phantomblu

Senior Member
Nov 25, 2011
261
7
I need help with this guide. I have a HTC Sensation with CM10. I don't know if I have debugging on or not, but I am rooted. I can't get the "adb" command to work, but I know I've done it before when I first rooted. I don't know how to run the commands from CWM either. I have 4ext recovery, will that be a problem?
 

Ahish.s

Senior Member
I need help with this guide. I have a HTC Sensation with CM10. I don't know if I have debugging on or not, but I am rooted. I can't get the "adb" command to work, but I know I've done it before when I first rooted. I don't know how to run the commands from CWM either. I have 4ext recovery, will that be a problem?

All you need to do is reboot to recovery, and type the commands through adb. Reboot after sending commands and you're done. :cool:

Sent from my LG-P500 using Tapatalk 2
 

muz_aj

Senior Member
May 23, 2009
96
2
Portland
tried it with 4.2 on a maguro, after trying the sqlite3 command, it gave me a "unable to open database file"

Is there another way around it?

Thanks
 

pauloallex24

Senior Member
Nov 12, 2010
82
10
Aveiro, Portugal, Portugal
I'm getting this error on Nexus 7 without root:
/system/bin/sh: sqlite3: not found

And if I try to use ls command I get:
opendir failed, Permission denied

I've used this on Samsung Galaxy Gio without root and it work. Any idea what to do?
 

RootTheMachine

Senior Member
Oct 4, 2011
2,089
533
I'm getting this error on Nexus 7 without root:
/system/bin/sh: sqlite3: not found

And if I try to use ls command I get:
opendir failed, Permission denied

I've used this on Samsung Galaxy Gio without root and it work. Any idea what to do?

I think I got that when I didn't do it as root... Anyway the second method is easier. Didn't even need to reboot.

Sent from my Nexus 7 using Tapatalk HD
 

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