Forgotten password on a smartphone is a situation that almost every user has encountered. Android. One careless click, changing your usual PIN code or a long break in using the gadget - and now youโ€™re standing in front of a locked screen, not knowing what to do. The problem is aggravated by the fact that modern smartphones store not only contacts, but also access to banking applications, social networks, and work correspondence. Losing all this because of a forgotten password is not an option.

Fortunately, you can unlock an Android phone even without knowing the passwordthis does not always require a full reset. In this article we will look at all current methods - from official methods through an account Google to technical solutions using the mode Fastboot or Recovery. Important: Some methods will delete your data, so try low-risk options first. If encryption is enabled on the phone (and on new models Samsung, Xiaomi or Google Pixel it is activated by default), the chances of saving files are sharply reduced.

Before we begin, let's answer the main question: Is it possible to unlock the phone without losing data? Theoretically, yes, but only if:

  • ๐Ÿ”“ You have synchronization enabled with your account Google (for devices running Android 4.4 and older).
  • ๐Ÿ“ฑ The phone supports unlocking via Smart Lock (for example, by Bluetooth device or location).
  • ๐Ÿ–ฅ๏ธ You have previously connected your smartphone to a computer with debugging enabled by USB (ADB).

If none of these points apply, get ready to reset. But donโ€™t panic: even after a hard reset, many data (photos, contacts) can be restored from backup copies. Below are step-by-step guide for all scenarios.

1. Unlocking via Google account (for Android 4.4โ€“7.0)

This is the simplest official method, but it works only on older versions of Android (from 4.4 KitKat to 7.0 Nougat). On new devices (Android 8.0+), the function has been removed for security reasons. If your smartphone was released before 2017, try the following:

  1. On the lock screen, enter the wrong password/pattern 5 times in a row.
  2. After the fifth attempt, a message will appear "Forgot your password?" or "Forgot your graphic key?" โ€”click on it.
  3. The system will prompt you to enter the login and password for the account Googlethat was linked to phone.
  4. After successful authorization, the device will be unlocked and you can set a new password.

Important: this method will not work if:

  • ๐Ÿšซ The Internet is turned off on the phone (Wi-Fi or mobile data).
  • ๐Ÿšซ The device was reset to factory settings after the last account linking.
  • ๐Ÿšซ You are using a corporate account (for example, from work or study).
โš ๏ธ Attention: On some firmware (for example, MIUI from Xiaomi or EMUI from Huawei) even on old Android The Google unlock feature may be disabled by the manufacturer. If the button does not appear, proceed to the next method.
๐Ÿ“Š What smartphone do you have?
Samsung
Xiaomi/Redmi
Huawei/Honor
Google Pixel
Another brand

2. Using Smart Lock (unlock by trusted device) is an Android feature that automatically unlocks the phone in โ€œtrustedโ€ conditions: when you are at home, connected to a familiar Wi-Fi network, carry a headset with you, or are near a trusted device (for example, a watch). If you have previously configured this option, there is a chance to bypass the blocking without resetting.

Smart Lock - an Android feature that automatically unlocks the phone in โ€œtrustedโ€ conditions: when you are at home, connected to a familiar Wi-Fi network, carry it with you Bluetooth-headset or are near a trusted device (for example, Android Wear-hours). If you have previously configured this option, there is a chance to bypass the blocking without resetting.

How to check:

  1. Make sure that the phone is connected to the Internet (Wi-Fi or mobile network).
  2. Move the device to a place where it was previously used Smart Lock (for example, home or office).
  3. If the phone recognizes a trusted network or device, it will unlock automatically.
  4. After unlocking, immediately go to Settings โ†’ Security โ†’ Smart Lock and update the settings.

If Smart Lock doesnโ€™t work, try connecting to your phone Bluetootha device that has been added to the trusted list (for example, headphones or a fitness bracelet). Sometimes even a short-term connection helps.

๐Ÿ’ก

To avoid problems in the future, add at least 2-3 trusted devices or locations to Smart Lock. For example, a home Wi-Fi network and a car Bluetooth system.

3. Unlocking via ADB (if USB debugging is enabled)

This method is suitable for advanced users, which were previously activated Developer mode and enabled USB debugging. If you have ever connected your phone to a computer to install firmware or debug applications, there is a chance to unlock the device without losing data.

