How to Reset Your Password to Xiaomi If You Forgot – Unlock Without Losing Data

Introduction: Can you unlock Xiaomi without resetting?

A forgotten password on a Xiaomi smartphone is one of the most common problems among MIUI users. Unlike other brands, Redmi, POCO or Mi phones have dual protection: a local PIN/pattern lock and binding to a Mi Account account, which makes unlocking difficult, but does not make it impossible.

The main fear of users is data loss. Photos, correspondence, saved passwords from social networks and banking applications... Resetting to factory settings through Recovery erases everything, but there are methods of bypassing lock without formatting. In this article, we will discuss 5 working ways to unlock Xiaomi (including models from 2023-2026) with saving files, and also tell you which ones are suitable for devices with a locked bootloader.

Important: The effectiveness of the method depends on the version of MIUI (12, 13 or 14), the status of the Mi Account (whether it is connected to the device), and whether you have USB debugging. If you have never enabled Developer Options, some of the methods will not be available – but not all.

1 Unblocking through Mi Account (official method)

The easiest and safest method is to use a linked Mi Account, which works if:

  • πŸ“± Device connected to the Internet (Wi-Fi or mobile network).
  • πŸ”‘ You remember the username and password from the Mi Account that was linked to the phone.
  • πŸ”„ On the lock screen there is a button "Forgot your password?" (available on the screen). MIUI 12–14).

Instructions:

  1. On the lock screen, tap β€œForgot password?” (or β€œForgot password?” on English firmware).
  2. Enter the email or phone number associated with your Mi Account.
  3. Confirm the entrance through SMS-account code.
  4. Create a new PIN/pattern lock.

βœ… Pros: No computer, data is saved, works on all models (Redmi Note 12, POCO X5, Mi 13, etc.).

❌ Cons: If your Mi Account is not tied or your password is forgotten, it won't work.

πŸ“Š You remember the password from your Mi Account on your Xiaomi?
Yeah, I remember.
No, I forgot.
Not tied to the account.
I don't know if he's tied up.

Password bypass through Fastboot mode (for devices with unlocked bootloader)

If the bootloader on your Xiaomi is unlocked (for example, you have previously installed custom firmware), you can reset your password through Fastboot without losing data.This method is suitable for Redmi, POCO and Mi models based on Qualcomm Snapdragon (for example, Redmi Note 11 Pro+, POCO F4).

You'll need:

  • πŸ’» Computer with Windows/Linux.
  • πŸ”Œ Cable USB (preferably original).
  • πŸ› οΈ Quickboot (part of Android) SDK Or Mi Flash Tool).

Step-by-step:

1. Turn off the phone.


2. Press the buttons Volume down + Power before the logo Fastboot (robot with a gear).




3. Connect the device to the PC.




4. Open the command line (Windows) or the terminal (Linux/Mac) and execute:




fastboot devices




(Your Xiaomi serial number should be displayed)




5. Enter a command to delete the password:




fastboot erase userdata


   WARNING! This command does NOT erase user data, but only resets lock settings.


Reset the device:




fastboot reboot

Make sure the bootloader is unlocked (checked by the fastboot oem device-info team)

Download and install Xiaomi USB Drivers

Connect your phone to the back USB 2.0 port on your PC (front ports may not work)

Disable the antivirus (it can block fastboot)

-->

⚠️ Note: If the phone is stuck on the boot after the fastboot erase userdata command or requires you to enter the password again, then the bootloader is blocked. EDL-regime (section 4).

3. Use of ADB (if USB debugging is enabled)

If your Xiaomi has previously been activated debugging via USB (in Settings β†’ About Phone β†’ MIUI version 7 times tap, then in Additional β†’ For developers), you can reset your password through ADB without losing data.

Algorithm:

  1. Connect your phone to your PC via USB.
  2. Open the command line and execute: adb shell su rm /data/system/gesture.key # graphical key /data/system/password.key # for PIN-rm /data/system/locksettings.db rm /data/system/locksettings.db-wal rm /data/system/locksettings.db-shm reboot
  3. After resetting, the password will be reset.

πŸ”Ή For MIUI 14: If the above commands didn’t work, try an alternative method:

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

This will open the password change menu directly.

πŸ’‘

If the su command doesn't work, then there are no root rights on the device, in which case try to do without it by executing commands without su (efficiency is lower, but sometimes works).

⚠️ Note: On some models (Redmi) 10C, POCO M4 Pro) after such manipulations, it may be necessary to re-assign the Mi Account. Prepare the username and password in advance!

4. Unlock through EDL-Mode (for locked bootloader)

EDL-Emergency Download Mode is an emergency boot mode that allows you to flash a device even with a locked bootloader.It is suitable for Xiaomi on Qualcomm processors (most Redmi models and the likes of the two). POCO).

Unlocking will require:

  • πŸ’» Windows PC.
  • πŸ”Œ Cable USB Type-C (required original!).
  • πŸ› οΈ Mi Flash Tool and firmware for your model.
  • πŸ”‘ Authorized Mi Account (for new devices).

