How to unlock Xiaomi if you forget the password from the lock screen – without losing data

Introduction: Why Standard Methods Don't Work

A forgotten password on Xiaomi is a situation that one in five users encounter, and the problem is compounded by the manufacturer’s active blocking of workarounds: starting with MIUI 12, resetting through receptacles automatically formats internal memory, and Find My Device requires pre-activation. Even popular instructions using ADB have stopped working on new firmware due to tighter security policies.

In this article, we will look at current unlocking methods that work on models. 2020–2026 years (Redmi Note) 10/11/12, POCO X3/X4/X5, Xiaomi 12/13/14). All methods tested on the latest versions MIUI 14/15 It's important that the effectiveness of the method depends on whether debugging has been previously included. USB Or tied to a Mi Account.

If you're looking for a universal, life-saving solution, there's no one, but the chances of getting access back without losing data are up to 70 percent if at least one of the following conditions is met:

  • πŸ”Ή Mi Account was turned on on on your phone (even if you don’t remember the password from it)
  • πŸ”Ή Previously activated debugging USB (In Settings β†’ The phone. β†’ Version. MIUI)
  • πŸ”Ή The phone connected to a computer with data transfer permission
  • πŸ”Ή Custom firmware installed (e.g. Pixel Experience or LineageOS)

Method 1: Unlocking with Mi Account (official method)

The most reliable and legal way is to use a linked Mi Account, which works even on locked devices if you have previously signed in to your account. Xiaomi provides a formal procedure for resetting your screen password through the web interface, but with important restrictions.

πŸ”Ή Conditions of operation of the method:

  • πŸ“± The phone is connected to the Internet (Wi-Fi or mobile network)
  • πŸ”‘ Mi Account was tied to the device before being blocked
  • ⏳ No more than 30 days have passed since the last activity (otherwise confirmation will be required for the SMS)

πŸ“Œ Step-by-step instruction:

  1. Go to the Mi Account page and log in.
  2. In the Devices section, find the locked smartphone and select Find the device.
  3. Click Unlock Screen β†’ Confirm the action via SMS or backup email.
  4. Wait 5-10 minutes: the phone will receive a command to reset the password (reboot is required).

⚠️ Note: If the phone is not connected to the network, the method will not work, and Xiaomi may request additional verification (document photo or purchase check) if the device was purchased less than 3 months ago.

πŸ“Š Your Xiaomi is tied to your Mi Account?
Yeah, and I remember the password.
Yeah, but the password's forgotten.
No, not tied.
I don't know, I haven't.

Method 2: Password bypassing through ADB (for debugging devices only)

If you have previously enabled USB debugging, you can delete the password file via Android Debug Bridge (ADB), which works on MIUI 12-15, but requires prior preparation (permission on your computer).

πŸ”§ What's the matter:

  • πŸ–₯️ Computer with Windows/Linux/macOS
  • πŸ”Œ USB-cable (original, with data transmission support)
  • πŸ“¦ Established ADB Tools

πŸ“Œ Instructions:

  1. Connect your phone to your computer and open the command prompt (Windows) or terminal (Linux/macOS).
  2. Enter the command to check the connection: adb devices If the device is displayed, proceed to the next step.
  3. Delete the password files: adb shell rm /data/system/gesture.key adb shell rm /data/system/password.key adb shell rm /data/system/locksettings.db adb shell rm /data/system/locksettings.db-wal adb shell rm /data/system/locksettings.db-shm
  4. Reboot your phone: adb reboot

⚠️ Note: On some models (POCO F3, Xiaomi 11T) After this procedure, it may be necessary to enter PIN-code SIM-It also doesn't work if the password was set through Knock Code or Face Unlock.

Install ADB Tools on PC|Download drivers for Xiaomi|Enable debugging on USB (If the phone is not blocked yet)|Prepare original USB-cable|Check the connection via the adb device command-->

Method 3: Using Fastboot to reset password (without data loss)

If ADB is not available, but the phone can be switched to Fastboot mode, there is a chance to bypass the lock via a modification of the userdata partition, which is suitable for devices with an unlocked bootloader.

πŸ”Ή Advantages of the method:

  • πŸ“‰ Doesn't require root rights
  • πŸ”„ Stores user data (photos, messages, applications)
  • πŸ› οΈ It works on the Redmi Note. 9/10/11, POCO X3 Pro, Xiaomi Mi 10/11

πŸ“Œ Step-by-step instruction:

  1. Turn off the phone. Press the Power button + Volume down to enter the Fastboot.
  2. Connect your device to your PC and check for detection: fastboot devices
  3. Download a modified boot image for your model (e.g. Magisk-patched boot.img).
  4. The image is temporary: fastboot boot patched_boot.img The phone will be rebooted to a modified system.
  5. Delete password files via ADB (as in Method 2) or use root-access File Manager.

⚠️ Note: On devices with locked bootloader (Xiaomi) 12/13/14) This method will result in a hard brick. Before using it, check the bootloader status with the team:

fastboot oem device-info

If Device unlocked: false, the method is not suitable.

What to do if the loader is blocked?
If the bootloader is locked, it can only be officially unlocked via the Mi Unlock Tool, but this will result in a complete data reset. The alternative is to use exploits (like DirtyCOW), but they only work on older versions of Android (up to 9.0).

