A forgotten pattern on an Android smartphone is a situation familiar to many. Instead of accessing your device as usual, you see a lock screen asking you to enter a combination that you canโ€™t remember. If standard recovery methods via a Google account do not work (for example, due to a disconnected Internet or an outdated version of Android), all that remains is to unlock the phone via a connection to a computer.

In this article we will analyze 5 proven ways to reset a pattern key using a PC - from simple solutions without data loss to a radical reset to factory settings. Each method is suitable for different scenarios: when you need to save files, when the phone is not detected by the system, or when you need to bypass the lock on older versions of Android. Important: some methods require preliminary configuration (for example, USB debugging mode is enabled), therefore the effectiveness of the method depends on the preparedness of your device.

Before you begin, make sure you have:

  • ๐Ÿ–ฅ๏ธ Computer with Windows, macOS or Linux OS
  • ๐Ÿ“ฑ USB cable (original or high-quality analogue)
  • ๐Ÿ”‹ Phone battery charge at least 30%
  • ๐Ÿ“‚ Backup of important data (if perhaps)
๐Ÿ“Š What smartphone do you have?
Samsung
Xiaomi
Huawei
Google Pixel
Another brand

1. Unlocking via ADB (only if USB debugging is enabled)

The method works if on the phone USB debugging mode was activated in advance (Settings โ†’ For developers โ†’ USB debugging). This is the most gentle method, as it allows you to delete the key file without resetting the data.

Instructions:

  1. Connect the phone to the PC via USB.
  2. Open the command line (Windows) or terminal (macOS/Linux) and enter:
adb shell

rm /data/system/gesture.key

reboot

After rebooting the device, the pattern will be reset, but all data will remain in place.

Install ADB drivers on PC|

Download the Android SDK Tools platform|

Enable USB debugging on the phone (if possible)|

Connect the phone to the PC with the original cable-->

โš ๏ธ Attention: On new versions of Android (10+), this method may not work due to changes in the system key storage. In this case, a full reset will be required.

2. Using Recovery mode to reset to factory settings

If USB debugging is not enabled, it remains hard reset via Recovery. This method will delete all data from the phone, including applications, photos and settings, but is guaranteed to unlock the device.

How to enter Recovery:

  • ๐Ÿ“ฑ Turn off the phone.
  • ๐Ÿ”˜ Press the button combination (depending on the model):
    • Samsung: Volume up + Power + Home
    • Xiaomi/Redmi: Volume up + Power
    • Google Pixel: Volume down + Power
  • ๐Ÿ–ฑ๏ธ In the Recovery menu, select Wipe data/factory reset (volume button control and power).

After the reset, the phone will reboot to its original state. This method is suitable for any versions of Android, but requires knowledge of button combinations for your model.

What to do if Recovery does not open?

If the phone does not respond to button combinations, try:

1. Connect the charger for 10โ€“15 minutes (sometimes a low battery blocks the entry to Recovery).

2. Use special utilities to force login (for example, Fastboot for devices with an unlocked bootloader).

3. Contact the service center if the hardware buttons are faulty.

3. Unlocking via Fastboot (for devices with an unlocked bootloader)

The method is suitable for phones with unlocked bootloader (bootloader). Usually these are devices that previously had custom firmware installed. If the bootloader is locked, this method will not work.

Step-by-step guide:

  1. Install Fastboot on PC (included in the Android SDK).
  2. Connect your phone to mode Fastboot (press Volume down + Power with the device turned off).
  3. In the command line, run:
fastboot devices

If the phone is detected, enter:

fastboot erase userdata

fastboot reboot

This command will reset the user data, including the pattern. After rebooting, the phone will be like new.

โš ๏ธ Attention: On some models (for example, Huawei or Sony), unlocking the bootloader is officially prohibited and may lead to loss of warranty.

4. Unlocking apps (Dr.Fone, Tenorshare 4uKey)

