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

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:

  1. After 5 failed attempts to enter a password on the screen will appear button Forgot the password?.
  2. Click on it and select the recovery option via Mi Account.
  3. Enter the login (email or phone number) and password from the account.
  4. 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 modelSupport for Mi AccountInternet is requiredUnlock 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:

  1. Turn off the phone with a long press on the power button.
  2. Hold the Power and Volume button down at the same time until the MI logo appears.
  3. Release the buttons and wait for the download in Safe Mode (there will be an inscription at the bottom of the screen).
  4. 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:

  1. Connect your phone to your PC through USB-cable.
  2. Open the command prompt (cmd on Windows or Terminal on macOS/Linux).
  3. 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
  4. 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.
πŸ“Š Have you ever used it? ADB unlockable?
Yes, successfully.
Yeah, but it didn't work.
No, but I want to try.
No, it's too complicated.

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:

  1. Go to i.mi.com and log in to your Mi Account.
  2. In the Devices section, select a locked phone.
  3. Press Find the device. β†’ Unlock.
  4. 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?
If the phone is not displayed in Mi Cloud, check: 1. Is sync enabled in the phone settings (Settings β†’ Mi Account β†’ Mi Cloud β†’ Sync). 2. Is the phone connected to the Internet (Wi-Fi or mobile data). 3. Has your account information (email, password) changed after the last sync. If the device is still not visible, try rebooting the phone - sometimes this helps restore the connection to Xiaomi servers.

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:

  1. Turn off the phone and press Power + Volume down to log into the Fastboot.
  2. Connect the device to the PC and open the command line.
  3. 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:

  1. On the lock screen, press Emergency Call.
  2. Enter any number and press the call.
  3. During the call, quickly go to Contacts β†’ Settings β†’ Import / Export.
  4. 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:

  1. Official Xiaomi service: Provide proof of purchase (check, box) – the service center can unlock the device without data loss (paid).
  2. 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).

FAQ: Frequent questions about unlocking Xiaomi

Can I unlock Xiaomi without losing data if I don’t remember the username from Mi Account?
If you forgot the data from Mi Account, you can restore access through the attached email or phone number on the account.xiaomi.com page. If the account is not restored, there are no official ways to unlock without resetting the data - you will have to use ADB (if debugging was enabled) or contact the service.
Does the method work with ADB on Xiaomi 13 Pro with MIUI 14?
Xiaomi 13 Pro with MIUI 14 ADB It only works if: previously included debugging USB (USB Debugging.The device is identified in the list of adb devices. The Bootloader is not locked (checked by the fastboot oem device-info command, ADB won't help.
What happens if you enter your Xiaomi password 10 times wrong?
After 10 failed attempts to enter a password on most Xiaomi models, you can: Lock input for 30 seconds (on MIUI 12-13). Lock for 1-5 minutes (on MIUI 14+). Some devices (for example, Redmi Note 11) may offer to reset the phone to factory settings. To avoid a hard reset, use the methods from this article before the 10th attempt.
Can I unlock Xiaomi via Google Account (like on older Android)?
No. Since MIUI 9 (2017), Xiaomi has removed its Google Account unlock support, which now only works on very old models (like the Redmi 4X) with firmware below MIUI 8.
How much does it cost to unlock in the Xiaomi service center?
The cost of unlocking without data loss in official Xiaomi service centers varies: 1 500–3 000 β‚½ β€” for Redmi models and POCO. 3 000–5 000 β‚½ β€” for flagships (Xiaomi) 13/14). Free, if you have a warranty phone and you provide a check, check the prices by phone, as they depend on the region and the policy of the service center.