How to unlock a Xiaomi smartphone if you forgot the password lock screen – with data

Why is standard reset not suitable?

Forgetting the password from Xiaomi’s smartphone is a frustrating situation, but it’s not a dead end. The main problem is that most β€œfast” solutions (like resetting via Recovery Mode) result in a complete cleanup of internal memory, which means you’ll lose photos, correspondence, documents, and even saves in games. But the good news is that the manufacturer has provided several ways to unlock without losing data, if you act carefully and follow the verified instructions.

In this article, we will look at all the working methods for 2026, from official (via Mi Account) to technical (using ADB and Fastboot). It is important to understand that success depends on several factors: whether the Xiaomi account was tied, whether debugging is enabled over USB, and which version of MIUI is installed on the device. For example, on new models (Xiaomi 13/14, Redmi Note 12), some life hacks stopped working due to tighter security.

Before you start, check:

  • πŸ”Ή Is the smartphone connected to the Internet (Wi-Fi or mobile network)? This is critical for methods with Mi Account.
  • πŸ”Ή Do you have access to an email or phone number linked to your Xiaomi account?
  • πŸ”Ή Is the device enabled by debugging USB (Settings β†’ The phone. β†’ Version. MIUI β†’ 7 times to tap)?
πŸ“Š What Unlocking Method Have You Tried Before?
Reset via Recovery
Mi Account
ADB/Fastboot
I've been to the service.
I've tried nothing.

Method 1: Unlocking with Mi Account (official method)

This is the most reliable and recommended way for Xiaomi, but it only works if:

  1. The smartphone is linked to the Mi Account.
  2. The device has access to the Internet (via Wi-Fi or SIM-card).
  3. You remember the login and password from the account.

Instructions:

  1. On the locked screen, tap Forgot Password? (or Forgot Password).
  2. Choose Unblock with Mi Account.
  3. Enter the email or phone number associated with the account.
  4. Confirm your login via SMS or email (depending on your security settings).
  5. Follow the instructions on the screen to reset the lock password.

⚠️ Warning: If your smartphone isn't connected to the Internet, it won't work (POCO F5, Redmi K60) After 5 failed attempts to enter a password, the option Forgot the password? can disappear for 24 hours.

Check your internet connection

Make sure you remember the username/password from your Mi Account.

Battery charge of at least 30%

A second phone/computer is on hand to confirm the code

-->

Method 2: Use of ADB (for advanced users)

If debugging is on USB (USB Debugging) was enabled before blocking, you can try to delete the file with the password through ADB. This method works for MIUI 12/13/14, It requires a computer and basic command line skills.

Steps:

  1. Connect your smartphone to your PC through USB-cable (original!).
  2. Open the command line (Win + R β†’ enter cmd).
  3. Enter the commands in turn: adb shell su rm /data/system/gesture.key rm /data/system/password.key rm /data/system/locksettings.db rm /data/system/locksettings.db-wal rm /data/system/locksettings.db-shm reboot
  4. After resetting, the password should be reset.

⚠️ Note: On new models (Xiaomi 13 Ultra, Redmi Note 12 Pro)+) Password files can be stored elsewhere or encrypted. If you reboot android.process.acore, you'll have to reset.

What if the ADB can’t see the device?
If the adb device command returns an empty list: 1. Install Xiaomi drivers USB Drivers from the official website. 2. Try another one. USB-cable (preferably original). 3. Switch the connection mode to File Transfer (MTP) (If the phone requests). 4. On Windows, disable driver signatures: Run β†’ gpedit.msc β†’ User configuration β†’ Administrative templates β†’ System system β†’ Installation of the driver β†’ Disable signature verification.

Method 3: Fastboot and Data Partition Editing

This method is more complicated, but suitable for devices where debugging is done. USB It will require an unlocked bootloader β€” if it is not, the method will not work, POCO X4 Pro).

Instructions:

  1. Turn off your smartphone and press Volume Down + Power to log into Fastboot Mode.
  2. Connect the device to the PC and check its visibility with the command: fastboot devices
  3. Download a modified boot image for your model (e.g, magisk_patched.img).
  4. Please use it for a short time: fastboot boot magisk_patched.img
  5. After downloading to the system, delete password files via ADB (as in Method 2).

