How to reset your password to Xiaomi without losing data: step-by-step instructions

The forgotten password on Xiaomi is a situation that one in five users face. The main problem: a standard reset via Recovery Mode erases all data β€” photos, messages, contacts and installed applications. But there are legal ways to unlock that allow you to save information. In this article, we will discuss 5 proven methods that are relevant to the models of Redmi, POCO and Mi based on MIUI 12-14 and HyperOS.

It’s important to understand that the effectiveness of the method depends on the firmware version, the device model and the presence of a tied Mi Account. For example, on the Xiaomi 13 Pro with HyperOS, one algorithm will run, and on the Redmi Note 8 with MIUI 12.5 – another, we will describe each option in detail, specify the limitations and warn against common errors that lead to complete data loss or β€œbricking” of the device.

1 Unlocking through Mi Account (official method)

The most reliable and recommended method Xiaomi uses is a tied Mi Account, which works if:

  • πŸ“± Device connected to the Internet (Wi-Fi or mobile network).
  • πŸ”‘ You remember the username and password from your Mi Account (or you can restore them).
  • πŸ”„ Find Device has been activated in the settings.

Algorithm of action:

  1. On the lock screen, tap Forgot Password? (or Forgot Password?).
  2. Select Sign in via Mi Account and enter your account details.
  3. Confirm unlocking via SMS or email (if two-factor authentication is enabled).
  4. Set a new password or pattern lock.

⚠️ Note: If the device was purchased from hand and the previous owner did not untie his Mi Account, this method will not work).

πŸ“Š What Unlocking Method Have You Tried Before?
Mi Account
Hard Reset
ADB
Bypassing through Fastboot
I've tried nothing.

2. Password bypass through ADB (for users with USB debugging)

The method is suitable if the smartphone is enabled debugging by USB (USB Debugging) and access to a computer. It's one of the few ways that you can guarantee that you can save all the data, but you need to prepare it.

What you need:

  • πŸ–₯️ Computer with installed Xiaomi drivers and package ADB.
  • πŸ”Œ USB-cable (preferably original).
  • βš™οΈ Included debugging by USB in the developer settings (Settings) β†’ The phone. β†’ Version. MIUI (tap) β†’ For developers β†’ Debugging by USB).

Instructions:

1. Connect your smartphone to your PC.


2. Open the command line (Windows) or the terminal (macOS/Linux).




3. Enter the commands in order:




adb shell




su




rm /data/system/gesture.key (for pattern lock)




or




rm /data/system/password.key (for PIN/password)




4.Reboot the device: adb reboot

Once the reboot is done, the lock screen will disappear. Importantly, if the USB debugging was not enabled in advance, this method will not work, and some models (such as the POCO F5) may require root access.

What if the ADB can’t see the device?
Make sure the drivers are installed correctly (use Mi). PC Try another one. USB-cable or port. On some Windows systems, disabling driver signatures (test mode) helps).

3. Password reset via Fastboot (without data loss on some firmware)

The method is suitable for devices with an unlocked bootloader. It allows you to reset your password without affecting user data, but it does not work on all models. For example, on the Redmi Note 10 Pro with MIUI 13, the success rate is ~70%, and on the Xiaomi 12T with HyperOS - less than 30%.

Step-by-step:

β˜‘οΈ Preparing for reset via Fastboot

Done: 0 / 4
  1. Download Fastboot firmware for your model (for example, tissot_global_images_... for Mi A1).
  2. Unpack the archive in a folder without Cyrillic characters.
  3. Open the Mi Flash Tool, select the folder with the firmware.
  4. Connect the phone in Fastboot mode (clamp Volume down + Power until the bunny with a hat appears).
  5. In the Mi Flash Tool, select the Clean all and lock option (this is important!), then click Flash.

⚠️ Warning: Do not use the Clean all option without lock - this will lead to locking the bootloader and loss of data! After the procedure, the device will restart without a password, but all files will remain in place.

Xiaomi modelProbability of successRequires unlocking bootloader
Redmi Note 8/985%Yes.
POCO X3/X460%Yes.
Mi 11 Lite40%Yes.
Xiaomi 13/1420%Yes.

4.Use of Safe Mode (for third-party launchers)

