Forgot the password on Xiaomi: how to unlock the phone without losing data

Forgetting your smartphone password is a difficult situation, but it is not a hopeless one, especially if you are talking about Xiaomi phones, where the manufacturer has provided several ways to restore access, the main thing is not to panic or try to guess the combination dozens of times: after 5-10 unsuccessful attempts, the device can lock up for 24 hours or completely erase all data.

In this article, we will look at all the current Xiaomi unlocking methods (including Redmi, POCO, Black Shark models), from the simplest to the most technically complex. Importantly, the effectiveness of the method depends on the version of MIUI, the phone model and whether previously included features like Find Device or debugging on USB. Some methods will save your files, others will lead to a complete reset. Choose carefully!

If you are reading this article on a locked phone through another gadget, check immediately if it is connected to the Internet (Wi-Fi or mobile network), which is critical for most recovery methods.

⚠️ Warning: Methods using Fastboot or ADB If you've never connected your phone to a firmware computer, you'd better go to Xiaomi's service center. Wrong actions can turn your smartphone into a brick».

1 Unlocking with Mi Account (the safest way)

This method works if the phone previously had a Mi Account attached (even if you don’t remember the password from it). Xiaomi allows you to reset the screen lock via the web interface, but with important restrictions:

  • πŸ“± The phone must be connected to the Internet (via Wi-Fi or mobile network).
  • πŸ”„ The device must be enabled with the function Find Device (find the device).
  • πŸ”’ Mi Accounts should not be blocked for suspicious activity.

Step instructions:

  1. Go to account.xiaomi.com from a computer or other phone.
  2. Sign in with the same account as the locked device, and if you forget your password, restore it via email or phone number.
  3. From the menu, select Find Device β†’ find your phone in the list.
  4. Press Unlock and confirm the action.

βœ… If it goes well, the phone will unlock within 5-10 minutes.

⚠️ Warning: If you want to unlock your Mi Account phone and ask for an old password, try resetting it.

πŸ“Š Have you ever used the Find Device feature on Xiaomi?
Yeah, often.
Yes, but only in emergencies.
No, I didn't know she existed.
I tried it, but it didn't work.

2. reset password through recovery (Hard Reset)

If Mi Account is not tied or Find Device is disabled, the radical method is a complete reset, which erases all data on the phone (photos, contacts, messages), but is guaranteed to unlock the device.

How to make Hard Reset on Xiaomi:

  1. Turn off the phone with a long press of the power button.
  2. Press Volume Up + Power at the same time and hold for 10-15 seconds until the Mi logo appears.
  3. From the Recovery menu, select the language (usually English or Chinese).
  4. Go to Wipe Data β†’ Wipe All Data and confirm the action.
  5. After reset, select Reboot to reboot.

⚠️ Important: On some models (Redmi Note 10 Pro, POCO X3 Pro and later, after a reset, you may need to enter data from the Mi Account that was previously tied. This is anti-theft protection (Mi Cloud Lock). If you do not remember the username / password, you will not be able to unlock the phone without contacting Xiaomi in support.

Turn it off. SIM-card and memory card (if any)

Charge your phone at least 50%

Prepare data from Mi Account (if tied)

Download the firmware for your model (in case of errors)-->

3. Unlock through ADB (for advanced users)

The method is suitable if the phone was previously enabled debugging USB (USB Debugging. It's rare, but if you've ever connected a device to a computer for firmware or debugging, there's a chance.

What you need:

  • πŸ–₯️ Computer with installed Xiaomi drivers (you can download on the official website).
  • πŸ”Œ USB-cable (original, do not damage the connector!).
  • πŸ“¦ Utility. ADB (is part of Android SDK).

Instructions:

  1. Connect your phone to your PC and open the command line (Win + R β†’ cmd).
  2. Enter the command to check the connection: adb devices If the device is displayed – go further.
  3. Delete the password file (works on MIUI 10–14): adb shell rm /data/system/gesture.key adb shell rm /data/system/locksettings.db adb shell rm /data/system/locksettings.db-wal adb shell rm /data/system/locksettings.db-shm
  4. Reboot your phone: adb reboot

After the reboot, the password will reset, but on newer models (MIUI 15+), this method may not work due to enhanced protection.

πŸ’‘

If the adb device command doesn’t show your phone, try reinstalling drivers or using another one. USB-Sometimes it helps to switch the connection mode in the notification curtain (from Charging to File TransferΒ»).

4. Unlock via Fastboot (for tech-savvy)

If ADB didn't help or USB debugging was disabled, you can try resetting your password through Fastboot mode, which is more complicated, but it works even without debugging enabled.

⚠️ Warning: Wrong commands in Fastboot could lead to loss IMEI If you're not sure, don't risk it!

Instructions:

  1. Turn off the phone and press Volume Down + Power to log into the Fastboot.
  2. Connect your device to your PC and check for detection: fastboot devices
  3. Erase the password section (not working on all models!): fastboot erase userdata fastboot erase locksettings
  4. Reboot the phone: fastboot reboot

On some devices (Redmi 9, POCO M3), after this procedure, you will need to flash the phone again through the Mi Flash Tool.

What if Fastboot can’t see the phone?
If the fastboot device team returns an empty list: 1. Check if the Xiaomi Fastboot drivers are installed (you can download from xiaomiflashtool.com). 2. Try another one. USB-cable (preferably original). 3. Disable the antivirus - it can block the connection. 4. Restart the PC and phone then try again.

5. Contact the Xiaomi Service Center

If all of these methods fail, the last option is the official service, and Xiaomi can unlock the phone if you have:

  • πŸ“„ Check or warranty card (proof of purchase).
  • πŸ†” Passport holder (to confirm identity).
  • πŸ”‘ Data from Mi Accounts linked to the device.

The cost of the service varies from 1,500 to 5,000 rubles depending on the model and region, and in some cases, it may be necessary to flash the device, which cancels the warranty.

βœ… Pros: Guaranteed result without risk of damaging the phone.

❌ Cons: Long wait (from 3 days) and possible costs.

6.How to avoid blocking in the future

To avoid being in this situation again, follow these simple tips:

  • πŸ” Use a fingerprint or facial recognition as an additional way to unlock.
  • πŸ“§ Attach Mi Account and enable Find Device in Settings (Settings) β†’ Mi Account β†’ Find Device).
  • πŸ“± Regularly create backups of important data in Mi Cloud or on PC.
  • πŸ“ Write your password to a secure location (e.g., Google Password Manager or KeePass).

If you are afraid to forget the pattern lock, install a spare key. PIN-code in security settings (Settings) β†’ Lock screen β†’ Password. β†’ Spare. PIN).

πŸ’‘

Even if you’ve never been blocked, turn Find Device on in your Mi Account settings. This will take 2 minutes, but save you hours of nerves in case you lose your password or have your phone stolen.

Comparison of Xiaomi Unlocking Methods

MethodAre the data stored?Mi Account requiredDifficultySuitable for
Through Mi Account (Find Device)βœ… Yes.βœ… Yes.⭐All models with MIUI
Hard Reset (Wipe Data)❌ No.❌ No (but may be required after resetting)⭐⭐All models.
ADB (delete gesture.key)βœ… Yes.❌ No.⭐⭐⭐MIUI 10–14 with debugging enabled
Fastboot (erase locksettings)❌ No.❌ No.⭐⭐⭐⭐Technically savvy users
Service centre❓ Depends on the case.βœ… Yes (proof of possession)⭐⭐⭐Any other model, including new ones

FAQ: Frequent questions about unlocking Xiaomi

Can you unlock Xiaomi without losing data if USB debugging is disabled?
Unfortunately, no. Without debugging enabled or a Mi Account tied, the only reliable way is to reset through Recovery, which will delete all data. If the phone has been enabled cloud backups (Mi Cloud or Google Drive), some of the information (contacts, photos) can be recovered after unlocking.
What if after Hard Reset, the phone asks for an old password?
This means that the device has activated the protection of Mi Cloud Lock. You will need to enter data from Mi Account, which was associated with the phone. If you do not remember the username / password, try to restore it on account.xiaomi.com. If the account is not restored, contact the service center with documents on the phone.
Does ADB unlock work on Xiaomi with MIUI 15?
Starting with MIUI 14 and later, Xiaomi has tightened the protection of system files. The method of removing gesture.key or locksettings.db may not work. The alternative is to use Fastboot or official service utilities like Mi Flash Unlock, but they require unlocking the bootloader, which will reset all data.
How much does it cost to unlock Xiaomi in the service center?
The cost depends on the model and the reason for blocking: Redmi (budget models): 1,500-2,500 rubles. Xiaomi (flagships): 3000-5 000 rubles. additionally, there may be a fee for firmware (if required): + 1000-2000 rubles. In official Xiaomi service centers, the price is fixed, in informal ones it can vary. Always ask for a preliminary estimate!
Can you unlock Xiaomi through Google Account like on older Android?
No. Starting with Android 5.0 Lollipop (and all versions of MIUI), the unlock function through Google Account has been removed for security reasons. This method now only works on very old smartphones (until 2015 release). For modern Xiaomi, use Mi Account or other methods from this article.