A situation where access to a smartphone is limited to a forgotten key occurs suddenly and often at the most inopportune moment. Xiaomi owner may face lockdown due to banal absent-mindedness or after updating the MIUI interface, which sometimes changes the input algorithms, at which point the device turns into a useless piece of plastic and glass, storing important contacts and data.
There are several proven ways to regain control of the gadget without contacting the service center. The effectiveness of the method directly depends on the version of the operating system, the presence of a tied Mi Account and the enabled debugging over USB. Below we will discuss all the current options, from gentle to radical.
You should be aware that some methods will require the complete deletion of user data. Resetting is a last resort, but often the only way to unlock modern versions of Android. However, if you have prepared in advance or have access to cloud services, the loss can be minimized or avoided altogether.
Reset via Xiaomiโs Find Device service
The most civilized and secure way to get back to your phone is to use the manufacturer's official cloud service, which requires that the locked device log in to your Mi Account and activate the device's search function, and that you have a working Internet connection via your mobile network or Wi-Fi.
If these conditions are met, you will need any other gadget with access to the network. Go to the official website of the Xiaomi cloud service and log in with the same credentials as on the locked smartphone.
From the control menu, select the unlock option. The system will warn that this action will delete the data, but in some cases the key is removed without full cleaning if the MIUI version allows.
โ ๏ธ Warning: After remotely unlocking, the phone may require re-entering the Mi Account password on its first launch, a security mechanism against theft that cannot be circumvented without the owner's credentials.
This method works most consistently on devices that have not undergone a major modification of the system, and if the phone was bought with a handheld account, this method will not work without the participation of the previous owner.
๐ก
Always turn on the Find Device feature immediately after you buy a smartphone, even if you are sure you will never forget your password.
Google Find My Device with Google Find My Device
The alternative to a branded service is Googleโs standard tool, which is similar in its mechanism of action: it requires a device to be linked to a Google account and an active Internet connection, a method that is often more versatile, as Google services are stitched into the system at a deeper level.
Go to the service's website from a computer or other phone and log in to your inbox. If the device is online, you'll see it on the map. The side menu will have a lock or clean function available. The choice of "Erase" will result in the phone being completely reset to factory settings.
While it sounds radical, for many users, it's the only way to save data if it's synced with the Google Photos cloud and Google Drive. Once reset, you'll be able to set up the phone as new and restore backups.
Recovery Mode (Hard Reset)
When remote methods are unavailable due to lack of network, recovery mode comes to the rescue. Recovery Mode is a diagnostic partition of the system, available even when the screen is locked, and logged in with a combination of physical buttons on the device that is turned off.
To enter, press both the volume button and the power button. Hold them until the Mi logo or menu appears in English. Navigate the menu with volume buttons, and select the item with the power button.
โ๏ธ The procedure in Recovery
From the menu, select Wipe Data, then Wipe All Data. The system will request confirmation, you usually need to select Confirm. The formatting process will start, which will delete the pattern lock and all user files. After completion, select Reboot.
โ ๏ธ Note: On newer versions of Android (11, 12, 13 and above), after resetting via Recovery, the system will require you to enter a password from a Google account or Mi Account that was previously synced. FRP (Factory Reset Protection).
This is the most common method, but also the most risky method in terms of the safety of photos and contacts, and if you haven't made backups, the data will be lost forever.
Unlocking through USB debugging (ADB)
This method is suitable only for advanced users who have previously enabled debugging by USB If this function was active and the computer was previously authorized, you can delete the key file without losing data. ADB PC-only.
Connect the phone to your computer and open the command line. Enter a command to access the device shell. If the connection is successful, you can execute a command to delete the system file that stores the access keys.
adb shell rm /data/system/gesture.keyAfter completing the command, you need to restart the device. Some models may also require deleting the locksettings.db file. The method does not work if the phone has never connected to this computer or debugging is disabled.
What if the ADB canโt see the device?
Comparison of Unlocking Methods
The choice of the specific method depends on your situation and preparedness, and below is a table that will help you quickly navigate the available options and their implications for data.
| Method | We need the Internet. | Data security | Difficulty |
|---|---|---|---|
| Mi Cloud | Yes. | Possible preservation | Low. |
| Google Find My Device | Yes. | No (full reset) | Low. |
| Recovery Mode | No. | No (full reset) | Medium |
| ADB Command | No. | Yes (full) | Tall. |
As you can see from the table, Recovery Mode is the most versatile, because it doesn't require the Internet, but it sacrifices data. The ADB method is ideal for storing information, but it requires pre-preparation, which most users don't have at the time of blocking.
๐ก
If data is critical and none of the software methods helps without loss, the only option is to contact a specialized service where you can try to count memory directly.
Frequent problems and their solution
Users often face additional obstacles in unlocking, such as the phone may write "Incorrect Activation Code" after a reset, which means that FRP protection has worked, and the system requires proof of ownership of the account that was on the phone before the reset.
Another common problem is that the phone doesnโt come into Recovery mode, in which case you might try to press the buttons a little earlier or use the charger connection while trying to log in. Some Xiaomi models require the original cable connection.
If after all the manipulations the phone is cyclically restarted (bootloop), the system may have been damaged when trying to reset, in which case you will need to flash the device through the computer using the Mi Flash Tool utility.
โ ๏ธ Warning: Firmware running the Mi Flash Tool in Clean All mode completely wipes out memory partitions. Make sure the battery is at least 50% charged so the phone doesn't turn off at a critical moment.