How to remove the pattern lock from Android on Xiaomi phone

It is common for Xiaomi owners to be unable to access the menu because of a forgotten password. Users often set up complex combinations to protect their personal data, but forget them after a long lock or upgrade. Owners of smartphones with a MIUI shell or a new HyperOS face additional layers of security that complicate the process of restoring access.

There are several proven ways to bypass protection or completely reset your device settings. The choice of a particular method depends on the version of the operating system, the presence of a tied Mi Account and the USB debugging enabled. In this article, we will discuss in detail all the current solutions to the problem, from standard functions to the use of the engineering menu.

Donโ€™t panic if the screen is gone and the device requires input. PIN-Most modern Redmi and Poco smartphones allow you to regain control of the gadget without going to the service center.

Staffing ways to unlock through Mi-account and Google

The safest and easiest method that works on older firmware is using the manufacturer's cloud service, so if the device has logged in to Mi Account and enabled Find Device, you can remove the lock remotely, and you need to go to the official cloud service site from your computer or another phone.

Enter your credentials in the appropriate login fields. After you successfully log in, your personal account will display a list of all the devices you have attached to it. Select the device you want from the list, and click the "Unlock" button in the control menu. The system will send a command to your smartphone, and the pattern lock will be automatically deleted.

โš ๏ธ Attention: On new versions MIUI 12, 13, 14 and HyperOS Remote Unlocking feature via web interface is often unavailable or requires pre-setting that users rarely activate in advance.

The alternative is to use Google Find My Device, which is effective if the locked phone is geolocated and logged in to Googleโ€™s profile, a method that involves a complete reset of the device, but allows you to save important data if you enable synchronization.

  • ๐Ÿ”‘ Go to the site. google.com/android/find browser-wise.
  • ๐Ÿ“ฑ Select a locked smartphone from the list of devices at the top of the screen.
  • ๐Ÿ—‘๏ธ Click the "Clean Device" button to perform Factory Reset.
  • โœ… Wait for the reboot and perform the initial system setup.

โš ๏ธ Warning: Once reset via Google, the device will require you to enter a password from a Google account that was previously synced (FRP), It is impossible to avoid without the ownerโ€™s data.

Cloud services are the most civilized way, requiring no cables or third-party software, but their effectiveness declines with each new Android security update, and if standard methods fail, more sophisticated technical solutions will have to be resorted to.

๐Ÿ“Š Do you use cloud services for backup?
Yeah, all the time.
Only photos and contacts
No, I keep everything local.
I don't know what it is.

Recovery Menu (Hard Reset)

If remote methods don't work, the only option is to force resets through recovery mode, a process called Hard Reset, which puts the phone out of the box, and all user data, including photos, contacts and apps, will be permanently deleted.

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 them until the Mi logo appears, then release the power button, continuing to keep the volume. The main recovery menu will open.

โ˜‘๏ธ Algorithm of actions in Recovery

Done: 0 / 1

Navigation in the menu 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. In the next menu, select Wipe All Data and confirm the action. The formatting process takes from 10 seconds to several minutes.

Once the procedure is complete, the phone will automatically restart. The initial launch may take longer than usual as the system creates new configuration files. Be prepared to enter your Wi-Fi and Google account password to confirm ownership.

Action.The resultData security
Wipe DataTotal resetNo.
RebootReboot.Yes.
Connect with MIAssistantFirmware modeDepends on the method.
Safe ModeNo third-party appsYes.

It is important to understand that Hard Reset does not remove the account lock if it has been installed. PIN-If the phone was stolen and locked remotely by the owner, this method will not help to start the device.

Use of debugging by USB and ADB

For advanced users who have pre-installed USB debugging in the developer menu, there is a way to delete the key file through the computer, which allows you to save data, because we do not reset the system, but only delete a specific system file that stores password information.

You'll need a computer with ADB drivers installed and a USB cable itself. Connect the locked smartphone to a PC. If the drivers are installed correctly, the computer will recognize the device. Open the Command Prompt (CMD) or PowerShell in the ADB tool folder.

adb devices


adb shell rm /data/system/gesture.key




adb shell rm /data/system/keyguard/locksettings.db




adb shell rm /data/system/keyguard/locksettings.db-shm




adb shell rm /data/system/keyguard/locksettings.db-wal




adb reboot

Once the commands are executed, the phone will restart. When you turn on, you can see the lock screen, but any pattern lock or password entered will be accepted by the system as correct. Or the lock screen will disappear completely. This method works on older versions of Android (up to 9-10 versions), since in new versions the /data/system partition is protected by encryption.

There is also a simplified version through ADB-enabled file managers, such as TWRP Recovery or specialized programs like ADB AppControl. They allow you to visually find and delete the desired files without manually entering commands. However, installing a custom recap (TWRP) on a locked phone often requires an unlocked bootloader, which creates a vicious circle.

โš ๏ธ Note: On Android 11, 12, 13 and above, access to system files via ADB The key removal commands will return the error "Permission denied.

Unlocking with Fastboot and Mi Flash Tool

Fastboot is a low-level protocol that allows you to interact with your phone's memory directly, and you can reflash your device completely, which is guaranteed to delete any pattern lock, and you'll need the official Mi Flash Tool utility and a Fastboot firmware file.

