Forgetting the password from Xiaomi's smartphone is a frustrating situation, but it's not a hopeless one. The main problem most users have in this case is the fear of losing personal data: photos, correspondence, contacts or work documents. Standard tips from the Internet often suggest doing a hard reset through Recovery Mode, but it erases all information from the device. Fortunately, there are alternative methods of unlocking that allow you to keep files intact.
In this article, we will look at 5 proven ways to unlock Xiaomi (including the Redmi Note 12, POCO X5, Mi 11 and others) without losing data. It is important to understand that the effectiveness of the method depends on the version of MIUI, the presence of a linked Mi Account and the type of lock (PIN, pattern lock or fingerprint). Some solutions require preliminary preparation (for example, enabled debugging over USB), so if you read this in advance, remember preventive measures for the future.
1 Unlocking through Mi Account (official method)
The most reliable way to unlock if your phone has a Mi Account attached is to use the Find Device feature, which works even without first setting up the debugging over USB and does not require a computer connection, the main condition is that the phone must be connected to the Internet (via a mobile network or Wi-Fi).
Instructions:
- π Go to i.mi.com and log in with the same account that is linked to a locked phone.
- π In the menu, select Find the device β Your device (if the phone isnβt showing up, update the page or check your network connection on your smartphone).
- π Click Unlock the device and confirm the action through SMS email.
- β³ Wait 5-10 minutes β the phone unlocks automatically (may need to restart).
β οΈ Warning: If two-factor authentication is enabled on the phone, you will need access to a backup email or phone number.
This method works on all modern Xiaomi models (starting with MIUI 10), but there are nuances:
- β Suitable for unlocking. PIN-code, pattern lock and password.
- β It wonβt work if your Mi Account wasnβt tied to your phone before being blocked.
- β οΈ On some firmware (for example, MIUI Global for European Regions: The function can be disabled by default.
2. use ADB (if USB debugging is enabled)
If the phone had USB debugging enabled in advance (Settings β About Phone β MIUI Version β 7 times press to unlock developer mode), then unlocking through ADB (Android Debug Bridge) is one of the most effective ways. It allows you to delete the password file without resetting data.
Step-by-step:
- Download and install ADB Tools on your computer (Windows, macOS or Linux).
- Connect your locked phone to your PC via USB-cable (use the original cable for a stable connection).
- Open the command prompt (cmd on Windows or Terminal on macOS/Linux) and type:
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 restarting, the phone unlocks, but it may be necessary to re-configure the pattern lock or PIN-code.
Install ADB Tools on PC|Enable debugging on USB on the phone (in advance!)|Use the original USB-cable|Check the connection by command adb devices-->
β οΈ Note: New Xiaomi models (e.g. Redmi Note) 13 Pro+) Password files can be stored elsewhere. If the command doesn't work, try to delete them. /data/system/lock_pattern.autokey or /data/system/lockscreen.password_key.
Advantages of the method:
- π§ No data reset required.
- π± It works on most versions. MIUI (8-to-14).
- β‘ Fast execution (5-10 minutes).
Disadvantages:
- π Requires a pre-setting debugging for USB.
- π₯οΈ Minimum command line skills required.
3. Unlock via TWRP (for stitched phones)
If your Xiaomi has customized TWRP recavators installed, unlocking without data loss becomes much easier, a method that is suitable for users who have previously installed informal firmware or modified the system.
Instructions:
- Turn off your phone and press the button combination to log in to Recovery Mode (usually Power + Volume Up).
- From the TWRP menu, select Advanced β File Manager.
- Go to /data/system/ and delete files: gesture.key password.key locksettings.db locksettings.db-wal locksettings.db-shm
Reboot System
| Xiaomi model | Support for TWRP | Complexity of installation |
|---|---|---|
| Redmi Note 10/11 | β Yes. | Medium |
| POCO F3/F4 | β Yes. | Low. |
| Mi 11 Ultra | β οΈ Partially. | Tall. |
| Redmi 9A/9C | β Yes. | Low. |
If the TWRP is not installed, it can be flashed through the Fastboot, but this requires unlocking the bootloader, which will result in a complete data reset, so this method is only suitable for those who have already used custom firmware.
π‘
Before installing TWRP, back up the /data partition through the backup itself, which will save your data even if the firmware fails.
4. Bypassing locks via Safe Mode (for older versions of MIUI)
On phones with MIUI 8-11 (e.g. Redmi 4X, Mi A1), you can try to bypass the lock via Safe Mode, which does not work on all devices, but if you do, the data will remain intact.
How to do this:
- Press the power button to turn off the menu.
- Hold your finger on the option to turn off (or turn off power) until a request to switch to Safe Mode appears.
- Confirm the transition. The phone will restart in safe mode.
- In Safe Mode, try to install a new one. PIN-code or pattern lock through Settings β Screen locking.
- Restart your phone in normal mode.
β οΈ Attention: On new versions MIUI 12+ This method does not work β Xiaomi developers have closed this vulnerability, and some features may be disabled in Safe Mode (for example, mobile Internet).
The following is the MIUI 10β11:
- π Call the locked phone from another device.
- π Take a call and try to open Settings during the conversation β Screen locking.
- π Change your password and reset your phone.
Why is Safe Mode not working on Xiaomi?
5 Unlocking through Xiaomi Service Centers
If none of these methods worked, the last option is to contact the official Xiaomi service center.This is a paid service, but it guarantees unlocking without loss of data (provided that the phone was not stolen or blocked at the request of law enforcement).
What will be required:
- π Document confirming the purchase (check, warranty card or box with IMEI).
- π Passport of the holder (to confirm the identity).
- π± The device itself with a charge of at least 30%.
| Town | The cost of unlocking (β½) | Time limit for implementation |
|---|---|---|
| Moscow | 1 500β2 500 | 1-3 hours |
| St. Petersburg | 1 800β3 000 | 1-2 days |
| ekaterinburg | 1 200β2 000 | 1 day |
| Novosibirsk | 1 300β2 200 | 2-4 hours |
Advantages of using the service:
- π Guaranteed unlocking without risk of damaging data.
- π οΈ Diagnostics of the device for other malfunctions.
- π Official guarantee for the work performed.
β οΈ Warning: Don't go to informal workshops that promise to unlock "in 5 minutes." Often, these "specialists" use questionable methods (for example, flashing through the Internet). EDL), which may result in loss IMEI or the cell phone brick.
Prevention: How to avoid blocking in the future
To avoid the problem of forgotten passwords again, follow these tips:
- π Use a password manager (such as Bitwarden or KeePass) to store PIN-codes and graphic keys.
- π± Link your Mi Account and enable data synchronization (Settings) β Accounts. β Mi Account β Synchronization).
- π§ Enable Smart Lock (Settings) β Screen locking β Smart Lock for automatic unlocking in secure locations (e.g. at home).
- π§ Configure backup to Google Drive or Mi Cloud (Photos, Contacts, SMS).
- π Regularly check the efficiency of debugging USB (Settings β Additionally. β For developers).
If you often forget passwords, consider alternative unlocking methods:
- π Fingerprint (works even if you forget) PIN).
- π€ Facial recognition (on models with infrared camera, for example, Xiaomi 13 Pro).
- π Geofencing (automatic unlocking in certain locations).
π‘
The most reliable way to save data when you lock it is by linking your Mi Account and syncing enabled. Even if you forget your password, unlocking through i.mi.com will save all files.