When you pick up your Xiaomi smartphone to answer an urgent call or check a message, but the lock screen stubbornly keeps you out, it causes panic. PIN-A code or a complex password can turn a modern device into a useless piece of plastic and glass, especially if there are important contacts, work documents or memorable photos that are not accessible to you.
Fortunately, MIUI and HyperOS have multiple recovery scenarios, and the methods vary in complexity and consequences: some save data, others require a complete reset. In this article, we will go through each option, from the simplest to the most radical, so you can choose the right one for your case.
Before you start taking action, it's important to understand that data security comes first. Modern encryption algorithms don't allow you to just pull out information without authorization, so if you're looking for a way to log into your phone, saving all the files without losing data, you'll only be lucky in one specific case, which we'll talk about below.
Using a Mi Account to Reset a Password
The most humane way to unlock a device without losing personal data is to meet a number of strict conditions, which is relevant if you have previously activated Find a Device and remember your Mi Account.
First, you need to go to the official cloud service site from any other device, such as a computer, tablet or phone of a friend, and you need to enter your login and password. If two-factor authentication is enabled, be prepared to confirm the login via the linked phone number or backup email.
What to do if you forget your Mi Account password?
Once you have successfully logged in, select Find the device. The system will show you a list of all the gadgets that are tied to your profile. Select the locked smartphone from the list. The device control menu will have the option "Unlock." When you click on it, you will send a command to the phone that will remove the lock screen.
If the device is offline, the command will be queued and executed as soon as the phone appears on the network.
⚠️ Warning: Remote unlock may not work if a new version is installed on the phone MIUI Enhanced security protocols, where local authentication is prioritized.
Resetting with Recovery Mode (Hard Reset)
If you can't access the cloud, the only guaranteed way is to completely reset your settings to factory settings, which erases all user information: photos, contacts, apps and settings are returned to their original state, but that's the only way if other methods are exhausted.
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 or Redmi logo appears, then release the power button, while continuing to keep the volume. In a few seconds, a menu with a black background and yellow or blue text will appear.
☑️ Algorithm of actions in Recovery
Navigation in this menu is done with volume buttons (up/down), and the choice is confirmed by the power button. You need to find Wipe Data or Wipe & Reset. After selecting, the system will ask you to confirm the action, often requiring you to enter the word "yes" or select Confirm.
The cleaning process takes from a few seconds to a couple of minutes. When it's done, the phone automatically reboots. The first download will take longer than usual, which is normal, because the system reconfigures the files, and when you turn on, you'll be greeted by the screen of the initial setup, just like when you buy a new device.
| Entry method | Data retention | Conditions required | Difficulty |
|---|---|---|---|
| Mi Cloud | Yes. | Internet, linked account | Low. |
| Recovery Mode | No. | Physical access to buttons | Medium |
| ADB (PC) | No (most often) | USB debugging, drivers | Tall. |
| Mi Flash Tool | No. | Fastboot mode, firmware | Tall. |
Unlocking with Google Find My Device
Android device owners have access to Google’s ecosystem, and Find Device (formerly Device Manager) allows remote control of a smartphone, but in modern Android versions, this feature is more often used to lock or delete data than to remove a screen password, but it’s worth a try.
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, you will see it on the map. From the control menu, select the option “Clean the device”.
This command will force the phone to reset to factory settings, which is the equivalent of Hard Reset, but it's remotely done, and the data will be destroyed, but you can reset the phone, and the advantage of this method is that you don't have to press the buttons on the phone itself, which is useful if the volume buttons are faulty.
💡
If the phone is turned off or has no internet, the cleaning command will queue up and run as soon as the device connects to the network.
After cleaning, you will need to enter your Google account password to confirm that the device belongs to you (FRP — Factory Reset Protection: Without a Google account password, you can't use your phone after a reset.
Use of Fastboot and Mi Flash Tool
For advanced users who have not been helped by a standard reset or who have encountered software errors while booting, there is a Fastboot mode. It is a low-level protocol that allows you to interact with the phone's memory directly from the computer, USB-cable and utility Mi Flash Tool.
First, download and install the ADB and Fastboot drivers, as well as the Mi Flash Tool itself. Then turn your smartphone into Fastboot mode: turn off your phone and press the power button and the volume down button at the same time, and the image of a hare repairing an android will appear on the screen, or the inscription FASTBOOT will appear.
Connect your phone to your computer. In the Mi Flash Tool, select the "Clean all" option, which completely rewrites the memory partitions by removing the password. Be careful: selecting the "Clean all and lock" option will block the bootloader, which can create problems in the future if you plan to customize.
⚠️ Note: Fastboot firmware with full data cleanup is guaranteed to delete the password, but also delete all your files.
This method is especially effective if the phone is “hanging” on the lock screen or cyclically rebooting after unsuccessful password attempts.It also helps if the standard Recovery menu is damaged or unavailable.
Bypassing locking through USB debugging (ADB)
There is a myth that through the console ADB (Android Debug Bridge, you can delete a password file by saving data. This is possible, but only in one case: if you managed to turn on Debugging by Debugging before blocking. USB» In the “Developers” menu, they gave the computer permission to access it.
If debugging is enabled, connect the phone to the PC, install ADB-You can open the command line, and if you type in the adb device command, you'll see the serial number of the device. If the status is "unauthorized," it won't work without a confirmation on the phone screen.
adb shell rm /data/system/gesture.key
adb shell rm /data/system/keyguard/keyguard.dbExecuting these commands deletes files that store the pattern lock and password database. Once rebooted, the phone can let you in without a password or suggest you enter a new one. However, on modern versions of Android with disk encryption, this method practically does not work, since without unlocking, there is no access to the file system.
💡
The ADB method is only effective on older versions of Android or if previously obtained Root rights and enabled debugging.
If debugging was not enabled in advance, this path is closed. Attempts to exploit system vulnerabilities (exploits) through ADB on new MIUI firmware are usually unsuccessful and can lead to unstable system operation.
What to do if the FRP protection is working
After the Hard Reset, modern Xiaomi smartphones will activate FRP (Factory Reset Protection) protection. The system will require you to enter a Google account that was synchronized with the device before the reset. This is done to protect against theft: even the flashing will not help the attacker.
If you remember your Google account, just type it in when you set it up. If you forget both your phone password and your Google email password, things get complicated, and you have to restore access to your Google account through a recovery process on any other device.
In some cases, if the phone is not connected to the Internet, you can skip this step, but the first time you connect to Wi-Fi, the request will repeat. FRP bypassing through special utilities (so-called "bypasses") exists, but they require high qualifications, often paid and do not guarantee the result on new versions of security patches.
⚠️ Warning: Buying a used phone without checking for the previous owner’s account is risky. If the seller is not logged out, the phone can turn into a brick after a reset.
Prevention and backup
To avoid the problem of loss of access in the future, you should prepare the device in advance. Regular backup is the only insurance against data loss. Xiaomi offers built-in tools for this.
Set up automatic sync with Mi Cloud or Google Photos. Go to settings, select "Mi Account" and make sure that the ticks are against contacts, notes, voice recorder and gallery. SD-card or computer through the application "Conductor».
How to make a full backup on Xiaomi?
Write down yours. PIN-A code or pattern lock in a safe place (notebook, password manager) where you will remember to look in an emergency. ID) convenient, but remember: after restarting the phone will still require the input of a digital or graphical password.