How to unlock Xiaomi if you forgot a graphic drawing: a step-by-step guide

When you pick up a smartphone and realize you can't remember a security pattern, it's familiar to many Xiaomi users. The lock screen is the first frontier of security, but it often becomes an insurmountable barrier for the owner. In a hurry or because of stress, the fingers draw the wrong lines themselves, and after several attempts, the device is locked for a while or requires an account to be entered.

It's important to understand that modern versions of the MIUI and HyperOS shells have enhanced data protection, and just guessing the combinations won't help, and system constraints don't allow you to just bypass the protection without losing information or having special tools, but there are several proven methods that will help you regain access to the gadget.

In this article, we will discuss all the current ways to restore access, from using a cloud account to completely resetting your settings. We will look at the nuances of working with a Google account and the specific methods for different versions of Android.

Using Mi Account to remove the lock

The most civilized and safest way the manufacturer provides is to use the Find Device function. If you have logged in to Mi Account and the Internet is turned on on on your smartphone, you can remotely unlock the screen, which does not require data resetting, which is a huge plus for saving photos and contacts.

To implement this plan, you will need a computer or other smartphone with access to the network, you must go to the official website of the Xiaomi cloud service and log in under the same account that is used on the locked device, the system will automatically identify your gadgets.

Once you log in, select your phone from the device list. From the management menu, find the option "Unlock" or "Erase Data." Note that some firmware versions may replace the unlock function with a full reset, but you should try with a soft unlock.

  • πŸ”‘ Make sure the phone is on the internet (Wi-Fi or mobile data) or the command won't get through.
  • πŸ“± Entry into Mi Cloud must be done in advance, before blocking.
  • 🌐 The function only works if the device appears in the "Find Device" list as online.

⚠️ Warning: If you see a message that the device is offline, the command to unlock will only be executed after it is connected to the network. SIM-map, if you are hoping for this method.

This is ideal for those who have taken care of their account prior to the link, and it demonstrates the effectiveness of Xiaomi’s ecosystem by allowing you to manage your device remotely, but if the Internet on your phone has been turned off or your account has not been tied, you will have to move to more radical measures.

What to do if you forget your Mi Account password?
If you don't remember your account password, try to restore it through your email or phone number on the login page. Without re-accessing your account, remote unlocking is impossible.

Resetting with Recovery Mode (Hard Reset)

If cloud-based methods are not available, the only working option is to completely reset your settings to factory settings, a process called Hard Reset, which results in the complete deletion of all user data: photos, apps, correspondence and settings, and the phone will return to the state it was in immediately after purchase.

To get into the recovery menu, you need to use a combination of physical buttons. On a smartphone that is turned off, press the volume button and the power button at the same time. Hold them until the Mi logo appears, then release the power, continuing to keep the volume.

In the Recovery menu, you can control volume (up/down) and power button (select). You need to find Wipe Data and select Wipe All Data. The system will require confirmation, usually you need to select Confirm or type in the word "yes" if a text field appears.

β˜‘οΈ Preparation for Hard Reset

Done: 0 / 4

The reset process can take a few minutes. Once it's done, the phone will automatically restart. The initial setup will take time, because the system needs to prepare the files. Be prepared that the first run will take longer than usual.

Action.The resultData security
Wipe CacheClearing temporary filesData saved
Wipe All DataComplete resetting of settingsAll deleted.
RebootSystem restartNo change.
Connect with MIAssistantFirmware mode via PCDepends on the action.

It's important to note that once reset, the phone will request proof of ownership, which is FRP (Factory Reset Protection) theft protection, and you'll need to enter the login and password from the Google account or Mi Account that was synced to the device before locking.

πŸ’‘

If you plan to sell the phone, be sure to reset through the settings menu, not with buttons to untie accounts.

Unlocking with Google Find My Device

An alternative to Xiaomi’s branded service is Google’s standard tool: If you log in to a Google account and geolocate on a locked smartphone, you can use Find Device, which also often results in complete deletion of data, but it’s universal for all Android smartphones.

Go to android.com/find from any other device, log in to the Google account that was used on the locked phone, and the map will show the location of the device if it is online.

In the menu on the left, select the option "Clean the device." The system will warn you that all data will be deleted. Once confirmed, the phone will receive a reset command. This action is irreversible, but it is guaranteed to remove the pattern lock.

  • πŸ“ Requires an active Internet connection on a locked device.
  • πŸ”’ After reset, you will need to enter a password from Google-acca.
  • πŸ“² Notification of the reset may not come immediately, be patient.

