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 (for example, through hard reset) 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 legal ways to unlock your data, from official Mi Account tools to advanced technical solutions using ADB.
It's important to understand that success depends on the device model, the version of MIUI, and whether recovery features have been previously enabled. For example, on the new Xiaomi 13/14 with MIUI 15, some methods may not work due to tightened security policies. We tested all methods on current firmware (2026) and indicated which models they are suitable for.
1 Unlocking through Mi Account (official method)
The most reliable and recommended way Xiaomi is to use a tied account Mi Account, which works on all devices where previously synced, and does not require technical skills, the main condition is that the phone must be connected to the Internet (via Wi-Fi or mobile network).
How it works:
- After 5 failed attempts to enter a password on the screen will appear button Forgot the password?.
- Click on it and select the recovery option via Mi Account.
- Enter the login (email or phone number) and password from the account.
- Confirm unlocking via SMS or email (depending on security settings).
- β It works on: Redmi Note 12/13, Xiaomi 12T/13/14, POCO F5/X5 etc. MIUI 12β15.
- β Not suitable if: account is not tied, no access to email/SMS, device not connected to the network.
- β οΈ Note: If you have previously changed your Mi Account password, additional verification may be required via backup email.
π‘
If the button "Forgot your password?" does not appear, try to enter any password 5 times in a row - the forced system will display the recovery option.
| Xiaomi model | Support for Mi Account | Internet is required | Unlock time. |
|---|---|---|---|
| Xiaomi 14 Pro | β Yes. | β Yes. | 1-2 minutes |
| Redmi Note 12 | β Yes. | β Yes. | 2-3 minutes |
| POCO X5 Pro | β Yes. | β Yes. | 1-2 minutes |
| Xiaomi Mi 11 Lite | β Yes. | β Yes. | 3-5 minutes |
2.Use Safe Mode to bypass the pattern lock
If your Xiaomi has a pattern lock installed (not a PIN or password), you can try bypassing the lock via Safe Mode.This mode loads the system without third-party apps, which sometimes allows you to temporarily disable the screen lock.
Instructions:
- Turn off the phone with a long press on the power button.
- Hold the Power and Volume button down at the same time until the MI logo appears.
- Release the buttons and wait for the download in Safe Mode (there will be an inscription at the bottom of the screen).
- Try unlocking the screen with a standard gesture (if no key is requested) or delete the lock file via Settings β Apps β All Apps β Lock screen.
β οΈ Attention: On new models (MIUI 14+) Safe Mode may not disable the screen lock, and it also doesn't work if you're installed. PIN password.
Turn off the phone completely |
Make sure the battery charge is > 30%|
Prepare the charger (in case of a long load)|
Try the method only on the pattern lock
-->
3. Unlock through ADB (for advanced users)
If the phone has previously been enabled debugging mode USB (USB Debugging, you can delete the lock file via ADB (Android Debug Bridge: This method requires a computer and minimal command line knowledge, but retains all the data.
Step-by-step:
- Connect your phone to your PC through USB-cable.
- Open the command prompt (cmd on Windows or Terminal on macOS/Linux).
- Enter the commands in order: adb devices (should display your device) adb shell su rm /data/system/gesture.key or for PIN/password: rm /data/system/password.key
- Reboot your phone with command: reboot
- π§ Works on: All models with unlocked bootloader and enabled USB Debugging.
- β Not suitable if: debugging by USB Unactivated, bootloader locked, device not detected in adb devices.
- π‘ Critical: On Xiaomi with MIUI 13+ The lock file can be stored elsewhere. /data/system/locksettings.db.
4. Recovery via Mi Cloud (if synchronization is enabled)
If you're syncing with Mi Cloud on your phone, you can try resetting your password remotely, which works even without physical access to the device, but requires that the phone be connected to the Internet.
How to do this:
- Go to i.mi.com and log in to your Mi Account.
- In the Devices section, select a locked phone.
- Press Find the device. β Unlock.
- Confirm the action via SMS or email.
β οΈ Note: Remote unlock may be disabled on some models due to Xiaomi's security policy, such as the Xiaomi 13 Ultra with MIUI 14 This method is not stable.
What if the Mi Cloud canβt see the device?
5. Password reset via Fastboot (for unlocked bootloader)
If your Xiaomi bootloader is unlocked, you can reset your password through Fastboot mode without losing data. This method is technically more complicated, but effective when other methods do not work.
Instructions:
- Turn off the phone and press Power + Volume down to log into the Fastboot.
- Connect the device to the PC and open the command line.
- Enter the commands: fastboot devices (should display your device) fastboot erase userdata Attention! This command deletes user data, but on some firmware the password is reset without being completely cleaned. fastboot reboot
- π§ Works on: Devices with unlocked bootloader (for example, after official unlocking via Mi Unlock Tool).
- β Risks: On some models (MIUI 14+) The fastboot erase userdata command can lead to a complete reset.
- π οΈ Alternative: Try fastboot erase locksettings β it only removes lock settings.
π‘
Before using Fastboot, make sure that the bootloader is unlocked. Check this by using the fastboot oem device-info command - if there is a line Device unlocked: true in the answer, you can continue.
6. Alternative methods (for older models)
Xiaomi devices older than 2019 (e.g. Redmi Note 7, Mi 9) sometimes run vulnerabilities that allow you to bypass the lock without losing data.
How it works:
- On the lock screen, press Emergency Call.
- Enter any number and press the call.
- During the call, quickly go to Contacts β Settings β Import / Export.
- Select Import with SIM and try to return to the home screen.
β οΈ Note: This method is closed in MIUI 12+ It only works on old firmware, and on new devices, it can lead to account suspension for suspicious activity.
What do you do if nothing helps?
If all of these methods fail, there are two options:
- Official Xiaomi service: Provide proof of purchase (check, box) β the service center can unlock the device without data loss (paid).
- Hard Reset: It will clean the phone completely, but it will return access. To do this, press Power + Volume up and select Wipe Data from the Recovery menu.
Before visiting the service center:
- π Prepare documents confirming possession of the phone.
- π Charge the device to at least 50% β the service may require the phone on.
- π Check by phone whether your service center provides a data-free unlocking service (not all centers do this).