After five incorrect attempts to enter a pattern, the screen of the Xiaomi smartphone is blocked, requiring confirmation through your Mi account or complete deletion of data. Built-in MIUI security reliably encrypts information, but becomes an insurmountable obstacle if you forget the sequence of connecting the dots. To regain access to the device without losing files or through a hard reset, you can use several proven unlocking methods provided by the Android ecosystem and the functionality of the manufacturer's shell.

Before taking decisive action, you need to assess the current state of the device. Is your phone connected to the Internet? Is the account Mi Accountactive? These nuances directly affect the choice of unlocking strategy. In some cases, you will be able to save photos and contacts, in others, you will have to do a full factory reset. We will look at each scenario in detail so that you can choose the most suitable and safe option for your model.

It is important to understand that there is no universal “magic button” that will instantly remove the blocking without consequences. The methods offered online range from secure cloud services to complex manipulation of system partitions. Some methods require preliminary preparation, which is difficult to do if the phone is already locked. Therefore, carefully study the instructions below to minimize the risks of losing important information.

Using the Mi Cloud service for remote unlocking

The most civilized and safest way to regain control of your smartphone is to use the proprietary cloud service from the manufacturer. If your device has been logged in Mi Account and the Find My Device feature has been enabled, you have an excellent chance of avoiding data loss. This method works remotely, so the phone itself can be locked, but it must have an active connection to a mobile network or Wi-Fi.

To start the procedure, you will need any other gadget with Internet access: a computer, tablet or someone else's smartphone. You need to go to the official cloud services portal Xiaomi. Once you enter your credentials, you will have access to your linked devices control panel. The system will show the location of the phone on the map if geolocation is active, and will offer a set of actions to control the gadget.

Among the available options, we are interested in the function of clearing the screen lock. The algorithm of actions is extremely simple: select the desired device from the list, click on the unlock icon and confirm the action. The system will send a command to the phone and the pattern will be deleted. After this, you can enter the menu using a standard swipe or set a new security code.

⚠️ Attention: This method will only work if the phone is online. If the device is turned off or in flight mode, the command will be queued and executed only after a connection appears.

It is worth noting that after such unlocking, the system may require you to re-enter the password from Mi Account at the next reboot. This is a standard security measure to prevent the use of stolen devices. Make sure that you remember the account information, otherwise the phone may turn into a “brick” with an authorization request.

💡

If the Find My Device function was disabled in the security settings, this method will not work. In this case, proceed to the following options for solving the problem.

Resetting settings via Recovery mode (Hard Reset)

If cloud services are unavailable or were not configured in advance, you will have to resort to a more radical method - a hard reset via recovery mode. This method is guaranteed to remove any screen lock, including pattern, fingerprint and Face ID. However, it has a significant drawback: completely clearing the internal memory of the device.

All photos, contacts (not synchronized with the cloud), messages and installed applications will be permanently deleted. The phone will return to the condition it was in immediately after purchase from the store. Therefore, this method should be considered as a last resort when other options have been exhausted or the criticality of data loss is lower than the need to urgently use the smartphone.

To get to the recovery menu, you need to perform a certain sequence of actions with physical buttons. First, turn off the device completely. Then hold down the key combination, which depends on the specific model Redmi or POCO. Most often, this is the simultaneous holding of the volume up button and the power button.

☑️ Procedure for entering Recovery

Done: 0 / 4

When the logo appears on the screen Mi, the power button can be released, but the volume must be held until the main menu appears. The Recovery mode interface usually does not support touch controls, so navigation is carried out using the volume buttons (up and down), and the selection is confirmed with the power button. You need to find the item Wipe Data or Clear User Data.

Inside this section, select the option Wipe All Data. The system will ask you to confirm the operation, as this is an irreversible action. After confirmation, the formatting process will begin, which may take from a few seconds to a couple of minutes. When finished, select Reboot to reboot the system.

⚠️ Attention: On new versions of MIUI (especially with Android 11 and higher), after resetting via Recovery, the device may request a password from the previously entered Mi account (FRP Lock). If you don’t remember it, it will be extremely difficult to unlock your phone.

What to do if the Recovery menu does not appear?

Sometimes entering recovery mode is blocked by developer settings or firmware specifics. Try connecting the switched off phone to the computer with a cable, and then hold down the buttons. On some models, triple pressing the power button before holding the combination helps.

Unlocking through the Google Find My Device service

An alternative to the proprietary service Xiaomi is the standard solution from Google. The mechanism of operation is similar: remote control of the device via a web interface. This method is relevant if your Google account is active on your phone, geolocation is enabled and you have access to the Internet. Unlike Mi Cloud, the functionality here may be slightly limited depending on the version of Android.

Go to the service page Find My Device from any browser. Log in using the same Google account that is used on the locked smartphone. The system will try to determine the location of the device. If the connection is established, you will see three main options: “Ring”, “Block” and “Wipe device”.

The “Block” function allows you to set a new temporary password that will replace the forgotten pattern. Enter the new code twice and confirm. After a few minutes, your phone screen will ask for a new password. By entering it, you will gain access to the system. After this, immediately go to the security settings to disable the lock or set a method convenient for you.

Parameter Mi Cloud Google Find My Device Local reset
Data saving Yes Partially (depending on version) No
Internet requirement Required Required Not required
Complexity Low Low Medium
FRP blocking risk Low Medium High

