How to Reset Your pattern lock If You Forgot to Xiaomi

The situation of picking up your smartphone, swiping your finger across the screen, trying to remember the pattern, but the device ruthlessly reports an error, is familiar to many. It is especially unpleasant to realize that there are important photos, work documents or correspondence that are now blocked from access. Owners of Xiaomi, Redmi and Poco devices often face this problem due to the high popularity of the brand and various versions of MIUI or HyperOS firmware.

There are several proven ways to restore access to the gadget. Some methods allow you to save personal files, others require a complete reset to factory settings. The choice of a specific algorithm of actions depends on whether the Mi Account was pre-configured, whether debugging is enabled over USB and which version of the operating system is installed on your device.

In this detailed guide, we’ll take a look at all the current unlock options, from Google and Xiaomi’s regular tools to more complex technical manipulations. We’ll look at scenarios for different situations so you can choose the most appropriate and secure way to regain control of your smartphone.

Using Google’s Find Device feature

The easiest and most secure way to get lost is to use Google’s built-in services. If a locked phone has logged in to a Google account and the internet is turned on (mobile or Wi-Fi), you can remotely change your screen lock password, and you need to go to android.com/find from any other device, whether it’s a computer or another smartphone.

Once you log in to your Google account, it will ask you to select the device you want from the list, and you can use the call, lock and clear options in the control menu, and we're interested in the lock function, and if you click on it, you can install a new one. PIN-A code or password that replaces a forgotten pattern lock, and once you enter a new code on the site, it will automatically apply to your phone.

  • 📱 Make sure the phone is connected to the network or the command won’t reach the device.
  • 🔑 New password can be digital even if a pattern lock has been used before.
  • 🌐 This method only works if Google Play Services is activated on the device.

It's important to note that this method doesn't delete your data, it only changes the way you log in. However, if the phone is in flight mode or doesn't have access to the network, the command won't be executed until the connection is made, so you should try the other methods described below.

⚠️ Note: If you enter the wrong password multiple times through Google, your device may temporarily block the ability to unlock for a certain time (30 seconds to several hours) for security reasons.

Unlocking through Xiaomi Cloud

Xiaomi’s ecosystem provides its own powerful device search and management tool, known as Find Device, which is only effective if you have pre-created a Mi Account and logged in on a locked phone, and activated the device search function in settings, the advantage of which is that it works at the system level, regardless of the screen lock.

To start, go to the official i.mi.com website. You will need to enter the username and password from your Mi Account. Once you have successfully logged in, a map will appear in the interface with the location of your devices. Choose the desired smartphone from the list. If you have established communication with the device, the Unlock button will be available.

Pressing this button initiates the process of removing the lock. The system will warn you that the data may be deleted if the synchronization was not performed, but the screen itself will be unlocked. In some versions of MIUI, this action may also require confirmation via SMS or re-entering the password from the account to confirm the identity of the owner.

📊 What type of locking method do you use more often?
pattern lock
Digital. PIN-code
Fingerprint.
Facial recognition
  • ☁️ The service works only if there is an active Internet connection on a smartphone.
  • 🔒 The function must be pre-installed in the “Security” menu» -> «Find the device».
  • 📲 After unlocking, it is recommended to immediately change the password from the Mi Account.

If you forget the password from your Mi Account, the recovery process is complicated, you will have to go through the procedure of restoring access through a linked email or phone number on account.xiaomi.com. Without access to the Mi Account, this method of unlocking the phone will not work.

Resetting settings via Recovery Mode

When software methods are not available, a radical but effective way is to reset via Recovery Mode, which allows you to interact with the system at a low level, bypassing the blocked Android interface. The main consequence of this method is the complete removal of all user data, so it is suitable for those who have a backup or who are willing to sacrifice data for access to the phone.

To get into the recovery menu, you need to turn off your smartphone completely. Then you need to press the key combination. On most Xiaomi models, this is the Volume Up button and the Power button. Hold them simultaneously until the Mi logo or the Recovery menu appears. Some models may require a charger to be connected.

☑️ Preparation for Hard Reset

Done: 0 / 4

In the Recovery menu, the navigation is done with volume buttons, and the choice is confirmed by the power button. You need to find Wipe Data or Clear Data. Inside this menu, select Wipe All Data. The system will request confirmation several times, since this action is irreversible. Once the process is complete, the phone will restart, and you will see the screen of the initial setting, as when you first turn on.

Action.Keyboard combinationThe result
Entrance to RecoveryVolume + and NutritionRecovery menu
NavigationVolume buttonsMoving on the menu
ConfirmationPower buttonSelection of a paragraph
ExitReboot -> Reboot to SystemReboot to Android

