Unlocking the pattern lock on Xiaomi: a complete guide to saving data

Forgot the combination of unlocking the screen on Xiaomi? This problem is familiar to many users of Redmi, Poco or Mi β€” just a few times to enter the wrong pattern, and the system will block access. But do not rush to carry the phone to the service center: in 80% of cases, you can unlock yourself, and without losing personal data.

In this article, we will discuss all the current ways to reset a pattern lock to Xiaomi in 2026 – from official methods through Mi Account to technical solutions through Fastboot and Recovery. Special attention will be paid to saving photos, contacts and messages, as well as nuances for different versions of MIUI (12/13/14). If your smartphone gives an error β€œToo many pattern attempts” or β€œDevice locked by FRP”, here you will find working solutions.

Before you start unlocking, check:

  • πŸ”‹ Battery level (must be at least 30% - with a discharge during the procedure, a brick device is possible)
  • πŸ“Ά Backup (if sync with Mi Cloud has been enabled, data can be restored)
  • πŸ”§ Access to a computer (for methods) ADB And Fastboot will need it. Windows/Mac)
πŸ“Š What Unlocking Method Have You Tried Before?
Mi Account
Reset via Recovery
Fastboot/EDL
I've been to the service.
Never blocked.

1 Unlocking through Mi Account (official method)

The easiest and safest method is to use a Xiaomi account that works if:

  • πŸ“± The phone is connected to the Internet (Wi-Fi or mobile network)
  • πŸ”‘ Remember the username/password from Mi Account
  • πŸ“² Synchronization is enabled on the device (checked for notifications from Mi Cloud)

Step-by-step:

  1. On the lock screen, enter the wrong pattern 5 times and the message β€œForgot pattern?” will appear.
  2. Click on this and select Sign in with Mi Account.
  3. Enter your email/phone and account password. If two-factor authentication is enabled, confirm your login via SMS or Google Authenticator.
  4. After successful authorization, the system will offer to create a new pattern lock.

Important: If the error "This device is locked" appears after entering the data, then Factory Reset Protection (FRP) is activated on the phone.

πŸ’‘

If you do not remember the password from Mi Account, restore it through the official website account.xiaomi.com. Use the attached email or phone number.

2. Reset the pattern lock via Find Device (remotely)

If the phone is lost or physically unavailable but you have access to another device, you can use Xiaomi’s Find Device service, which works as long as you:

  • 🌍 The phone is connected to the Internet
  • πŸ“ Find Device has been activated in the settings
  • πŸ”„ The device is not switched off or discharged.

How to Reset Your Password Remotely:

  1. Go to findmi.com and log in to your Mi Account.
  2. In the list of devices, select a locked smartphone.
  3. Click β€œErase Data” – this will result in a complete reset (including the pattern lock).
  4. Confirm action. In 5-10 minutes, the phone will restart in factory condition.

⚠️ Note: This method deletes all data from the device, including photos, messages and installed applications. Use it only if the backup in Mi Cloud is up to date.

If Find Device is disabled, try an alternative method via ADB (described below).

3. Unlock through ADB (without data loss)

The method is suitable for users who have debugging enabled on the phone USB (USB Debugging is rare, but if you have activated this option before (for example, for root rights or firmware), there is a chance to unlock the device without resetting.

What you need:

  • πŸ–₯️ Computer with Windows/Mac/Linux
  • πŸ”Œ USB-cable (original, without damage)
  • πŸ› οΈ Utilities. ADB Fastboot (you can download from the Android website)

Instructions:

  1. Connect your phone to your computer via USB.
  2. Open the command prompt (cmd on Windows or Terminal on Mac/Linux).
  3. Enter the command to check the connection: adb devices If the device appears in the list, go further.
  4. Delete the file with the pattern lock: adb shell rm /data/system/gesture.key or for newer versions of MIUI (13/14): adb shell rm /data/system/locksettings.db
  5. Reboot your phone: adb reboot

After the reboot, the lock screen should disappear. PIN-code SIM-Cards – enter it, that’s fine.

Install Xiaomi drivers on PC|Download ADB Tools|Connect the original USB-cable|Check the included debugging by USB-->

⚠️ Attention: MIUI 14 and newer Xiaomi blocks access to the ADB If the adb device command returns a blank list, this method will not work.

4. Unlock via Fastboot (for advanced users)

If ADB is not available and Mi Account is not tied, the method remains via Fastboot.It requires an unlocked bootloader, but is suitable for most Redmi/Poco models (except for the new flagships with HyperOS).

Step-by-step action:

  1. Turn off the phone. Press the Power button + Volume down to enter the Fastboot.
  2. Connect your device to your PC and check detection: fastboot devices
  3. Unlock the bootloader (if not unlocked): fastboot oem unlock Attention: this will result in a complete data reset!
  4. Fastboot flash recovery recovery.img (download recovery.img for your model from xiaomifirmwareupdater.com)
  5. Recovery: Fastboot Reboot Recovery
  6. From the Recovery menu, select Wipe Data β†’ Format Data (this will remove the pattern lock).

The locked bootloader models (Redmi Note 12, Xiaomi 13 and later) will require official permission to unlock through Xiaomi's website, a process that takes up to 72 hours.

What if Fastboot doesn’t recognize the device?
If the fastboot device team returns an empty list: 1. Install Xiaomi drivers USB Drivers (download from the official website). 2. Try another one. USB-cable (preferably original). 3. Switch the port. USB on a computer (e.g. with USB 3.0 on USB 2.0). 4. On Windows, disable driver signature: enter in cmd on behalf of the administrator: bcdedit /set Testsigning on and restarting the PC.

5.Reset via Recovery Mode (full cleaning)

If other methods don't work, there's a hard reset through Recovery that will delete all the data, but is guaranteed to unlock the phone.

Instructions for MIUI Recovery:

  1. Turn off the phone. Press the Power button + Volume up until the Mi logo appears.
  2. In the Recovery menu, select the language (if available).
  3. Go to Wipe Data β†’ Wipe All Data (or Format Data on newer versions).
  4. Confirm the action and wait for the completion (it will take 2-5 minutes).
  5. Choose Reboot. β†’ Reboot to System.

For models with HyperOS (2026):

  • πŸ”§ Recovery menus may be different – look for β€œErase All Data” or β€œFactory Reset” items".
  • πŸ” After the reset, you will need to enter data from the Mi Account that was tied to the phone (protection) FRP).

