How to remove the unlock pattern (II)

Hexamob | Emma Rossinyol - 05/13/2014


How to remove the unlock pattern (II)

In the previous post we explain what to do if we not know the unlock pattern of our device. There are some cases where we can easily remove the pattern and retrieve the information, especially if we have internet access and our smartphone or tablet is linked to a Google account.

If this is not the case, we have two more options to remove the pattern and not to lose the devices’ data; one is deleting the file where this pattern is stored and the other resetting the device and reinstalling a backup of the full data. This article will explain you how to remove the gesture.key file.

How to remove the gesture.key file

Android devices store the unlock pattern in the file gesture.key. If we remove this file, the pattern disappears, and we have free access to the mobile or tablet, where we can redefine the security option we prefer.

Deleting this file is not difficult, and we can do it in many devices. We only need to meet two requirements: we must have the mobile or tablet rooted and the USB debugging mode enabled. Otherwise, we cannot access to the file.

USB debugging-en

Having the device rooted means we have root permissions and can install and remove system files and programs that are not accessible by default. In many devices we have to root them if we want these permissions, following a few steps that you can find detailed in “how to root your device.”

The USB debugging mode is used to install files on the device through a PC via USB. In our case we will use it to install ADB (Android Debug Bridge), the program we will use to remove the gesture.key file. To activate this mode, we must go to developer options in the settings menu and activate the USB debugging option.

If we haven’t checked if this option is enabled previously, it is likely that it is not activated by default. However, some Chinese tablets are sold rooted and with the USB debugging mode activated, so even if we haven’t root our device, there is still a chance that we can follow these steps.

adb-en

The next step is to have the ADB installed on our PC, along with the drivers of our device. Having the drivers is essential for the computer to recognize the device, and without these files installed properly we can do nothing. In the Drivers section we will find all necessary files depending on the manufacturer and model of our device.

Now we only need to connect our phone or tablet via USB to our PC and open the ADB console within the platform-tools folder. In the command window we need to copy the following code:

adb shell rm /data/system/gesture.key adb shell reboot

The device will reboot and the pattern will be gone.

The method is simple, but it requires a rooted device and the USB debugging mode enabled. If this is not the case, we will need to format the device. The following article will explain how to do it.