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

Forgetting your smartphone password is stressful, especially if your device stores important data such as photos, work documents or correspondence. Xiaomi owners face an additional complexity: the system MIUI It blocks not only the screen, but also the recovery functions through the Mi Account. However, factory resets are not the only way out. In this article, we will discuss the legal and technically safe methods of unlocking Redmi, POCO Mi without loss of data, including bypassing the pattern lock, PIN-account code and password.

The main problem is protection MIUI It doesn't allow you to just reset your password through Recovery Mode or Fastboot if you have a link to your Xiaomi account. ADB-It is important to understand that not all methods work on the latest versions. MIUI 14/15 β€” Some of the methods stopped working after security updates 2023–2026 We only selected the latest solutions tested on Redmi Note models. 12, POCO X5, Mi 11 others.

Critical note: if your Xiaomi has Device Protection enabled and your phone is linked to your Mi Account, unlocking without loss of data is only possible if you access your email/phone from that account, otherwise you will need official proof of ownership through Xiaomi Support.

1 Unlocking through Mi Account (official method)

The most reliable and legal method is to restore access through the attached Mi Account, which works even if you forget the password from the lock screen, but remember the data from the Xiaomi account.

  • πŸ“± On the tap lock screen, forget your password? (if available) Some models (Redmi 10 and later) may not have this option, so move on to the next step.
  • πŸ”— Go to account.xiaomi.com from another device. Enter the email or phone number associated with your account.
  • πŸ“§ Press Forgot Your Password? and follow the reset instructions. You'll receive an email or SMS confirmation-coded.
  • πŸ”“ After resetting the password from Mi Account, unlock your phone through the Settings menu β†’ Xiaomi account β†’ Remove the lock screen.

If the option Forgot the password? on the lock screen is missing, try to enter any password 5 times in a row - the system can offer alternative ways of login (for example, through Google Smart Lock, if it is configured).

⚠️ Note: If you have previously disabled sync with Mi Account or reset your phone without logging out, this method will not work, in which case you will need proof of ownership through Xiaomi support (you need a check, a box or a box). IMEI).

πŸ“Š What kind of Xiaomi phone is you?
Redmi (Note/Pro series)
POCO (F/X/M)
Mi (11/12/13)
Black Shark
Other

2.Use ADB to delete password (no reset)

Android Debug Bridge (ADB) is a debugging tool that lets you control your phone through a computer. If your Xiaomi has previously enabled USB Debugging, you can delete the password file without losing data. This method works on MIUI 12-15, but requires pre-preparation.

You'll need:

  • πŸ–₯️ Computer with Windows/Linux/macOS and installed Xiaomi drivers.
  • πŸ”Œ USB-cable (original, do not damage the port!).
  • πŸ“¦ Utility. ADB Tools (download the latest version).

Step-by-step:

  1. Connect your phone to your PC. The USB Debugging Notice will appear on the lock screen to confirm permission (if the phone requests a password, this method will not work).
  2. Open the command prompt (Windows) or terminal (macOS/Linux) in the folder with adb.exe.
  3. Enter the command to check the connection: adb devices If the device appears in the list, go further.
  4. Delete the password file (for the MIUI): 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
  5. Reboot your phone: adb reboot

After the reboot, the lock screen should disappear, and if not, repeat the commands or check if the data encryption is enabled (in which case the method will not work).

USB debugging enabled (before locking)

Installed drivers Xiaomi on PC

Downloaded by ADB Tools (last version)

There's original. USB-cable

The phone is charged at least 50 times%-->

⚠️ Note: On some models (POCO F4, Redmi K50) after MIUI 14 password files are stored in a secure partition. ADB It will not help – you will need to unlock the bootloader (see section 4).

Password bypass through Safe Mode (Security Mode)

If your Xiaomi has a third-party launcher (like Nova Launcher) or widgets installed, you can try removing your password through Safe Mode.This method doesn’t work on all devices, but it’s worth the effort.

How to start Safe Mode:

  1. Press the power button until the shutdown menu appears.
  2. Tap and hold the option to turn off (or reboot on some models).
  3. Confirm the transition to Safe Mode (the inscription "Safe Mode" will appear at the bottom of the screen).

In Safe Mode:

  • πŸ”§ Go to Settings. β†’ Passwords and security β†’ Lock screen.
  • πŸ—οΈ Try changing the lock method to Swipe (swipe) or disable the password completely.
  • πŸ”„ Restart your phone in normal mode.

If this method didn’t work, try removing the launcher via Safe Mode (like MIUI Launcher) and then installing it again from Google Play.

Why is Safe Mode not always working?
Since MIUI 13, Xiaomi has tightened its security policy: Safe Mode cannot change lock settings if data encryption or Mi Account binding is enabled. However, on older models (Redmi 9, POCO X3), this method can work if the password was set without being linked to the account.

4. Unlocking the bootloader and resetting the password (advanced method)

If previous methods failed, the only thing left is unlocking the bootloader and manually deleting the password via Fastboot, a technique that requires technical skills and will result in a reset of all data if you don't back up in advance, but on some firmwares (Xiaomi.EU, custom ROMs) you can bypass the lock without losing files.

Important: Xiaomi officially blocks unlocking the bootloader on new devices (released after 2022).For older models (Redmi Note 8 Pro, Mi 9), the process looks like this:

  • πŸ”“ Get permission to unlock through the official Xiaomi website (you will need a tied Mi Account).
  • πŸ–₯️ Install Mi Unlock Tool and connect your phone in Fastboot mode (clip Power). + Loudness down when switched on).
  • πŸ”§ In the command line, execute: fastboot oem unlock This will erase all data, but unlock the bootloader.
  • πŸ“± Install custom recovery (TWRP) and through it delete the password files in /data/system/.
