Disclaimer: This is for educational and personal purposes only,You should not apply this to other people phones without permission.
So, today I am going to post a very detailed guide about how we can unlock android device pattern in-case you forgot, and can’t bypass it via official method i.e. via Google account login authentication because of you didn’t have DATA connection enabled or it was disabled before it got locked.
Actually this happened to me once, That day while going to sleep I just set a unlock pattern, but the next day when I woke and trying to wake my device, It was asking for the unlock pattern but my mind was completely back and I just forgot the pattern and it got locked.
But I tried going via Forgot pattern? option but no luck due to unable to sign in cause I have disabled the data connection last night before going to sleep. But, I somehow managed to unlock it via CWM and restored a nan-droid backup.(my device was already rooted & CWM recovery flashed, was running 2.3(Gingerbread))
So, later I found a way to bypass it via ADB
.(android debug bridge).
These methods are confirmed working on Eclair(2.1), Froyo(2.2),Ginger-bread(2.3), Ice cream Sandwich(4.0) and Jelly-Bean(4.1) versions.
- The device needs to have ” USB Debugging “ enabled in application settings under development menu.
- Or in-case usb debugging isn’t enabled and you have ” cwm ” installed then you can run the same instructions from cwm.
- Root is not mandatory but chances would be more if the device was rooted.
Now, connect your phone USB to your computer and browse to your ABD Directory via command prompt.
below are the commands you should be executing now one line at a time.
So, below are the commands you should be executing it via ADB.
- 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’;
- adb shell rm /data/system/gesture.key
- Execute all the commands via adb while phone is connected via usb.
- Restart the phone.
- After rebooting you may see the pattern lock, just try any random pattern and it will unlock and then remove the pattern from settings.