When you pick up your Xiaomi smartphone, press the power button, and you realize you don't remember the pattern lock or the digital code, it happens quite often, and it can happen after a long period of downtime, system updates, or just because of human distraction, at which point the lock screen becomes an insurmountable barrier that separates you from important contacts, photos and working applications.
Fortunately, Android and MIUI have several scenarios for this, but itβs a realistic one: most current firmware versions put security first, meaning that a full Hard Reset is the only guaranteed way to get back to the device if standard recovery methods donβt work. Below, weβll take a look at all the options available.
Before we go to radical measures, we need to check the most obvious and simple ways to bypass the lock, sometimes the solution to the problem lies on the surface, and complex technical manipulations may not be necessary at all, it is important to remain calm and consistently follow the steps described in the following sections.
Using a Mi Account to restore access
The most civilized and secure method provided by Xiaomi developers is to use a tied Mi Account. If your personal account was logged in on a locked smartphone and the device is connected to the Internet (via Wi-Fi or mobile data), the system can offer unlocking through the server.
After five or more incorrect attempts to enter a password, a countdown timer often appears on the lock screen. In some versions of MIUI, a button may appear under or next to the timer, "Forgot your password" or "Forgot your pattern lock." When you click on it, you will see a field for entering your username and password from your Mi Account.
Enter the correct authorization data. If the credentials are correct and the device successfully communicates with the server, the lock will be removed, and you can specify a new access code. This method does not require deleting the data, which makes it an ideal option.
β οΈ Note: This method only works if the phone was previously linked to a Mi Account and currently has an active connection to the network.
If the button doesnβt appear immediately, try waiting for the timer to end and repeat the wrong password several times, sometimes it takes time or several failed attempts to activate the recovery option through the account.
What to do if you forget your Mi Account password?
Reset via Recovery (Hard Reset) menu
When recovery through an account is impossible, the only option is Hard Reset, which returns the phone to factory status, completely erasing user data, including forgotten passwords, photos, contacts and installed apps.
To enter recovery mode on Xiaomi smartphones, a combination of physical buttons is used. The device must be completely turned off. If it does not turn off due to locking, press the power button for 10-15 seconds before forced reboot and when the screen is turned off, proceed to the next step.
βοΈ Preparing for resetting through Recovery
Press both the Volume Up and Power button at the same time, hold them until the Mi logo appears, and then the power button can be released, continuing to hold the volume until the Recovery menu appears.
In the menu, you can navigate with volume buttons (up/down), and the choice is confirmed by the power button. You have to select Wipe Data, then Wipe All Data, and confirm the action by selecting Confirm.
π‘
Once reset via Recovery, the phone will require you to enter a password from a Google account that was synced to the device before locking.
Remote Unlocking through Find Device
Another effective way that doesnβt require physical contact with a smartphoneβs buttons is to use Xiaomiβs Find Device cloud service, which is similar to recovering from an account, but is performed from a different device.
You will need a computer or other smartphone with Internet access. Go to the official website https://i.mi.com/ or https://find.device.mi.com/. Sign in using the same Mi Account that is active on the locked phone.
In the service interface, select your device from the list of available gadgets. If your phone is online, you will see its location and status. In the control menu, find the Erase Device button.
Pressing this button will initiate a remote reset, the phone will receive a command, restart and begin the process of cleaning the data, and once completed, the lock will be removed, but all files will be lost.
| Parameter | Recovery Mode | Find Device (Online) |
|---|---|---|
| We need the Internet. | No. | Yeah (on the phone) |
| Data retention | No. | No. |
| Difficulty | Medium | Low. |
| Demands a PC. | No. | Preferably. |
π‘
If the phone is lost, the Erase Device feature will not only remove the password, but also delete the data so that it does not fall into the wrong hands, which is a security measure.
Bypassing the lock via ADB (for advanced users)
There is a method that allows you to delete a file with passwords without completely resetting the data, but it only works when a number of strict conditions are met: first, the phone must be pre-enabled to debug USB. Second, the computer to which the phone connects must have the status of a trusted one.
If these conditions are met, connect the smartphone to the PC through USB-Install Xiaomi drivers and utilities on your computer ADB. Open the command line (CMD) toolbox ADB.
adb shell rm /data/system/gesture.keyThis command deletes the file that stores the pattern lock, for a digital password or PIN-The command may differ, for example, deleting password.key. After completing the command, you need to restart the device.
β οΈ Note: On current versions of Android (10 and above) with data encryption, this method often does not work without an unlocked screen, since access to the file system is closed.
If USB debugging has not been enabled before locking, it is useless, and in such cases, you can only rely on a full reset via Recovery or service centers.
The problem of activating Google and FRP
Once you successfully execute Hard Reset, you will encounter the initial setup screen, which is where FRP (Factory Reset Protection) security comes into effect. The phone will require you to enter a login and password from the Google account that was synced to the device before the reset.
This is protection against theft: if a thief steals a phone and dumps it, he still can't use it without the owner's data. Type in your Gmail and password. If you remember them, there's no problem.
If you don't remember your Google account, it's very difficult to restore access, and Google doesn't officially provide any way to bypass FRP without verifying the identity of the account holder.
Sometimes, resetting network settings or using special combinations in the accessibility menu helps, but these loopholes are constantly closed with Android security updates.
Prevention and backup
To prevent a forgotten password from becoming a disaster, it is important to back up regularly. Xiaomi smartphones have a built-in Mi Cloud that can automatically save contacts, messages, notes and system settings.
It is also recommended to set up sync with Google Photos for images and videos, which will ensure that your memories are saved even in the event of complete loss of access to the device.
- π Write down a complex password in a secure location or use a password manager.
- βοΈ Enable sync of important data with the cloud weekly.
- π Make sure you remember the password from your Mi Account and Google account.
- π± Install the "Find the Device" app and check it for work.
Regular maintenance and checking of security settings will take a few minutes, but can save you from hours of nerves and loss of important information in the future.