Critical: This method can trigger anti-Rollback protection on new devices (e.g. Xiaomi 12T). Check your model’s compatibility on the XDA Developers or 4PDA forums before using it.

πŸ’‘

If after the firmware magisk_patched.img phone is stuck on startup the logo, press the volume up + Meals for food 10 second-on-seconds.

Method 4: Safe Mode bypass (for older versions of MIUI)

On MIUI 10/11 (e.g. Redmi 8, Mi 9 Lite), you can try to log in to Safe Mode and delete your password through settings.

How to do this:

  1. On the lock screen, press the Power button before the turn off menu appears.
  2. Tap and hold the power off until a request to switch to Safe Mode appears.
  3. Confirm the transition. After download, delete the password in Settings β†’ Screen Lock.

⚠️ Warning: Safe Mode disables all third-party applications, including launchers. If the screen remains black after deleting the password, restart the device.

Method 5: Contact Xiaomi Service Center

If none of the methods worked, the official service remains. Xiaomi can unlock the device by documents (passport + purchase check), but:

  • πŸ“„ Confirmation of ownership (guarantee card or check) will be required).
  • πŸ’° The cost of the service is from 1,500 to 3,000 rubles (depending on the model).
  • ⏳ Term - from 3 to 7 days (if there is no queue).

Where to look for service:

  • πŸ” Official website: mi.com/ru/service.
  • πŸ“ Maps. Google/Yandex by request "Xiaomi Service Center [your city]".
  • πŸ› οΈ Authorized Partners (check reviews!).

Important: Some "unofficial" services offer unlocking via EDL Mode (Firmware Emergency Mode).This works, but requires special hardware (Qualcomm HS-USB QDLoader 9008) and can void the warranty.

MethodConditions requiredData retentionDifficulty
Mi AccountLinked account, Internetβœ… Yes.⭐
ADBUSB debugging enabledβœ… Yes.⭐⭐⭐
FastbootUnlocked loaderβœ… Yes.⭐⭐⭐⭐
Safe ModeMIUI 10/11βœ… Yes.⭐⭐
Service centrePhone IDs.⚠️ Depends on the service.⭐⭐

What do you do if nothing helps?

If all methods are exhausted and the data is critical, there are two options:

  1. TWRP data extraction: Install custom recovery (TWRP) and copy files to your PC. You'll need an unlocked bootloader.
  2. Chip-off method: Removal of memory chip (eMMC/UFS) and reading data through a programmer. 5 000 RUB), but guaranteed to keep the information.

⚠️ Note: The chip-off method is only suitable for phones with a non-removable battery (for example, Xiaomi Mi 11). 9A) risk of damage to the fee.

πŸ’‘

If the phone was bought with hands, the chances of unlocking without losing data are minimal - the previous owner could have tied his Mi Account or enabled encryption.

FAQ: Frequent questions

Can I unlock Xiaomi without losing data if I don’t remember Mi Account?
Theoretically, yes, but only if: USB debugging is enabled (ADB will help then). The device is old (up to MIUI 12), and you can use Safe Mode. On new models without a tied account, unlocking without reset is almost impossible.
Why After Deleting Password Files Through ADB phone PUK-code?
This means that the device has enabled data encryption (Settings β†’ Security β†’ Encryption), in which case you can not do without a reset – the file system is encrypted with a key that is stored in locksettings.db.
Does SMS unlock work (like Samsung?)
No, Xiaomi does not support SMS unlocking. This feature is only available on some Samsung models (via Find My Mobile).
Can you bypass the lock through factory reset, but save the data?
No, a factory reset always deletes user data, and the only way to save files is to pre-extract them via TWRP or Fastboot.
What to do if photos are missing after unlocking?
Check the folders: /storage/emulated/0/DCIM/.thumbnails (miniatures). /storage/emulated/0/Pictures/Screenshots (screenshots). /data/media/0/ (if there is root access). If files are not found, try recovery software: DiskDigger, Recuva (only if the phone is connected to the PC as a drive).