Forgetting the PIN code for your smartphone is a more common situation than it seems. According to statistics, every fifth Android user has at least once encountered their device being blocked due to the loss of a password, pattern or digital code. The reasons are different: from simple forgetfulness to a child changing the code or accidentally pressing it while cleaning the screen. Fortunately, it is possible to unlock Android without losing data โ€”but only if you act quickly and correctly.

In this article we will look at all current unlocking methodsfrom official (via Google account) to technical (using ADB or Fastboot). Important: on devices with Android 10+ and newer, some methods may not work due to stricter security policies. Efficiency also depends on the phone model - for example, the unlocking algorithms differ between Samsung and Xiaomi . Before you begin, check the battery charge (at least 30%) and prepare a backup copy of important files, if possible.

If you are reading this article on a locked phone through another device, do not panic. Most methods do not require special skills, and the risk of data loss is minimal if done correctly. Let's start with the simplest solutions.

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

This is the most universal and safest method, but it works only on devices up to Android 10 (inclusive). On new versions of the OS, the "Forgot your password?" function. in the lock window has been removed for security reasons. If your phone was released before 2019, try the following:

  1. On the lock screen, enter the wrong PIN code 5 times in a row.
  2. After the fifth attempt, a message will appear: Forgot the pattern key? or Forgot your password? โ€”click on it.
  3. Enter the login and password from Google accountthat was linked to the phone.
  4. Follow the system instructions to create a new PIN code.

โš ๏ธ Attention: If you reset Google password after locking your phone, this method will not work. The system requires current account datathat were relevant at the time of blocking. Also, the method is not suitable for devices with corporate security policies (for example, work phones).

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

If the โ€œForgot your password?โ€ window does not appear, it means:

  • ๐Ÿ“ฑ Your Android 10+ -function has been removed.
  • ๐Ÿ”’ Phone is not linked to a Google account (for example, after a reset).
  • ๐Ÿ›ก๏ธ Enabled additional protection (for example, Samsung Knox or MIUI Protection).

2. Using the "Find My Device" function (Google)

Service Find My Device from Google allows you not only to track your phone, but and remotely unlock it or reset the settings. The method works on any version of Android, but requires:

  • ๐Ÿ”น Linked Google account with rights administrator.
  • ๐Ÿ“ถ Active Internet connection (Wi-Fi or mobile network).
  • ๐Ÿ”‹ Phone turned on (charge not lower than 5%).

Instructions:

  1. Go to the site Find My Device from another device.
  2. Select a blocked phone from the list of devices.
  3. Click Block device (yes, even if it is already blocked).
  4. Enter new temporary password (it will replace the old PIN code).
  5. Confirm the action. After 1-2 minutes, the phone will be unlocked.

โš ๏ธ Attention: If the phone is turned on. function Reset protection (Factory Reset Protection, FRP), after unlocking you may be required to enter your Google account information. Make sure you remember them!

Phone charge >10%

Phone is connected to the Internet

Do you know the login/password from linked Google account

Do not disturb mode is disabled on the phone -->

3. Unlocking via Recovery Mode (reset to factory settings)

If the previous methods did not work, it remains hard reset via Recovery Mode. This will delete all data from the phone, but will restore access. The method is suitable for all Android models, including new ones.