If the option to change the password is not available, only the “Wipe device” function remains. It works similarly to Hard Reset via Recovery: it deletes all data and removes the lock. Use this option only if the information on the phone is not valuable or you have a recent backup in the Google cloud.

💡

The Google service often works faster than Mi Cloud if the phone has not been synchronized with Xiaomi servers for a long time, but the link to the Google account remains active.

Using USB debugging and the ADB utility

For advanced users who have previously enabled USB debugging in the developer menu, there is a technical way to delete the key file via a computer. This method allows you to reset the lock without losing user data, but it requires drivers, an installed package ADB (Android Debug Bridge) and basic command line skills.

Connect the locked smartphone to the computer using the original USB cable. Open a command prompt or terminal on your PC in the ADB tools folder. Enter the command to test the connection: adb devices. If this computer was previously allowed to trust this computer on the phone screen, you will see the device's serial number in the list.

If the device is detected, you can try to delete the system file that stores the pattern key. Enter the following command into the terminal:

adb shell rm /data/system/gesture.key

After executing the command, restart your phone. The key file will be deleted, and the system will allow you to log in without entering a password. It is recommended to install new protection immediately after logging in. It is worth noting that on modern versions of Android with data encryption, this method may not work, since the partition /data is not writable without unlocking.

⚠️ Attention: If USB debugging was not enabled before the lock, this method is useless. The phone will simply charge from the computer, but will not transfer data for management.

There is also a variation with deleting the file locksettings.dbif deletion gesture.key did not help. The command will look similar: adb shell rm /data/system/locksettings.db. However, the success of this operation highly depends on the processor model and firmware version MIUI.

📊 Did you manage to enter developer mode before the lock?
Yes, debugging is enabled
No, I did not enable it
I don’t know what it is
I only use buttons

Specifics of unlocking new Xiaomi models

Owners of fresh models Xiaomi 13, 14 or the latest versions Redmi Note face enhanced security measures. The company's engineers are constantly improving protection, closing vulnerabilities that were used in old reset methods. In particular, the requirements for identity confirmation after resetting the settings have become more stringent.

The FRP (Factory Reset Protection) mechanism is now activated almost always after a forced restart. This means that even after a successful Hard Reset, the phone will require you to enter the password for the Google account or Mi account that was synchronized with the device before the reset. Without this data, you will not be able to use the phone.

In addition, on many new devices, entering Recovery mode is blocked if the phone has not been previously unlocked at least once after purchase. This is done to protect against theft: an attacker cannot simply erase data and resell the device. In such situations, the only legal way is to contact the service center.

If you are the first owner and have a purchase receipt, the authorized center employees will be able to remove the blocking programmatically, confirming your ownership. Do not try to use dubious paid apps from the Internet that promise to “hacking” any phones - at best, you will lose money, at worst, you will introduce viruses to your computer.

Why do old methods stop working?

Manufacturers update bootloaders and system partitions. Methods that work on Android 9 or 10 are often blocked at the kernel level in Android 13 and 14, making deleting files via ADB impossible without superuser rights (Root).

Prevention and security tips

To prevent the situation of a forgotten password from happening again, you should take care of setting up backup access methods in advance. In the security section of MIUI, you can add a fingerprint or facial recognition as an alternative to a pattern. Biometric data is difficult to forget and allows you to quickly unlock your device in a stressful situation.

It is also recommended to regularly check the synchronization status. Make sure your contacts, photos and notes are automatically uploaded to the cloud. This will not prevent locking, but it will make the reset procedure less painful, since you can quickly restore all important information after wiping the phone.

  • 🔐 Write down a complex password in a safe place (for example, in a password manager on your computer), and not on a piece of paper that may get lost.
  • ☁️ Always keep the “Find” function turned on device" and make sure that the phone periodically goes online to update the status.
  • 🆔 Remember or save in a safe place the login and password for the main Mi Account and Google account - these are your main keys to saving data.

Remember that the pattern key is only one of the levels of protection. To store particularly important information (banking applications, personal photos), it is better to use additional functions, such as “Second Space” or hidden folders, which have their own passwords and do not depend on the main screen lock.

Is it possible to unlock Xiaomi without data loss if the Internet is not turned on?

Unfortunately, without the Internet, remote methods (Mi Cloud, Google Find My Device) do not work. Local methods via ADB require debugging to be enabled. If the Internet is turned off and debugging is turned off, it is almost impossible to save data when unlocking without knowing the password.

What is FRP Lock and how to bypass it?

FRP (Factory Reset Protection) is reset protection. It requires you to enter your account after formatting. You can officially bypass it only by entering the correct data. Unofficial methods (bypass) often stop working after security updates and may be unsafe.

Will a reset via Recovery work on a phone with a dead battery?

No. To enter Recovery mode and carry out the reset procedure, the battery charge must be sufficient (preferably more than 30-40%). If the phone turns off during the formatting process, this can lead to damage to the file system and complete inoperability of the device.

Will resetting the key delete files on the SD memory card?

Usually, a standard reset (Wipe Data) affects only the internal memory of the phone. Files on the external SD memory card remain intact. However, if the card was formatted as internal memory (Adoptable Storage), the data on it will also be encrypted and lost.

Will calling the phone help to remove the lock?

In very old versions of Android, there was a bug that allowed you to get into the settings through the call menu. On modern Xiaomi smartphones with current MIUI firmware, this method does not work, since access to the settings from the call menu is completely blocked by the security system.