The forgotten password on Xiaomi smartphone is a situation that thousands of users face every day. The main problem is that a standard reset via Recovery Mode erases all data, which is not always acceptable. Fortunately, there are legal ways to unlock without losing photos, contacts and applications. In this article, we will discuss 5 working methods relevant to the models of 2020-2026, including the Redmi Note 12, POCO X5, Xiaomi 13 and others.
It's important to understand that not all methods are universal. Success depends on the version of MIUI, the status of the Mi Account, the availability of debugging over USB and even the firmware region. We will describe each option in detail, specify the limitations and risks, and provide unique data on compatibility with the latest security updates from Xiaomi (patches from June 2026). If you are not sure about your actions, you better contact the service center, so as not to turn the phone into a brick.
1 Unlocking through Mi Account (official method)
The safest method if you have linked your device to a Xiaomi account is suitable for most models, including the Redmi 10, POCO F4 and Xiaomi 12T. The main condition is that the phone must have Internet access (Wi-Fi or mobile network).
Algorithm of action:
- πΉ On the lock screen, tap Forgot your password? (or Forgot password? on English firmware).
- πΉ Select Restore via Mi Account and enter the login/password from the linked account.
- πΉ Confirm the unlock through SMS or email (depending on your account security settings).
- πΉ Create a new one. PIN-code.
β οΈ Note: If the phone is not connected to the network, this method will not work, and Xiaomi may request additional verification (for example, a linked phone number) if more than 30 days have passed since the last authorization.
2.Use of Fastboot Mode (for advanced users)
The method is suitable if the debugging USB (USB Debugging) was enabled before locking. Requires a computer with Mi Flash Tool drivers installed and a package ADB/Fastboot. Works on MIUI 12β14, but may not work on devices with a blocked bootloader (bootloader).
Step-by-step:
- Turn off your phone and press the Power button + Volume down to log into Fastboot Mode.
- Connect the device to the PC through USB-cable.
- Open the command line (Windows) or terminal (macOS/Linux) and do:
fastboot oem unlock-goIf the team is not supported, try:
fastboot flashing unlockβ οΈ Note: On new models (Xiaomi 13 Ultra, Redmi Note 12 Pro)+) This method is often blocked by the manufacturer. Before trying, check the status of the bootloader with the command:
fastboot oem device-infoIf Device unlocked: false is not available without Xiaomiβs official permission.
Install the Mi Flash Tool|Download ADB/Fastboot|Enable debugging on USB (if the phone is unlocked)|Check the status of bootloader|Backup of data (if possible)-->
3. Password bypass through ADB (only for unlocked devices)
It works if you've already activated USB debugging on your phone and you've been allowed access to your computer, it's good for MIUI 11-14, but it requires technical skills, and the main advantage is that the data stays intact.
Instructions:
- π§ Connect your phone to your PC and open the terminal.
- π§ Enter the commands one by one:
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 reset, the password will be reset. If the commands don't work, try the alternative:
adb shell am start -n com.android.settings/.ChooseLockGenericβ οΈ Note: On devices with data encryption (on by default on the MIUI 12+) This method can lead to loss of access to internal memory.
What if the ADB canβt see the device?
4. Reset password via TWRP (for devices with custom recavery)
If your Xiaomi has custom TWRP reclaimers installed, you can manually delete password files. The method is suitable for enthusiasts who previously unlocked the bootloader and installed an alternative firmware. It does not work on stock devices!
Algorithm:
- Load to TWRP (Plug Power + Volume Up).
- Go to Advanced β File Manager.
- Delete files: /data/system/gesture.key /data/system/password.key /data/system/locksettings.db
Reset the device.
| Xiaomi model | Support for TWRP | Risk of data loss | Difficulty |
|---|---|---|---|
| Redmi Note 10 Pro | Yes (unofficially) | Low. | Medium |
| POCO X3 Pro | Yes (officially) | Medium. | Tall. |
| Xiaomi 12 | Partially (requires patch) | High-pitched | Very high. |
| Redmi 9A | No (closed bootloader) | β | β |
β οΈ Note: Delete system files through TWRP may disrupt Google Pay, Banking applications and other services tied to device security. After resetting the password, it is recommended to perform Factory Reset through settings (without data loss).
π‘
If after deleting the password files, the phone requests a PIN when turned on, try entering any character set (e.g., 0000) β the system may miss the check due to the lack of authentication files.
5.Official reset via Xiaomi Service Center
If all of the above methods do not work, you need to contact an authorized service center. Xiaomi provides an official unlock service using the ownerβs passport (or document confirming the purchase).
- π Guaranteed data retention (if the phone is not encrypted).
- π Legality β No risk of blocking IMEI.
- π οΈ Ability to diagnose other problems (for example, a damaged connector).
Disadvantages:
- β³ Waiting time: 3 to 7 days.
- π° Cost - from 1,500 to 5 000 rubles (depending on the model and region).
- π Documents required (passport, check or box with a passport) IMEI).
β οΈ Warning: Unofficial services often use exploits to unlock, which can result in a Mi Account lock or loss of warranty.Please check reviews and Xiaomi certificate before contacting.
π‘
Official resets via the service are the only 100% secure way to do so if you are unsure of your technical skills or fear losing data.
Frequent Mistakes and How to Avoid Them
Many users make critical mistakes when trying to remove a password, which leads to complete loss of data or βbrickingβ of the device.
- Ignoring backup. Even if you plan to save data, create a backup via Mi Cloud or Google Drive (settings β accounts β sync).
- Use of dubious software: Utilities like the "Mi Unlock Tool" from third-party developers often contain viruses or spyware.
- Interrupt the unlocking process. If you have started resetting via Fastboot or TWRP, don't turn off the cable or turn off the phone until you fully restart.
- Unverified ADB commands. Some instructions on the Internet advise you to delete system files that are not associated with a password (for example, settings.db), which leads to malfunctions in Android.
If after an unsuccessful attempt to unlock the phone stopped turning on or got stuck on the MI logo, try:
- π Sign in to Recovery Mode and run Wipe Cache.
- π§ Reflash the device via the Mi Flash Tool (you will need the official firmware for your model).