Post Reply

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

OP m.sabra

28th July 2012, 05:48 AM   |  #1  
OP Senior Member
Flag Beirut
Thanks Meter: 533
130 posts
Join Date:Joined: Sep 2011

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:
adb shell
cd /data/data/
sqlite3 settings.db
update system set value=0 where name='lock_pattern_autolock';
update system set value=0 where name='lockscreen.lockedoutpermanently';

method 2:
adb shell rm /data/system/gesture.key
and that's a video showing how method 2 is done (thanks to melvinchng) :

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

-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)
Last edited by m.sabra; 23rd August 2012 at 12:28 PM.
The Following 182 Users Say Thank You to m.sabra For This Useful Post: [ View ]
8th August 2012, 11:17 PM   |  #2  
creagrox's Avatar
Senior Member
Flag Ranchi, Jharkhand
Thanks Meter: 21
158 posts
Join Date:Joined: Feb 2012
But What if i remember the password well enough, but didnt have data enabled the moment it got locked?

Explained elaborately here>>>
9th August 2012, 10:47 AM   |  #3  
Senior Member
Flag Kaunas
Thanks Meter: 22
189 posts
Join Date:Joined: Jun 2011
It will unlock either (Loook at the time of message above - I am time traveler )
The Following 2 Users Say Thank You to ashirviskas For This Useful Post: [ View ]
10th August 2012, 12:59 PM   |  #4  
vNa5h's Avatar
Senior Member
Flag Mumbai
Thanks Meter: 122
688 posts
Join Date:Joined: Dec 2011
i have better method than bot the above ones

look for smudges on the phone
The Following 19 Users Say Thank You to vNa5h For This Useful Post: [ View ]
16th August 2012, 01:33 AM   |  #5  
Junior Member
Thanks Meter: 3
14 posts
Join Date:Joined: Aug 2010
Do the files need to be restored or are they just the user data for the pattern locks?
16th August 2012, 02:00 AM   |  #6  
spiderio's Avatar
Senior Member
Flag Jakarta
Thanks Meter: 867
1,138 posts
Join Date:Joined: Aug 2009
Donate to Me
This is really great...
i wonder how do you discover this
you must be a hacker
The Following User Says Thank You to spiderio For This Useful Post: [ View ]
16th August 2012, 02:18 AM   |  #7  
Senior Member
Flag glasgow
Thanks Meter: 154
876 posts
Join Date:Joined: Dec 2010
Donate to Me
Or you could boot into recovery backup data
wipe factory reset and reboot
Could try restoring data but most likely restore pattern lock
Or simply enter your gmail address as requested
The Following 2 Users Say Thank You to manemzjum For This Useful Post: [ View ]
16th August 2012, 03:03 AM   |  #8  
Thunder07's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter: 2,009
1,374 posts
Join Date:Joined: Sep 2007
Donate to Me
2nd option...
if you have Custom recovery
use AROMA File Explorer and you can do the same thing through the recovery
or adb through the recovery
The Following 3 Users Say Thank You to Thunder07 For This Useful Post: [ View ]
16th August 2012, 03:42 AM   |  #9  
zmore's Avatar
Senior Member
Flag NYC
Thanks Meter: 892
1,605 posts
Join Date:Joined: Apr 2011
FWIW, on CM10 neither method works as non-root. Yay CyanogenMod.

Method #1 FAIL:
1|shell@android:/data/data/ $ ll
opendir failed, Permission denied
255|shell@android:/data/data/ $ sqlite3 settings.db
Error: unable to open database "settings.db": unable to open database file

Method #2 FAIL:
shell@android:/data $ ll /data/system/gesture.key
-rw------- system system 20 2012-08-11 04:51 gesture.key
shell@android:/data $ rm /data/system/gesture.key
rm failed for /data/system/gesture.key, Permission denied

(I use faceunlock + pattern (mostly to keep my kid outta my phone), but if I actually cared more about security I'd encrypt my phone and use a passphrase instead)
The Following User Says Thank You to zmore For This Useful Post: [ View ]
16th August 2012, 06:04 AM   |  #10  
Senior Member
Flag Ankara
Thanks Meter: 16
177 posts
Join Date:Joined: Jul 2010
This is a useful guide, thanks, I will try it

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes