How to unlock Xiaomi phone if you forgot your password: all ways without resetting settings

The forgotten password on Xiaomi smartphone is a situation that even experienced users face. The main problem is that a standard reset via Recovery erases all data, which is not always acceptable. Fortunately, there are methods to unlock without losing files, photos and applications. In this article, we will discuss 7 proven methods relevant to the models of 2020-2026, including Redmi Note 12, POCO X5, Xiaomi 13 and others.

It's important to understand that the effectiveness of the method depends on the version of MIUI, the status of the Mi Account and the security settings. For example, on devices with a blocked bootloader, some of the ways will not work. We will specify the limitations for each option and provide alternatives. If you are not sure about your technical skills, you should contact the service center - the wrong actions can lead to complete loss of data or "bricking" of the device.

1 Unlocking through Mi Account (official method)

The safest method is to use a linked Mi Account, which works if:

  • πŸ“± The phone is connected to the Internet (Wi-Fi or mobile network).
  • πŸ”‘ Remember the username and password from Mi Account.
  • πŸ”„ Find Device has been activated in the settings.

Instructions:

  1. On the locked screen, tap Forgot your password? (or Forgot password?).
  2. Select Sign in via Mi Account.
  3. Enter your email/phone and password from your account.
  4. Confirm unlocking via SMS or email (if two-factor authentication is enabled).

If the buttons Forgot your password? no, try entering any password 5 times in a row - a prompt should appear. Some firmware (MIUI 14+) may require a stable Wi-Fi connection to verify your account.

⚠️ Note: If you have previously untied your Mi Account or dropped your phone via Fastboot, this method will not work, and it is not available on custom firmware devices (for example, LineageOS).

πŸ“Š What kind of smartphone you Xiaomi?
Redmi Note Series Series Series
POCO
Xiaomi (flagship)
Black Shark
Other

2.Use of Fastboot Mode (for advanced users)

The method is suitable if:

  • πŸ”§ The phone has unlocked the bootloader (bootloader).
  • πŸ’» Access to a computer with drivers installed ADB/Fastboot.
  • πŸ“‚ Installed utility Mi Flash Unlock Tool (official from Xiaomi).

Step-by-step:

  1. Turn off the phone. Press the Power button + Volume down to enter the Fastboot.
  2. Connect the device to the PC via USB.
  3. Start the Mi Flash Unlock Tool and log in to your Mi Account.
  4. Follow the instructions of the program to unlock the bootloader (it may take 72-168 hours to wait if the account is new).
  5. After unlocking, run your phone through Fastboot with data saved (team: fastboot flash userdata userdata.img).

This requires technical knowledge. Errors in the firmware stage can result in loss of IMEI or damage to the userdata partition.

Install ADB/Fastboot drivers on PC|

Download Mi Flash Unlock Tool from official website|

Check bootloader status (unblocked/locked) |

Backup of important data (if possible) |

Prepare original USB-cable (do not use cheap analogues)-->

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

If the phone has previously been debugged USB (USB Debugging, you can delete the password file through ADB. This method works for MIUI 12-14 and does not require resetting.

What you need:

  • πŸ–₯️ Computer with installed ADB Tools.
  • πŸ”Œ Original. USB-cable (important for stable connection).
  • πŸ“± Battery-charged phone >30%.

Instructions:

  1. Connect the phone to the PC.
  2. Open the command line (cmd) and type: 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
  3. After resetting, the password will be reset.

If the su command doesn't work, then there's no root permission on the phone, so try an alternative method:

adb shell am start -n com.android.settings/.ChooseLockGeneric

⚠️ Attention: MIUI 14 and newer Xiaomi tightened protection. Deleting password files can result in a cyclical reboot or requiring you to enter an old password after a reboot. Before using the method, check the firmware version in the settings (Settings) β†’ The phone. β†’ Version. MIUI).

4 Unlocking through Xiaomi Service Center (official method)

If the self-help methods didn’t work, contact a Xiaomi authorized service center.This is the only legal way to unlock without losing data if:

  • πŸ“„ You have checks or a warranty card on your phone.
  • πŸ†” You can confirm possession of the device (for example, through the IMEI).
  • πŸ”’ The phone is not on the blacklist (stolen/lost).

Procedure:

  1. Find the nearest service center on mi.com.
  2. Provide documents confirming the purchase.
  3. Pay for the service (the cost varies from 1000 to 3 000 rubles depending on the model).

The unlock period is 1 to 5 business days, and in some cases, the service center may offer a free unlock if the phone is warranty-related and the problem is caused by a software failure.

What if the service center refuses to help?
If you are denied unlocking, try: 1. Contact another service center (sometimes the policies differ). 2. Provide additional documents (for example, a box from a phone with a serial number). 3. Write in support of Xiaomi through the official website or social networks (the answer comes within 24-48 hours). 4. Use alternative methods from this article, if you are willing to risk the data.

5. Unlock via TWRP (for root devices)

