There is nothing more annoying than putting a pattern lock on your phone and then forgetting it. It is a moderately strong security feature if you use it correctly. They do so well that apparently they even stump the FBI. However, you do need to get in there somehow and now there’s a way to crack the Android pattern lock.
XDA Senior Member m.sabra has written up not one, but two easy ways of bypassing the Android pattern lock. Both require ADB and both also require that the device have USB Debugging enabled. Root isn’t required, although it is highly recommended as always.
Both processes do about the same thing just in different ways. The first method edits the values of a couple of variables to zero, and the second method simply removes the gesture.key entirely. If one doesn’t work, then the suggestion is to try them both together, as m.sabra explains:
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
adb shell rm /data/system/gesture.key
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.