Instructions:

  1. Turn off the phone.
  2. Press Volume Up + Volume Down + Power for 10-15 seconds at the same time. The screen should remain black (this is normal).
  3. Connect the device to a PC. Device Manager should appear Qualcomm HS-USB QDLoader 9008.
  4. Install the Qualcomm Drivers driver (you can download it on XDA Developers).
  5. Open the Mi Flash Tool, select the firmware (for example, fastboot_rom For your model, press Refresh. The device must be determined.
  6. At the bottom, select Clean all and lock (this will save data!) and click Flash.

❗ Important: On new devices (Redmi Note 12 Pro)+, Xiaomi 13T and newer EDL-Regime requires authorization of the Mi Account. If it is not, use the services of the service center.

What if the Mi Flash Tool can’t see the device?
1. Check that the cable is working (try another). 2. Make sure the Qualcomm driver is in good condition. HS-USB QDLoader 9008 is installed correctly (there should be no exclamation points in the Device Manager). 3. Try another one. USB-port (preferably 2.0 on the back of the PC). 4. Disable driver signatures in Windows (via Run β†’ gpedit.msc β†’ User configuration β†’ Administrative templates β†’ System system β†’ Installation of the driver β†’ Disable signature verification). 5. Reinstall the Mi Flash Tool from Xiaomi's official website.

5. Alternative methods: Unblocking through service centers and third-party services

If independent attempts have not been successful, two options remain:

MethodCostTimelineData retentionSuitable for
Official Xiaomi Service Center1 500–4 000 β‚½1-3 days❌ No (full reset)All models, including new ones (Xiaomi 14, Redmi Note 13)
Unofficial services (Chip-off, JTAG)2 000–8 000 β‚½1-5 daysβœ… Yes (unless the memory chip is damaged)Older models (Redmi 9, POCO X3) with a JTAG connector
Online Services (Remote Unblocking)500–2 000 β‚½10–60 minutesβœ… Yes (unless there are hardware locks)Devices with unlocked bootloader or vulnerabilities in MIUI

⚠️ Attention: Online services often require payment upfront and do not guarantee results (4PDA, XDA). Also be wary of β€œunlock in 5 minutes” offers – this could be a scam.

πŸ”Ή Tip: If data encryption was enabled on the phone (in Settings) β†’ Security, even after resetting the password, the files may not be available, in which case only a complete reset will help.

6. How to avoid blocking in the future: prevention

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

  • πŸ” Use biometric unlocking (fingerprint or facial recognition) as a backup option.
  • πŸ“ Write it down. PIN-code to a secure location (e.g., Google Keep or an encrypted notebook).
  • πŸ”„ Update regularly MIUI β€” In new versions, vulnerabilities that allow to bypass the lock are fixed.
  • πŸ”— Link your Mi Account and make sure you have access to a backup. email/phone.
  • πŸ’Ύ Enable backup in Settings β†’ The phone. β†’ Backup.

πŸ”Ή For developers: If you work with them often ADB or Fastboot, create a script to automatically reset your password and store it on your PC. ADB:

@echo off


adb shell




su




rm /data/system/gesture.key




rm /data/system/password.key




reboot

Save him like reset_lock.bat and launch if necessary.

πŸ’‘

The most reliable way to unlock without losing data is to combine a tied Mi Account with USB debugging enabled, and if both conditions are met, the chances of success are 90%.

FAQ: Frequent questions about unlocking Xiaomi

❓ Can you unlock Xiaomi without a computer?
Yes, but only if: You remember the data from the Mi Account (method 1). The device has enabled Smart Lock (unlocking to a trusted location / device). PIN-code (if it was configured) All other cases require a PC.
❓ Why After Resetting Password Through Fastboot, Your Phone Asks You to Enter Old PIN?
This means that: Bootloader is locked, and the fastboot erase userdata command is not fully operational. The device has encryption enabled, and the system requires proof of identity. MIUI 14 with enhanced security (Migre account authorization required). Solution: Try the method with EDL-or contact the service center.
❓ The Mi Account Unlock Tool is a software program?
Most of these programs are: πŸ› οΈ Legal Utilities to Unlock Bootloader (Requires Authorization of Mi). 🚫 Fraudster software that steals data or asks for payment for β€œunlockingΒ». ⚠️ Utilities for old models (Redmi) 4X, Mi A1), non-new-device. πŸ”Ή Conclusion: Use only official tools (Mi Flash Tool, ADB) or verified services from forums 4PDA/XDA.
❓ Can you unlock Xiaomi with gestures or voice commands?
No. Unlike Samsung or Google Pixel, MIUI does not support: Voice unlock (except Google Assistant, but it requires pre-setting); Gestures or secret codes (e.g. ##7780## only works on older Androids); Unlock via Find My Device (a feature not available without logging in); the only "gestive" way is Smart Lock, but it must be configured in advance.
❓ What to do if the phone does not turn on after unlocking?
Possible causes and solutions: Problem Cause solution Black screen after Fastboot Boot damage Swipe device through Mi Flash Tool in Clean all Mode Hang on Mi logo Firmware Conflict Install firmware of the same version as before Requires password after ADB Not all lock files deleted Repeat commands or use fastboot