Forgetting the password from Xiaomi smartphone is a bad situation, but it is fixable. Even if you have never set up backup login methods, there are official and alternative methods of access restoration. The main thing is not to panic or try to find a combination at random: after 5 unsuccessful attempts, the device can lock for 24 hours or even require a reset before factory settings.
In this article, we will discuss all the current ways to unlock without loss of data (where possible) and with minimal risks to the system. The methods described work on the Redmi, POCO, Mi and Black Shark models running MIUI 12-14 and HyperOS. Particular attention will be paid to the nuances for devices with Mi Account protection - without it, some methods will be useless.
1 Unlocking through Mi Account (official method)
If your Xiaomi account is tied to Mi Account (even if you donβt remember the password), this is the most reliable way to get back access.
First, try to reset your Mi Account password through the official website. If you have an email or phone number attached, follow the system's instructions.
- π Enter the wrong password on the lock screen 5 times until the button Forgot the password appears?.
- π§ Click on it and select Login via Mi Account.
- π Enter your account details β the phone will be unlocked automatically.
Important: If the Find Device option is enabled on the device, SMS or email confirmation may be required after unlocking. On HyperOS models (such as Xiaomi 14 or Redmi Note 13 Pro), this step is mandatory.
β οΈ Note: If you have not previously untie your Mi Account from your phone, but forgot your login, try finding emails from Xiaomi in the mail (subject: βWelcome to Mi Accountβ) or checking your saved passwords in your browser. Without access to the account, official unlocking is impossible β you will have to use alternative methods.
2. Password reset via Fastboot (for advanced users)
If Mi Account is not tied or you can't restore access to it, then Fastboot mode remains, USB-cable and basic knowledge of working with ADB/Fastboot. On devices with a locked bootloader (bootloader), the method will not work β you will need official unlock through Xiaomi.
Step-by-step:
- Turn off the phone. Press the Power button + Volume down to enter the Fastboot.
- Connect the device to your PC and install the Mi Flash Tool drivers.
- Download the firmware archive for your model (for example, for Redmi Note). 10 Pro β fastboot_rom).
- Open the command line in the firmware folder and execute: fastboot oem clean_all This command will reset all data, including password.
- Squeeze the device with the command: fastboot flash all (or use the Mi Flash Tool in Clean All mode).
Once rebooted, the phone will be like new, without password, but without your data. On models with HyperOS (such as Xiaomi 13T), after reset, you may need to re-assign the Mi Account.
Download the official firmware for your model |
Install Xiaomi drivers on PC|
Connect your phone to Fastboot |
Backup of important data (if possible)-->
3. Unlocking through Recovery Mode (without data loss)
If your Xiaomi has custom firmware installed (like LineageOS or Pixel Experience), or youβve previously enabled debugging. USB (USB Debugging, you can try resetting your password through Recovery Mode without completely resetting.
Instructions:
- π§ Turn off the phone. Press the power button. + Volume up to enter Recovery.
- π± Choose Advanced β File Manager (if there is no such option, the method is not suitable).
- ποΈ Go to the folder. /data/system/ and delete files: gatekeeper.password.key gatekeeper.pattern.key locksettings.db
- π Reset the device. Password will be reset, but the data will be saved.
Limitations: The method only works on devices with unlocked bootloader and TWRP Recovery. There is no file manager on the MIUI Recovery stock.
What to do if there is no TWRP Recovery?
4.Use of Xiaomi services (for blocked devices)
If the phone is locked after multiple incorrect password input (for example, the words "Device locked. try later"), the official Xiaomi service can help unlock it remotely.
How it works:
- π Contact the Xiaomi service center or write in support through the official website.
- π Provide a purchase check, a box from your phone or IMEI (indicated on a sticker under the battery or in the documentation).
- β³ Wait 1-3 days for an answer, and after confirmation, you will be sent an instruction or unlock code.
The service is suitable for devices with active Mi Account protection when other methods do not work, for example, if you bought a phone with your hands and the previous owner did not untie the account.
β οΈ Please note: Do not trust the "unlocking" IMEI" The only legal way to do this is to use Xiaomi's official service, otherwise you risk getting a brick or losing your warranty.
5. Alternative methods (for older models)
On Xiaomi devices before 2019 release (for example, Redmi 4X, Mi A1) sometimes trigger βholesβ in the security of MIUI. One of them is resetting the password through a call to a locked phone:
- π Call the locked phone from another device.
- π When calling, quickly press the Home button (if physical) or swipe up.
- π If you can get to the main screen, go to Settings. β Password and security and change password.
On new models (Redmi Note 12, POCO X5 and newer), this method does not work β Xiaomi has closed the vulnerability in MIUI 11+.
Another way to use old phones is to use them. ADB-commands (inclusive debugging is required) USB):
adb shell
rm /data/system/gesture.key
rm /data/system/password.key
rebootIf the debugging has not been activated in advance, this method is useless.
π‘
Before buying a used Xiaomi phone, always check to see if the Mi Account is untied. Ask the seller to reset to the factory settings with you and log in again. This will save you from locking problems in the future.
Table 6: Methods compatibility with Xiaomi models
| Unlocking method | Redmi (2020β2026) | POCO (2021β2026) | Mi 11/12/13/14 | Black Shark | Notes |
|---|---|---|---|---|---|
| Mi Account | β | β | β | β | Works on all models with an associated account |
| Fastboot (clean_all) | β | β | β | β | Black Shark requires bootloader unlocking |
| Recovery (TWRP) | β οΈ | β οΈ | β οΈ | β | Only with unlocked bootloader and custom Recovery |
| Xiaomi Service | β | β | β | β | Paid service, requires confirmation of purchase |
| Call/ADB | β | β | β | β | It only works on models until 2019. |
7.How to avoid blocking in the future
To avoid the problem of forgotten password again, set up backup ways to unlock in advance:
- π Add a fingerprint or facial recognition to Settings β Password and security.
- π Activate Find Device β this will allow you to unlock your phone through your Mi Account even after resetting.
- π Write your password in a secure location (such as Google Keep or Google Keep). 1Password).
- π Regularly back up through Settings β System and device β Backup.
On models with HyperOS (for example, Xiaomi 14 Ultra), the Emergency Access feature has appeared - you can add a trusted phone number to which the unlock code will come. Configure it in Settings β Lock Screen β Emergency Information.
π‘
If you often forget passwords, use a pattern lock instead of a key. PIN-code is easier to remember visually, but don't choose too simple combinations (like the letter "Z") to avoid being hacked.