The situation when Xiaomi smartphone suddenly locks because of a forgotten pattern lock is familiar to many users. The screen goes out, and attempts to enter a combination only lead to a countdown timer or a complete ban on access. This causes panic, especially if important contacts, photos and working documents are stored inside the device. However, the modern Android architecture installed on Xiaomi has several scenarios for access recovery, each of which has its own characteristics and limitations.
Before we go to radical measures, it is important to understand that Android security is designed to protect your data from outsiders. So simply “disable” the password without confirming the rights of the owner through an account or resetting data will not work. In this article, we will discuss in detail all legal and technical ways to remove the pattern lock on Xiaomi, while retaining as much information as possible or completely clearing the device if there is no other way out.
There is a direct correlation between the pre-configured Mi Account and the ability to easily unlock. If you previously linked your phone to the manufacturer's cloud service and enabled Find a Device, your chances of returning access without losing data are much higher, otherwise you will have to resort to the Hard Reset procedure, which will return the gadget to factory settings.
Using Mi Account to Remotely Unblock
The most humane way to save all files to an internal drive only works when a number of conditions are met: the device must be connected to the Internet (via Wi-Fi or mobile network), and the Find Device function must be activated in the cloud settings, and you must know the username and password from the Mi Account account that were entered on the locked phone.
To start, go to the official Xiaomi cloud service website from any other device, whether it is a computer or another smartphone. Enter your credentials and log in. From the main menu, select the section responsible for managing devices, often marked with a smartphone icon or called “Find Device”.
After selecting the model of your locked gadget, the control menu will appear on the screen. Here you are interested in the unlock option. When you press the corresponding button, you will send a command to the server, which will transmit the signal to the phone. If communication with the device is established, the locking screen will be removed automatically.
- 🔐 Make sure your phone is on data or connected to Wi-Fi.
- ☁️ This function only works if you have previously paired with Mi Cloud.
- 📱 This method is effective for models with activated Mi Unlock status.
- ⚡ The command is performed remotely, the phone must be online.
Importantly, after successful remote unlocking, the system may require you to re-enter your Google or Xiaomi account password the next time you download it, which is a standard FRP (Factory Reset Protection) protection procedure that prevents the stolen devices from being used. If you are the legitimate owner, there will be no problems.
💡
If you have forgotten your Mi Account password, try to restore it through your linked email or phone number on i.mi.com before trying to unlock your device.
Recovery Mode (Hard Reset)
If remote unlocking is not possible, the only way out is to completely reset your settings through Restore Mode, which is guaranteed to remove the pattern lock, but permanently deletes all user data: photos, contacts, apps and messages. Internal memory will be cleared completely, so this step should be resorted to if backups are missing or not important.
To enter Recovery mode on Xiaomi and Redmi smartphones, you need to turn the device off completely. Then press the volume button and the power button at the same time. Hold them until the brand logo appears, then release the power button, continuing to keep the volume. In a few seconds, the Recovery menu will appear with black background and color text.
The navigation in this menu is done with volume buttons (up/down), and the choice is confirmed by the power button. You need to find the Wipe Data item and select it. In the next menu, confirm the action by selecting Wipe All Data. The system will warn you about the loss of data again - confirm the operation by selecting Confirm.
☑️ Preparation for Hard Reset
⚠️ Warning: Once reset, the phone will require you to enter a password from a Google account that was synced to the device before locking, which is a theft protection that is virtually impossible to circumvent without the owner's data.
The cleaning process can take 2 to 10 minutes depending on the storage capacity and the speed of the drive. Upon completion, the phone will automatically restart. The first boot after the reset takes longer than usual, as the system creates new configuration files and checks the integrity of the partitions.
💡
Hard Reset is the only guaranteed way to unblock if you forget your password and don’t have access to your Mi Account, but it leads to total data loss.
Unlocking through Google’s Find My Device service
An alternative that worked on older versions of Android is Google’s device management service. On modern versions of MIUI and HyperOS shells, direct password deletion through this service is often not available, but it’s worth a try, especially if you have an old firmware or a specific version of Android installed.
Go to android.com/find from any browser and log in to the Google account that was the main one on the locked phone. If the device is online and geolocated, the service will show its location. From the control menu, select the option “Erase Device”.
This command initiates a remote reset to the factory settings, which is basically a Hard Reset analog, but it's done over an Internet command, and as with the previous one, all the data will be destroyed, and the advantage of this method is that you don't have to physically manipulate the buttons of the case, which is convenient if they're faulty.
| Method | Data retention | We need the Internet. | Difficulty |
|---|---|---|---|
| Mi Account (Remotely) | Yes. | Yes. | Low. |
| Recovery Mode | No. | No. | Medium |
| Google Find My Device | No. | Yes. | Low. |
| ADB (USB Debugging) | Depends. | No. | Tall. |
It should be borne in mind that if the device is enabled disk encryption (which is standard for Android 6.0 and higher), then after resetting, it will be impossible to restore data even by specialized programs.
Use of debugging by USB and ADB
This method is only suitable for advanced users and works only in one case: if before blocking you managed to turn on the mode “Debugging by USB” in the menu for developers and the computer already has permission to access the device.
If the conditions are met, connect the phone to the PC through USB-Install the computer with the tools. ADB (Android Debug Bridge. Open the command line or terminal in the folder with ADB and enter a command to delete the file that stores the pattern lock.
adb shell rm /data/system/gesture.keyOnce you have completed the command, restart the device. The lock screen may disappear or the system will allow you to enter any graphical key. However, on newer versions of MIUI, this file can be replaced or supplemented with other system locking files, such as locksettings.db, making the method less effective in 2026-2026.
What if the ADB can’t see the device?
There are also scripts that try to delete locksettings.db and locksettings.db-wal files.
adb shell rm /data/system/locksettings.db
adb shell rm /data/system/locksettings.db-walThe effectiveness of these manipulations depends on the version of Android and the level of the security patch. On devices with an updated security system, these files can be protected by superuser rights, access to which is closed without an unlocked screen.
Features of unlocking different models Xiaomi
The procedure for unblocking can vary slightly depending on the model and shell installed.The flagship Xiaomi Mi and Xiaomi series (digital series) often have more stringent security measures compared to the budget Redmi and POCO lines.
On some models with MediaTek processors, it is possible to unlock through the engineering menu, but login to it is also often password protected or requires specific actions with the help of the user. SIM-For example, inserting a special test card. SIM-maps or the use of an engineering cable can open access to a menu where, in theory, you can reset security settings.
Google services are easier for owners of Global ROM devices, whereas Chinese ROM users are completely dependent on the Mi Account ecosystem. If you bought your phone in a gray way, make sure that it does not have someone else’s Mi Account on it, otherwise you will face activation blocking after a reset.
- 📱 Global versions are easier to unlock through Google Find My Device.
- 🇨🇳 Chinese versions require binding to Mi Cloud.
- 🔒 New models with Android 13/14 have enhanced protection of the loader.
- 🛠 The engineering menu is not available on all Snapdragon processors.
⚠️ Warning: Attempting to unlock someone else's device without the owner's consent is illegal.All of the methods described are solely for restoring access to your own gadgets.
Older models like the Redmi Note 4 or Mi 6 had vulnerabilities that could bypass locks through Safe Mode, but the current Redmi Note 12/13 or Xiaomi 13/14 have long since closed those security holes with updates.
Prevention and backup
To prevent a forgotten password from being taken by surprise and data loss, you need to take regular care of backups. In the Xiaomi ecosystem, this is done automatically if sync is configured. Photos can be saved to Google Photos or Mi Cloud, contacts to Google Account, and files to an external drive or cloud storage.
It is recommended to periodically check the relevance of passwords from your accounts, write them down to a safe place or use a password manager. It is also a good habit to install alternative unlock methods, such as a fingerprint or facial recognition, that duplicate the pattern lock.
Remember that a pattern lock is one of the least reliable security methods, as there are often fatty traces on the screen that can be used to reconstruct the combination. Using biometrics in conjunction with a complex alphanumeric password (numbers and letters) provides the best balance between convenience and security.
💡
Set up automatic contact sync with Google right now: Settings → Accounts and sync → Google → Contact sync.
Regularly creating full backups through the Mi Mover app or third-party utilities on your PC will allow you to restore your phone to the “as it was” state in 15-20 minutes if you reset your settings.