A forgotten password on a Xiaomi smartphone is a situation that one in five users face. According to Xiaomi Community, in 2023, more than 12% of support calls were related to device locking. The problem is compounded by the fact that a standard Recovery reset erases all data: photos, messages, contacts. However, there are legal ways to unlock without losing information, from official codes to hidden MIUI features.
In this article, we will discuss 4 working methods for the Redmi Note 12/13, POCO X5/F5, Xiaomi 13/14 and other devices on MIUI 14/15. Importantly, not all methods are universal - their effectiveness depends on the firmware version, the availability of debugging over USB and the associated Mi Account. Before you act, check whether the method is suitable for your situation.
If youβre looking for a way to get around locks without resetting to factory settings, start with the safest option, the official unlock codes, which work on 60% of Xiaomi devices with an active Internet connection, and the rest of the cases will require more complex manipulation, including using ADB or service modes.
1. Official unlock codes from Xiaomi (works on 60% of devices)
The easiest and safest way to do this is to use the unlock codes that Xiaomi provides through support, which is suitable if:
- πΆ The device has access to the Internet (Wi-Fi or mobile network).
- π The phone was not re-interfaced (it is the original one). MIUI).
- π§ Your Mi Account is linked to your device (even if you donβt remember your password).
Algorithm of action:
- On the locked screen, press Emergency Call.
- Enter the combination: ##36446338## (to check the version of MIUI).
- If the code worked, copy the firmware data and contact Xiaomi for an unblock request.
- In return, you will receive a unique unlock code (usually within 24 hours).
To speed up the process, you can use an alternative code: ##7378423## (opens the service menu). Select Service tests β Security β Unlock. If the option is active, the system will prompt you to enter the code that will come to the attached email or phone number.
β οΈ Note: Codes only work on devices with MIUI Global or MIUI Europe, on the Chinese versions (MIUI China) this method is blocked by default.
π‘
If the code doesn't work, try typing it in the Phone app on an emergency call, sometimes adding a # character at the end of the combination helps.
2. Unlock via ADB (USB debugging enabled required)
The method is suitable for users who have previously activated debugging over USB (Settings β About Phone β MIUI version, 7 times press to unlock developer mode). If this feature is enabled, you can delete the password file via ADB.
Step-by-step:
- Connect your phone to your PC through USB-cable (original!).
- Open the command line (Win + R β cmd) and type:
adb shell
su
rm /data/system/gesture.key
rm /data/system/locksettings.db
rm /data/system/locksettings.db-wal
rm /data/system/locksettings.db-shm
reboot- After resetting, the password will be reset.
If the su command doesnβt work (no root rights), try an alternative method:
adb shell am start -n com.android.settings/.ChooseLockGenericThis will open a password change menu where you can set a new PIN.
β οΈ Attention: MIUI 14+ Xiaomi has blocked part of the ADB-If the device is released after 2022, this method may not work.
Install ADB-PC drivers|Download the Android platform SDK Tools|Enable debugging on USB on the phone (if you had access)|Use the original USB-cable-->
3. Password reset via Mi Account (if the phone is linked to the account)
If you have an authorized Mi Account on your phone, you can reset your password through Xiaomi's website, which works even without access to the device itself, but requires:
- π§ Access to an email or phone number linked to an account.
- π Connecting your phone to the internet (at least at the time of resetting).
- π No two-factor authentication (if enabled, code from the SMS).
Instructions:
- Go to account recovery page: account.xiaomi.com/pass/forgetPassword.
- Enter the email or phone number associated with the Mi Account.
- Confirm your identity via SMS or code letter.
- After resetting your account password, unlock your phone through Settings β Accounts β Mi Account.
If your phone is not connected to the internet but you have access to another device with the same Mi Account, you can use the Find Device feature:
- Go to i.mi.com and log in.
- Select a locked phone from the list of devices.
- Click Unblock (option will appear if the device is online).
| Method | Conditions required | Implementation time | Risk of data loss |
|---|---|---|---|
| Official codes | The Internet, the original MIUI | 1-24 hours | No. |
| ADB | Debugging by USB, PC | 10.30 minutes | No. |
| Mi Account | Linked account, Internet | 5-15 minutes | No. |
| Safe Mode | Physical access to the phone | 5 minutes. | No. |
4. Unlock via Safe Mode (for older versions of MIUI)
On devices with MIUI 12 and older (released before 2021), you can try to bypass locking through Safe Mode, which disables third-party applications, including the screen blocker.
How to start:
- Press the power button before the off menu appears.
- Hold your finger on the option to turn off β you will be prompted to go to Safe Mode.
- Confirm transition. The phone will reboot with Safe Mode in the corner of the screen.
- Remove or disable the lock app (if it is third-party) through Settings β Apps.
If the lock is standard (from Xiaomi), this method will not work. Also on new devices (Redmi Note 11/12, POCO X4/F4) Safe Mode does not disable the system lock screen β this method is outdated.
Why is Safe Mode not working on Xiaomi?
5. Alternative methods: service codes and hidden menus
Some Xiaomi models have service codes that allow you to reset your password without losing data, and these combinations are not officially documented, but confirmed by users on the 4PDA and XDA Developers forums.
Popular codes:
- π’ ##7780## - Resetting (not always working on new devices).
- π’ ##36446338## - Firmware information (can help in appealing for support).
- π’ ##4636## - Test menu (sometimes allows you to reset the pattern lock).
For Redmi models with Qualcomm processor (such as Redmi Note 10 Pro), you can try:
- Enter ##786# (RTN menu opens).
- Select Reset Settings (not Factory Reset!).
- Confirm the reset β this will only remove the lock screen settings.
β οΈ Note: Service codes may vary depending on the regional firmware. MIUI China most combinations blocked.
6.If nothing has worked: last resort without data loss
If all of these methods fail, there are two options:
- Contact Xiaomi Service Center β Official partners have access to special unlock tools without resetting. The cost of the service: ~ 1500-3,000 rubles.
- Using exploits (such as DirtyCOW for older versions of Android) is a risky method that can result in loss of warranty or damage to the system.
For bootloader devices, you can try flashing a modified recovery (e.g., TWRP) and manually delete password files. However, this requires technical skills and is only suitable for advanced users.
If the phone has enabled data encryption (by default on MIUI 14+), then any password reset without official tools will lead to loss of access to files, in which case the only safe way is to recall the password or contact Xiaomi with proof of ownership of the device (check, box, IMEI).
π‘
On File-Based Encryption devices, deleting password files via ADB or TWRP will make the data unreadable, and it will be impossible to recover it without the original password.