Forgot the pattern lock on Xiaomi, Redmi or POCO β and now the phone has turned into a brick? β The situation is familiar to many: after several failed attempts to enter, the system offers only a complete reset, which means loss of all data. But not everything is so terrible β there are legal ways to get around locking without deleting files, if you act carefully and with an understanding of the mechanisms of protection of MIUI.
In this article, we will discuss 5 proven methods of unlocking the pattern lock on Xiaomi devices (including models from 2022-2026), which do not require root rights or complex firmware manipulation. Importantly, the effectiveness of methods depends on the version of MIUI, the presence of a linked Mi Account and the state of debugging over USB. None of the methods guarantee 100% result, but in 80% of cases at least one of them works.
If you read "Device locked. Try again in 24 hours," it means Xiaomi has activated the hardware protection, and the chances of unlocking without losing data are zero, you'll have to wait or contact the service center.
1 Unlocking through Mi Account (official method)
The most reliable and recommended method for Xiaomi is to use a tied Mi Account, which works on all devices with MIUI 12 and later if:
- π± The phone is connected to the Internet (Wi-Fi or mobile network).
- π Mi Account was tied to the device before being blocked.
- π§ You remember the login (email/phone number) and account password.
After 5 failed attempts to enter the pattern lock, the "Forgot your password" button (or similar) will appear on the screen.
- Enter the email or phone number associated with the Mi Account.
- Confirm your login via SMS or email (depending on your security settings).
- Create a new pattern lock or PIN-code.
β οΈ Note: If two-factor authentication is enabled on the device (2FA), You will need to confirm it through a backup email or code from the Mi Security app.
This method will not work if:
- π« Device not connected to the network (no internet connection).
- π« Mi Account was not linked or you do not remember login details.
- π« The phone has custom firmware installed (for example, LineageOS or Pixel Experience).
2.Use ADB (Android Debug Bridge) to bypass lock
The method is suitable for devices that previously had USB debugging enabled (Settings β About Phone β MIUI version, 7 times press to activate developer mode, then enable USB debugging in Settings β Additional β For developers). If debugging is not activated, the method will not work.
You'll need:
- π₯οΈ A computer with installed Xiaomi drivers and ADB Tools.
- π USB-cable (preferably original).
- β‘ Device with a battery charge of at least 30%.
Step-by-step:
- Connect your phone to your PC via USB.
- Open the command prompt (Win + R β enter cmd) and go to the folder with adb:
cd C:\platform-tools- Check the connection of the device:
adb devicesIf the phone appears in the list, execute the command to remove the pattern lock:
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- Reset the device:
adb rebootAfter the reboot, the pattern lock will be reset, but all data (photos, messages, apps) will remain in place. Importantly, some models (Redmi Note 10 Pro, POCO F3) may require re-assignment of the Mi Account after this procedure.
Install Xiaomi drivers on PC|Download ADB Tools from the official website|Enable debugging on USB on the phone (if possible)|Prepare original USB-cable|Charge your phone to at least 30%-->
3. Unlock through Recovery Mode (without data loss)
This method works on devices with MIUI 11-14, if the option Mount /data is available in Recovery Mode. It does not require root rights, but is suitable only for some models (Redmi 9, Redmi Note 8 Pro, POCO X3, etc.).
Instructions:
- Turn off the phone.
- Press Volume Up + Power to Enter Recovery Mode.
- Select a language (if available) and go to Advanced β File Manager.
- Find and delete files: /data/system/gesture.key /data/system/locksettings.db /data/system/locksettings.db-wal /data/system/locksettings.db-shm
Reboot β System
β οΈ Note: On newer models (Xiaomi 13, Redmi Note 12), File Manager in Recovery may be blocked.
If you donβt have a File Manager option, try an alternative way:
- In Recovery Mode, connect your phone to your PC.
- Open the command line and enter:
adb shell
mount /data
cd /data/system
rm gesture.key
rm locksettings.db
rm locksettings.db-wal
rm locksettings.db-shm
rebootWhat if Recovery Mode asks for a password?
4.Blocking bypass via Safe Mode (for MIUI 12β14)
Safe Mode allows you to temporarily disable third-party applications, including the screen blocker.The method works if the pattern lock was installed through third-party software (for example, AppLock), and not through system settings.
How to start Safe Mode:
- On the lock screen, press the Power button before the turn off menu appears.
- Hold your finger on the βSwitch Offβ (or βRebootβ) option until a request to switch to Safe Mode appears.
- Confirm the action.
Instructions:
- Turn off the phone and press Volume Down + Power to log in to Fastboot Mode.
- Connect the device to the PC and check the connection:
fastboot devices- Download the temporary TWRP:
fastboot boot twrp.img- In TWRP, go to Advanced β File Manager.
- Delete files: /data/system/gesture.key /data/system/locksettings.db
Reset the device.
β οΈ Note: Use of Fastboot and TWRP This can cause a loss of warranty and unstable system performance if performed incorrectly.On models with a locked boot loader (Xiaomi 13 Ultra, Redmi) K60) This method will cause a reset to factory settings.
Unlocking methods comparison: which one to choose?
To avoid wasting time on useless attempts, use the table below to help determine which method is right for your Xiaomi model and MIUI version.
| Method | Conditions required | Suitable models | Risk of data loss | Difficulty |
|---|---|---|---|---|
| Mi Account | Linked account, Internet | All models with MIUI 12+ | No. | β |
| ADB | USB debugging enabled | Redmi Note 10/11, POCO X3/F3, Mi 11 | No. | ββ |
| Recovery Mode | Access to File Manager in Recovery | Redmi 9/8, POCO X3, Mi 10 | No. | βββ |
| Safe Mode | Blocking through third-party software | All models with MIUI 11-14 | No. | β |
| Fastboot + TWRP | Unlocked loader | Custom firmware devices | High-pitched | ββββ |
If neither method works, there are two options:
- Contact the Xiaomi service center with a confirmation of purchase (check or box).
- Perform a hard reset via Recovery Mode (Wipe Data), but this will result in complete data loss.
If after successful unlocking, the phone asks you to enter the old pattern lock when you first turn on, follow the following steps:
- Connect to Wi-Fi.
- Enter any key 5 times until the βForgot your passwordβ button appears.
- Sign in via Mi Account and set up a new key.
π‘
If the phone reboots cyclically after unlocking via ADB or Recovery, reset the cache to Recovery Mode (Wipe β Wipe Cache). This will not delete data, but can stabilize the system.