5,604,686 Members 38,573 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
m.sabra
Old
(Last edited by m.sabra; 23rd August 2012 at 11:28 AM.)
#1  
Senior Member - OP
Thanks Meter 523
Posts: 130
Join Date: Sep 2011
Location: Beirut
Default [GUIDE][HOW-TO]Crack android pattern lock!

Quote:
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=tVJ7T...layer_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)
The Following 173 Users Say Thank You to m.sabra For This Useful Post: [ Click to Expand ]
 
creagrox
Old
#2  
creagrox's Avatar
Senior Member
Thanks Meter 19
Posts: 158
Join Date: Feb 2012
Location: Ranchi, Jharkhand
But What if i remember the password well enough, but didnt have data enabled the moment it got locked?

Explained elaborately here>>>http://forum.xda-developers.com/show...php?p=29963687
 
ashirviskas
Old
#3  
Senior Member
Thanks Meter 22
Posts: 147
Join Date: Jun 2011
Location: Kaunas
It will unlock either (Loook at the time of message above - I am time traveler )
Optimus one
Device status: Finally got P500 AGAIN
Rom: IcySnap 1.6
OC: @320-787 SmartassV2
About me: Poor english I have. Blame me not that for
Other Things: Ma future phone will have foldable screen, at least 2 GB of RAM, 4 or 8 cores processor and of course it will be Android Google Phone. (It is my "dream phone" from 2010 ).
The Following 2 Users Say Thank You to ashirviskas For This Useful Post: [ Click to Expand ]
 
vNa5h
Old
#4  
vNa5h's Avatar
Senior Member
Thanks Meter 96
Posts: 514
Join Date: Dec 2011
Location: Mumbai
i have better method than bot the above ones


look for smudges on the phone
Motorola Moto G a.k.a XT1033 a.k.a Falcon
Running Stock KK 4.4.2, Soundmagic PL11 earphones
Quote:
TV Shows / Movies .....I have watched....
Music
...I listen...
The Following 18 Users Say Thank You to vNa5h For This Useful Post: [ Click to Expand ]
 
simster007
Old
#5  
Junior Member
Thanks Meter 3
Posts: 14
Join Date: Aug 2010
Do the files need to be restored or are they just the user data for the pattern locks?
 
spiderio
Old
#6  
spiderio's Avatar
Senior Member
Thanks Meter 557
Posts: 991
Join Date: Aug 2009
Location: Jakarta
This is really great...
i wonder how do you discover this
you must be a hacker
 
manemzjum
Old
#7  
Senior Member
Thanks Meter 148
Posts: 816
Join Date: Dec 2010
Location: glasgow

 
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: [ Click to Expand ]
 
Thunder07
Old
#8  
Thunder07's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 1699
Posts: 1,251
Join Date: 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: [ Click to Expand ]
 
zmore
Old
#9  
zmore's Avatar
Senior Member
Thanks Meter 870
Posts: 1,570
Join Date: Apr 2011
Location: NYC
FWIW, on CM10 neither method works as non-root. Yay CyanogenMod.

Method #1 FAIL:
1|shell@android:/data/data/com.android.providers.settings/databases $ ll
opendir failed, Permission denied
255|shell@android:/data/data/com.android.providers.settings/databases $ 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)
Primary Phone: Note3 (SM-N900T); ROM: CyanogenMod 11 (KitKat 4.4.*); kernel: Stock @ 2.3GHz; misc: Incipio DualPro; 64GB class10 microSDXC
Primary Tablet: Nexus 7 (2012); ROM: CM11
Working museum piece: SGS1 Captivate (SGH-i897); ROM: CM11; kernel: Stock @ 1.0GHz
(Other devices: Nexus 10 (stock); Retired devices: SGS3 (SGH-i747), Kindle Fire (otter), OG Galaxy Tab 7, ...)
 
The Following User Says Thank You to zmore For This Useful Post: [ Click to Expand ]
 
D0GuKaN
Old
#10  
Senior Member
Thanks Meter 14
Posts: 156
Join Date: Jul 2010
Location: Ankara
This is a useful guide, thanks, I will try it

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes