How to unlock Xiaomi if you forget your password: save all data

A forgotten password on a Xiaomi smartphone is a situation that even power users face. The main problem is that most standard unlock methods (such as resetting via Recovery) lead to the removal of all data β€” photos, contacts, messages. However, there are ways to get around the lock without losing information if you act carefully and use the right tools.

In this article, we will discuss 5 working methods of unlocking Xiaomi (including the models Redmi, POCO, Black Shark) that allow you to save data. Importantly, the effectiveness of each method depends on the version of MIUI, the phone model and whether previously enabled features like Find Device or debugging over USB. Let’s start with the most reliable and versatile option – unlock through the Mi Account.

1 Unlocking through Mi Account (official method)

If your Xiaomi has a Mi Account attached (even if you don’t remember your password), this is the safest way to unlock it, and it works on all models, including the Redmi Note 10/11/12, POCO X3/X4, Mi 11/12, provided that the phone is connected to the Internet (via Wi-Fi or mobile network).

Algorithm of action:

  • πŸ“± On the lock screen, tap "Forgot password?" (or Forgot password on English firmware).
  • πŸ”— Select the recovery option via Mi Account (could be called Sign in with Mi Account).
  • πŸ“§ Enter an email or phone number linked to your account, and it will receive a confirmation code.
  • πŸ”‘ Enter the code and follow the instructions to create a new lock password.

⚠️ Note: If you don't remember Mi Account data, try re-accessing it through Xiaomi's official website. Use a backup email or phone number. If your account is unlinked or your phone is not connected to the network, go to the next method.

πŸ’‘

If the screen does not have a button "Forgot password?", try to enter any password 5 times in a row - a link to restore should appear.

Xiaomi modelSupport for Mi AccountInternet is required
Redmi Note 10/11/12βœ… Yes.βœ… Yes.
POCO X3/X4/X5βœ… Yes.βœ… Yes.
Mi 11/12/13βœ… Yes.βœ… Yes.
Black Shark 4/5⚠️ Partially (depends on firmware)βœ… Yes.

2.Use Find Device (Remote Unlock)

Find Device (similar to Google's Find Phone) allows you to remotely unlock Xiaomi if it was activated before locking, which works even without physical access to the phone, but requires:

  • πŸ“Ά Internet connection (Wi-Fi or mobile network).
  • πŸ”„ Included function Find Device in settings (Settings) β†’ Mi Account β†’ Find Device).
  • πŸ“¬ Access to a Mi Account linked to your phone.

Instructions:

  1. Go to i.mi.com and log in.
  2. Select a locked phone from the list of devices.
  3. Click on "Unlock Device" (Unlock Device).
  4. Confirm the action via SMS or email.

⚠️ Note: After remote unlocking, you may need to re-set your fingerprint or face. If Find Device has been disabled, this method will not work.

πŸ“Š What Unlocking Method Have You Tried Before?
Mi Account
Find Device
ADB/Fastboot
Reset via Recovery
Nothing.

3. Unlock through ADB (for advanced users)

The method is suitable if the phone is enabled debugging by USB (USB Debugging) before locking. This is rare, but if you've previously connected your phone to a computer for development or modifications, there's a chance. MIUI 12/13/14 requires:

  • πŸ–₯️ Computers with installed ADB Tools (you can download it here).
  • πŸ”Œ USB-cable (preferably original).
  • βš™οΈ Included debugging by USB developer-setting.

Step-by-step:

  1. Connect the phone to the computer.
  2. Open the command line (Win + R β†’ cmd) and enter: adb devices If the device is determined, go further.
  3. Enter the command to delete the password: adb shell rm /data/system/gesture.key adb shell rm /data/system/password.key adb shell rm /data/system/pattern.key
  4. Reboot your phone: adb reboot

Once the password is reset, it should reset. If no permissions error appears, try root access first (but this is already risky for data).

Install ADB Tools on PC|Download drivers for Xiaomi|Enable debugging on USB (If the phone is not blocked yet)|Prepare original USB-cable-->

4 Unlocking via Fastboot (without data loss)

