Forgot your pattern key or PIN code for your smartphone? Android screen requires a password, but you can't remember the combination? This situation is familiar to many - according to statistics, every fifth user has blocked himself at least once due to a lost access code. Fortunately, there are several official and alternative methods to remove the login password on Android without data loss or with minimal consequences.

In this article we will look at all the current unlocking methods: from simple (via Google account or Smart Lock) to advanced (ADB commands and reset via Recovery). It is important to understand that the effectiveness of the method depends on Android versions, device models and security settings. For example, on Samsung Galaxy s One UI 5.0 one trick may work, and on Xiaomi Redmi s MIUI 14 another. We have indicated the nuances for each option so that you can choose the best path.

We warn you right away: some methods require preliminary preparation (for example, USB debugging is enabled or a linked Samsung account). If you are reading this article after blocking, skip these methods and go to universal solutions like Hard Reset.

๐Ÿ“Š What smartphone do you have?
Samsung
Xiaomi/Redmi/Poco
Huawei/Honor
Google Pixel
Another brand

1. Unlocking via Google account (Android 4.4 and below)

This method only works for Old versions of Android (up to 5.0 Lollipop inclusive). Modern devices (since Android 6.0 Marshmallows) have made it impossible for users to reset their password through Google due to security vulnerabilities. If your smartphone was released before 2015, try the following:

  1. Enter the wrong password/pattern 5 times in a row.
  2. A message will appear on the screen "Forgot your pattern key?" or "Forgot your password?" โ€”click on it.
  3. Enter the login and password for account Googlethat was linked to the device.
  4. Create a new pattern or PIN code.

โš ๏ธ Attention: On devices with Android 5.1+ this method will not work - Google has removed the function due to the risk of unauthorized access. If you have a modern smartphone, skip to the next section.

Why did Google remove this feature?

In 2015, security researchers discovered that attackers could bypass screen locks through a vulnerability in Google services. After several unsuccessful attempts to enter the password, the system offered to reset the key through the account, but did not check whether the device belonged to the owner. This made it possible to steal data from lost phones. The Android 6.0 function was completely removed, replacing it with more reliable mechanisms like Smart Lock i Find My Device.

2. Using Smart Lock (if the feature has been configured in advance)

Smart Lock is an Android feature that automatically unlocks the device in trusted environments (for example, at home, when connected to a specific Wi-Fi network, or when a trusted device is detected via Bluetooth). If you set it up before lockingthere is a chance to bypass the password:

  • ๐Ÿ“ Trusted places: Bring the phone to the place that you added to Smart Lock (for example, home or work). The device should unlock automatically.
  • ๐Ÿ”— Trusted devices: Connect to your phone via Bluetooth a device that has been added to the trusted list (for example, a smart watch or headphones).
  • ๐Ÿ‘ค Face/voice recognition: If enabled, try unlocking the phone with your voice or face (even if the main method is a PIN code).

To check if Smart Lock is enabled:

  1. If the phone unlocks for even a second, quickly go to Settings โ†’ Security โ†’ Smart Lock.
  2. See what conditions have been added. If there is nothing, the function will not help.
โš ๏ธ Attention: Smart Lock works only if to locks have been configured. If you have never enabled this feature, skip this section. Also note that on some firmware (for example ColorOS from Oppo) Smart Lock may be called "Smart Lock" or "Trusted devices".

3. Unlocking via Find My Device (for devices with a Google account)

Service Find My Device from Google allows you not only to find a lost phone, but also delete all data or lock the device. Unfortunately it is impossible to reset only the password without losing data through this service but you can completely wipe the phone and then restore the data from a backup (if one was created).

Instructions:

  1. Go to the site Find My Device from another device.
  2. Login using the same Google account that is linked to the locked phone.
  3. Select your device in the list (if there are several).
  4. Click "Erase data" ("Erase Device").
  5. Confirm the action. The phone will be reset to factory settings and the password will disappear.

After reset:

  • ๐Ÿ“ฑ Restore data from Google backup (if it was included in Settings โ†’ System โ†’ Backup).
  • ๐Ÿ”‘ Set a new password and write it down in a safe place (for example, in a password manager).
๐Ÿ’ก

If you have Samsung, use the service Find My Mobile (linkinstead of Find My Device). It allows you to unlock the phone without resetting the data if the function "Unlock screen" was activated in advance.

4. Password reset via ADB (requires USB debugging)

The method is suitable for users who enabled USB debugging in advance (Settings โ†’ For developers โ†’ USB debugging). If this function has been activated, you can delete the file with the password by Android Debug Bridge (ADB).

Step-by-step guide:

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

su

rm /data/system/gesture.key

rm /data/system/password.key

rm /data/system/locksettings.db

rm /data/system/locksettings.db-wal

rm /data/system/locksettings.db-shm

reboot

After rebooting, the phone will not require a password. If an error appears "permission denied", then you do not have rights root โ€”in this case the method will not work.

โš ๏ธ Attention: This method does not work on all firmware. On some devices (for example, Xiaomi c MIUI), password files are stored in a different location or protected by additional mechanisms. Also, after deleting files, the pattern key may be reset, but the PIN code for the SIM card will remain.

Make sure that USB debugging was enabled before blocking

Install ADB drivers on your computer

Download the platform Android SDK or portable version of ADB

Connect the phone to the PC with the original cable

Check whether the device is detected by the command adb devices-->

