When you pick up your Xiaomi or Redmi, and the lock screen meets you with a request to enter a password that you can not remember, it happens more often than you think. The stress brain can completely refuse, especially if you change the complex pattern to a simple one, and then get confused in the options, or the phone got you in this state, at which point the main thing is not to panic, because the Android security system is designed to protect the owner’s data from outsiders as much as possible.
There are several proven methods to remove the pattern lock on Xiaomi devices, and the choice of the specific method depends on whether the device is debugging over USB, whether the Mi Account is tied and whether there is Internet access. Some methods allow you to save photos and contacts, while others require a complete reset to factory settings, which is a last resort.
In this article, we will take a look at all possible scenarios, from the simplest ways through cloud services to forced reboot in Recovery mode, learn how to use Mi Cloud to remotely unlock, what to do if the phone does not see the network, and what nuances are in different versions of the MIUI firmware.
Use the “Find Device” function via Mi Cloud
The most civilized and safe way to unlock your phone without losing your personal data is to use Xiaomi’s built-in service called Find Your Device, which only works if you meet a few conditions: a locked smartphone must sign in to Mi Account, the “Find Your Device” feature is enabled in the settings, and most importantly, the device must be connected to the Internet via Wi-Fi or a mobile network.
To start the procedure, you will need any other gadget (computer, tablet or phone of a friend) with access to the global network, you must go to the official website of the service i.mi.com and log in using the same login and password that are registered in the locked device, if the data is correct, the system will display a map with the location of the device.
⚠️ Note: If you enter the wrong Mi Account password several times in a row, the security system may temporarily block access to cloud features or require additional identity verification, which will delay the unlocking process.
In the device management interface, you'll be interested in the Unlock option, and if you click on it, you'll send a command to your smartphone, which will forcefully remove the current lock screen, whether it's a pattern lock, a digital key. PIN-code or fingerprint. Once you successfully execute a command, the phone unlocks, and you can set a new password in the settings.
It is worth noting that on newer versions of MIUI 12 and MIUI 13, this feature may not work properly or be completely disabled for security reasons. If the Unlock button is inactive or absent, you will have to resort to other methods.
Unblocking through Google account (for older versions of Android)
On devices running older versions of the Android operating system (up to or including version 5.1 of Lollipop), there was a convenient feature to restore access through a Google account. If you enter the wrong pattern lock five or more times in a row, the system will offer the option “Forgot your password?” or “Forgot your pattern lock?”, which will allow you to log in through your Google account.
However, modern Xiaomi, Redmi and POCO smartphones are coming with Android 6.0 and higher, where the feature has been eliminated for security reasons. Now, after many failed attempts to enter, the device simply locks up for a certain time (from 30 seconds to several hours), without offering alternative ways of login. However, it is worth checking if this option is available, since it can be saved on some custom firmware or very old models.
If you're lucky enough to have a button, click on it and enter the login and password from a Google account that was previously synced to your phone. It's important that the device has an active Internet connection, otherwise the credentials check won't work. Once you've successfully logged in, the system will suggest you set a new way to lock the screen or turn it off altogether.
💡
If the phone says “No network connection”, try inserting SIM-card of another operator or connect the device to Wi-Fi via the emergency call menu, if such a function is supported by the lock interface.
In the case when the phone requires a network connection and you don’t know the Wi-Fi password, you can try using modem mode on another smartphone by creating an access point with a name and password that was previously used by your locked phone. Android can automatically connect to a familiar network when it appears in range.
Resetting with Recovery Mode (Hard Reset)
If cloud-based methods fail, the only guaranteed way to unblock is to completely reset your device to factory settings (Hard Reset), which removes all user data: photos, contacts, messages and apps, so it should only be used as a last resort, but it is 100% effective regardless of the MIUI version or phone model.
To enter Recovery Mode, you need to turn off your smartphone completely. Then press the volume button and the power button at the same time. Hold them until the Mi logo appears, then release the power button, continuing to hold the volume button until the Recovery menu appears.
☑️ Algorithm of actions in Recovery
Recovery interfaces may vary depending on the version. In Chinese firmware, the menus will be in English and Chinese, in global firmware, only English, and the navigation is done with volume buttons (up/down), and the choice is confirmed by the power button. You need to find Wipe Data or Clear Data.
After selecting the reset point, the system may require confirmation. In newer versions of MIUI, to confirm the reset, it is often required to enter a special code that appears on the screen, or press a combination of buttons (for example, press the power button 5 times). Be careful: if the phone is tied to the Mi Account, after the reset, it will require you to enter a password from this account when you first download (anti-Theft protection).
⚠️ Warning: Data reset is irreversible. If you haven’t synced to the cloud, recovering deleted files after Hard Reset will be almost impossible without the use of complex and expensive professional software.
Once the cleaning process is complete, select Reboot or Reboot to System. The first download after a reset can last longer than usual, from 5 to 10 minutes, as the system reassembles its configuration files.
Use USB and ADB debugging (for advanced users)
This method is suitable only for those users who have previously enabled the “Debugging by” mode. USB» (USB Debugging) in the Developer menu and allowed the computer to access the device, if these settings were not activated before locking, this method will not work. ADB (Android Debug Bridge).
To start, you'll need a computer with ADB drivers installed and the USB cable itself. Connect the locked smartphone to your PC. Open the command line (cmd) or PowerShell in the ADB tool folder and enter a command to check the connection:
adb devicesIf a device has been listed, the connection is established, then you need to enter a command to delete the key file. The path to the file may vary depending on the version of Android, but most often the following path is used:
adb shell rm /data/system/gesture.keyIn some cases, especially on older devices, it may be necessary to delete the locksettings.db and locksettings.db-wal file as well. Once the commands are executed, you must reboot the device with the adb reboot command or manually. When turned on, the phone can accept any entered pattern lock or password, or the lock screen will disappear altogether.
What if the ADB can’t see the device?
Note that on Android 11 and above, as well as on the new MIUI shells, security is significantly enhanced, and simply deleting the key file may not work without root rights.
Comparison of Xiaomi Unlocking Methods
To help you better understand the best approach, we have prepared a comparison table that will help you assess the risk of data loss and the complexity of the procedure for each of the described methods.
| Method | Data retention | We need the Internet. | Difficulty | Efficiency |
|---|---|---|---|---|
| Mi Cloud (Find the device) | Yes. | Yes. | Low. | Tall (on old MIUIs) |
| Google Account | Yes. | Yes. | Low. | Only Android 5.1 and below |
| Recovery Mode (Hard Reset) | No (complete removal) | No. | Medium | 100% |
| ADB Teams | Yes. | No. | Tall. | Depends on the Android version |
As you can see from the table, the most reliable, but also the most radical method is resetting through Recovery. If saving photos and correspondence is critical for you, it is worth spending time trying to remember the password or find it through Mi Cloud.
Sometimes users try to use third-party PC programs that promise to “hack” the phone in a couple of clicks. Be careful: most of these programs are either paid or contain viruses, and their effectiveness on modern Xiaomi devices tends to zero due to hardware encryption of data.
💡
There is no magic button or universal code that instantly removes a password without a trace, and any unlock is either using legal cloud tools or a forced reset.
Frequently Asked Questions (FAQ)
Can you unlock Xiaomi without losing data if you don’t remember the Mi Account password?
What is FRP Lock and How to Get Around It?
Will the phone help remove the pattern lock?
Will unlocking through a fingerprint work if you forget the pattern lock?
In conclusion, the best way to protect against such situations is to regularly sync important data with the cloud and keep records of complex passwords in a safe place. Security technologies are becoming stricter every year, making unauthorized access more difficult, but restoring access to the legitimate owner also requires preparation.