Instructions:

  1. Connect your phone to the computer via USBcable (preferably original).
  2. Open Command Line (Windows) or Terminal (macOS/Linux) and enter:
    adb devices

    If the device is detected (its serial number appears), proceed further. If not, install drivers for your model.

  3. Enter the commands one by one:
    adb shell
    

    su

    rm /data/system/gesture.key (for a graphic key)

    or

    rm /data/system/password.key (for PIN/password)

  4. Reboot the phone with the command:
    reboot

After the reboot, the lock screen should disappear. Attention: this method does not work on all firmware (especially on new versions Android 10+), as manufacturers are tightening security. If the command su is not executed, then you do not have rights rootand the method will not work.

โš ๏ธ Attention: Deleting files gesture.key or password.key may cause the system to crash if the phone uses data encryption (FBE). On new devices (Android 9+), this method most often results in a requirement to enter a password after a reboot.

4. Reset via Recovery Mode (data loss)

If the previous methods did not help, it remains hard reset โ€”return the phone to factory settings. This method will delete all data from the internal memory (photos, applications, settings), but will restore access to the device. Recovery Mode is available on all Android smartphones, but the button combinations for entering differ depending on the manufacturer.

General instructions:

  1. Turn off the phone (press and hold the power button for 10-15 seconds).
  2. Press the button combination to enter Recovery:
    Manufacturer Button combination
    Samsung Volume up + Power + Bixby (if available)
    Xiaomi/Redmi Volume up + Power
    Google Pixel Volume down + Power
    Huawei/Honor Volume up + Power
    OnePlus Volume down + Power
  3. V menu Recovery Use the volume buttons to select Wipe data/factory reset and confirm the selection with the power button.
  4. After resetting, select Reboot system now.

The phone will reboot and offer to configure it as new. Important: if the device had Encryption is enabled (and on Android 6.0+ it is activated by default), after resetting you may need to enter the old password to decrypt the data. If you do not remember it, the internal memory will remain locked and it will be impossible to restore the files.

Make a backup copy of important data (if the phone reacts in any way)

Charge the phone at least 50%

Find the original USB cable (to connect to a PC if necessary)

Find out the button combination for your model

-->

5. Unlocking via Fastboot (for advanced users)

Mode Fastboot allows you to reflash the phone and execute low-level commands. This method is suitable if:

  • ๐Ÿ”ง You have unlocked bootloader (on most smartphones it is locked by default).
  • ๐Ÿ–ฅ๏ธ You have access to a computer with installed drivers ADB/Fastboot.
  • ๐Ÿ“ฑ You are prepared for possible data loss or even bricking of the device.

Instructions:

  1. Turn off the phone and hold down the combination to enter Fastboot (usually Volume down + Power).
  2. Connect the device to the computer and open Command Prompt.
  3. Check the connection with the command:
    fastboot devices
  4. To reset the password, enter:
    fastboot erase userdata
    

    fastboot erase cache

    or (on some devices):

    fastboot flash userdata userdata.img
  5. Reboot the phone:
    fastboot reboot

On devices with a locked bootloader (for example, most Samsung or Xiaomi smartphones) these commands will not work without first unlocking them. An attempt to execute them can lead to a complete loss of functionality of the phone!

