The situation of picking up a smartphone to answer a call or check a message, and the device meets you with a request to enter a forgotten code, is familiar to many. For owners of Xiaomi, Redmi and Poco, this is especially true due to the aggressive security measures in the shell of MIUI and the new HyperOS. Data protection system in modern gadgets is designed so that simple bypass without losing information becomes almost impossible if you did not take care of backups in advance.
There are several proven ways to unlock the password of the Xiaomi screen, but their effectiveness depends on the version of Android, the type of lock (pattern lock, PIN-It's important to understand that in most cases, removing the protection will require the complete deletion of user data. This is not a whim of the instructions, but a fundamental principle of data encryption on modern mobile platforms.
In this guide, we will take a look at all the available methods, from official cloud services to engineering menus Recovery and Fastboot. We will look at the nuances of working with a Google account and the features of unlocking on old and new versions of firmware. Before you start taking decisive action, carefully evaluate your capabilities and the availability of the necessary tools.
Resetting via Mi Cloud and Find Device
The most civilized and secure method that developers have in mind is to use Find Device, which only works when a number of strict conditions are met: the smartphone must be on, connected to the Internet (via Wi-Fi or mobile network), and the Device Search function must be activated in the settings, and if these conditions are met, you can remotely erase the data and unblock it.
To start, go to the official i.mi.com website from any other device (computer or phone). You need to log in using the same Mi Account that was entered on the locked smartphone. The interface of the site may vary depending on the region, but the functionality remains the same. Once logged in, select your device from the list of available gadgets.
In the device management menu, find the "Erase data" button. Click on it and confirm your actions. The smartphone will receive a command to perform a full reset (Wipe Data). After the reset, the screen lock will be removed, but all files, contacts and applications will be deleted. If the Internet on the phone is disabled, the command will be executed automatically once the device is in the network coverage area.
β οΈ Note: If two-factor authorization or anti-theft protection is enabled on the device, the system may require login confirmation via SMS Or an authenticator application. Without access to the associated phone number or backup codes, it will be impossible to log in to your account.
This is ideal for those who have forgotten the code but remember the password from the account, avoiding cables and complex software, but if the device search function has been disabled or the smartphone is in flight mode, this method will be useless.
Resetting with Recovery Mode (Hard Reset)
If cloud services are not available, the most effective way to do this is to use the Recovery Mode Recovery Menu, which is built into the firmware of every Xiaomi smartphone and allows you to perform system operations regardless of the operating system status, and log in to this menu with a combination of physical buttons, making the method available even with a completely broken touch screen.
The login procedure may vary slightly depending on the model, but the classic algorithm is this: turn off the smartphone completely. Then simultaneously press the Volume Up and Power button. Hold them until the Mi or Redmi logo appears, then release the power button, but keep the volume.
When the main Recovery menu appears on the screen (usually a black screen with text and buttons), the volume buttons (up/down) are controlled, and the power button selects the item. You need to find the Wipe Data item. In new versions of MIUI, you may need to select a Wipe All Data subitem and confirm the action by selecting Confirm.
βοΈ Checklist before reset
Once confirmed, the Data partition will be cleaned. The progress bar will show the execution status. Upon completion, the system will prompt you to return to the main menu (Back to Main Menu) or immediately restart (Reboot). Select Reboot to System. The first start after the reset can take up to 5-10 minutes, since the system needs to reconfigure the files.
β οΈ Warning: Android 9 and newer after reset via Recovery will work protection FRP (Factory Reset Protection: The system will require you to enter a password from a Google account or Mi Account that was synced to the device before the reset, without which the phone will become a brick-and-brick".
Use of Fastboot Mode and Computer
Fastboot mode is a low-level protocol designed to flash and diagnose Xiaomi devices in depth. Unlike Recovery, Fastboot doesn't have a graphical interface on the phone screen (only the bunny fixing the robot is displayed) and is controlled exclusively from a computer.This method often helps if the Recovery menu is damaged or blocked.
To enter Fastboot mode, turn off your smartphone and press the Volume Down and Power button at the same time. Hold them until the image with the hare and the inscription appears on the screen. FASTBOOT. Connect the device to the computer through the original USB-cable.
On your computer, you will need an ADB and Fastboot Tools utility or specialized software like Xiaomi ADB/Fastboot Tools. Open the command line (CMD) in the utility folder and enter a command to check the connection:
fastboot devicesIf you see the serial number of the device in response, the connection is established. To perform the data reset, type the command:
fastboot erase userdataThis command compulsorily clears the partition with user data, which is equivalent to a factory reset. Once you complete the command, type fastboot reboot to reboot, which is especially useful for advanced users, since it allows you to control the process at the file system level.
What if your computer doesnβt see your phone in Fastboot?
Specificity of unlocking the pattern lock on older versions
Owners of older Android devices (roughly before 5.0-6.0 Lollipop/Marshmallow) can count on luck. Back then, there was a mechanism to reset the pattern lock through a Google account, and after five incorrect typing attempts, the "Forgot the key?" or "Forgot the password" button appeared on the screen.
Clicking on it, the system suggested entering the username and password from the Google account that was the main one on the device, which was removed after successful authorization, and the data was saved. However, on modern versions of MIUI and Android, this feature was abolished for security reasons. Now, after 5 or 10 wrong attempts, the phone is only locked for a time (from 30 seconds to 24 hours).
However, some custom firmware or CN Version-specific MIUI builds may have loopholes associated with Find My Device. If you have a rare version of the software, try entering the wrong key repeatedly until the timer appears and check if a reset option appears over the network.
| Method | Data retention | We need the Internet. | Difficulty |
|---|---|---|---|
| Mi Cloud (Find Device) | No (remote erasure) | Yeah (on the phone) | Low. |
| Recovery Mode | No (full reset) | No. | Medium |
| Fastboot + PC | No (section removal) | No (PC needed) | Tall. |
| ADB (USB debugging) | Yes (if you're in the mood) | No. | Tall. |
ADB Method: A Chance to Save Data
There is only one way to unlock the Xiaomi screen password without losing data, but it works only under one condition: the phone should have been enabled in advance. USB" (USB Debugging) in the Developer menu. If you didn't turn on this feature before blocking, this method won't work.
If debugging is enabled, connect the phone to your computer, install ADB drivers, and open the command line. Enter a command to delete the file that stores the password hash:
adb shell rm /data/system/gesture.keyDepending on the type of lock:
adb shell rm /data/system/password.keyAfter you execute the command, restart the device. The system may still require a password, but any combination will do, since the verification file is deleted. Immediately after logging in, it is recommended to disable the screen lock in the settings so that the system does not create a new key file.
π‘
Tip: If you use complex passwords, write them to a secure location or use cloud-synced password managers. Biometrics (fingerprint, face) is convenient, but always have a backup digital code that you remember exactly.
Mi Account and FRP lock problems
After successfully resetting your screen password with any of the methods described (except ADB), you will encounter the initial setting screen, which is where FRP (Factory Reset Protection) comes into effect. If the phone was linked to your Mi Account, the system will require you to enter the password from it.
This is protection against theft: if a thief steals a phone and dumps it through Recovery, he can't use it without the owner's data. If you remember the username but you forgot the password, use the recovery procedure on mi.com. If the phone is bought from hand and the previous owner did not untie the device, it is almost impossible to unlock it legally.
Waiting helps in some cases, if you can't remember your password right now, sometimes the system lets you skip that step or suggests you try it later, but on newer versions of HyperOS, the requirements have become more stringent, and bypassing FRP without account data requires complex software intervention, often paid and not guaranteed.
β οΈ Warning: Don't try to guess Mi Account passwords repeatedly. After several failed attempts, the account will be temporarily blocked and access to data recovery will become more difficult.
Frequently Asked Questions (FAQ)
Can I unlock Xiaomi without losing photos and contacts?
What if the phone says "Device locked" after resetting?
Will the reflashing help to remove the password?
How long does the phone stay locked after incorrectly entering the password?
π‘
The only reliable way to avoid losing access is to remember the password from your Mi Account and Google account, and regularly back up important data to the cloud.