When you pick up your Xiaomi or Redmi, try to log in and realize you have forgotten your pattern lock or digital code, it causes panic.It's a common problem that users around the world face, and it often occurs after a system update or a long password change.
Depending on the version of MIUI or the new HyperOS, and whether you have a Mi Account attached, the solutions may be very different, with some methods allowing you to save personal photos and contacts, while others require you to completely reset the device to factory settings.
It’s important to understand that modern Android security systems are designed to protect your data from outsiders, so the process of restoring access can be difficult. In this article, we’ll look at all the relevant and working methods that will help you regain control of your smartphone.
Use the “Forgot Password” function through your Mi Account
The most humane and simple way to unlock your phone without losing data is only available if you have signed in to your Mi Account and enabled the option, which doesn’t work on all firmware versions, but it’s worth trying first.
After five failed attempts to enter a pattern lock or pin, the lock screen should display a “Forgot Password” or “Forgot the pattern lock” button, and clicking on it will redirect you to the login page.
You will need to enter the username and password from your Mi Account that was previously synced with that device, and if the data is entered correctly, the system will prompt you to reset the current locking code.
💡
Make sure your smartphone is connected to the internet (Wi-Fi or mobile network), otherwise you cannot verify your account.
⚠️ Note: If you don’t remember the password from your Mi Account, first restore access to it via your computer or other phone on i.mi.com, otherwise you won’t be able to unlock it.
It is worth noting that on the new versions of Android 11/12/13/14 in the shell MIUI 13/14 and HyperOS Google and Xiaomi have increased security, and this button may be missing, in which case you will have to use more radical methods.
Resetting settings via Recovery (Hard Reset)
If the soft methods didn’t work, the only way out is a complete reset, known as Hard Reset, which erases all user information: photos, contacts, apps and settings return to factory state.
To enter Recovery mode on Xiaomi smartphones, you need to turn the device off completely. Then press the volume button and the power button at the same time.
Hold the buttons until the Mi logo appears, then release the power button, but continue to hold the volume until the main Recovery Mode menu appears. The control here is carried out with volume buttons (up/down), and the choice is confirmed by the power button.
☑️ Reset algorithm via Recovery
From the menu, select Wipe Data, then Wipe All Data, and confirm the action. Once the process is complete, select Reboot to restart. The first run of the system will take longer than usual.
| Action. | Navigation buttons | The result |
|---|---|---|
| Moving on the menu | Volume Up/down | Selection of the right item |
| Confirmation of choice | Power button | Execution of the team |
| Exit from the menu | Reboot to System | Reboot to Android |
Delete passwords via Google’s Find My Device service
Another way that can work is if the phone has geolocation and sync with Google account enabled.Spot Device allows you to remotely control your smartphone, including the data cleanup feature.
Go from your computer or other gadget to android.com/find and log in to the same Google account used on the blocked Xiaomi.
From the control menu, select the option “Erase Device” (Erase Device) which will delete all data from internal memory, including the forgotten password lock screen.
What to do if the phone is offline?
Once you do that, the phone will reboot, and you can set it up as new, which is effective, but requires pre-setting and an active Internet connection.
Using ADB for Advanced Users
For technically savvy users, there is a method of unlocking through debugging by USB (USB Debugging requires that the function be activated in advance in the Developer Menu and that the computer be authorized to access the phone.
You will need to install Xiaomi drivers and Android SDK Platform-Tools on your PC. Connect your smartphone with a cable to your computer and open the command line in the ADB tool folder.
Enter the adb device command to check the connection. If the device is displayed, you can try to delete the file that stores the access keys.
adb shell rm /data/system/gesture.keyIf you have a digital password, the command will look different:
adb shell rm /data/system/password.keyOnce you have completed the command, restart your phone. The lock screen should disappear or allow any code to be entered. However, on newer versions of Android with data encryption, this method often does not work without root rights.
⚠️ Attention: Method C ADB It only works if you've previously received debugging permission from that particular computer, otherwise the phone will request a screen confirmation that you can't give.
Unlocking with Xiaomi Unlock Tool (Mi Unlock)
Xiaomi’s official Mi Unlock tool is designed to unlock the bootloader, but it can also help in difficult lock cases, a process that is more complex and requires waiting.
The method is to unlock the bootloader, which automatically performs a complete data reset, you need to apply in the Mi Community application, wait for permission (3 to 30 days) and perform the procedure via the PC.
Once the bootloader is successfully unlocked, the phone will be completely cleared and you can set a new password, which is a last resort, as it removes the software warranty in some regions.
💡
Unlocking the bootloader via Mi Unlock is the only official way to bypass protection if the Mi Account password is forgotten, but it takes time to wait.
Specificity of unlocking different models Xiaomi
Access recovery can be nuanced depending on the specific model of your device, and old models can have vulnerabilities, and new ones can have enhanced protection.
- 📱 Xiaomi Redmi Note 8/9/10: Often have a standard Recovery menu, reset is carried out according to the classic scheme through the buttons.
- 📱 Xiaomi Mi 11/12/13: These flagships often require Mi Account confirmation even after a reset (FRP lock), so knowing the password from the account is critical.
- 📱 POCO F3/F4/F5: Use the same security system as the main Xiaomi lineups, but sometimes have a modified button combination to log in to Fastboot. + Nutrition).
Owners of devices with AMOLED screens should be careful when rebooting frequently in Recovery mode, although the risk of burnout is minimal, it is better not to keep the screen on.
Reset Protection (FRP) and How to Get Around It
Once you have a hard reset, you get FRP (Factory Reset Protection), which is a mechanism by Google that requires you to enter a password from a Google account that was synced to your phone before you lock it.
If you don’t remember the password from your Google account, the phone will become a brick for the average user, in which case you will have to restore access to Google email through the account recovery form on another device.
There are workarounds (FRP Bypass) that exploit system vulnerabilities through a special feature menu or browser, but they close with each Android security update.
⚠️ Warning: Buying handsets without checking the previous owner’s Mi and Google accounts is a high risk of being hit by a phone FRP a blockage that cannot be legally removed.
Prevention: How to avoid losing access in the future
To avoid the situation of forgetting your password, it is important to set up your device correctly in advance. Regular backup and memorization of credentials is a guarantee of peace of mind.
Use biometrics, like a fingerprint or a face unlock, and even if you forget the digital code, biometrics often lets you log in and change your security settings.
- 🔐 Write down the password from your Mi and Google accounts to a secure location (notebook or password manager).
- ☁️ Set up automatic contact and photo sync to the cloud.
- 🔢 Set up a backup. PIN-code that is easier to remember but that won’t be on the main lock.
Check regularly if the Find Device feature is active and make sure the phone number to restore access is up to date.