Instructions for most devices:

  1. Turn off the phone (press the power button for 10โ€“15 seconds).
  2. Hold down the combination of buttons to enter Recovery:
    • Samsung: Power + Volume Up + Bixby (or Home on older models).
    • Xiaomi/Redmi: Power + Volume up.
    • Google Pixel, OnePlus: Power + Volume down.
  • In the menu Recovery select Wipe data/factory reset (volume button control, confirmation - power button).
  • After reset, select Reboot system now.
  • โš ๏ธ Attention: On some phones (for example, Huawei or Sony) after the reset you may need to enter the data Google accountthat was linked before the lock. If you donโ€™t remember it, the phone will turn into a โ€œbrickโ€ - use instructions for bypassing FRP below.

    Phone model Combination for Recovery Features
    Samsung Galaxy S23/S22 Power + Volume up After reset, requires entering PIN from SIM card
    Xiaomi Redmi Note 12 Power + Volume up Menu in Chinese - look for the hieroglyph""
    Google Pixel 7/8 Power + Volume down Supports unlocking via Fastboot
    Huawei P50/P60 Power + Volume up Requires account entry Huawei ID after reset
    What to do if you canโ€™t log into Recovery?

    If the button combination does not work, try:

    1. Connect the phone to charge for 10 minutes - sometimes a low battery blocks the input.

    2. Use ADB commands to force a reboot into Recovery (needs a PC).

    3. On some Samsung you first need to hold Volume up + Bixby, then connect the USB cable.

    4. Unlocking via ADB (for advanced users)

    If on your phone USB debugging is enabled (USB Debugging, you can delete the file with the PIN code via Android Debug Bridge (ADB). The method works without data loss, but requires preparation:

    Necessary conditions:

    • ๐Ÿ–ฅ๏ธ Computer with installed ADB drivers.
    • ๐Ÿ”Œ USB cable (preferably original).
    • ๐Ÿ”ง Enabled USB debugging before blocking.

    Instructions:

    1. Connect the phone to the PC.
    2. Open the command line (Win + R โ†’ enter cmd).
    3. Enter the commands in order:
      adb shell
      

      su

      rm /data/system/gesture.key

      rm /data/system/password.key

      reboot

    4. After reboot, the phone will be unlocked.

    โš ๏ธ Attention: On Android 11+ this the method may not work due to changes in the password storage structure. Also, some manufacturers (for example, Samsung) block access to system files even through ADB.

    ๐Ÿ’ก

    If USB debugging has been disabled, but the phone is recognized by the PC as a โ€œmedia device,โ€ try using the app Dr.Fone or Tenorshare 4uKey โ€”they sometimes bypass the lock through exploits in the firmware.

    5. Bypass FRP (Factory Reset Protection) after resetting

    If you reset the phone via Recovery, but after turning on it requires data entry Google accountthat you don't remember is FRP blocking. It appears on all devices with Android 5.1+if the phone was linked to an account. You can bypass it in several ways:

    Method 1: Through Wi-Fi settings (for Android 8โ€“10)

    1. On the Google account entry screen, press Add Wi-Fi network.
    2. Enter any text in the network name field, select it and click Share โ†’ Gmail.
    3. In the Gmail window that opens, click Add account and sign in new Google account.
    4. Return to the phone settings - the blocking will be removed.

    Method 2: Using the app FRP Bypass APK (for Android 11+)

    This method requires downloading a special APK file to your phone via an OTG cable or SD card. Detailed instructions:

    • ๐Ÿ“ Download FRP Bypass APK (for example, FRP_Hijacker.apk) to a flash drive.
    • ๐Ÿ”Œ Connect the flash drive to your phone via OTG adapter.
    • ๐Ÿ“ฑ On the lock screen, tap Emergency call โ†’ dial #0 and quickly tap on the SIM card notification.
    • ๐Ÿ”— In the SIM settings, select Add APN โ†’ Name โ†’ insert any text and select it.
    • ๐Ÿ“ค Click Share โ†’ Files and install the downloaded APK.
    • ๐Ÿ”“ Launch the application and follow the instructions to bypass FRP.

    โš ๏ธ Attention: Using third-party APK files may not be safe. Download them only from trusted sources (for example, XDA Developers). On new models Samsung (2023+ years) and Google Pixel FRP bypass is complicated - it may be required soldering equipment to flash the EFS partition.

    6. Contacting the service center: when nothing helps

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

    • ๐Ÿ” Phones with hardware encryption (for example, Samsung Knox or Google Titan M).
    • ๐Ÿ“ฑ Devices where USB debugging is disabled there is no access to Recovery.
    • ๐Ÿ›ก๏ธ Smartphones with corporate security policy (for example, work phones).

    What is required to unlock in the service:

    • ๐Ÿ“„ Document confirming the purchase (receipt, warranty card).
    • ๐Ÿ†” Owner's passport.
    • ๐Ÿ’ณ Payment for the service (from 1,000 to 5,000 rubles depending on the model).

    โš ๏ธ Attention: Unofficial services may offer "unlocking" through flashing, but this:

    • ๐Ÿšซ Will void the warranty.
    • ๐Ÿ”’ May lead to loss of IMEI (the phone will become a โ€œbrickโ€).
    • ๐Ÿ“ต Risks damaging the module eSIM (on new models).

    Official centers Samsung, Xiaomi and Google in Russia they provide an unlocking service using a passport. The average period is 1-3 days. On phones with Qualcomm processors (for example, OnePlus, Oppo) it is sometimes possible to restore access via EDL mode, but this requires special equipment.

    ๐Ÿ’ก

    The official service is the only legal way to unlock phones with hardware encryption (for example, Samsung Knox or Google Pixel with Titan M).

    7. How to prevent blocking in the future

    To no longer encounter the problem of a forgotten PIN code, follow these tips:

    Security settings:

    • ๐Ÿ”‘ Use biometric unlocking (fingerprint or facial recognition) as a backup method.
    • ๐Ÿ“ Write down the PIN code in password manager (for example, Google Password Manager or KeePass).
    • ๐Ÿ”„ Set up automatic backup automatic backup Settings โ†’ System โ†’ Backup.

    Actions when access is lost:

    • ๐Ÿ“ฑ Check immediately Find My Device โ€”the phone may still be online.
    • ๐Ÿ”‹ Do not let the battery discharge below 20% - this will complicate unlocking.
    • ๐Ÿ“ก If the phone is connected to Wi-Fi, do not disconnect the router - this will break the connection with Find My Device.

    โš ๏ธ Attention: Never use simple PIN codes like 1234 or 0000. On Android 12+, the system automatically requires a complex password if signs of hacking are detected (for example, repeatedly entering the wrong code). Also avoid. data-i="286">โ€”they are easier to spy on or forget. graphic keys โ€” they are easier to spy on or forget.

    ๐Ÿ’ก

    Set up Smart Lock in Settings โ†’ Security โ†’ Smart Lock. This feature automatically unlocks the phone in trusted places (for example, at home) or when connected to a trusted device (for example, a smart watch).

    FAQ: Frequently asked questions about unlocking Android

    Is it possible to unlock a phone without losing data?

    Yes, but only if:

    • The phone is turned on USB debugging (method with ADB).
    • You Android 9.0 or older and your phone is linked to a Google account ("Forgot your password?" method).
    • You are using Find My Device to change the password.

    On new devices (Android 11+) without losing data, unlocking is almost impossible due to enhanced protection.

    What to do if the phone requires the old password after resetting?

    This FRP blocking. Solutions:

    • Enter the data Google accountthat was linked before reset.
    • Use bypass through Wi-Fi settings (see section about FRP).
    • Contact the service center with documents for the phone.

    โš ๏ธ Do not try to enter random accounts - after 5 unsuccessful attempts, the phone will be blocked for 24 hours.

    Does unlocking through a call (method with an emergency call) work?

    On Android 10 and later this method doesn't workPreviously, it was possible to access the settings through an emergency call, but the vulnerability is closed. On older versions (Android 8โ€“9) sometimes it helps:

    1. On the lock screen, press Emergency call.
    2. Dial *#06# (IMEI check).
    3. Quickly click on the error message icon and try opening the settings.

    Success - less than 10%. Samsung and Xiaomi does not work.

    Is it possible to unlock the phone via a SIM card?

    No. SIM card PIN code and phone PIN code are different things. Even if you enter the PUK code to unlock the SIM, it will not restore access to the device. The exception is phones with two-factor authentication via SIM (for example, some models Huawei for corporate clients), but this is rare.

    How much does it cost to unlock at a service center?

    The cost depends on the model and method:

    Service Cost (โ‚ฝ) Term
    Reset through the official service (according to your passport) 1 000โ€“3 000 1โ€“3 days
    FRP bypass (unofficial) 2 000โ€“5 000 2โ€“6 hours
    Flashing (risk of losing IMEI) 3 000โ€“8 000 1 day

    โš ๏ธ Official centers Samsung i Google do not charge for unlocking documents. Unofficial services may inflate prices.