Forgot the password on the Xiaomi phone: all ways to unlock (2026)

Forgot the pattern lock, PIN-Xiaomi code or password and can't unlock your phone? This is a familiar situation, according to statistics, one in five users has experienced a device lock at least once. Fortunately, the manufacturer has provided several ways to restore access, and for complex cases there are workarounds.

In this article, we will discuss all the current methods of unlocking Xiaomi, Redmi and POCO smartphones – from official (via Mi Account and Find Device) to technical (Fastboot, ADB and EDL mode). Each method is illustrated by step-by-step instructions, taking into account the nuances for different versions of MIUI (including MIUI 14/15).

Important: the methods vary in complexity and consequences. For example, a Mi Account reset saves data, and a Hard Reset erases it completely. Choose an approach based on your situation - we have detailed the pros and cons of each one below.

1 Unlocking through Mi Account (official method)

The safest method is if you have a Mi Account attached and confirmed, which works on all Xiaomi, Redmi and POCO models (except devices without Xiaomi services, such as some regional versions), 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, the system will offer a recovery option through the account. If this option does not appear, try manually:

  1. On the lock screen, tap Forgot Password? (or Forgot Password?).
  2. Enter the email or phone number associated with the Mi Account.
  3. Confirm the entrance through SMS-code.
  4. Create a new password or pattern lock.

⚠️ Note: If the device is enabled, the device is unlocked in the Mi Account settings (located in Settings) β†’ Xiaomi account β†’ Security, after unlocking, additional confirmation may be required via SMS email.

πŸ’‘

If you do not have access to the linked phone number, try to restore Mi Account through a backup email at account.xiaomi.com. This will require access to the mail specified during registration.

2. Use of the "Find Device" function (remote unlock)

Find Device, the equivalent of Find My Phone, not only allows you to track your phone, but also unlock it remotely, which is a good way to do this if you:

  • πŸ“± The device is connected to the Internet (even through mobile data).
  • πŸ”’ Find Device has been activated in settings (Settings) β†’ Xiaomi account β†’ Find Device).
  • πŸ“§ You have access to the Mi Account linked to your phone.

Instructions:

  1. Go to i.mi.com and log in.
  2. Select the locked device in the list.
  3. Click Unlock Device (or Unlock Device).
  4. Confirm the action via SMS or email.

After that, the phone will unlock and the old password will be reset, and it’s important that this method only works if the device does not have a password for the Find Device application (this option is available in some firmware).

πŸ“Š What Unlocking Method Have You Tried Before?
Through the Mi Account.
Find Device
Reset to factory settings
ADB/Fastboot
Never blocked.

3. reset to factory settings (Hard Reset)

If the previous methods didn't work or you don't have access to the Mi Account, the radical method is hardware reset, which deletes all data from the phone, including the password, but returns the device to the "out of the box" state, which is suitable for all Xiaomi models, regardless of the version of MIUI.

There are two options for resetting:

  • πŸ”„ Recovery Mode (Recovery Menu).
  • πŸ–₯️ Through Fastboot with PC.

Method 1: Recovery Mode

  1. Turn off the phone (press the power button for 10 seconds).
  2. Press Volume Up + Power and hold for 10-15 seconds until the Mi logo appears.
  3. From the Recovery menu, select Wipe Data (use volume buttons for navigation and power button for confirmation).
  4. Confirm the reset by selecting Wipe All Data.
  5. After completion, select Reboot.

Method 2: Fastboot (for advanced users)

You will need a computer with installed Xiaomi drivers and fastboot utility.

fastboot oem unlock


fastboot flashing unlock




fastboot erase userdata




fastboot erase cache




fastboot reboot

Install Xiaomi drivers on PC|Download Platform Tools from Google|Connect your phone to your PC in Fastboot mode (clip Volume Down) + Nutrition)|Backup important data (if available)-->

⚠️ Note: On some models (Xiaomi) 12/13, Redmi Note 11/12) After a Fastboot reset, you may need to log in to your Mi Account to activate your device. If you don't remember your account details, your phone will turn into a brick".

4. Unlock through ADB (for debugging devices)

The method is suitable if the phone previously had USB debugging enabled (Settings β†’ About Phone β†’ MIUI version β†’ 7 taps to unlock developer options, then Settings β†’ Additional β†’ Developers β†’ USB debugging). This is rare, but if you set up a phone for development, there is a chance.

