How to unlock Xiaomi if you forgot your password: 3 working ways through your computer

Forgotten password on Xiaomi is a situation that even experienced users face. SMS-The code doesn't work, the only reliable option is unlocking through the computer. In this article, we'll discuss three official ways to return access to the device without losing data (in some cases) or with a complete reset.

It is important to understand that the procedure depends on the model of the smartphone, the version. MIUI For example, on new devices (after 2021) with a linked account, unlocking via Fastboot can require up to 720 hours of waiting. ADB data-free.

Before you start, check:

  • πŸ”Œ Do you have any originals? USB-cable (not all cables support Fastboot data transfer)
  • πŸ’» Computer on Windows 10/11 MacOS (Linux requires additional drivers)
  • πŸ“± The battery level of the smartphone (minimum 30%, otherwise the process will be interrupted)

If you are not sure of your actions, it is better to contact the Xiaomi service center - improper manipulations can lead to a complete lock of the bootloader (bootloader) or damage to the firmware.

1 Unlocking through Mi Unlock Tool (official method)

This is the most reliable method approved by Xiaomi, but it requires a tied Mi Account and waiting time (72 to 720 hours) Suitable for most models, including the Redmi Note 10/11/12, POCO X3/X4, Mi 11/12.

Algorithm of action:

  1. Download Mi Unlock Tool from the official website (the version must match your OS).
  2. Install Qualcomm or MediaTek drivers (depending on the smartphone processor).
  3. Transfer the phone to Fastboot mode: turn off the device, then press Power + Volume down.
  4. Connect your smartphone to your PC and start the Mi Unlock Tool.
  5. Sign in with the same Mi Account that is linked to your phone.

After that, the program will show a waiting timer. For example, for new devices it can be 168 hours (7 days), for older models it can only be 72 hours. At the end of the period, press Unlock, and the bootloader will unlock. You can then flash custom recovery (for example, TWRP) and reset the password.

⚠️ Warning: If you haven't previously linked your Mi Account to your phone, this method won't work. β„–2 or β„–3.

Download the official utility|Install drivers for your processor|Link your Mi Account to your phone in advance|Wait 3 to 30 days (depending on the model)|Have originality. USB-cable-->

2. Password reset via Fastboot (without waiting)

This method works if you have a bootloader unlocked or are ready to unlock it. It works on most Xiaomi devices, but requires an ADB and Fastboot installation on your PC.

Instructions:

  1. Install Google’s Platform Tools (includes adb and fastboot).
  2. Transfer your phone to Fastboot mode (as in the method) β„–1).
  3. Open the command prompt (cmd) in the folder with Platform Tools and type:

fastboot oem unlock


fastboot flashing unlock

If the bootloader is already unlocked, run the command to reset:

fastboot erase userdata


fastboot erase locksettings

Once rebooted, the phone will be reset to factory settings and the password removed, a method that doesn't work on devices with a locked bootloader without waiting (as in the method). β„–1).

Xiaomi modelDoes it support unlocking via Fastboot?Whether waiting is required
Redmi Note 9/10/11Yes.72-720 hours
POCO F3/F4Yes.168 hours
Mi 10/11 UltraYes.360 hours
Redmi 9A/9CNo (Mi Account required)β€”

⚠️ Note: Some models (e.g. Redmi) K40 or Mi 12) after the command fastboot oem unlock phone may require you to enter a password from the account Mi, even if you do not remember it.

Redmi Note 10/11/12|POCO X3/X4/X5|Mi 11/12/13|Redmi 9/9A/9C|Another model-->

Password bypass through ADB (without loss of data)

This is the only way that sometimes allows you to unlock Xiaomi without resetting data, and it only works if the phone is debugging over USB and you have previously confirmed access from that computer.

Procedure:

  1. Connect your phone to your PC and open the command line in the folder with ADB.
  2. Enter a command to check the connection:

adb devices

If the device is displayed, do:

adb shell


su




rm /data/system/gesture.key




rm /data/system/locksettings.db




rm /data/system/locksettings.db-wal




rm /data/system/locksettings.db-shm




reboot

Once you reboot, the password will be reset, and if the su command doesn't work, you don't have root permissions, and this method won't work.

