When you pick up your smartphone and realize you can't unlock it, it causes panic. It happens quite often: we change passwords to improve security, but our brains don't always instantly remember the complex sequence of lines. For Xiaomi and Redmi owners, this problem is solvable, but requires clear action to keep important data from being lost.
There are several ways to restore access, each of which depends on the version of the Android operating system and the settings of your device. Some ways allow you to save photos and contacts, others require a complete reset. It is important to understand that modern versions of MIUI have enhanced protection, so the old methods may not work.
In this guide, we’ll look at all the options we need to take, from simple login attempts to radical measures, how to use Google and Xiaomi’s built-in features, and what to do if the screen responds to touch but doesn’t accept the right code.
Use the “Forgot Password” function through your Mi Account
The most civilized and safe way the manufacturer provides is to use a Mi Account, which, if you've logged in before and activated Find Device, you have a high chance of unlocking your phone without losing data, and this only works if you have an active Internet connection on your smartphone.
First, you need to type in the wrong pattern lock several times, and after the fifth or sixth attempt, the screen should show the words "Forgot the password" or "Forgot the pattern lock." By clicking on this button, the system will prompt you to log in, you will need to enter the username and password from your Mi Account.
⚠️ Note: If you don’t remember the password from your Mi Account, you can recover it via your computer by going to the official i.mi.com website, but it will take extra time.
Once you have successfully logged in, the system will suggest resetting your current lock password, so you can set a new code or disable the lock at all, which doesn't work if the phone is in flight mode or doesn't have access to Wi-Fi and mobile network at the time you enter the password.
Reset via Find Device (Device Search)
If you can't directly log in through the lock screen, you can use remote control. Find Device not only tracks the location of the lost gadget, but also controls its lock, and you'll need another device (a friend's computer or phone) with Internet access.
You need to go to i.mi.com and log in to the same Mi Account that was used on the locked device. In the management interface, select your device from the list. Among the actions available is the Unblock or Erase data button.
- 📱 Select your device in the list of connected gadgets.
- 🔒 Click the Unblock button (not available on all versions) MIUI).
- 🗑️ If unlocking is not possible, use the function "Erase data».
- 🔄 Confirm the action with a code from the SMS sent to the tied number.
Using the data erasure feature will delete the pattern lock, but it will also delete all files, contacts and applications. This is an extreme measure if other methods did not help. Once you reboot, the phone will be as new and you can set a new password.
What if two-factor authentication doesn’t allow you to log in?
Resetting with Recovery Mode (Hard Reset)
When software is powerless, Recovery Mode comes to the rescue, a low-level mode built into the phone's firmware that allows system operations to be performed, and it's entered with a combination of physical buttons that works even when the sensor is completely broken.
To enter recovery mode on most Xiaomi and Redmi models, you need to turn off the phone. Then press the Volume Up and Power button at the same time. Hold them until the Mi logo appears, after which the power button can be released while keeping the volume still.
☑️ Reset algorithm in Recovery
The Recovery menu doesn't have a touch screen. Navigation is done with volume buttons (up/down), and the power button selects the item. You need to find Wipe Data or Clear Data. Some versions may require you to enter special code displayed on the screen using volume buttons.
⚠️ Note: Wipe Data permanently deletes all user data, and photos, correspondence, and installed applications will be lost if they are not synced to the cloud.
Once you have selected the confirmation point, the system will alert you to the consequences, agree, and the formatting process will begin. Once completed, select Reboot. The first launch of the system will take longer than usual.
Delete passwords via ADB (for advanced users)
The ADB (Android Debug Bridge) debugging method is considered one of the most effective, but it requires pre-preparedness, the main condition is that the phone must have USB debugging enabled in advance in the Developer menu. If this feature was disabled, the method will not work.
You'll need a computer with the device drivers installed and the Android SDK platform tools. Connect your phone with a cable to your PC. Open the command line on your computer and type in the command to check the connection: adb devices. If the device appears in the list, you can proceed to delete the lock file.
adb shell rm /data/system/gesture.key
adb shell rm /data/system/locksettings.db
adb shell rm /data/system/locksettings.db-wal
adb shell rm /data/system/locksettings.db-shmThese commands delete files that store the hashes of graphic keys and PINs. After you execute the commands, you need to reboot the device. On the lock screen, you can enter any password or draw any shape, the system must unlock.
💡
Method ADB It only works if the debugging has been previously included. USB The computer already had access to the device (confirmation) RSA-key).
Comparison of Xiaomi Unlocking Methods
The right way to do this depends on your specific situation: is debugging enabled, is there an Internet connection, do you remember your account information, and to make it easier to make a decision, we've created a composite table that compares the effectiveness and risks of each method.
| Method | Data retention | We need the Internet. | Difficulty |
|---|---|---|---|
| Mi Account (screen) | Yes. | Yes. | Low. |
| Find Device (site) | No. | Yes. | Low. |
| Recovery Mode | No. | No. | Medium |
| ADB Teams | Yes. | No. | Tall. |
As you can see from the table, the only way to save data without special knowledge is through the Mi Account. All other methods that guarantee the removal of the lock lead to the cleanup of internal memory. So regular backups to Google Photos or Mi Cloud is a critical habit.
Prevention of blocking and important nuances
To minimize the risks, set up alternative unlock methods. Biometrics (fingerprint or face unlock) allows you to access the device even if you do not remember the digital code, although some system operations will still require a password.
Also worth mentioning is FRP (Factory Reset Protection) protection, which requires you to reset your settings through Recovery, and you need to enter a Google account that you've synced with before, which is a protection against a thief being able to use your phone after the theft, but for an honest owner, it can be a barrier if you don't remember your email.
- 🔐 Write down a complex password in a secure location or use a password manager.
- 📸 Set up automatic synchronization of contacts and photos.
- 👤 Make sure you remember the passwords of Google and Mi accounts.
- 🆔 Write it down. IMI-device code, it may be needed to remove the lock in the service.
If neither of these methods worked, it could be a hardware sensor malfunction or a deep system failure, in which case the only solution is to go to a Xiaomi authorized service center, and the specialists can reflash the device, but this will also cause data loss.