Forgot the password on the Xiaomi phone โ€“ how to unlock without losing data: 5 proven ways

A forgotten password on a Xiaomi smartphone is a situation that one in five users encounter. The main problem is that most standard unlock methods (such as resetting via Recovery) lead to a complete data cleanup. But what if important photos, correspondence or work documents are stored on the phone? In this article, we will discuss 5 unlock methods that will help save information, from official Mi Account tools to advanced technical solutions using ADB and Fastboot.

It's important to understand that the effectiveness of the method depends on the phone model, the version of MIUI, and whether sync functions have been activated before. For example, on devices with MIUI 14 and later, some loopholes are closed, but there are workarounds, and we will also tell you what actions are guaranteed to lead to data loss so that you do not repeat other people's mistakes.

1 Unlocking through Mi Account (official method)

The most secure and recommended method for Xiaomi is to use a tied Mi Account, which works if:

  • ๐Ÿ“ฑ The phone is connected to the Internet (via Wi-Fi or mobile network).
  • ๐Ÿ”‘ You remember the username and password from Mi Account that was tied to the device.
  • ๐Ÿ“ฒ Find Device has been activated in the settings.

If the conditions are met, follow the instructions:

  1. On the locked screen, tap the button Forgot password? (or Forgot password? on English firmware).
  2. Select the recovery option through Mi Account.
  3. Enter the login (email or phone number) and password from the account.
  4. Confirm unlocking via SMS or email (if two-factor authentication is enabled).

Once authenticated successfully, the system will prompt you to create a new password or graphical key, and all the data on the phone will remain intact.

โš ๏ธ Note: If you do not remember the data from Mi Account, do not try to find a password - after 5 unsuccessful attempts, the account will be blocked for 24 hours.

๐Ÿ“Š How often do you use your Mi Account to sync?
Constantly.
Backup only.
Never set up.
I don't know what it is.

2. Unlock through ADB (for advanced users)

The method is suitable if the phone is enabled debugging by USB (USB Debugging) and access to a computer. It's one of the few ways to get around a lock without losing data, but it requires technical skills.

You'll need:

  • ๐Ÿ–ฅ๏ธ Computer with installed Xiaomi drivers and tools ADB.
  • ๐Ÿ“ฑ USB-cable (preferably original).
  • ๐Ÿ”ง Knowledge of the command line (or willingness to follow instructions).

Step-by-step:

  1. Connect your phone to your PC via USB.
  2. Open the command prompt (cmd on Windows or Terminal on macOS/Linux).
  3. Enter the command to check the connection: adb devices If the device appears in the list, go further.
  4. Delete the file with the password (works on the MIUI beforehand 12): adb shell rm /data/system/gesture.key or PIN-code: adb shell rm /data/system/password.key
  5. Reboot your phone: adb reboot

After the reboot, the lock screen will disappear, but you will need to reconfigure the pattern lock or PIN in the security settings.

Install Xiaomi drivers on PC|Download ADB Tools (platform-tools)|Enable debugging on USB on the phone (if previously available)|Prepare original USB-cable-->

โš ๏ธ Attention: MIUI 13/14 This method may not work because of the increased protection, so try the alternative command: adb shell am start. -n com.android.settings/.ChooseLockGeneric It will call the password change menu directly.

3. Use of Fastboot mode (for devices with unlocked bootloader)

If your Xiaomi has a bootloader Unlocked, you can try bypassing the lock via Fastboot mode.This method is suitable for models Redmi Note 10/11, POCO F3/F4, Xiaomi 11/12 and others where the bootloader has been officially unlocked.

Algorithm of action:

  1. Turn off the phone.
  2. Press the Power + Volume buttons down to log into the Fastboot.
  3. Connect the device to the PC and open the command line.
  4. Check the connection: fastboot devices
  5. Delete the password file (root rights required): fastboot erase userdata Attention! This command will delete all user data, but on some firmware you can do without it using: fastboot flash userdata userdata.img (where userdata.img is a partition backup).

If the bootloader is locked, this method will not work โ€“ it will require official unlocking through the Mi Unlock Tool, which will take up to 720 hours (30 days) of waiting.

What to do if the loader is blocked?
If Bootloader is blocked, Fastboot unlocking is not possible without Xiaomi's official permission. You will have to: 1. Request to unlock via Mi Unlock. 2. Wait 7-30 days (depending on the model). 3. Repeat the procedure after unlocking. This will result in a complete data reset!