5. Reset via Recovery Mode (Hard Reset)

If no other methods help, it remains hard reset (Hard Reset) through recovery mode (Recovery Mode). This method deletes all data from the phone, including photos, messages and applications, but is guaranteed to remove the lock.

Instructions for most Android devices:

  1. Turn off the phone (hold the power button for 10-15 seconds).
  2. Hold the combination of buttons to enter Recovery:
    • ๐Ÿ“ฑ Samsung: Power + Volume up + Bixby (or Home on older models).
    • ๐Ÿ“ฑ Xiaomi/Redmi: Power + Volume Up.
    • ๐Ÿ“ฑ Huawei/Honor: Power + Volume Up (on some models you need to hold for 10+ seconds).
    • ๐Ÿ“ฑ Google Pixel: Power + Volume Downthen select Recovery Mode.
  • In the Recovery menu, select Wipe data/factory reset (volume button control, confirmation - power button).
  • Confirm the reset by selecting Yes.
  • Once completed, select Reboot system now.
  • Brand Combination for Recovery Features
    Samsung Power + Volume up + Bixby On new models, confirmation may be required via Find My Mobile.
    Xiaomi Power + Volume up On MIUI 12+ reset may require entering the password from the Mi-account.
    Huawei Power + Volume up On some models you need to hold the buttons for 15+ seconds.
    Google Pixel Power + Volume down In the Recovery menu you need to select Wipe data manually.

    โš ๏ธ Attention: On devices with MIUI (Xiaomi) or EMUI (Huawei) after resetting, you may be required to enter your account password Mi-account or Huawei ID. If you do not remember this data, the phone will remain locked even after Hard Reset.

    ๐Ÿ’ก

    Hard Reset is the last option when other methods do not work. It deletes all data, but is guaranteed to remove the lock. If there were important files on the phone, try first removing the SD card (if there is one) or connecting the phone to the PC in Fastboot mode to save the data.

    6. Alternative methods for specific brands

    Some manufacturers offer unique unlocking methods. Here are the most common:

    Samsung: Unlocking via Find My Mobile

    If your Samsung service was turned on Find My Mobile, you can unlock your phone without losing data:

    1. Go on findmymobile.samsung.com.
    2. Login using your Samsung account.
    3. Select a locked device.
    4. Click "Unlock screen" ("Unlock").
    5. Xiaomi: Unlocking via Mi-account

      On phones Xiaomi after Hard Reset you may be required to enter your password Mi-account. If you forgot it:

      • Try to recover your password via account.xiaomi.com.
      • If recovery does not help, contact Xiaomi support with proof of purchase.

    Huawei: Unlocking via HiSuite

    For devices Huawei you can try official utility HiSuite:

    1. Install HiSuite on your computer.
    2. Connect the phone to the PC in mode Fastboot (press Power + Volume Down).
    3. In HiSuite, select "System Restore".
    ๐Ÿ”„ Interfaces and functions may change. For example, Samsung regularly updates Find My Mobileand Xiaomi tightens the unlocking requirements via Mi-account. Before using alternative methods, check the current conditions on the manufacturer's official website.

    7. How to avoid blocking in the future

    To avoid being in a similar situation again, follow these tips:

    • ๐Ÿ” Use password manager (for example, Google Password Manager or Bitwarden) to store PIN codes.
    • ๐Ÿ“ฑ Set Smart Lock to automatically unlock in safe places.
    • ๐Ÿ”„ Regularly create backups backups Settings โ†’ System โ†’ Backup.
    • ๐Ÿ“ง Link to phone Google account i account manufacturer (Samsung, Xiaomi, etc.).
    • ๐Ÿ› ๏ธ Enable USB debugging (Settings โ†’ For developers) in case of emergency unlocking via ADB.

    Also worth remember combinations to enter Recovery for your phone model - this will help you quickly reset the settings if other methods do not work.

    Frequently asked questions (FAQ)

    Is it possible to remove a password from Android without losing data?

    Yes, but only if it was configured in advance Smart Lock, turned on USB debugging or the phone is linked to the manufacturer's account (for example, Samsung or Xiaomi). Otherwise, the only reliable way is Hard Reset, which deletes all data.

    What to do if you forgot the password for Mi-account on Xiaomi?

    Try to recover the password via official website. If this does not help, contact support Xiaomi with your purchase receipt - they can help you unlock the device. On some models (for example, Redmi Note 10), after 30 days of inactivity, the account can be unlocked via SMS.

    Does resetting the password through a call (method with an emergency call) work?

    No, this method has stopped working after Android 5.0 Lollipop. Previously, it was possible to access settings through the emergency call screen, but Google has closed this vulnerability. This trick will not work on modern devices.

    How to unlock a phone if it requires a password after resetting (FRP Lock)?

    This Factory Reset Protection (FRP) is reset protection. To remove the blocking:

    1. Enter the login and password for the last linked Google account.
    2. If you donโ€™t remember the data, restore it via Google Account Recovery.
    3. On Samsung can be used Find My Mobile to bypass FRP.

    โš ๏ธ Without an original account, it is almost impossible to bypass FRP (especially on Android 9+).

    Is it possible to unlock a phone through a service center?

    Yes, but this is a paid service, and not all centers will undertake unlocking without a purchase receipt. Official services (for example Samsung Service or Xiaomi Authorized Center) may require proof of ownership. The cost varies from 1,000 to 5,000 rubles depending on the model.