If USB debugging is disabled but you have access to Fastboot mode, you can try bypassing the lock using special commands.This method does not guarantee 100% data security, but in most cases files remain intact. Suitable for Xiaomi models on Qualcomm processors (for example, Redmi Note 10 Pro, POCO F3).

What you need:

  • πŸ–₯️ Computer with Fastboot Tools installed.
  • πŸ”Œ Cable USB (better-than-original).
  • πŸ“„ File. persist.img For your model (can be found on the forums) XDA Developers or 4PDA).

Instructions:

  1. Turn off your phone and press the Power button + Volume down to log into the Fastboot.
  2. Connect your phone to your computer and check the connection: fastboot devices
  3. Download persist.img for your model and place it in the folder with fastboot.
  4. Enter the command to unlock: fastboot flash persist.img fastboot reboot

⚠️ Attention: Wrong file persist.img may result in loss IMEI Use only proven sources!

What if the Fastboot can’t see the device?
If the fastboot device command doesn’t show your phone, install Qualcomm drivers. HS-USB QDLoader 9008 manually through Windows Device Manager. USB-cable or port (better) USB 2.0).

5. Bypassing the lock via Safe Mode (temporary solution)

If you need to access your phone urgently but don't have to delete your password permanently, try Safe Mode, which disables all third-party apps, including some system locks, and doesn't work on all models, but it's worth a try.

How to turn on Safe Mode:

  1. On the lock screen, press the "Switch off" button (or Power off).
  2. In the menu that appears, press the β€œSwitch Off” option (or Power off) for 3-5 seconds.
  3. Confirm the transition to Safe Mode.

In Safe Mode, try:

  • πŸ”“ Remove password through settings (Settings) β†’ Screen locking).
  • πŸ“ Copy important data to a memory card or cloud.
  • πŸ”„ Reboot the phone in normal mode and try again to unlock.

⚠️ Note: In Safe Mode, some features (such as mobile internet or Wi-Fi) may not work smoothly. Do not remove system applications, this will cause a crash!

6. When nothing helps: extreme measures

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

  1. Recovery resets will delete all data, but it's guaranteed to unlock the phone. To minimize the loss, remove the memory card and SIM before discharge. πŸ”„ Turn off the phone and press the power button. + Loudness up. πŸ“› Choose Wipe Data β†’ Wipe All Data.

Contacting the service center

Xiaomi

Important: On models with a MediaTek chip (e.g. Redmi 9A, POCO M3), a reset via Recovery may result in activation of FRP (Factory Reset Protection) protection, in which case you will need to enter data from the Mi Account that was tied before the reset.

πŸ’‘

If the phone is locked after a firmware or MIUI update, try rolling back to the previous version via Fastboot.Instructions and firmware look for on Xiaomi Firmware Updater.

FAQ: Frequent questions about unlocking Xiaomi

Can I unlock Xiaomi without losing data if I don’t remember Mi Account?
Yes, but the odds are lower. Try the methods with ADB (if debugging was enabled) or Fastboot (if there is a persist.img file for your model). If nothing works, you just have to reset through Recovery, but the data will be lost.
Does Google Account Unblocking Work on Xiaomi?
No. Unlike pure Android phones, Xiaomi does not support unlocking through a Google account.Use only Mi Account or alternative methods from this article.
What if IMEI disappeared after unlocking via Fastboot?
This means that the inappropriate file persist.img was used. To restore the IMEI, you will need to: Download the original persist.img for your model. Swipe it back through Fastboot. If the IMEI is not restored, contact the service center.
Can I unlock Xiaomi with a fingerprint if I forgot my password?
No. The biometrics (fingerprint, face) are tied to the primary password, and if you forget your PIN/pattern lock, fingerprint unlocking will also become unavailable.
How much does it cost to unlock Xiaomi in the service center?
Cost depends on the model and region: πŸ“± Redmi / POCO: 1000–1500 β‚½. πŸ“± Mi / Black Shark: 1500–3000 β‚½. Xiaomi may require phone documents (passport) in official centers + Unofficial services will be unblocked without documents, but the risk of fraud is higher.