If your Xiaomi has a custom TWRP recap, you can manually delete your password files, a method that is suitable for users who previously obtained root rights.

Instructions:

  1. Turn off the phone. Press the Power button + Volume up to enter TWRP.
  2. Select Advanced β†’ File Manager.
  3. Go to /data/system/ and delete files: gesture.key password.key locksettings.db locksettings.db-wal locksettings.db-shm

Reboot β†’ System

If after restarting the phone requires you to enter the old password, try:

  • πŸ”„ Repeat the procedure, but instead of deleting files, rename them (for example, add the.bak extension).
  • πŸ“‚ Delete the folder /data/system/ completely (risky, may cause failures!).
MethodRequired. root/TWRPData retainedDifficultyRisks.
Mi Account❌ No.βœ… Yes.⭐⭐ (easily)It doesn't work without the Internet.
ADB❌ No (but I need debugging)βœ… Yes.⭐⭐⭐ (middle-of-the-road)It may not work on the new MIUI versions.
Fastbootβœ… Yes (bootloader unlocked)⚠️ Partially.⭐⭐⭐⭐ (difficult)Risk of "bricking"
TWRPβœ… Yes.βœ… Yes.⭐⭐⭐⭐ (difficult)It may disrupt the system.
Service centre❌ No.βœ… Yes.⭐ (easily)Paid service, requires documents

6. Alternative methods (for older models)

Xiaomi devices until 2018 (e.g. Redmi 4X, Mi A1) sometimes run security holes to bypass locks, one of which is an emergency call:

  1. On the lock screen, tap the emergency call.
  2. Enter #4636## (test menu opens).
  3. Return to the home screen via the Home button (if it is active).
  4. Set a new PIN/password in the settings.

Some firmware works bypassing through Google Account:

  • πŸ”‘ Enter any password 5 times until the Forgot Password button appears?.
  • πŸ“§ Choose Log in via Google and use your account details.

These methods don’t work on MIUI 12 or later due to tighter security policies, and they can also work unstable on Google’s patch firmware (e.g., Android One devices).

πŸ’‘

If you often forget passwords, set up biometric unlocking (fingerprint or facial recognition) in Settings β†’ Password and security, which will speed up access to your phone and reduce the risk of locking.

7 What should I do if nothing helps?

If all of these methods fail, there are two options:

  1. Hard reset via Recovery (loss of all data).
  2. Contacting the specialists in unlocking (paid, but with a guarantee of data preservation).

For reset via Recovery:

  1. Turn off the phone.
  2. Press the Power button + Volume up to enter Recovery.
  3. Choose Wipe Data β†’ Wipe All Data.
  4. Confirm the action and restart the device.

If you decide to contact a β€œprivate master”, make sure that:

  • πŸ›‘οΈ They have reviews on independent sites (for example, Yandex.Services or 2GIS).
  • πŸ’° The cost of the service is adequate (average price is 1,500-4000 rubles).
  • πŸ“„ The Master provides a guarantee for work (at least 7 days).

πŸ’‘

If the phone is encrypted (by default on MIUI 13+), resetting via Recovery will lead to a complete loss of access to internal memory, even if you remember the password later, in which case data recovery is possible only through specialized services (cost from 5 000 rubles).

FAQ: Frequent questions about unlocking Xiaomi

Can you unlock Xiaomi without losing data if USB debugging has been disabled?
No, no debugging on. USB (USB Debugging) or unlocked bootloader methods such as ADB The only options are: Use Mi Account (if tied), go to the service center, reset your phone via Recovery (data loss).
Why does the phone still ask for the old password after deleting the password files via TWRP?
This is because of the fact that new versions MIUI Passwords are not only stored in files. gesture.key/password.key, but also in an encrypted vault. /data. Solutions: Try to delete the entire folder /data/system/locksettings. Refuse the phone with data saved (if there is a backup userdata). TWRP (data formatting).
How much does it cost to unlock Xiaomi in the service center?
The cost depends on the model and the reason for the lock: Redmi Note 10/11: 1000-1 500 rubles. Xiaomi 12/13: 1,800-2 500 rubles. POCO F4/F5: 1,500-2000 rubles. Devices with damaged bootloader: 2,500-4000 rubles. If the phone warranty and lock occurred due to the fault of the firmware, unlocking can be free.
Can I unlock Xiaomi through IMEI?
No, IMEI is used only to identify a device on the network and is not connected to unlocking the screen. Fraudsters often offer "IMEI unlock" is a scam. The only legitimate way to use IMEI is to confirm ownership of the phone at the service center.
What if the phone does not turn on after unlocking via Fastboot?
This is a sign of damage to the bootloader or firmware. Try: Swipe your phone through the Mi Flash Tool in Clean All mode. EDL-Mode (requires an authorized Xiaomi account) Contact a service center to restore firmware. If your phone has turned into a brick, don't try to sew it yourself, this can make the problem worse.