There's a way to unlock the phone without having to resort to a hard reset. You don't need to have a rooted phone for this to work, but it's more effective if it is. First you need a PC that has
ADB installed and a USB cable to connect your phone to the PC. Also, your phone needs to have USB debugging enabled. If you don't know whether that's the case or not, just give it a try to see if it works. If you're able to get into ADB shell, then USB debugging is enabled and you're good to go. Once you've got everything ready, do the following:
1. Turn your phone on and connect it to the PC using the cable.
2. Open a command prompt, then enter the following:
Code:
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';
.quit
3. Reboot the phone.
4. In the command prompt, type the following:
Code:
adb shell rm /data/system/gesture.key
5. Reboot the phone.
If a pattern lock still appears, try a random pattern. If it unlocks, the congratulations, it worked.