How to Reset or Change the pattern lock on Xiaomi Smartphones: All Working Methods

Forgot the screen unlock combination on Xiaomi, Redmi or POCO? Or just want to change the pattern lock to a more complex one? In this article, 5 proven ways to change or reset the lock pattern, including methods through Mi Account, Restore Mode and even ADB for advanced users. The instructions are relevant for all devices on MIUI 12-14, including Xiaomi 13/14 models, Redmi Note 12 and POCO F5.

The pattern lock is one of the most unreliable ways to protect it: it's easy to peek or forget. If you typed the wrong pattern 5 times in a row, the system will suggest unlocking the phone via Mi Account or Google (on older versions of Android). But what if the account is not tied or you don't remember the password? We will analyze all scenarios from standard to emergency, including the hidden method through Emergency Call for some models.

1. Standard method: changing the pattern lock through settings

If you remember the current pattern and just want to update it, use the built-in MIUI settings.This method works on all Xiaomi devices, regardless of the firmware version.

Go to the menu:

  • πŸ“± Settings β†’ Passwords and security β†’ Screen locking
  • πŸ”’ Enter the current pattern lock (or PIN/password if you use them)
  • 🎨 Select β€œpattern lock” and draw a new pattern (minimum 4 dots)
  • βœ… Confirm the changes with re-entry

On MIUI 14, the screen lock menu also has additional options:

  • πŸ”„ Automatic locking (after 5–30 seconds of inactivity)
  • πŸ‘οΈ Face unlock (requires Face Unlock settings)
  • πŸ“± Smart Blocking (Unlocking in Trusted Networks)

Remember the current pattern or PIN

The device is charged at least 30%

Connected to Wi-Fi (for synchronization of Mi Account)

VPNs disabled (can block access to Xiaomi servers)

-->

If after changing the key, the screen starts to spontaneously unlock, check the Smart Lock settings or turn off the Up to Wake Up function in Settings β†’ Display.

2 Unlocking through Mi Account (if you forgot the key)

The most reliable way to restore access is to use the Mi Account, which works even if you have never entered your account password after setting up your phone.

After 5 failed attempts to enter the pattern lock, the button "Forgot your password?" will appear.

  1. πŸ“§ Enter the email or phone number associated with the Mi Account.
  2. πŸ”‘ Get the confirmation code by SMS or.
  3. πŸ”“ Enter the code and create a new pattern lock or PIN.
What to do if the Mi Account code does not come in?
1. Check the Spam folder in the mail. 2. Make sure that SIM-The card is inserted into the phone (for SMS). 3. Try requesting the code through another browser or device. 4. If the account is not tied, proceed to the Hard Reset method (see section 4).

Important: If the phone was purchased from hand, the previous owner could not delete his Mi Account, in which case unlocking through the account is impossible - a full reset will be required (see section 4).

⚠️ Note: Some Xiaomi models (e.g. Redmi) 9A or POCO M3) After 10 failed key attempts, the device can automatically lock for 24 hours, in which case you can only wait or drop through Fastboot.

3. Reset the pattern lock via ADB (for advanced)