If manual methods seem complicated, you can use specialized apps. They automate the process, but often require payment. Popular solutions:

  • ๐Ÿ› ๏ธ Dr.Fone โ€” Unlock (Android): supports most brands, but does not work on new versions of Android 12+.
  • ๐Ÿ”“ Tenorshare 4uKey for Android: removes pattern, PIN and fingerprints, but resets the device.
  • ๐Ÿ“ฑ iMyFone LockWiper: suitable for Samsung and LG, saves data in some cases.

How to use:

  1. Download and install the app on your PC.
  2. Connect your phone via USB.
  3. Follow the instructions on the screen (usually you need to select the device model and confirm the reset).
app Cost Data saving Supported brands
Dr.Fone ~$40 No Samsung, Xiaomi, Huawei, Google
Tenorshare 4uKey ~$30 No All popular brands
iMyFone LockWiper ~$35 Partially (for Samsung only) Samsung, LG, Sony
๐Ÿ’ก

Before purchasing the app, check whether your phone model is supported. Many utilities offer a free compatibility check on the official website.

5. Contacting the service center: when nothing helps

If all of the above methods did not work, all that remains is to contact authorized service center. This is relevant for:

  • ๐Ÿ“ฑ Phones with a locked bootloader (for example, Huawei or Xiaomi linked to an account).
  • ๐Ÿ”’ Devices with hardware encryption (some models Samsung Knox).
  • ๐Ÿ“… Phones released after 2020 (they have enhanced protection against reset via PC).

Service centers use special equipment (for example, JTAG or ISP), which allows you to reset the key without losing data. However, the cost of such a service can reach 30โ€“50% of the price of the phone, and the warranty for the device will be voided.

โš ๏ธ Attention: Do not trust โ€œhandicraftโ€ workshops offering unlocking for 500โ€“1000 rubles. Unqualified intervention can damage the phone.

Comparison. methods: which one to choose?

To determine the best method, evaluate the following criteria:

  • ๐Ÿ”„ Data saving: ADB only (if debugging is enabled) or service center.
  • ๐Ÿ’ป Difficulty: apps are simpler than manual commands.
  • ๐Ÿ’ฐ Cost: free (ADB/Recovery) vs. paid utilities (~$30โ€“40).
  • โณ Time: resetting via Recovery takes 5โ€“10 minutes, contacting the service takes 1โ€“3 days.

Critical information: On phones with Android 9+ and with File-Based Encryption enabled, resetting the pattern via ADB or Recovery will lead to the loss of all data, even if you did not format the memory manually. This is due to the fact that the encryption key is stored in the same area as the pattern password.

๐Ÿ’ก

If encryption is enabled on the phone, the only way to save the data is to contact a service center with JTAG/ISP equipment.

FAQ: Frequently asked questions about resetting the pattern code

Is it possible unlock the phone without losing data if USB debugging is not enabled?

No. Without first setting up debugging or an unlocked bootloader, all methods other than the service center will result in a data reset. The exception is some models Samsung with the function Find My Mobile (Samsung account required).

Why after resetting via Recovery the phone asks to enter the old PIN?

This is due to the function Factory Reset Protection (FRP)which is activated on Android 5.1+. After the reset, you need to enter the details of the Google account that was linked to the phone. If you do not remember the password, you will need to bypass FRP (a separate procedure).

Do unlock apps work on Android 13?

Most apps (for example, Dr.Fone or Tenorshare) do not support new versions of Android due to enhanced protection. For Android 12+, only a reset via Recovery or a service center is effective.

Is it possible to unlock the phone through a computer if it does not turn on?

No. If the phone does not respond to charging or does not boot (black screen, bootloop), hardware repair will be required. In such cases, data is usually not restored.

How to avoid blocking in the future?

We recommend:

  • Use PIN code instead of a pattern key (itโ€™s easier to remember).
  • Activate Smart Lock (trusted locations, Bluetooth devices).
  • Regularly create backups via Google Drive or Samsung Cloud.
  • Write passwords to managers (for example Google Password Manager or KeePass).