How to Undo the pattern lock on Xiaomi Phone: The Complete 2026 Guide

Forgotten pattern lock on Xiaomi smartphone is one of the most common problems faced by Redmi users, POCO and the Mi line. Unlike the Mi line. PIN-If you have a code or a password, you don't always have a lock pattern that's easy to recover from memory, especially if you rarely change it. Fortunately, the manufacturer has a few formal and alternative ways to unlock that don't require you to go to a service center.

In this article, we will discuss all the current methods of removing graphics keys on Xiaomi devices (including models from 2023-2026), from the simplest – using a tied Mi Account, to advanced – through ADB or Fastboot. Special emphasis will be placed on saving user data: you will learn in which cases you can do without a complete reset, and when it is inevitable.

1 Unlocking through Mi Account (official method)

The most secure and recommended method for Xiaomi is to use a Mi Account tied to the device, which works on all modern smartphones of the brand (starting with MIUI 10), if:

  • πŸ“± The phone is connected to the Internet (Wi-Fi or mobile network).
  • πŸ”‘ You have access to email/The phone number associated with the Mi Account.
  • πŸ”„ Find Device has been activated in the settings.

To unlock the phone:

  1. On the lock screen, click Forgot Password? (or Forgot Pattern? on English firmware).
  2. Select the option to Sign in via Mi Account.
  3. Enter your email/phone and account password. If two-factor authentication is enabled, confirm your login via SMS or Mi Security.
  4. Follow the instructions on the screen to create a new pattern lock.

πŸ’‘

If the button "Forgot password?" does not appear, try to enter the wrong pattern 5 times in a row - the system will offer alternative ways of login.

⚠️ Note: If you have previously disabled Find Device in your settings (Settings) β†’ Mi Account β†’ Find the device, this method won't work, so move on to the next section.

2. Reset the pattern lock via Recovery Mode (without loss of data)

If the Mi Account is not tied or you don't remember the login details, you can try resetting the key through Recovery Mode. MIUI 12-14 and does not require a complete reset, but only works if debugging is enabled USB (USB Debugging).

Instructions:

  1. Turn off the phone with a long press of the power button.
  2. Press the Volume Up + Power combination and hold for 10-15 seconds until the Mi logo and Recovery menu appear.
  3. Use volume buttons for navigation and select Connect with MiAssistant (on some firmwares - Advanced β†’ Connect to PC).
  4. Connect your phone to your computer through USB-cable and run the Mi program PC Suite (download from the official website).
  5. In the program, select Unlock and follow the prompts to reset the pattern lock.

Download Mi. PC Suite on PC|Enable debugging on USB (If the phone has been unlocked before)|Use the original USB-cable|Check the battery charge (minimum 30%)

-->

⚠️ Note: On some models (Redmi Note 11, POCO X5) The Connect with MiAssistant may not be available. ADB (section).

3. Full reset to factory settings (Hard Reset)

If the previous methods didn’t work, the radical solution is a complete Hard Reset, which will remove all data from the device, including photos, contacts and apps, so use it only as a last resort.

How to perform the reset:

  1. Turn off the phone.
  2. Press Volume Up + Power to Enter Recovery Mode.
  3. In the recovery menu, select Wipe Data β†’ Wipe All Data (navigation with volume buttons, confirmation – power button).
  4. Confirm the action, wait for the process to be completed (5-10 minutes).
  5. Reboot your device with Reboot β†’ Reboot to System.
Xiaomi modelCombination for RecoveryDoes the reset support data loss without data loss
Redmi Note 12/13, POCO X5Volume up + NutritionNo (full reset only)
Mi 11/12, Mi Mix 4Volume up + NutritionYes (via MiAssistant)
Redmi 10A, POCO M4Volume up + NutritionPartially (depends on firmware)

⚠️ Warning: Once reset, the phone will require input from the Mi Account that was previously tied (Factory Reset Protection) if you don't remember the credentials, the device will become a brick»!

Mi Account|Recovery Mode|ADB/Fastboot|Reset to factory settings|None of the above.-->

4. Unlock through ADB (for advanced users)

The Android Debug Bridge (ADB) method is suitable if the phone has previously enabled USB debugging and access to the computer, which allows you to delete the file with the pattern lock without losing data.

Step-by-step:

  1. Download and install ADB Tools on PC.
  2. Connect your phone to your computer via USB.
  3. Open the command line (cmd) in the adb folder and execute the commands:
adb shell


su




rm /data/system/gesture.key




rm /data/system/locksettings.db




rm /data/system/locksettings.db-wal




rm /data/system/locksettings.db-shm




reboot

After the reboot, the pattern lock will be reset. If the commands don't work, try the alternative:

adb shell am start -n com.android.settings/.ChooseLockGeneric
What if the ADB can’t see the device?
Make sure you have Xiaomi drivers installed (download from the official website). Check if debugging mode is enabled in the developer settings (Settings) β†’ The phone. β†’ Version. MIUI (press 7 times) β†’ Additionally. β†’ For developers β†’ Debugging by USB). Try another one. USB-cable.

5.Using Fastboot to unlock the bootloader

If ADB doesn’t work, you can try unlocking the bootloader via Fastboot.This method requires unlocking the Bootloader (which erases all data) and is suitable for power users.

Algorithm of action:

  1. Turn off the phone and press Volume Down + Power to log in to Fastboot Mode.
  2. Connect the device to your PC and open the command line in the folder with fastboot.
  3. Run the command to unlock the bootloader:
fastboot oem unlock

After that, run the device through the Mi Flash Tool with the official firmware.

⚠️ Attention: Unlocking Bootloader on Xiaomi requires a binding to Mi Account and waiting 7-15 days (on new devices!

6. Alternative methods and warnings

If none of the methods worked, consider the following options:

  • πŸ”§ Contact Xiaomi Service Center (official centers can unlock the device on purchase documents).
  • πŸ“± Use service codes (e.g. #7378423## for reset on some models), but they don’t work on all firmware.
  • πŸ”„ Installation of custom Recovery (TWRP) manual deletion of key files is a risky method that can lead to loss of warranty.

To avoid problems in the future:

  • πŸ” Link Mi Account and enable Find Device.
  • πŸ“ Write the pattern lock to a secure location (for example, in the password manager).
  • πŸ”„ Regularly back up through Settings β†’ Additionally. β†’ Backup.

πŸ’‘

The most reliable way to unlock is to link Mi Account, all other methods either require prior preparation (debugging over USB) or lead to data loss.

FAQ: Frequent questions about resetting a pattern lock

Can you unlock Xiaomi without losing data if USB debugging has been disabled?
No. Without USB debugging enabled or a tied Mi Account, the only option is a full reset via Recovery Mode, which will delete all data.
What to do if your phone requires an old Mi Account after a reset?
This is Factory Reset Protection (FRP) protection, and you can enter the email/password from the account that was linked to the phone before the reset. If you don't remember the data, you can restore access through the Mi Account site.
Does the ADB unlock work on MIUI 14?
Yes, but only if USB debugging was enabled before locking.On newer versions of MIUI (13+), Xiaomi has tightened protection, so the method may not work on some models.
Can I bypass the pattern lock through service codes?
Service codes (e.g. #4636##) do not help reset the pattern lock; they are for diagnostics, not unlocking.
How much does it cost to unlock in the Xiaomi service center?
Official service centers will unlock the device for free if you have a check or a box. Informal workshops can charge 500-2000 rubles, but the risk of fraud is high.