There is a nuance: on some older versions of Android (up to 7.0) through this service you could just change the password lock screen, but on modern Xiaomi with MIUI 12/13/14 and later only a full wipe works.

⚠️ Warning: If your phone has two-factor authentication, make sure you have access to your phone number or backup email to log into your Google account from another device.

Use of USB and ADB debugging (for advanced ones)

This method is only suitable for those users who have pre-enabled the USB Debugging feature in the Developer Menu. If this option was activated before blocking, you have a chance to delete the lock key file without losing data.

You'll need a computer, USB-cable and installed Xiaomi drivers, as well as utility ADB (Android Debug Bridge. Connect your phone to your PC and open the command line in the folder with ADB. Enter a command to check the connection:

adb devices

If a device has been listed, the connection is established, then you need to delete the files that store the graphic keys. Depending on the version of Android, the paths may differ, but the following commands are most often used:

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 you've done the commands, restart the phone. The lock screen should disappear or allow any pattern to be entered. However, if the debugging wasn't enabled in advance, this method won't work, because the phone will request permission to connect on the lock screen itself.

πŸ“Š Have you had the debugging enabled on USB lock-in?
Yeah, it was on.
No, he didn't.
I don't know what it is.
I use an iPhone.

Features of unlocking different models Xiaomi

The procedure for restoring access may vary slightly depending on the smartphone model.The flagship Xiaomi Mi and Xiaomi series (digital series) often have stricter security restrictions compared to the budget Redmi and POCO lineups.

For example, models with high refresh rate screens sometimes have problems with the response of the touchscreen in Recovery mode. USB-mouse-over OTG. This will allow you to click on the menu items accurately if the sensor is not listening.

Devices with Snapdragon and MediaTek processors can react differently to combinations of recovery buttons. Some Redmi Note models require a power cable to be connected while the buttons are pressed, otherwise the menu will not appear.

  • πŸ“± For models without control buttons (sensor only), the entrance to Recovery is carried out by clamping volume and power.
  • πŸ”Œ Use of original cable is critical for stable connection to PC.
  • ⚑ In some models POCO You need to press both volume buttons at the same time as the power supply.

Also, consider the age of the device. On older models running Android 6-8, there were vulnerabilities that allowed you to bypass locking through the camera or call, and in modern HyperOS firmware, these security holes are closed.

Theft and FRP Protection: What You Need to Know

Once you successfully reset your settings, you'll encounter an activation screen, and this is where FRP (Factory Reset Protection) comes into effect, which is Google's protection, which prevents the stolen phone from being used after being reset.

The system will require you to enter a password from a Google account that was synced on the device before the reset, and if you don't remember this password, it will be extremely difficult to restore access, similarly, Mi Account protection works: if the phone was linked to the Xiaomi cloud, it will require you to enter a password from the Mi Account.

Don’t try to buy FRP unlock services from unsavory sellers, often it’s a scam or the use of temporary exploits that stop working after a security update, and the best way to do so is to recall your account details or restore them through standard password recovery procedures.

⚠️ Warning: Buying a used phone without checking for account detachment is a high risk. If the previous owner did not log out of the Mi Cloud, the phone will turn into a brick after resetting.

Understanding FRP will help you avoid any problems in the future, always untether your device from your accounts before selling or sending it for repair, and this is a digital hygiene rule that applies to any smartphone user.

Frequently Asked Questions (FAQ)

Can I unlock Xiaomi without losing data?
Without data loss, it is possible only if the Internet was turned on and the Find Device function in the Mi Cloud was working, or if debugging over USB was enabled. In other cases, especially when using Hard Reset, the data will be lost.
What if the phone says "Device locked" after resetting?
This is FRP protection. You need to enter the username and password from a Google account or a Mi Account that was on your phone before the reset, and without that data, you can't legally unlock the device.
How long do you have to wait after 5 wrong attempts?
The lock time increases exponentially, from 30 seconds to 12 hours or more. If you see a timer, it is better to wait or try to remember the pattern, as after a long wait, the attempt counter may reset.
Will the phone be able to remove the lock?
Official flashing through the Mi Flash Tool also results in complete deletion of data, and if Mi Account protection is enabled, the phone will still request the account password when it is first activated after the firmware is installed.