πŸ’‘

Hard reset via Recovery is the only method that works on 100% of Xiaomi devices, but leads to irretrievable data loss.

6. Unlocking through EDL Mode (for power users)

EDL (Emergency Download Mode) is a low-level firmware mode that allows you to bypass locking, but requires special hardware (EDL cable or Deep Flash Cable) and firmware.

When to use EDL:

  • πŸ”§ Phone in brick state (not turned on, stuck on the logo)
  • πŸ”’ The bootloader is locked and other methods don’t work
  • πŸ“± Xiaomi model older than 2020 (new devices have protection from the new device) EDL)

Instructions:

  1. Download the firmware for your model from Xiaomifirmwareupdater.com.
  2. Install the Qualcomm HS-USB QDLoader 9008 (for Snapdragon) or MediaTek Preloader (for MTK).
  3. Connect the phone in EDL mode (this may require circuiting contacts on the board or a special cable).
  4. Sweat the firmware through the Mi Flash Tool (select the Clean All option).

⚠️ Note: Incorrect Firmware Through EDL This method is recommended only for advanced users or in service centers.

7 How to bypass FRP (Factory Reset Protection) after reset

If you reset through Recovery or Find Device, the first time you turn on, the phone can request data from the Mi Account that was previously tied. This is FRP (Factory Reset Protection) protection, and without bypassing further configuration is impossible.

The official method (if you remember the data):

  • πŸ“§ Enter. email/phone and password from Mi Account, which was on the phone before the reset.
  • πŸ“± If two-factor authentication is enabled, confirm the login via SMS or-app.

Unofficial methods (if you do not remember the data):

  1. For MIUI 12/13: Use FRP Bypass APK (e.g. Xiaomi FRP Tool). To do this: Download the archive with the utility. Connect your phone to your PC in Fastboot mode. Run the script bypass.frp.bat.

HyperOS

(2026):

EDL

FRP

DC Phoenix

UFI Box

Models with a MediaTek chip (Redmi 9A, Poco C31):

  • πŸ› οΈ We can use the utility. SP Flash Tool with authentication.byp file.
  • πŸ”§ For instructions, look for XDA-Developers forums (a section of your model).
Xiaomi modelFRP bypass methodDifficultyLoss of data
Redmi Note 10/11FRP Bypass APKMediumNo.
Xiaomi 12/13Firmware through FastbootTall.Yes.
Poco X3/X4EDL + Mi FlashVery high.Yes.
Redmi 9/9ASP Flash ToolMediumYes.

FAQ: Frequent questions about unlocking Xiaomi

Can I unlock Xiaomi without losing data?
Yes, but only if: πŸ”‘ You have a Mi Account tied and your phone is connected to the internet. πŸ–₯️ The phone's debugging on. USB (ADB). In all other cases, the data will be deleted.
What to do if you forget your Mi Account password?
Restore access via account.xiaomi.com: Click on Forgot Password? Enter email or phone linked to your account. Confirm recovery via SMS or backup email. If you don't have access to your email/phone, contact Xiaomi with proof of ownership of the device (check, box).
Why does the phone ask for an old Mi Account after resetting via Recovery?
It's protection. FRP (Factory Reset Protection: This is activated automatically if the phone has a Mi Account attached and sync enabled: πŸ“Œ Enter your old account information (if you remember). πŸ› οΈ Use it. FRP Bypass Tool (for the MIUI 12/13). πŸ“ž Contact the service center with proof of purchase.
Does universal unlock codes work for Xiaomi?
Unlike the old Samsung or Nokia, Xiaomi smartphones don’t support universal codes like this ##7780##. All unlock methods are tied to: πŸ” Mi Account πŸ–₯️ ADB/Fastboot πŸ”§ Hardware features (e.g, EDL Any β€œmagic codes” from the Internet are a scam.
How much does it cost to unlock in the service center?
Cost depends on model and method: Service Price (β‚½) Term Reset via Mi Account Free 5-10 minutes Unlock bootloader 500-1500 1-3 days Firmware through EDL 2000–4000 1 day FRP 1000–3000 2–4 hours Xiaomi may request a check or box at official service centers to confirm ownership.