Tuesday, August 6, 2013

PATTERN ATTAMPT UNLOCK BY RG


Android should have a method to turn on wifi or mobile networks when device is locked. But no, there is no such a method :-/
Solution
I did lot of google searches and most of them end up with hard resetting the device. If you hard reset all the data are gone. I tried it too, but because of some problem(it may be the device model), my resetting was stuck in middle of the process. Finally I found a solution to access the device from a PC via a USB cable (ADB Commands). For this method you have to have enabled USB Debugging on the device before it is locked. Luckily I had enabled it before it is locked.  (As I saw, for rooted users USB Debugging is not required — but you might need to manually mount the/data partition. Actually I didn’t try it and don’t know how to do it as my USB debugging is enabled.)
Ok here is the solution for devices which have enabled USB debugging ,
I used a windows PC
Install android SDK (http://developer.android.com/sdk/index.html) on PC
Connect the device with USB cable to the PC
Install USB drivers for android device on PC (Update drivers using this folder http://hotfile.com/dl/136803097/cffe5ab/LiveSuitPack_v1.07_usb_drivers.rar.html)
Open the command prompt (cmd) in Windows
Change directory to the android SDK platform tools (cd C:\Program Files\Android\android-sdk\platform-tools)
Type following commands in cmd
adb devices (verify device is identified by pc. If not reconnect device and try again. it should display “device” with a serial no)
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'; (for some devices update “system” is enough but I had to update “secure” too)
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 should be unlocked. If not do this step too,
adb shell rm /data/system/gesture.key (I didn’t have to do it. But it had mentioned here)
Here what I have done is clear lock patterns and remove the permanent lock from the database. Yes here I have break the security, but saved my device as can be used again. If you are concern about the security of your device “Always keep off USB debugging mode“. But I don’t know what will happen to your important data when someone locked your device.

No comments:

Post a Comment