The forgotten pattern lock on Xiaomi's smartphone is a situation that thousands of users face every day. PIN-If you have a code or a password, a graphic pattern seems easy to remember, but its abstract nature is often a cruel joke. MIUI locks the device for 30 seconds, and after 20 failed attempts may require you to enter a Mi Account account - which may also be forgotten.
In this article, we will discuss 5 working methods for bypassing the pattern lock on Xiaomi, Redmi, POCO and Black Shark devices (relevant to MIUI 12-15 firmware). Importantly, not all methods will save your data - some lead to a complete reset. We will specify the risks in advance so you can choose the best option. You will also learn how to avoid blocking in the future and what to do if the smartphone requires confirmation through Mi Account, which is not accessible.
1 Unlocking through Mi Account (official method)
The safest and most recommended way for Xiaomi is to use a tied Mi Account, which works if:
- π± Device connected to the Internet (Wi-Fi or mobile network).
- π You remember the login (email/phone number) and password from Mi Account.
- π Find Device has been activated in the settings.
After 5 failed attempts to enter the pattern lock, the system will offer the option "Forgot the password?". Click on it and follow the instructions:
- Enter the email or phone attached to your Mi Account.
- Confirm the identity via SMS or email (the code will come to the mail / phone).
- Create a new pattern lock or PIN-code.
β οΈ Note: If you have previously disabled the Find Device service (Settings) β Mi Account β Finding the device wonβt work, and Xiaomi may also request additional verification (such as a linked phone number) if the account was created long ago.
2. Recovery Mode reset (data loss)
If Mi Account is lost and unlocked, hard reset is reset via Recovery Mode, which deletes all data on the device, including photos, messages and apps, but is guaranteed to unlock the smartphone.
Instructions for most Xiaomi models (including Redmi Note 10/11/12, POCO X3/X4, Mi 11/12):
Turn off your smartphone (press the power button for 10 seconds)
Connect the charger (the battery must be charged at least 30%)
Make sure you have a backup of important data (if it was created earlier)
-->
- Turn off the device (if it is locked, press the power button for 10-15 seconds).
- Press the button combination: For most models: Volume up + Power button. For older devices (until 2019): Volume up + Volume down + Power button.
Mi
Recovery Mode
Wipe Data
Clear Data
Wipe All Data
Reboot
β οΈ Note: On some devices with MIUI 14+ Mi Account data may be required after reset if Factory Reset Protection has been activated previously (FRP). This is a protection against theft, and it is almost impossible to get around it without access to an account.
What is FRP and why does it lock the device after a reset?
3. Use of ADB (for advanced users)
If your Xiaomi has enabled debugging on USB (USB Debugging, you can try to delete the file with the pattern lock through ADB (Android Debug Bridge: This method does not result in data loss, but requires prior preparation.
Conditions for this method:
- π On the smartphone was activated debugging on USB (Settings β The phone. β Version. MIUI (7 times press) β Developer settings β Debugging by USB).
- π» You have a computer with Xiaomi drivers installed and a tool ADB.
- π The device can connect to the PC through USB (even in a blocked state).
Instructions:
- Connect your smartphone to your computer via USB.
- Open the command line (Windows) or terminal (macOS/Linux) and type:
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
rebootAfter 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β οΈ Attention: On devices with MIUI 13+ Android 12+ This method may not work due to the increased protection of the system, and some Xiaomi models are blocked. ADB-commands with a locked screen.
4. bypassing Fastboot (for unlocked bootloader)
If your device has a Bootloader Unlocked, you can use the fastboot command to reset the pattern lock, a method that is suitable for users who have previously unlocked the bootloader to install custom firmware.
Step-by-step:
- Turn off your smartphone and put it in Fastboot mode (clip Volume Down + Power button).
- Connect the device to the PC and open the terminal.
- Enter a command to check the connection:
fastboot devices- If the device is detected, execute the command to remove the key:
fastboot erase userdataor (for some models):
fastboot format userdataβ οΈ Warning: This command deletes all user data but saves system files. If the bootloader is locked, the method will not work - you will need official unlock through the Mi Unlock Tool, which takes up to 720 hours (30 days) of waiting.
π‘
Before unlocking the bootloader, back up your data via TWRP (if installed), a method that allows you to save some of the information even after you reset.
5. Alternative methods (with limitations)
If none of the above methods are suitable, alternatives can be tried, and their effectiveness depends on the device model and the MIUI version.
| Method | Conditions | Risks. | Efficiency |
|---|---|---|---|
| Calling a blocked phone | The device is on call reception, there is a second phone. | Not working on MIUI 14+ | Low (10%) |
| Use of emergency call mode | Access to the Emergency Call screen | It can only work on older versions of Android | Average (30%) |
| Installation of custom Recovery (TWRP) | Unlocked bootloader, experience with firmware | Risk of "bricking" of the device | High (80%) |
| Feedback with Xiaomi (proof of ownership) | Availability of a check, box, IMEI device | Long process (up to 2 weeks) | High (90%) |
One of the most exotic methods is to call a locked phone, and on some devices (such as the Redmi 4X or Mi A1), you could access the interface and disable the lock during the incoming call, but in MIUI 12+, this vulnerability is fixed.
A more reliable, but complicated, way is to install TWRP, which allows you to back up data before you reset it, or even delete a file with a pattern lock manually, but it requires an unlocked bootloader and firmware experience.
π‘
If you are not sure about your ADB or Fastboot skills, it is best to contact the service center.The wrong commands can lead to a complete loss of the device's performance.
6.How to avoid blocking in the future
To avoid the problem of a forgotten pattern lock again, follow these tips:
- π Use it. PIN-A code or password instead of a pattern lock β itβs easier to recover them with a Mi Account.
- π Write the key in a secure location (e.g., Google Password Manager or Bitwarden).
- π Regularly back up through Settings β System system β Backup.
- π± Attach to your Mi Account device and activate Find the Device.
- π§ Put the debugging on. USB In case of future problems (but do not leave it on permanently for security reasons).
We also recommend setting up a Smart Lock in Android that will automatically unlock the device in secure places (such as at home or at work). To do this, go to Settings β Screen Lock β Smart Lock and add trusted devices or locations.
If you often forget passwords, consider using biometric unlocking (fingerprint or facial recognition). On Xiaomi devices with MIUI 13+, these methods work stably and can serve as a backup option.