What if the ADB can’t see the device?
If the adb device command returns a blank list, try: 1. Reinstall Xiaomi drivers manually through Device Manager. 2. Use another. USB-cable (preferably original). 3. Enable Transfer Files mode (MTP) on your phone (if it's on). 4. Try another port USB (better USB 2.0, because USB 3.0 is sometimes incompatible with ADB).

πŸ’‘

If you have Mi Cloud sync enabled, after resetting your password, check the MIUI/Backup/AllBackup folder on your phone – there you can save backups of SMS and contacts.

4 Unlocking through Recovery and EDL modes

If the previous methods didn’t work, there are two options: reset via Recovery (with loss of data) or firmware via EDL (emergency mode), the first method is easier, but not always available, the second requires special equipment.

Reset via Recovery:

  1. Turn off the phone.
  2. Press Power + Volume Up to Enter Recovery.
  3. Select Wipe Data β†’ Wipe All Data (control – volume buttons, confirmation – power button).

This way you delete all the data, including photos and apps. If Recovery requests a password, go to the firmware via EDL.

Firmware via EDL:

This method requires:

  • πŸ”§ Special cable. EDL (or circuitry)
  • πŸ’Ύ Official firmware for your model (download from xiaomifirmwareupdater.com)
  • πŸ–₯️ Mi Flash Tool or QFil (for Qualcomm)

The process is complex and risky - if you make a mistake, the phone can turn into a brick.

πŸ’‘

Firmware via EDL is an extreme method, used when other methods have not worked, but requires experience and special equipment. On new models (after 2022), Xiaomi blocks this mode without authorization of a service account.

5. Frequent mistakes and how to avoid them

When you unlock Xiaomi via PC, users often face typical problems, and here are the most common ones and ways to solve them:

  • 🚫 The "Couldn't unlock" error in the Mi Unlock Tool β†’ Check that you are using the original cable and the latest Qualcomm driver.
  • ⏳ The waiting timer is not decreasing β†’ Untie your Mi Account from your phone via account.xiaomi.com and re-attach it.
  • πŸ”Œ Computer doesn't see phone in Fastboot β†’ Try another one. USB-port or disable driver signatures in Windows.
  • πŸ“± After resetting, the phone asks for an old password β†’ This means that the data has not been deleted completely. Repeat the command fastboot erase userdata.

If you see a message saying "This device is locked" when you try to flash TWRP, So the bootloader is not unlocked. β„–1 and wait for the timer to end.

6 How to protect yourself from future blockages

To avoid the problem of forgotten passwords again, follow these tips:

  • πŸ” Use a fingerprint or facial recognition as an additional way to unlock.
  • πŸ“ Write your password in a secure location (such as Google Keep or Google Keep). 1Password).
  • ☁️ Enable sync with Mi Cloud – this will help to recover data after reset.
  • πŸ”§ Regularly back up through Settings β†’ System system β†’ Backup.

We also recommend unlocking the bootloader in advance (if you plan custom firmware). To do this, link your Mi Account and unlock through the Mi Unlock Tool before locking your phone.

πŸ’‘

Set up Smart Lock in Android: It lets you unlock your phone automatically in trusted places (such as at home or work). To do this, go to Settings β†’ Screen Lock β†’ Smart Lock.

FAQ: Answers to Frequent Questions

Can I unlock Xiaomi without losing data?
Yes, but only if you have debugging enabled. USB And you've previously confirmed access from that computer, and then the method of using this computer will help. ADB (method β„–In all other cases, the data will be deleted.
How long does it take to unlock through the Mi Unlock Tool?
Timeline depends on model: Old devices (until 2019): 72 hours; New devices (2020–2022): 168–360 hours; Flagships (e.g. Mi 12 Ultra): up to 720 hours (30 days). The timer begins when the Mi Account is first linked to the phone.
What to do if I forget my password from my Mi Account?
Restore it through the official website. If you have a phone number or email attached, follow the reset instructions. Without access to your account, unlocking through the Mi Unlock Tool is impossible.
Does unlocking work through service codes (##...)?
No, service codes (e.g. ##7780##) on Xiaomi don’t reset passwords; they only work to reset to factory settings, which is equivalent to a complete data cleanup.
Can I unlock Xiaomi via iCloud or Find My Device?
No, these are Apple and Google services, they don't work with Xiaomi devices, and you need a tied Mi Account and Internet access on your phone to remotely unlock it.