Entering Fastboot mode on Xiaomi is done by pressing the volume button and the power button on the device turned off. The screen will show an image of a rabbit repairing an android, or the words FASTBOOT. Connect the phone to the computer with a cable.

Launch the Mi Flash Tool on behalf of the administrator. Press the Refresh button to allow the program to detect the device. En route to the firmware, specify the folder with the official firmware files unpacked. It is important to select the clean all mode that completely erases the user partition.

  • ๐Ÿ’พ Download the current Fastboot firmware for your model from the official website.
  • ๐Ÿ”ง Unpack the archive in the root of the C disk (the path should not contain Cyrillic).
  • ๐Ÿ”Œ Transfer your phone to Fastboot mode and connect to the PC.
  • ๐Ÿš€ Press the Flash button in the program and wait for the green Success inscription.

The firmware process takes 200 to 600 seconds; interrupting the process or disconnecting the cable is strictly forbidden, as this can lead to a brick of the device. Once successfully firmware is installed, the phone will boot as new, requiring initial setup.

The feature of modern Xiaomi devices is the need for an unlocked bootloader to run global versions or change the region. If the bootloader is blocked, the Mi Flash Tool will give an error, in which case there is only a wait of 168 hours (7 days) after submitting an application in the Mi Unlock application, or using paid unlock services.

Specifics of unlocking different versions of MIUI and HyperOS

The password deletion procedure varies considerably depending on the version of the shell installed. On older versions of MIUI 10 and MIUI 11, vulnerabilities were often encountered that allowed you to reset the key through safe mode or certain combinations in the call menu.

In MIUI 12 and MIUI 13, security was enhanced, and a mandatory Mi Account binding was made when resetting via Recovery, and even after Hard Reset, the phone would require you to enter a password from an account that was synced before locking, making it useless to simply reset your account information.

With the exit. MIUI 14 and especially HyperOS based on Android 13/14, The encryption system is even stricter, and the encryption keys are now tied to the hardware IDs and the user's password. PIN-In the code or pattern lock, the data remains unreadable even when the memory chip is connected to the programmer.

MIUI versionResetting methodI need a Mi Account.Data retention
MIUI 10-11Recovery / ADBNo.Maybe (ADB)
MIUI 12-13Recovery / FastbootYeah (after reset)No.
MIUI 14Fastboot / ServiceYes (required)No.
HyperOSFastboot / ServiceYes (required)No.

Users of newer versions of the OS should note that standard methods of bypassing locks through the engineering menu (##6484###) now also often require confirmation of the lock screen password before logging in. The era of simple rounds is over, and the main emphasis is on recovery through the account.

What to do if your phone requires an account after a reset

Once you have done Hard Reset or flashed it, you may come across an activation screen where the system will require you to enter a password from a Google account or Mi Account, a FRP (Factory Reset Protection) protection mechanism designed to protect data in the event of a device being stolen.

If you remember your login and password, it's okay. But if you lose it, it gets complicated. There are ways to bypass Google accounts. FRP through special combinations in the availability menu or installation APK-Files via browser, but these vulnerabilities are quickly closed by security patches.

In the case of Mi-account, it is almost impossible to bypass the security without access to the mail or phone number to which the account is registered. You will have to use the account recovery procedure through the Mi Account website, providing a check for the purchase of the device or a box with a copy of the account. IMEI-support-code.

There are paid services and boxed solutions for removing FRP, but using them carries risks. Unprofessional intervention can lead to a complete lock of the device on the IMEI in the manufacturerโ€™s database, turning the phone into a useless piece of plastic.

Frequently Asked Questions (FAQ)

Can I delete my pattern lock without losing my photos and contacts?
Without data loss, this is only possible in two cases: if you had USB debugging enabled and you use ADB to delete system key files (works on Android 9 and below), or if you remember the password and just want to change the way you lock. On modern Android 11+, it is almost impossible to save data with a forgotten password due to encryption.
Will Recovery Reset Work if Mi Cloud Protection Is Enabled?
Yes, the reset itself through Recovery (Wipe Data) will be successful and the pattern lock will be deleted, but the first time you download it after the reset, the system will require you to enter a password from the Mi Account that was previously associated with the device, without which you will not be able to use the phone.
How to log in to Recovery if the volume buttons don't work?
If the physical navigation buttons are faulty, you can't log in to Recovery in the standard way. ADB And you can type in the adb reboot recovery command, and sometimes it helps. USB-cable to the phone switched off with one of the volume buttons clamped, but it depends on the model.
Will the pattern lock be removed if you just discharge the phone?
No, battery drain won't remove the password. When you charge the phone and turn it on, the system will again require you to enter a pattern lock or password. The only thing that can happen with a long discharge is a time and date reset, but not security settings.
Is it safe to use software to reset your password from your computer?
Most free software that promises to โ€œinstantly reset Xiaomi passwordโ€ is either a virus or requires a paid subscription that doesnโ€™t guarantee results. Official tools like the Mi Flash Tool are safe, but they completely erase data. Third-party software can damage the bootloader or install malware.