A forgotten pattern lock, PIN-Xiaomi code or password is a situation that one in five users encounter, and the main problem is that most standard unlock methods (such as resetting via Recovery) lead to a complete cleanup of internal memory. However, there are ways to get around the lock without losing data β from official Mi Account tools to technical solutions through the use of the Internet. ADB or Fastboot.
In this article, we will discuss 7 working methods relevant to the 2018-2026 models (including the Redmi Note 12, POCO X5, Xiaomi 13T We will focus on the nuances of when this will work and when it will make things worse, for example, unlocking through Mi Cloud is only possible with an attached account, and using it is possible to use it. EDL-The regime requires a special cable and risks cancelling the warranty.
We warn you right away that none of these methods is 100% guaranteed to save data, and the probability of success depends on the phone model, the version of MIUI, and the type of lock (password, fingerprint, Face ID), and if the phone is encrypted, the chances are significantly reduced.
1 Unlocking through Mi Account (official method)
The safest way to do this is to use a linked Mi Account, which works if:
- π± The phone is connected to the Internet (Wi-Fi or mobile network).
- π Remember the username and password from Mi Account.
- π The device is enabled synchronization with the cloud.
After 5 failed attempts to enter a password, the system will offer the option "Forgot your password?" Click on it and follow the instructions:
- Enter the email or phone number associated with the account.
- Confirm your identity via SMS or email.
- Create a new unlock password.
β οΈ Warning: If the phone is not connected to the network, this method will not work. 9A s MIUI 12.5) Re-authorization in applications may be required after unlocking.
π‘
If you donβt have access to your linked phone number, try to restore your account via backup email. Go to account.xiaomi.com and select Forgot Password β Restore via email.
2.Use of Fastboot Mode (for advanced users)
The method is suitable if you have access to a computer and installed Xiaomi drivers. The bottom line: through Fastboot you can reset your password without affecting user data. However, this only works on devices without encryption (check in the settings: Settings β Additional β Encryption and accounts).
Step-by-step:
- Turn off the phone. Press Volume down + Power to enter the Fastboot.
- Connect the device to the PC via USB.
- Open the command prompt (cmd) and type: fastboot devices If the device is displayed, continue. If not, install the drivers.
- Enter the command to delete the password: fastboot erase userdata Attention! On some firmware, this command resets all data. For secure deletion of only the password, use: fastboot erase locksettings
- Reboot the phone: fastboot reboot
πΉ Important: On models with MIUI 13+ And if you turn on encryption, this method will cause data loss. β The phone.
Install Xiaomi drivers on PC|Download the platform ADB (like, from here)|Check if the device is displayed in fastboot devices|Backup of data (if possible)-->
3. Unlocking through ADB (Android Debug Bridge)
The method works if the phone previously had USB debugging mode enabled (Settings β About Phone β MIUI Version β 7 times press to unlock developer options β Settings β Additional β For developers β USB debugging). If debugging is not activated, the method will not work.
Instructions:
- Connect your phone to your PC via USB (use the original cable!).
- Open the command line and type: Adb devices If the device does not appear, confirm the debugging permission on the phone screen.
- Delete the file with the password: adb shell rm /data/system/gesture.key or PIN-code: adb shell rm /data/system/password.key
- Reboot the device: adb reboot
Once rebooted, the password will be reset, but all data will remain in place, but on MIUI 14, this method may not work due to the changed key storage structure.
4 Unlocking through Mi Cloud (remotely)
If the βFind Deviceβ function is enabled on the phone (Settings) β Mi Account β Mi Cloud β Find the device, you can try to unlock it remotely, and this method works even if the phone is turned off, but it requires that you do not have to:
- π Internet connection (on next turn on).
- π Geolocation enabled (not necessarily, but increases the odds).
- π Linked Mi Account Account.
Instructions:
- Go to i.mi.com and log in.
- Select the locked device in the list.
- Click βUnlock the deviceβ and confirm the action.
β οΈ Note: On some models (e.g, POCO F4) After you remotely unlock, you may need to enter your old password when you first connect to Wi-Fi. If you don't remember it, it won't work.
| Method | Conditions required | Data retention | Difficulty |
|---|---|---|---|
| Mi Account | Linked account, Internet | β Yes. | β |
| Fastboot | Drivers, PCs, no encryption | β οΈ Partially. | βββ |
| ADB | USB debugging enabled | β Yes. | ββ |
| Mi Cloud | The function "Find the device", the Internet | β Yes. | β |
| EDL | Special cable, firmware. | β No. | ββββ |
5. Unlock through EDL mode (for power users)
EDL (Emergency Download Mode) is an emergency firmware mode that allows you to reflash your phone without unlocking the bootloader. This method voids the warranty and can lead to complete data loss if the wrong firmware is selected. Use it only as a last resort!
What you need:
- π EDL-cable (or homemade adapter with contact closure).
- π» Mi Flash Tool and firmware for your model.
- π§ Knowledge in phone firmware.
Instructions:
- Turn off the phone.
- Connect. EDL-cable (or close contacts on the board).
- Launch the Mi Flash Tool, select the firmware and click "Flash".
- Wait until the end (10-15 minutes).
β οΈ Warning: Wrong firmware can turn a phone into a brick before use EDL Check firmware compatibility with your model in forums (for example, 4PDA or Xiaomi.eu).
What if the phone doesnβt turn on after EDL?
6. Contact the Xiaomi Service Center
If all of these methods do not work, you can contact the official service center.
- π οΈ Guaranteed data retention (if possible).
- π Official documentation and check.
- π Recovery of the guarantee.
There are, however, downsides:
- β³ Waiting (from 3 days to 2 weeks).
- π° Cost (from 1,500 to 5,000 rubles depending on the model).
- π In some cases, the wizard may refuse to save data (for example, if encryption is enabled).
Before the service visit:
- Check if the warranty period (usually 12 months) has expired.
- Bring a check or a box from your phone.
- Check by phone if they are unlocking without losing data.
π‘
Official Xiaomi service centers in Russia can be found on the website mi.com/ru/service/location. Check before visiting if they work with your model β some new devices (e.g. Xiaomi) 14) They can only be served in a limited number of centers.
7. Alternative methods (with the risk of data loss)
If data storage is not essential, you can use standard reset methods:
- π Hard Reset via Recovery: Press the Volume Up + Power, select "Wipe Data." All data will be deleted!
- π± Mi Account reset (if phone is stolen): All data can be deleted remotely on i.mi.com.
- π οΈ Flip-through SP Flash Tool: Suitable for MediaTek processor devices (e.g. Redmi) 10A).
β οΈ Attention: On phones with MIUI 13+ And the encryption that's enabled, even after you reset it through Recovery, may require you to enter the old password, and then you can only use a full flashing through Fastboot or a full flashing. EDL.