Instructions:

  1. Connect your phone to your PC via USB.
  2. Open the command line in the folder with platform-tools.
  3. Enter the commands: adb shell rm /data/system/gesture.key rm /data/system/password.key rm /data/system/locksetting.db rm /data/system/locksettings.db-wal rm /data/system/locksettings.db-shm reboot
  4. After resetting, the password will be reset.

If the commands don’t work, try an alternative:

adb shell am start -n com.android.settings/.ChooseLockGeneric

This will open a password change menu where you can set a new one.

What if the ADB can’t see the device?
If the adb device command doesn’t show your phone, check: 1. Are Xiaomi drivers installed on your PC. 2. Is debugging enabled USB on your phone (even if it is locked, sometimes it works when connected to a home PC). 3. Try another one USB-cable or port. 4. Reinstall platform-tools (you can download from Google for Android) SDK).

5. EDL mode (for power users)

Emergency Download Mode (EDL) is a "emergency" firmware mode that allows you to reflash your phone even without an unlocked bootloader. It is suitable for cases where other methods have failed, but requires:

  • πŸ’» Computer with Windows and Qualcomm driver HS-USB QDLoader 9008.
  • πŸ“¦ Firmware (fastboot) ROM) for your model.
  • πŸ”§ Mi Flash Tool or QFil.

⚠️ Attention: Incorrect firmware in mode EDL This method is recommended only if you are confident in your actions or follow the instructions for a particular model.

Instructions:

  1. Turn off the phone.
  2. Close the EDL contacts (you need to disassemble the phone or use a special cable).
  3. Connect your phone to your PC – Qualcomm HS-USB QDLoader 9008 should appear in the Device Manager.
  4. Start the Mi Flash Tool, select the firmware and press Flash.

After the firmware, the phone will be completely reset, including the password.

MethodAre the data stored?You need a Mi Account?DifficultySuitable for
Mi Accountβœ… Yes.βœ… Yes.⭐All models.
Find Deviceβœ… Yes.βœ… Yes.⭐Active function models
Hard Reset (Recovery)❌ No.❌ No.⭐⭐All models.
ADBβœ… Yes*❌ No.⭐⭐⭐Devices with debugging enabled
EDL❌ No.❌ No.⭐⭐⭐⭐Advanced users

* When using ADB, data is stored but can be deleted if errors occur.

6. Alternative methods and warnings

If none of the methods worked, consider the following options:

  • πŸ“ž Contact Xiaomi Service Center, which requires a check or a box from your phone (to confirm ownership), and in some cases, unlocking is possible even without a check, but this depends on the policy of the center.
  • πŸ”§ The use of special boxes (such as UFi Box or Octoplus) are paid solutions that are used by wizards in service centers.
  • πŸ“± Buying a used motherboard with the same revision, the last option is if the phone is important and the data on it is critical.

⚠️ Warning: Be careful of "unblock in 5 minutes" offers on dubious sites:

  • They ask for a fee for a β€œinstruction” that is actually free.
  • Install malware on the phone under the guise of "firmware".
  • They require access to your Mi Account to steal your data.

πŸ’‘

If the phone is locked after being reset due to a Mi Account link, the only official way to unlock is to enter account data.Bypassing this restriction (via EDL or modified firmware) violates Xiaomi's policy and may result in IMEI blocking.

FAQ: Frequent questions about unlocking Xiaomi

Can I unlock Xiaomi without losing data?
Yes, if you have Mi Account linked and confirmed, use the Forgot Password Recovery method? on the lock screen or the Find Device service. Other methods (e.g. Hard Reset) will delete all data.
The phone asks for the old password after resetting through Recovery.
This happens if the device is enabled with the Mi Data Protection feature (encryption), in which case only: Entering the old password (if you remember), firmware via Fastboot or EDL (delete all data), contacting the service center with proof of ownership.
How to unlock Xiaomi if you forgot your Mi Account email?
Restore your account at account.xiaomi.com: Click Forgot email?. Enter the linked phone number. Confirm the recovery via SMS. If the number is also lost, try to recall the backup email or contact Xiaomi with proof of account ownership (checks, device serial number).
Does Google Account Unblocking Work on Xiaomi?
Unlike many Android phones, Xiaomi does not support recovery through a Google account. The only official way is Mi Account.
Can you unlock Xiaomi with ## code?
No, there are no universal engineering codes for resetting a password on Xiaomi, codes like ##7780## or *2767*3855# either don't work or perform a full reset (like Hard Reset), deleting all data.