How to reset your pattern unlock data on your android phone or tablet using PC via ADB (android debug bridge)
This method will only work if and only if you have previously enabled "USB debug mode" in your device, prior to an actual lock out due to forgotten password or screen pattern.
- 1Install Android SDK.Download android SDK from www.developer.android.com/sdk/index.html.
- 2Extract.After downloading the file, do not open it, but instead extract the content to a folder in the root of your drive C. Rename the folder to android-sdk.
- 3USB Driver.Download the necessary USB driver for your tablet. If you have difficulty in obtaining the right USB driver for your device, you could use an Android management tool like "Moborabo." This application was originally intended for smartphones, but will also work for Android tablets.
- 4Connect your tablet.Connect your Android tablet to your computer using the provided USB cable. Make sure that the device is detected by your computer.
- 5Open command prompt.Type "Win+R." This will open the run command window on your desktop. Type "cmd" on the space provided.
- 6Go to the adb directory by typing the following commands on the command prompt window:
- 7Check that you device is recognized by typing the adb command to list the devices connected to your computer.This should display the serial number of the device(s).
- 8Type the adb command to wipe the user data on your android device:
- adb shell
- rm /data/system/gesture.key
- Restart your device
- Start the adb shell again
- 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
- Restart -- Your phone should now allow you to enter a new pattern unlock. If not continue on to the next step.
- If it does not you can go into adb shell again and type wipe data. WARNING: ALL DATA ON YOUR PHONE WILL BE LOST. Since this method will cause your data to be lost anyway, you might as well do a full factory reset instead. However for completeness this solution documented here.
- Depending on the amount of data on your Android tablet, this may take some time. Just wait until you see the message "Done wiping/data." Your Android tablet will be restored to factory default after this process.
- adb shell
- 9Close the command prompt window.
- 10You can now remove your Android tablet from the computer and restart the device.
The Last resort
- If your Android Device is unable to connect to the Internet while locked, then unfortunately you have lost access to your device. You will need to perform a full factory reset of the device.
- To perform a full factory reset on an Android device, follow the instructions found here:How to perform a full factory reset on an Android device.