Crack Android Pattern Lock using Adb

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: jelly bean and kitkat.

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';
  • quit


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.
  2. reboot
  3. run the second method
  4. reboot


  • 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

No comments:

Post a Comment