4. Bypass locking through Safe Mode (hidden mode)

A little-known way is to log into Safe Mode, where all third-party applications, including the screen blocker, are disabled, and this method works on MIUI 10-13 and some custom firmware.

Instructions:

  1. On the locked screen, hold the Power button until the turn off menu appears.
  2. Tap and hold the option to turn off (Power off) โ€“ will be prompted to go to Safe Mode.
  3. Confirm the transition. The phone will reboot.
  4. In Safe Mode, try to remove or disable the lock app (like Screen Lock) through the settings.

If deletion is not possible, try installing a new screen locking app (like AppLock) and configuring it as your primary. After rebooting in normal mode, the old password may reset.

๐Ÿ’ก

If Safe Mode is not activated, try an alternative: When the off menu appears, quickly tap the Reboot icon 3-5 times in a row. On some models, this calls Safe Mode.

5. Access Restoration through MIUI backup

If you have previously backed up through Settings โ†’ Additional โ†’ Backup, you can try to restore the system to a state where the password has not yet been set. This method is suitable for devices with MIUI 12+ and active sync with Mi Cloud.

How to do this:

  1. On the locked screen, tap the Emergency Call.
  2. Type ##4636## and it will trigger a test menu.
  3. Go to Usage statistics and find the Backup app.
  4. Run recovery from the latest backup (if you have it in the Mi Cloud).

After recovery, the password may be reset, but there is no guarantee - it all depends on whether the security settings were saved in the backup.

Unlocking methodData retentionConditions requiredDifficulty
Mi Accountโœ… Yes.Linked account, Internetโญ
ADBโœ… Yes.Debugging by USB, PC, skillsโญโญโญ
FastbootโŒ No (usually)Unlocked loaderโญโญโญโญ
Safe Modeโœ… Yes.MIUI 10โ€“13, no hardware encryptionโญโญ
Backup copyโš ๏ธ Partially.Active backup in Mi Cloudโญโญ

What NOT to do when unlocking Xiaomi

Some actions are guaranteed to cause data loss or damage the device.

  • ๐Ÿšซ Recovery (Wipe Data) โ€“ This will completely clear the internal memory.
  • ๐Ÿšซ Installation of custom firmware without backup - the risk of "bricking" the phone.
  • ๐Ÿšซ Using unofficial services ("unblock in 5 minutes") is a fraud or virus.
  • ๐Ÿšซ Multiple times the wrong password is entered MIUI 14 This can lock the device permanently.

If none of the methods worked, contact the Xiaomi service center with proof of purchase. Official partners can unlock the device without losing data (but this is a paid service, the cost is from 1,500 to 5 000). โ‚ฝ).

๐Ÿ’ก

If your phone has File-Based Encryption (FBE) enabled, most unlock methods will not work without losing data. This applies to all devices on MIUI 13/14 with Android 11+.

FAQ: Frequent questions about unlocking Xiaomi

Can you unlock Xiaomi without losing data if USB debugging has been disabled?
Unfortunately, no. Without USB Debugging, the ADB or Fastboot methods won't work, and you'll only have Mi Account options or call a service center.
Will resetting via Mi Cloud help if your phone is not connected to the internet?
No. Recovery through Mi Cloud requires an active Internet connection, and if Wi-Fi and mobile are disabled, this method is not available.
What if, after unlocking through ADB, the phone asks for a password again?
This means that the password file was not deleted completely. Try repeating the command or using an alternative method: adb shell su -c "rm /data/system/locksettings.db" If this does not help, it is possible that the device has hardware encryption enabled.
Can you unlock Xiaomi through Google Account like on older Android?
No. Starting with MIUI 9 (Android 7+), Xiaomi removed its unlock support through Google Account. Now it only works on very old models (like the Redmi 3S or Mi 4).
How much does it cost to officially unlock at Xiaomi Service Center?
Cost depends on model and region: For budget smartphones (Redmi) 9A/10A) โ€” 1 500โ€“2 500 โ‚ฝ. For flagships (Xiaomi) 13/14, POCO F5) โ€” 3 000โ€“5 000 โ‚ฝ. If you need to replace the board (with hardware locks) - from 7 000 โ‚ฝ. Contact official service centers only โ€“ informal workshops may use illegal methods.