Hacking or Unlocking Android Device using adb commands
Hacking or Unlocking
Android Device using adb commands
Well while in the era of android and smartphones, we usually have our phone locked with a pattern or something like that...
But when it happens that if we want to hack someone's pattern without the concern of the person, here comes my post for these people...
Well it's not kindaa hacking. It is just with some codes you are unlocking it. If the owner doesn't comes to know about it, then it surely becomes hacking...
When a wrong pattern is entered too often, your device is locked and asking to unlock it via google. You are a lucky guy, if it is locked with Wifi or data network on and of course you remember your google username and password. But if not, you have three possible solutions:
- hard reset your device.
- use adb commands.
- have twrp or any kind of recovery
If you use number 1 all your data are gone. Maybe you can restore it with a backup.
To use 2 you have to have enabled USB Debugging on the device before it is locked. If you have, and I have it always enabled on all my android devices, you can use the following solution to unlock your device.
Using 3 is highly complicated and you need to flash your phone for installing such recoveries plus they may won't be available for all phones...
Requirements:
- PC or Laptop with a working OS on it (I use Linux , but it is working also on Unix and Windows)
- Android SDK. You can get it at the developer site.
- Connected android device via usb to your PC
adb commands
To run the adb-commands you have to change to the
platform-tools
directory in your android-sdk (/path/to/your/android-sdk/platform-tools
).
Now you can use the following commands
adb devices # to verify that your device is identified
adb shell
cd /data/data/com.android.providers.settings/databases
sqlite3 settings.db
update system set value=0 where name='lock_pattern_autolock';
update secure set value=0 where name='lock_pattern_autolock';
update system set value=0 where name='lockscreen.lockedoutpermanently';
update secure set value=0 where name='lockscreen.lockedoutpermanently';
.quit
exit
adb reboot
Now your device is unlocked. If not use
adb shell rm /data/system/gesture.key
I cleared lock patterns and removed the permanent lock from database. I have broken the security to unlock my device, but I saved my device and all data and I can use it again.
Comments
Post a Comment