If you have debugging enabled USB (USB Debugging, you can reset the pattern lock through ADB It's a data-free method. MIUI 12–14, but requires a computer and minimal command line knowledge.

Step-by-step:

  1. πŸ–₯️ Connect your phone to your PC through USB-cable.
  2. πŸ“₯ Download. ADB Tools and unpack in a separate folder.
  3. 🐍 Open the command line (Windows) or the terminal (Mac/Linux) file ADB.
  4. πŸ”§ Enter the commands in turn: 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 phone will unlock, but all lock settings will reset – you will need to configure a new PIN or pattern lock.

⚠️ Note: If the bootloader is not unlocked on the phone, the su command will not work. In this case, use the method with Fastboot (section 5) or Hard Reset (section 4).

Change through settings

Mi Account

ADB

Hard Reset

Never blocked.

-->

4.Hard Reset – the last resort

If other methods fail, you can still reset hard through Recovery Mode, which removes all data from your phone, including photos, messages and apps, and only use it as a last resort!

Instructions for Xiaomi/Redmi/POCO:

  1. πŸ”„ Turn off the phone.
  2. πŸ”§ Press the power button. + Volume up 10-15 seconds until the Mi logo appears.
  3. πŸ“± In the Recovery menu, select β€œWipe DataΒ» β†’ Β«Wipe All Data (use volume buttons for navigation, power button for confirmation).
  4. βœ… After reset, select "RebootΒ».

On the newer models (Xiaomi 13/14, Redmi Note 12), the Recovery menu can be in Chinese. Look for items with characters "" (clear data) and "" (reboot).

Model phoneCombination for RecoveryFeatures
Xiaomi 11/12/13/14Food + Volume upMenu in Chinese, look for ""
Redmi Note 10/11/12Food + Volume upEnglish menu, "Wipe Data" item
POCO F3/F4/F5Food + Volume upYou may need to connect to Wi-Fi after resetting
Redmi 9A/9CFood + Volume upLong retention (15+ seconds)

πŸ’‘

If the phone asks to enter the old Mi Account after the reset, the Xiaomi security mechanism (Mi Cloud Lock) has been activated, in which case you will need to enter the account details of the previous owner or contact the support with proof of purchase.

5. Unlock via Fastboot (for unlocked bootloader)

If your Xiaomi has a Bootloader Unlocked, you can reset the pattern lock through Fastboot without losing data, a method that is more complex than ADB, but works even without USB debugging enabled.

What you need:

  • πŸ–₯️ Computer with installed ADB/Fastboot Tools
  • πŸ”Œ USB-cable (preferably original)
  • πŸ“„ File. twrp.img For your model (download from the official website)

Instructions:

  1. πŸ”„ Turn off the phone and shut down the power. + Volume down for entrance to Fastboot.
  2. πŸ“₯ Connect your phone to your PC and check the connection with the command: fastboot devices (should display the serial number of the device).
  3. πŸ”§ Enter commands in turn: fastboot flash recovery twrp.img fastboot boot twrp.img
  4. πŸ“± On the menu. TWRP Choose "AdvancedΒ» β†’ Β«File Manager and delete files: /data/system/gesture.key /data/system/locksettings.db
  5. βœ… Reboot the phone.

⚠️ Note: On models with a locked loader (Xiaomi) 12S Ultra, Redmi K50 Pro) attempt to flash TWRP Check the status of the bootloader with the command: fastboot oem device-info Search for Device unlocked: true.

6. Hidden method via Emergency Call (not working on all models)

This method only works on older versions of MIUI (up to 12.5) and some models of 2018-2020 release (for example, Redmi Note 7/8, Mi 9). On new firmware, the vulnerability is eliminated, but if you have an older version, you can try:

Steps:

  1. πŸ“ž On the lock screen, click "Emergency Call).
  2. πŸ”’ Enter the code ##7378423##
  3. πŸ”§ In the menu, select β€œService testsΒ» β†’ Β«WLANΒ».
  4. πŸ“± Long-click on β€œWi-Fi” can open settings where you can disable the pattern lock.

If the method worked, be sure to update the firmware – this vulnerability allows attackers to unlock your phone!

πŸ’‘

On newer versions of MIUI (13+), this method doesn't work. Xiaomi has closed a vulnerability in 2021 security updates.

Frequent Mistakes and How to Avoid Them

When changing or resetting a pattern lock, users often face typical problems, and here are the most common ways to solve them:

  • 🚫 Β«Mi Account Password: Check if Caps Lock or keyboard layout is enabled. If you forget your password, restore it to account.xiaomi.com.
  • πŸ”„ Β«Phone freezes after reset" - wait 10-15 minutes. If the screen does not respond, press the power + Volume down 20 seconds for forced reboot.
  • πŸ“΅ Β«ADB Cannot see the device – install the Mi drivers PC Suite and check if debugging is included USB In Settings β†’ The phone. β†’ Version. MIUI (Press 7 times to activate the developer mode).
  • πŸ”’ Β«After Hard Reset asks for the old Mi Account" - this is Mi Cloud Lock. Solved only through the previous owner or official Xiaomi service with a check of purchase.

If none of these methods worked, contact Xiaomi’s service center with the purchase documents, and in some cases (such as Mi Cloud Lock), only they can unlock the device.

❓ Can I reset the pattern lock without losing data?
Yes, if you have USB debugging enabled (ADB method) or unlocked the bootloader (Fastboot method), otherwise the data will be deleted.
❓ Why does the phone ask for a reset via Mi Account? PIN?
This means that the phone has enabled two-step authentication (PIN + pattern lock). type in the PIN you set when you set up the lock.
❓ Does the method work with Emergency Call on Xiaomi 13 Pro?
No, all models with MIUI 13/14 have fixed this vulnerability, and it only works on older firmware (until 2021).
❓ How to know if the bootloader is unlocked on my Xiaomi?
Turn off your phone, press Power + Volume down to log in to Fastboot. If there's "Unlocked" at the bottom of the screen, the bootloader is unlocked.
❓ Can I recover data after Hard Reset?
If you have synced with Mi Cloud enabled, contacts, notes, and some settings will be restored automatically, and you can try to restore photos and files through programs like DiskDigger or EaseUS MobiSaver, but the chances are low.