Xiaomi modelAbility to unlock the loaderLoss of data
Redmi Note 10/11Yes (with account confirmation)Yes (full reset)
POCO X3 ProYes (without confirmation on old firmware)Not (if you use TWRP)
Mi 11 UltraNo (blocked by manufacturer)β€”
Redmi 9AYes. EDL-regime)Possible data retention

⚠️ Note: Unlock the bootloader on new models (Redmi Note 12, POCO X5) It requires waiting 7-15 days after the account is linked, and Xiaomi can block the account. IMEI Devices with incorrect unlocking.

πŸ’‘

If you plan to unlock the bootloader, pre-back up via Mi Cloud or locally on your PC. Even if the method promises to save data, there is always a risk of failure.

5. Exploitation of MIUI vulnerabilities (for tech-savvy)

Some versions of MIUI have vulnerabilities that allow you to bypass the lock screen without resetting, for example, MIUI 12.5 had an error related to the Emergency Call, and MIUI 13 had a bug with Google Assistant. These methods are often closed in new updates, but we will give you the current ones for 2026.

Method 1: Bypassing Google Assistant (MIUI 14)

  1. On the lock screen, activate Google Assistant with a voice command (β€œOK, Google”) or a swipe from the corner.
  2. Say, "Open settings."
  3. In settings, go to Applications β†’ Application Management β†’ Settings.
  4. Click Storage β†’ Clear the data to reset the lock settings.

Method 2: Emergency Call (MIUI 13 and below)

  • πŸ“ž On the lock screen, tap an emergency call.
  • πŸ”’ Enter any number (e.g. 112) and press the Call.
  • πŸ›‘ Quickly click Home (or swipe up) to return to the home screen.
  • πŸ”§ Open the Settings. β†’ Passwords and security and change the method of blocking.

These methods do not work on all devices and can be fixed in new updates. If after several attempts nothing comes out, move to the next section.

πŸ’‘

MIUI vulnerabilities quickly close in security patches. If your phone has recently been updated, the chances of success are minimal.

6. Contact Xiaomi Support

If all self-unlocking attempts fail, the official path remains to appeal for Xiaomi, which is the only legal way to unlock a phone without losing data if:

  • πŸ” The device is tied to Mi Account, but you don’t remember the password.
  • πŸ“„ You have proof of purchase (check, box, warranty card).
  • πŸ“± Phone's not stolen (IMEI off-list).

How to apply:

  1. Go to the support page of Xiaomi.
  2. Select Unlock Device or Forgot Mi Account Password.
  3. Fill out the form with: IMEI phone (you can find out by *#06# on another device or on the box), serial number (on the box or under the battery, if removable), purchase data (date, store, check).

Wait for a response (usually 3-7 days). Xiaomi will send you unlock instructions or reset the account.

If you buy a phone with your hands, the chances of success are minimal – Xiaomi requires proof of original ownership, in which case you only have to reset via Fastboot with loss of data.

7 What NOT to do (risks and consequences)

In trying to unlock Xiaomi, many users make mistakes that lead to complete loss of data or blocking IMEI.

  • 🚫 Resetting via Recovery Mode (Wipe Data) without backup will erase all data forever.
  • 🚫 Use unofficial unlock services (e.g., via AliExpress), many of which are scams and can permanently lock your phone.
  • 🚫 Enter random passwords more than 10 times β€” MIUI You can lock your device for 24 hours or require confirmation via your Mi Account.
  • 🚫 Independently stitch the phone without experience - incorrect firmware will lead to a "brick" (defaulting device).

Also avoid advice like:

  • ❌ "Connect your phone to your PC and format the partition /data" β€” This will delete all user files.
  • ❌ "Use the Miracle Box program – it only works on older models and can damage the firmware.
  • ❌ "Close contacts on the board – this will physically damage the device.

If you are not sure about your actions, it is better to contact the Xiaomi service center or a proven master of smartphone repair.

FAQ: Frequent questions about unlocking Xiaomi

❓ Can I unlock Xiaomi without losing data if I can’t remember the Mi Account password?
No, if the phone is connected to the Mi Account and you don't remember the data from it, it is impossible to officially unlock the device without losing data. The only chance is to exploit the MIUI vulnerabilities (see section 5) or seek support with proof of purchase.
❓ Does the way with ADB Xiaomi MIUI 15?
On most devices with MIUI 15 (2026 year) password files are stored in a secure partition, so the standard commands ADB It won't help, but some models (POCO F3, Redmi Note 11) You can try alternative commands: adb shell su -c "rm /data/system/locksettings.db" But it requires root access, which is impossible to get on a locked phone.
❓ What to do if the phone requires an old password after unlocking?
This means that the password files are not completely deleted or data encryption is enabled. Try: Repeat ADB commands (section 2). Set custom recovery (TWRP) and manually delete files to /data/system/. If nothing helps, reset your phone via Fastboot (data loss is inevitable).
❓ Can you unlock Xiaomi through service codes (##)?
No, service codes (e.g. ##7780##) on Xiaomi don't work to reset passwords. These codes are designed to test hardware components and don't affect lock settings. Don't believe instructions promising unlock via *#06# or other combinations - that's a hoax.
❓ How to avoid blocking in the future?
So that you don't have to face the problem again: πŸ”‘ Use biometric unlocking (fingerprint or face) as a backup method. πŸ“§ Link Mi Account and update your password regularly. ☁️ Enable automatic backup in Settings β†’ Xiaomi account β†’ Mi Cloud. πŸ“ Write it down. PIN-a code or password in a secure location (for example, in a password manager).