If you have a side launcher on your device (like a Nova Launcher or Apex Launcher), you can try bypassing the lock via Safe Mode, which works because all third-party applications, including the screen blocker, are disabled in Safe Mode.

How to activate Safe Mode:

  1. Press the power button until the shutdown menu appears.
  2. Tap and hold the option to Turn Off (or Power off) before a request to switch to Safe Mode appears.
  3. Confirm action. The device will restart.

After downloading in safe mode:

  • πŸ”“ Remove or disable the blocking app (if it is third-party).
  • πŸ”„ Restart the device in normal mode.
  • πŸ”‘ Set a new password.

⚠️ Attention: On new versions MIUI And HyperOS, this is a method that's often blocked by the system. If you have a password left after you reboot, try other ways.

πŸ’‘

If Safe Mode doesn’t help, try connecting your smartphone to your PC and delete /data/system/locksettings.db via ADB. This will only work if USB debugging is enabled.

5. Official unlock via Mi Unlock (for locked devices)

If you bought your smartphone from hand and you were tied to someone else's Mi Account, the only legal way to unlock it is to use Mi Unlock, which is guaranteed to work, but requires:

  • πŸ“„ Documents confirming the purchase (check, contract of sale).
  • ⏳ Wait 7-14 days for the application to be considered.
  • πŸ’³ Payment for services (from $10. $50 depending on the model).

The unlocking process:

  1. Go to the Mi Unlock page and create a request.
  2. Attach scans of documents and IMEI devices (you can find out via *#06#).
  3. Pay for the service (a link to the payment will come after prior approval).
  4. Wait for the letter with the instructions for unlocking.

⚠️ Warning: Do not use "grey" unlock services (e.g. via AliExpress or Telegram) They are often fraudulent or exploit vulnerabilities that can permanently lock the device (Red State status in Mi Cloud).

Frequent Mistakes and How to Avoid Them

When trying to reset a password, users often make critical errors that lead to data loss or device failure.

  • πŸ”‹ Battery discharge during the procedure: If the device turns off during reset via Fastboot or Recovery, it could cause partition damage /data. Always make sure the charge is higher. 50%.
  • πŸ”„ Use of informal firmware. Installation of custom ROM (For example, LineageOS) without unlocking the bootloader leads to bootloop ( looped reboot).
  • πŸ“± Attempting to bypass the "holes" in MIUI. Many YouTube β€œlife hacks” (such as TalkBack) have stopped working after the attack. MIUI 12.Not only will they not help, they can trigger the Anti-Rollback.

If you are not sure of your actions, it is better to contact an authorized Xiaomi service center. The cost of unlocking there will be ~ 1500-3,000 rubles, but this guarantees the safety of data and the device’s performance.

πŸ’‘

None of these methods guarantee 100% data retention, but always back up important files through Mi Cloud or Google Drive in advance.

FAQ: Answers to Frequent Questions

Can I reset my password to Xiaomi without losing data if USB debugging is turned off?
Not if the debugging is on USB (USB Debugging) was not enabled in advance, then it is almost impossible to get around the lock without losing data.The only chance is to use the tied Mi Account (section 1) or official unlock through Mi Unlock (section 5).
Why does the phone ask for an old password after reset via Fastboot?
This happens if you choose the wrong mode in the Mi Flash Tool, instead of Clean all and lock, Save user data or Clean all was chosen, in which case repeat the procedure strictly following the instructions in section 3.
Can I unlock Xiaomi with service codes (##)?
No, service codes (e.g. ##7780##) on Xiaomi do not work for password resets; they are designed to test hardware components and do not affect screen locking.
What if photos and contacts are missing after unlocking?
If data is lost, check: Mi Cloud (Settings) β†’ Mi Account β†’ Mi Cloud. Backups in Google Photos or Google Contacts. Folder. DCIM You can use programs like DiskDigger or Recuva to recover deleted files, but the chance of success depends on whether the data was overwritten.
How to protect yourself from data loss in the future?
To avoid such situations: πŸ” Use biometric unlocking (fingerprint or face) in addition to the password. ☁️ Enable automatic backup in Settings β†’ Google β†’ Backup. πŸ“ Write down your Mi Account password in a secure location (e.g. Google Password Manager). πŸ”§ Check regularly if the debugging is included USB (Settings β†’ For developers).