A forgotten password on a Xiaomi smartphone is a situation that one in five users encounter, according to service center statistics. The main problem: standard unlock methods (for example, through Mi Account) often lead to a complete data reset, which means losing photos, messages and installed applications. However, there are ways to get around the lock without formatting memory β if you act quickly and correctly.
In this article, we will discuss 5 working methods of unlocking Xiaomi (including the Redmi Note 12, POCO X5, Mi 11 and others) on current versions of MIUI 14/15. Importantly, the effectiveness of the method depends on whether the Mi Account was previously linked, whether debugging is enabled over USB and whether there is a backup in the cloud. If any of these conditions are met, the chances of saving data increase by up to 90%.
Before you start, check:
- π Battery level (must be at least 30% - when discharged during the procedure, the phone can lock permanently).
- πΆ Availability of stable Internet (you will need to log in to Mi Account or download tools).
- π₯οΈ Access to a computer (for methods using the ADB Or Mi Flash Tool).
1 Unlocking through Mi Account (if the phone is linked to the account)
The most reliable way is to use the official password reset function through your Xiaomi account, which works if:
- π± The phone was tied to Mi Account before being locked.
- π The device has access to the Internet (Wi-Fi or mobile network).
- π You remember your account login and password (or you can restore them through your account). email/SMS).
Instructions:
- On the lock screen, tap Forgot password? (or Forgot password? on English firmware).
- Choose Restore through Mi Account.
- Enter the email or phone number associated with the account and confirm the code from the SMS/letter.
- Create a new unlock password.
The advantage of the method is that it doesn't require a computer and it saves all the data, and the disadvantage is that if the account is not tied or the password is forgotten, it won't work.
π‘
If you donβt remember the password from Mi Account, try to restore it through account.xiaomi.com. Use the backup email or phone number provided when you register.
2.Using Fastboot and Mi Flash Tool (for advanced users)
If Mi Account is not tied and USB debugging (ADB) has been enabled before locking, you can try unlocking your phone via Fastboot.This method is suitable for models on Qualcomm Snapdragon (e.g. POCO F5, Redmi K60) and requires:
- π» Computers with installed Xiaomi drivers and Mi Flash Tool.
- π Cable. USB (preferably original).
- π The firmware file is the same version that is installed on the phone (you can download it on the official website).
Step-by-step:
- Turn off the phone. Press the Power button + Volume down to enter the Fastboot.
- Connect the device to a PC. In the Mi Flash Tool, select the downloaded firmware file (.tgz format).
- In the program settings, mark Clean all and lock (this is important, otherwise the data will disappear!).
- Press Flash and wait until it is completed (the process will take 5-10 minutes).
What if the Mi Flash Tool can't see the phone?
Note: this method does not work on all models. On phones with a Mediatek processor (such as Redmi 10C), unlocking through Fastboot can lead to data loss.
3. Unlock via ADB (if USB debugging is enabled)
If you activated USB debugging before blocking (Settings β About Phone β MIUI β 7 taps by build number β For developers β Debugging by USB), you can delete the password file via ADB. This method saves all data, but requires:
- π₯οΈ Computer with Android installed SDK Platform-Tools.
- π Connecting the phone to the PC in mode USB-Debugging (even if the screen is locked!).
Instructions:
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
rebootAfter the reboot, the phone unlocks, but you may need to reconfigure the pattern lock or PIN.
π‘
The ADB method only works if the debugging was enabled before locking, and if you've never connected your phone to a PC in developer mode, it won't work.
β οΈ Attention: on some firmware MIUI 15 password files are stored in an encrypted partition, in which case the rm command will not help - an alternative approach will be required (see section on the subject). TWRP).
4. Installation of custom TWRP Recovery (for unlocked bootloader)
If your Xiaomi bootloader is unlocked, you can install custom TWRP recaps and manually delete password files. This method is suitable for enthusiasts, as it requires:
- π Unlocked bootloader (checked by the command fastboot oem device-info β if Device unlocked: true, you can continue to use the device).
- π± Compatible version TWRP For your model (download on twrp.me).
- πΎ Backup of data (in case of error).
Algorithm of action:
- Install TWRP via Fastboot: fastboot flash recovery twrp.img fastboot boot twrp.img
- Go to Advanced β File Manager.
- Delete files: /data/system/gesture.key, /data/system/password.key, /data/system/locksettings.db*.
- Reboot the phone.
Warning: Installing TWRP incorrectly can lead to a phone "brick" (completely inoperable) if you are not sure about your actions, contact the service center.
5. Contact Xiaomi Service Center (official method)
If none of the above methods worked, the last option is to officially contact the Xiaomi service center.
- π§ Unlocking without risk of damaging your phone.
- π Preservation of the guarantee (if it is still valid).
- π‘οΈ Minimum risk of data loss (in 60% of cases, specialists save files).
What will be required:
- π Check or warranty card (to confirm possession).
- π Passport (for identification of the person).
- π° Payment for the service (the cost of unlocking in 2026 - from 1,500 to 3,000 rubles, depending on the model).
β οΈ Warning: informal services often offer "unlock in 5 minutes" with a complete data reset. Avoid such workshops - they use illegitimate methods that can damage the firmware.
Bring the original box and documents to your phone|Make sure the battery level is >50%|Remove the cover and protective film (to inspect the device)|Prepare a backup of important data (if you have access to the cloud)-->
Comparison of Xiaomi Unlocking Methods without Data Loss
| Method | Conditions required | Data retention | Difficulty | Time. |
|---|---|---|---|---|
| Mi Account | Linked account, Internet | β 100% | β | 5-10 minutes |
| ADB | Included debugging on USB, PC | β 100% | βββ | 15-20 minutes |
| Fastboot + Mi Flash | The same version of the firmware, PC | β οΈ 70% (depending on the model) | ββββ | 30-40 minutes |
| TWRP | Unlocked bootloader, PC | β 95% | βββββ | 40+ mine |
| Service centre | Phone ID, payroll | β οΈ 60% | β | 1-3 days |
Frequent Mistakes and How to Avoid Them
When trying to unlock Xiaomi, users often face typical problems:
- π "Phone is not defined in Fastboot" - check the cable (use the original), install drivers via Mi Phone Manager.
- π "ADB Do not see the device β make sure that the debugging USB It was turned on before the lockdown. If it wasn't, it wouldn't work.
- π± "After flashing, the phone doesn't turn on, you probably picked the wrong firmware version. EDL, This requires an authorized Xiaomi account.
- π "Mi Account is blocked" - if you have entered the password incorrectly several times, the account may be temporarily blocked. Wait 24 hours or restore access through a backup email.
Tip: If the phone gives an error "This device is locked" when trying to flash TWRP, then the bootloader is locked. You can only unlock it officially through the Xiaomi website (the process takes up to 720 hours of waiting!).