How to bypass android lockscreen with adb

The lockscreen is one of the cornerstones of security on Android. It keeps nosy people at bay, it avoids ill-intentions and serves as a barrier of entry to possible thieves. However, sometimes it manages to keep even you at bay – it’s very easy to forget your lockscreen PIN, or to mess up the pattern unlock. So, what can you do once that happens, and you’re locked out of your own device?

In case you have USB Debugging enabled (for those that aren’t aware, this option can be found in the Settings, under Developer options), there’s a lot you can do to try and hack the lockscreen to bypass it completely. For this, you’ll need to setup and install ADB, which stands for Android Debug Bridge. This is a feature meant for developers and allows them to directly interact and send commands to the device in order to get accurate and direct data in real time. However, we can use it to send our own commands and try to get rid of the lockscreen completely.

This is done by connecting your device to the computer over USB, opening a command prompt or terminal on your OS, and typing “adb devices”. You should get a code in return that identifies your device, meaning that ADB is working correctly and is able to see your device. If you get an error, you don’t have USB Debugging enabled or ADB set up properly.

adb reboot recovery
adb devices
adb shell
#cd /data/system
#rm *.key
#/system/xbin/sqlite3 /data/data/com.android.providers.settings/databases/settings.db
sqlite> update secure set value=65536 where name='lockscreen.password_type';
sqlite> update system set value=0 where name=’lock_pattern_autolock';
sqlite> update system set value=0 where name='lockscreen.lockedoutpermanently';
sqlite> .exit
# exit
adb reboot
Android Device Manager
This is by far the easiest and most direct method of bypassing the lockscreen, since it’s supported by Google and doesn’t really have any special requirements. It should work for most users, and is very simple to do. All you need is Android Device Manager enabled beforehand, which is something Google automatically does for you anyway in most modern devices, and a data connection.
Go to https://www.google.com/android/devicemanager?hl=en&u=0 

Press the “Lock” button. It will show you a screen where you are able to replace your current lockscreen PIN number with a new one, set by you.

Enjoy!

Post a Comment

Previous Post Next Post