โš ๏ธ Attention: Manufacturers regularly tighten protection against unauthorized access. On new models (Android 11+, even with unlocked bootloader password reset via Fastboot may lead to a requirement to enter the old PIN after a reboot.
What to do if the phone does not turn on after commands in Fastboot?

If after executing the commands the device does not boot (stuck on the logo or the screen is flashing), try:

1. Repeat the command fastboot reboot.

2. Flash the stock firmware via Fastboot (look for instructions for your model).

3. Contact the service center - independent actions may worsen the problem.

6. Contacting a service center: when this is the only option

If none of the above methods work, you can only contact professionals. This is relevant in the following cases:

  • ๐Ÿ”’ The phone uses hardware encryption (for example, Samsung Knox or Google Titan M).
  • ๐Ÿ“ฑ The device is blocked after Find My Device (for example, after theft).
  • ๐Ÿ› ๏ธ You are afraid of damaging the phone by independent actions (especially important for expensive models).

What you need to know before visit to the service:

  • ๐Ÿ“„ Take with you documents confirming the purchase (receipts, warranty card). Without them, some centers will refuse to help.
  • ๐Ÿ’ฐ The cost of unlocking can reach 30โ€“50% of the price of the phone (especially if the motherboard needs to be replaced).
  • โณ Restoring access can take from several hours to a week (depending on the model and complexity of the blocking).

Official service centers Samsung, Xiaomi or Google usually refuse to unlock devices without proof of ownership. In such cases, unofficial workshops help, but the risk of fraud or damage to the phone is higher. Before your visit, check:

  • ๐Ÿ” Does the center have experience working with your model.
  • ๐Ÿ›ก๏ธ Do they provide a guarantee for the service (at least 1-2 weeks).
  • ๐Ÿ’ณ Is payment possible after successful unlocking.
๐Ÿ’ก

If encryption is enabled on your phone and you have forgotten the password, no service center will be able to recover data from the internal memory. The maximum is to return the device to functionality, but the files will be lost.

7. How to avoid blocking in the future

To no longer encounter the problem of a forgotten password, follow these simple rules:

  • ๐Ÿ” Use password manager (for example, Google Password Manager or Bitwarden) for storage PIN codes.
  • ๐Ÿ“ฑ Set up Smart Lock with multiple trusted devices (for example, home Wi-Fi and car).
  • โ˜๏ธ Enable automatic synchronization with account Google (photos, contacts, SMS).
  • ๐Ÿ”„ Regularly create backups via Settings โ†’ System โ†’ Backup.
  • ๐Ÿ“ Write down your PIN code in a safe place (for example, in a notepad or encrypted file).

If you often forget passwords, consider alternative unlocking methods:

  • ๐Ÿ‘ค Face/print recognition finger (but don't give up on the PIN code completely - it's needed for backup access).
  • ๐Ÿ“ Geolocation unlocking (for example, disabling PIN at home).
  • ๐Ÿ”‘ Temporary password (some banking applications offer one-time access codes).

Remember: the most secure password is the one you wonโ€™t forget. Don't use complex combinations unless you're sure you'll remember them. Itโ€™s better to set a simple but unique PIN (for example, associated with an important date) and duplicate it in the password manager.

FAQ: Frequently asked questions about unlocking Android

Is it possible to unlock a phone without losing data if you forgot password?

Theoretically, yes, but only if:

  • On your phone, synchronization with Google (for Android 4.4โ€“7.0) is enabled.
  • You have previously activated ADB and have access to computer.
  • The device supports Smart Lock and is located in a trusted zone.

On new smartphones (Android 8.0+) the chances of saving data are minimal due to hardware encryption.

What to do if after To reset via Recovery, the phone asks for the old PIN?

This means that the device is enabled encryption (FBE or FDE). Without the old password, it is impossible to decrypt the data. Options:

  • Try to enter possible combinations (dates of birth, simple sequences).
  • If the phone supports Fastboot, try flashing the stock firmware (but this will delete all data).
  • Contact the service center - sometimes flashing it using a special one helps equipment.
How to unlock Samsung if you forgot your password and your Google account does not help?

On devices Samsung c Android 8.0+ unlocking via Google is disabled. Alternatives:

  1. Use Find My Mobile (service Samsung): go to findmymobile.samsung.com, log in and select the option "Unblock".
  2. If Find My Mobile is not connected, the only option left is to reset via Recovery or Fastboot (with loss of data).
  3. On new models (Galaxy S21+), a service center with an official Software Samsung.
Will flashing the phone help bypass the lock?

Flashing via Fastboot or Odina (for Samsung) will remove the password, but:

  • ๐Ÿšซ On devices with locked bootloader firmware is impossible without unlocking.
  • ๐Ÿ”’ If encryption is enabled, the data will still remain locked.
  • โš ๏ธ Incorrect firmware can โ€œbrickโ€ phone.

It is better to entrust this to professionals.

Is it possible to recover data after a reset via Recovery?

Partly yes, if:

  • โ˜๏ธ The data was synchronized with Google Account (contacts, calendar, some settings).
  • ๐Ÿ“ฑ You made backups via Samsung Cloud, Mi Cloud or Google Drive.
  • ๐Ÿ’พ Photos and videos were stored on SD card (reset does not affect).

apps like Dr.Fone or EaseUS MobiSaver can restore part files, but only if the internal memory was not overwritten after the reset.