⚠️ After resetting via Recovery on modern versions of Android will work protection FRP (Factory Reset Protection. You will need to enter a password from a Google account or Mi Account that was synced to the device before the reset. Without this data, the phone will remain locked.

Use of debugging by USB and ADB

For advanced users who have pre-installed debugging USB (USB Debugging) in the "Developers" menu, there is a technical way to delete a file with a key through a computer. This method does not require data reset, but it does not work on all devices and versions of Android, as modern security systems restrict access to system files even with rights. ADB.

You'll need a computer, USB-cable and installed drivers ADB. Connect your phone to a PC. If the phone asks for debugging permission (which is unlikely if it's locked, but possible if you've previously ticked "Always Allow from this computer"), confirm it. Open the command prompt or terminal on your computer in the folder with the ADB.

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-shm

Once these commands are executed, the file storing the hash of the pattern lock will be deleted. Next, you need to restart the device. On some smartphones, after rebooting, the screen can still request input, but any key or password entered will be accepted by the system as correct. On newer versions of MIUI, this method often does not work due to increased security requirements.

  • 💻 Requires PC and basic command line skills.
  • ⚙️ The method is effective only if previously included debugging USB.
  • 🔐 No guarantee of success on Android 10 and higher due to data encryption.

If the adb shell command issues an access error or writes "device unauthorized," then the method will not work, in which case there is nothing left but to resort to a complete reset via Recovery, described in the previous section.

Features of unlocking on different versions of MIUI

Xiaomi firmware varies considerably by region (Global, China, EEA) and Android version. For example, older versions of MIUI (up to 9-10) had a vulnerability that allowed you to unlock your phone through the emergency call menu, but in modern versions (MIUI 12, 13, 14, HyperOS) these security holes are closed. Understanding your system version helps you assess the chances of successfully unlocking without losing data.

Chinese firmware versions often lack Google’s default services, making Google Find Device a non-working method unless you have installed GMS yourself. At the same time, Chinese Mi accounts may have restrictions on using Find Device outside of China, although the functionality has been unified in recent years.

The Impact of Android Version on Security
With the release of Android 11 and the introduction of Scoped Storage, direct access to system files through ADB without root permissions has become almost impossible for the average user.

If you have a digital password or a complex mixed password, the chances of matching or bypassing are minimal. The pattern lock has fewer variations (389,112 combinations for 9 points), which theoretically allows for brute force techniques, but in practice modern phones are locked after 5-10 failed attempts, requiring a wait of 30 seconds to 24 hours.

  • 🇨🇳 Chinese firmware may require Chinese number to restore Mi Account.
  • 🌍 Global versions are more integrated with Google services.
  • 🆕 HyperOS strengthens bootloader protection, complicating third-party interventions.

Users should remember that with each security update, Google and Xiaomi close the door to bypassing locks, so relying on cloud services and regularly creating backups becomes critical.

Prevention and backup

The best way to avoid the stress of losing access is to set up your device correctly in advance. Regularly backing up data to the Xiaomi Cloud or Google Drive cloud ensures that even if you reset completely, you can quickly restore contacts, photos and app settings.

Write your passwords and graphics keys down to a safe place, like a paper notebook or password manager on another device. Human memory is prone to errors, especially when we come up with complex security combinations. It's also useful to link a backup phone number to the device, which you can get an SMS to access.

💡

Use biometrics: Set up fingerprint or face unlock as the primary method, and leave the pattern lock as backup. You can't forget biometrics.

Check the status of Find Device. Go to the security settings and make sure the switch is active. Check the health of your accounts periodically by logging in on other devices, which will help you detect problems with accessing your account while the phone is still unlocked.

Action.FrequencyWhere to find out
BackupWeeklySettings -> Advanced -> Copying
Account verificationOnce a monthSettings -> Accounts and Synchronization
Update of the POOn leaving.Settings -> About the phone

And if you follow these simple rules of digital hygiene, you'll feel secure, and even if you forget the key, having a fresh copy of the data will turn a nasty dumping procedure into a quick fix.

⚠️ Warning: Do not install third-party applications to lock the screen from unverified sources, they can conflict with system protection and complicate the recovery process, as well as carry the threat of virus infection.

💡

Regular sync with the cloud is the only guaranteed way to avoid losing data when you forget your password.

Frequently Asked Questions (FAQ)

Can I unlock Xiaomi without losing data?
Yes, this is only possible in two cases: if Google Find Device works to change your password, or if you have debugging enabled over USB and you can delete system key files via ADB. In all other cases, including reset via Recovery, the data will be deleted.
What if the phone says "Device locked" after resetting?
This is FRP (Factory Reset Protection) protection, and you need to enter the login and password from the Google account or Mi Account that was the main one on this device before the reset, and if you forget this data, you will have to restore access through support sites of Google or Xiaomi.
Will unlocking through Find Device work if your phone is without a SIM card?
Yes, if the phone is connected to Wi-Fi. To transmit a command to unlock or change the password, the device needs any Internet access, the type of connection (mobile or Wi-Fi) does not matter.
How long does the phone stay locked after the key is entered incorrectly?
After 5 wrong attempts, the lock lasts 30 seconds. Then the time increases: 1 minute, 5 minutes, 15 minutes, etc. After many failed attempts, the phone may lock for an hour or require a login to Google account to continue trying.
Will the phone help to remove the lock?
Fastboot flashing is basically like resetting through Recovery, which will clear all the data, but FRP protection doesn't get removed, and once you've done it, the phone still needs to enter a password from a previously synchronized account.