The forgotten pattern lock on Xiaomi's smartphone is a situation that thousands of users face every day. PIN-And if you have a code or a password, it seems more convenient, until you have a problem with how to play it back, and fortunately, the manufacturer has provided several official ways to restore access, without resorting to "hacking" in the classical sense of the word.
It is important to understand that the term βhackingβ in the context of modern Xiaomi smartphones with MIUI 14/15 and current firmware does not apply. All legal methods are based on the use of built-in security features or service tools. Attempts to bypass protection through the engineering menu, ADB or third-party utilities in 90% of cases lead to a complete data reset or βbrickingβ of the device. This article will help to avoid errors and return access to the phone with minimal losses.
Weβll look at different scenarios: when you have a backup, your Mi Account is tied, the USB Debugging is turned on, and emergency measures for devices without prior preparation. Weβll focus on models with a Qualcomm Snapdragon chip (e.g. Redmi Note 12 Pro+, Xiaomi 13T) and MediaTek (Poco X5, Redmi 12C), because the unlock algorithms for them are different.
1 Unlocking through Mi Account (official method)
The most reliable way is to use a tied Mi Account, which works on all Xiaomi devices released after 2018, provided that:
- π± The phone is connected to the Internet (Wi-Fi or mobile network)
- π Mi Account was tied to the device before being blocked
- π The device was not reset via Fastboot after the last authorization
Instructions:
- On the lock screen, tap the button βForgot your password?β (bottom of the screen).
- Select βUnblock with Mi Accountβ.
- Enter the login (email or phone number) and password from the account.
- Confirm unlocking via SMS or email (if two-factor authentication is enabled).
β οΈ Warning: If after 5 failed attempts to enter the pattern, the system suggests waiting 30 minutes - do not turn off the phone (FRP), This will require you to enter your account data even after the reset.
2. Reset the pattern lock via Find Device (remotely)
Find Device, which allows you to not only track your phone, but also control it remotely, is a good way to do this if you:
- π The device is connected to the Internet
- π The search function has been activated in the settings (Settings) β Mi Account β Find Device)
- π Phone is not discharged (battery charge) > 15%)
Step-by-step:
- Go to i.mi.com from a computer or other phone.
- Sign in with the same Mi Account as on the locked device.
- Select a locked phone from the list of devices.
- Click on Delete Data (this will result in a reset before factory settings).
- Confirm the action via SMS or email.
β οΈ Warning: This method removes all data from your phone, including photos, messages and installed apps. Use it only if your device has no critical information or backup.
βοΈ Preparing for reset via Find Device
3. Unlock via Fastboot (for advanced users)
The Fastboot method is suitable for bootloader devices, requiring a computer, USB-TypeC cable, and minimal ADB/Fastboot knowledge. Importantly, new Xiaomi models (e.g. Xiaomi 14 or Redmi Note 13 Pro) have the bootloader locked by default and take up to 72 hours to unlock.
Instructions for devices with unlocked loader:
- Turn off the phone.
- Press the Power button + Volume down to log into the Fastboot.
- Connect your phone to your PC and open the command line (CMD or Terminal).
- Enter the command to check the connection: fastboot devices If the device is determined, continue.
- Perform a protection reset: fastboot erase frp Then reset data: fastboot -w
- Reboot the phone: fastboot reboot
β οΈ Note: On devices with MediaTek (e.g. Redmi) 10A) The fastboot erase frp command may not work. SP Flash Tool, which is risky without experience.
What if the fastboot canβt see the device?
4.Use ADB (only if USB Debugging is enabled)
If the phone was pre-enabled debugging mode USB (USB Debugging, you can delete the file with the pattern lock through ADB. This method does not work on devices with debugging turned off or after resetting settings.
Instructions:
- Connect your phone to your PC via USB.
- Open the command line and type in: Adb shell
- Delete the files with the lock data: rm /data/system/gesture.key rm /data/system/locksettings.db rm /data/system/locksettings.db-wal rm /data/system/locksettings.db-shm
- Reboot the phone: reboot
After the reboot, the pattern lock will be reset, but all data will be saved. However, on MIUI 14/15, this method does not work stable due to the enhanced protection.
π‘
If the key is not reset after deleting the files, try to execute the command adb shell am broadcast. -a android.intent.action.BOOT_COMPLETED before restarting.
5. Contact the Xiaomi Service Center
If none of the above methods worked, you have to contact the official service center.
- π± Devices with locked loader
- π Phones that do not have a Mi Account tied
- π΄ Models older than 2018 (e.g. Redmi 5 Plus, Mi) A1)
What will be required:
- π Checks or warranty card (if the phone is guaranteed)
- π Passport of the owner
- π± The charger itself > 30%
The cost of unlocking the service varies from 500 to 2000 rubles depending on the model. New flagships (for example, Xiaomi 13 Ultra) may be higher. In 2026, Xiaomi tightened its security policy: without proof of ownership, unlocking is impossible even for a fee.
| Model phone | Average cost of unlocking | Implementation time |
|---|---|---|
| Redmi Note 12 | 800β1200 β½ | 1-2 hours |
| Xiaomi 13 Lite | 1200β1800 β½ | 2-3 hours |
| POCO X5 Pro | 1000β1500 β½ | 1 hour |
| Redmi 10C | 500β900 β½ | 30-60 minutes |
Alternative methods (risks and consequences)
On the Internet, there are often tips for βhackingβ a pattern lock through:
- π§ Engineering menu (#4636##) β does not work on the MIUI 12+.
- π± Hard Reset via Recovery β Leads to Data Loss and Activation FRP.
- π» Third-party programs (e.g. Dr.Fone, iMyFone) β often contain viruses or do not support new models.
β οΈ Note: Using unofficial firmware or tools like Mi Flash Unlock can lead to a:
- π« Block IMEI (The phone will lose communication with the networks of operators).
- π΄ Activation of antirollback (inability to roll back on the old firmware).
- π₯ Β«Fittingβ (complete failure).
If you still decide to experiment, back up via TWRP (if installed) or Mi PC Suite (if the phone is recognized by the computer).
π‘
The only safe way to unlock without losing data is to use a tied Mi Account or ADB (if debugging was enabled in advance).