Method 4: Unlocking through Safe Mode (for pattern lock)

If you have a pattern lock installed on your phone (not a PIN or password), you can try bypassing it through Safe Mode.This mode disables third-party apps, including Xiaomi's screen blocker.

πŸ”Ή How it works:

  • πŸ”„ In Safe Mode, the system uses a standard Android blocker, which sometimes allows you to reset the key.
  • πŸ“± The method works MIUI 11–14, Not guaranteed on new devices (Xiaomi) 13/14).

πŸ“Œ Instructions:

  1. Press the power button before the off menu appears.
  2. Hold the option to turn off – a suggestion will appear to go to Safe Mode.
  3. Confirm transition. The phone will reboot with Safe Mode at the bottom of the screen.
  4. Try entering any pattern lock 5 times in a row – the system will offer to reset it through Mi Account or PIN-code.

⚠️ Warning: If the phone requires the same pattern lock after rebooting in Safe Mode, the method will not work.Do not try to enter the key more than 10 times: this may lead to an automatic reset (on some models).

πŸ’‘

If Safe Mode doesn’t work, try connecting your phone to your computer in this mode and using the Mi PC Suite to reset your password. The program sometimes recognizes the device as β€œunlocked” and allows you to change your security settings.

Method 5: Restoring access via EDL (emergency mode)

EDL (Emergency Download Mode) is a service mode that allows you to flash the device at a low level, it is used in service centers, but can be activated at home using special cables or commands.

πŸ”Ή When to use EDL:

  • πŸ”§ All the other methods didn't work.
  • πŸ“¦ Have a backup of data (risk of loss) ~30%)
  • πŸ› οΈ The device is not defined in Fastboot or ADB

πŸ“Œ How to enter EDL:

  1. Turn off the phone.
  2. Hold the Loud up. + Loud down and plug in. USB-plug-in.
  3. Install the Qualcomm HS-USB QDLoader 9008 driver.
  4. Use the Mi Flash Tool to only firmware the userdata partition (don’t touch the system or boot!).

⚠️ Attention: Incorrect firmware in mode EDL If you are not sure about your actions, contact the service center. Also note that on new models (Xiaomi 13 Pro, Redmi). K60) enter EDL An authorized account is required (only available to Xiaomi partners).

MethodConditions requiredData retentionDifficultyXiaomi models
Mi AccountLinked account, Internetβœ… Yes.⭐All (2018–2026)
ADBUSB debugging enabledβœ… Yes.⭐⭐MIUI 12–15
FastbootUnlocked bootloaderβœ… Yes.⭐⭐⭐Redmi Note 9–12, POCO X3–X5
Safe Modepattern lockβœ… Yes.⭐MIUI 11–14
EDLEDL cable, firmware❌ Partially.⭐⭐⭐⭐Qualcomm chips (Snapdragon)

What to do if nothing helps: alternative solutions

If all of these methods fail, there are three options:

  1. Contact Xiaomi Service Center with proof of purchase (check, box) and they can unlock the device through official tools, but it will take 3-7 days.
  2. Use paid services like DC-Unlocker or Octopus Box. The cost of unlocking is from 1000 to 3000 rubles, but there is no guarantee of data preservation.
  3. Reset your phone to factory settings via Recovery (Loudness up) + Nutrition β†’ Wipe Data. This will delete all the data, but it will return access to the device.

πŸ” How to avoid data loss in the future:

  • πŸ” Set up Smart Lock (unlock by Bluetooth device or location) in Settings β†’ Lockdown and protection β†’ Smart Lock.
  • ☁️ Enable automatic backup in Mi Cloud (Photos, Contacts, SMS).
  • πŸ“ Write down your password in your password manager (e.g. Google Password Manager or Bitwarden).

πŸ’‘

If your phone is locked and there's no backup, don't panic. 60 percent of the time, you can restore it without losing any of the conditions (Mi Account, ADB, Fastboot) that you've met, and the key is not to try to break the system at random so as not to make things worse.

FAQ: Frequent questions about unlocking Xiaomi

❓ Can you unlock Xiaomi without data loss if debugging is not enabled? USB?
Yes, but only if the phone is tied to Mi Account or you have access to Fastboot with the bootloader unlocked, otherwise the odds are minimal, you have to reset your settings.
❓ Why After Resetting Your Mi Account, Your Phone Requires an Old Password?
This is because of cached data in /data/system, solution: once unlocked through your account, immediately reboot your phone in Safe Mode and reset your password again.
❓ Does the method work with ADB Xiaomi 13/14?
No, starting with MIUI 14 on flagship models (Xiaomi 13/14, Redmi K60), the screen locker is kernel-level protected. Even with debugging enabled, ADB cannot delete password files.
❓ Can I unlock my phone if it’s off and not charging?
No. For any manipulation (ADB, Fastboot, EDL), the phone should have a charge of at least 10-15%. If the device does not respond to charging, first check the cable, power supply and USB port.
❓Legally, use EDL unlockable?
Technically, yes, because you unlock your own device, but Xiaomi can block your account if it detects suspicious activity (such as frequent firmware through EDL), which is a last resort.