How to unlock Xiaomi Redmi: Delete the pattern lock

Xiaomi Redmi’s owner forgets a pattern lock or pin code, and the lock screen becomes an insurmountable barrier to hiding important contacts, photos and apps, and unlike simple reboots, more drastic action is needed because Android’s security system is designed to protect data from outsiders.

There are several proven ways to restore access to the device, but they have their own nuances: some methods allow you to save data, others require a complete reset. The choice of the specific algorithm depends on the model of your smartphone, the version of the MIUI firmware and the presence of binding to accounts.

In this article, we will look at the current methods of bypassing locks that work on most devices in the Redmi and Poco line, we will examine both software methods through standard interfaces and more complex technical solutions. Read carefully each step, so as not to complicate the situation and not lose important information irretrievably.

Using a Mi Account to unlock

The easiest and safest way that Xiaomi ecosystem developers have in mind is to sign in via Mi Account, and if you've previously linked your device to your account and enabled Find a Device, the system will suggest unlocking the screen after several failed typing attempts, a standard feature that doesn't require third-party software.

After five incorrect pattern lock inputs, the screen will have a countdown timer and a button "Forgot the key?" or "Forgot the password?". By clicking on it, you can log in by entering the username and password from the Mi Account. It is important that the smartphone is connected to the Internet at this point via Wi-Fi or a mobile network, otherwise the verification of the credentials will not pass.

💡

Make sure that the date and time on the device are set correctly if possible, as sync errors can prevent authorization on Mi servers.

This method doesn’t work on all firmware versions. With the new MIUI 12, 13 and 14 updates, the company has increased protection, and the restore button may not be available, but it’s the first option worth trying, as it ensures that all user files and system settings are safe.

⚠️ Note: If you forget the password from your Mi Account, it will be impossible to restore access through Xiaomi servers, in which case you will have to resort to a complete reset of the device, which will lead to the deletion of all data.

Resetting settings via Recovery Mode

The most versatile method, which works on 99% of Android devices, including the Redmi Note and Xiaomi Mi series, is to enter Recovery mode, which allows you to perform low-level operations with the system, such as clearing the cache or full reset (Wipe Data), a radical method that returns the phone to a factory state.

To enter Recovery mode, you need to turn off your smartphone completely. Then you need to press the combination of buttons: usually a Volume Up button (Vol+) and a Power button. Hold them simultaneously until the Mi logo or recovery menu appears. Some models may require a charging cable connection.

1. Turn off the smartphone completely

2.Clasp Volume Up + Nutrition

3. Select a language (English)

4. Press Wipe Data.

5. Confirm the action and wait for the reboot-->

In the Recovery menu, the control is done with volume buttons (up-down), and the choice is confirmed by the power button. You need to find Wipe Data or Clear Data, then select Wipe All Data. The system will request confirmation, often requiring you to choose Confirm or Yes. Once the process is complete, the phone will restart and the lock will be removed, but all data will be destroyed.

What if Recovery asks for a password?
On some new models with Find Device enabled, logging into Recovery may require a password from your Mi Account. If this happens, you won’t be able to bypass the lock without your account data by standard methods – you will need to contact the service or use specialized software to unlink.

Removing the lock via ADB (Android Debug Bridge)

For more advanced users who have previously included debugging USB (USB Debugging) in the developer menu, there is a way to delete the key file through the computer, this method allows you to remove the lock without losing data, but it only works if the corresponding option was activated before the problem occurred.

You'll need a computer with ADB drivers installed and a smartphone connected by cable. After you connect to the command line (Terminal or CMD), you'll need to enter a command to delete the system file that stores the hash of the pattern lock, which is a gesture.key file or password.key located in the system directory.

adb shell rm /data/system/gesture.key


adb shell rm /data/system/password.key

Once you've done the commands, you need to restart the device. The next time you turn on, the system won't find the key file and will suggest you set a new lock or leave the screen unlocked. This method is effective on older versions of Android, but in modern MIUI builds, access to these files can be limited even with debugging rights.

MethodData retentionDifficultyA PC is needed.
Mi Account.Yes.Low.No.
Recovery ModeNo.MediumNo.
ADB TeamsYes.Tall.Yes.
Service centreDepends.Low.No.
📊 Have you ever had a screen lock on Xiaomi?
Yeah, I forgot my password.
No, I'm using a print.
Yeah, the kid blocked it.
No, but I'm afraid to face it.

Google's "Find the Device" service

Another official tool from Google that can help in a critical situation: Find My Device allows you to remotely control your smartphone if it is geolocated and logged in to your Google account. The functionality of the service changes periodically, but the possibility of reset remains relevant.

Go to android.com/find from any other device (computer or phone) and log in to the same Google account used on a blocked Redmi. If the system sees the device online, you will be prompted to play the audio, lock or clear the device.

Selecting the Erase Device option will initiate a remote factory reset. As with Recovery, this will result in the complete deletion of all files, photos and apps. However, this is the only way to unlock your phone remotely if you are away from it and your Mi Account is lost.

⚠️ Note: After resetting through Google account, when you first turn on the phone will require you to enter a password from the same Google account (protection) FRP). If you don’t remember it, the device will turn into a brick before Gmail is restored.

Features of unlocking on different versions of MIUI

The MIUI shell has many modifications, and the security behavior is different. Global ROMs often run Google’s standard methods, while Chinese versions (CN ROMs) may have more stringent limitations or specific vulnerabilities.

On MIUI versions 11 and below, there was a possibility of unlocking through Safe Mode or exploiting vulnerabilities in the interface, but in MIUI 12, 13, 14 and HyperOS, these holes were closed.

💡

The newer the MIUI version, the harder it is to get around the lock without losing data. On current firmware, a complete reset is almost the only guaranteed solution.

Owners of unlocked bootloaders are more fortunate than those who can flash customized recaps (such as TWRP) and delete key files via the Recovery file manager, saving the data. However, the process of unlocking the bootloader requires an unlocked phone to obtain permission from Xiaomi.

Prevention and backup

To prevent a forgotten password from becoming a disaster, it’s important to set up a backup system in advance. Xiaomi offers built-in tools for syncing contacts, SMS, call logs and even desktop layout with the Mi Cloud or Google Drive cloud.

Check your sync settings regularly. Go to Settings → Mi Account → Sync and make sure all important items are ticked. It’s also helpful to make local backups to your memory card or computer periodically, especially before installing major system updates.

Write your passwords and graphic keys down to a safe place, like a paper notebook or a password manager on another device. Human memory is imperfect, and complex combinations designed to protect us are often forgotten at the most inopportune time. Prudence will save you hours of time and nerves in the future.

Can I unlock Xiaomi without losing data?
Without loss of data, you can unlock the device only if you log in through your Mi Account (the “Forgot password” button on the lock screen) or if you have debugging over USB and deleted the gesture.key file via ADB. In all other cases, especially when using Factory Reset, 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 type in a Google account that was synced to your phone before the reset, and if you forget it, you'll need to get around FRP through a utility or go to the service.
How long does it take to reset through Recovery?
The process of formatting the data takes from 1 to 5 minutes depending on the amount of memory, but the first download after reset can take up to 10-15 minutes, as the system performs the initial setup and verification of the files.
Will a phone call help to remove the lock?
On very old versions of Android (up to 5.0-6.0), there was a method of calling and receiving a call with a transfer to retention to access the menu. On modern Xiaomi Redmi, this method does not work, since the call interface does not give access to the system settings.