How to Bypass the Pattern Lock on an Android Device

The Android operating system provides a great security featured called Pattern Lock that lets you avoid any accidental taps made on the device. In order to use the feature, you first have to define a pattern which will then be used to authorize access to your device. Sometimes, the pattern gets forgotten by the users and they start to panic as they’re unable to access the device. As with every issue, there’s a solution. By using a few ADB commands, you can bypass the patter and get access to the device. To learn how to do that, follow our guide below.

I. Before You Begin:

1. You must have ADB installed on your PC. Learn how to install ADB.

2. You must have USB debugging enabled before the device was locked.

II. Bypassing the Pattern Lock on an Android Device:

1. Connect your device to your PC via USB cable.

2. Open the folder where you have installed ADB.

3. Right-click on any blank area on the screen while holding down the Shift button on your keyboard, choose Open command window here.

4. In the Command Prompt Window you just opened, type in following commands:

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

5. Once done, reboot the device.

6. You’re all set!

Great! The Pattern Lock has successfully been disabled on your device and you can now access the device!

If this procedure helped you please thank/donate to the original developers here.

If you need help with this procedure, please ask in the comments below or in the forum.

This is part of our Android How To’s. We have how to’s on rooting, loading ROMs, and tons of other tips and tricks for your specific device or for Android devices in general! For all of our Android How To’s, head here.

Join 90k others & subscribe to my weekly, not annoying newsletter for more tech!

* indicates required
  • Ummm….. If my device is locked with a forgotten pattern lock…. Uhhhh… Ummmmm… How do I go into my settings to enable usb debugging? … And if I’m in the settings, why wouldn’t I just turn off pattern lock?

    • Mahesh Makvana

      Think you didn’t read the first section!

  • Well there is always the capability to unlock your device using your gmail password. Easier and faster. But I guess if you steal a phone this will be useful

    • DuBuD

      probably works only when rooted

      • According to the original developer of the trick above, it works on non-rooted devices as well. All you need to have is USB debugging enabled on your device.

  • nk

    This wud not work until u hav su permissions

  • vmd

    Ha, ha, ha . . . me too. So how did you get it? I have sooo much saved information I’m not wanting to hard-reset my Acer A500. I went to Google – there isn’t (or I can’t find it) a place to reset my account on the tabet because it is LOCKED.

  • vmd

    Mee tooo. Locked. Won’t connect to wireless. Went to google recovery, hmmmm, is that a joke? Well, I need my information in the morning. Geeze…..go figure.

  • ary

    i am showing message device not found

  • Atwal

    sqlite3.db not found