Forgot the pattern lock on Xiaomi and fear losing photos, contacts or messages when unlocked? This situation is familiar to many: the smartphone is blocked after 5 failed attempts of input, and a standard reset via Recovery erases all data. Fortunately, there are legal ways to bypass the lock without losing information - from official Mi Account tools to engineering loopholes in the firmware.
In this article, we will discuss 5 working methods for unlocking Xiaomi, Redmi and POCO (including models on MIUI 14/15 and HyperOS), which will work even if you do not remember the password from your Mi Account. Importantly, the effectiveness of methods depends on the firmware version and the state of the phone (for example, whether debugging is enabled over USB), We will also tell you what actions are guaranteed to lead to data loss โ so that you avoid them.
Why a standard Recovery reset erases data
Most guides on the Internet advise you to clamp Power + Volume Up, log into Recovery Mode and select Wipe Data. This method works, but has a critical drawback: it formats the /data partition where you store:
- ๐ธ Photos and videos (unless synced with Google Photos)
- ๐ Contacts (unless linked to Mi Account or Google)
- ๐ฌ Messages in messengers (WhatsApp, Telegram โ without backup)
- ๐ฎ Save games and customize applications
The reason for the Android architecture: section /data encrypted using your pattern lock or PIN-Without it, the system can't decrypt files, so Wipe Data simply removes the encryption key, making the data unreadable. Except for the bootloader, which is rare among ordinary users.
โ ๏ธ Warning: If the lock screen says "This device is locked by" FRP" โ This means activating Factory Reset Protection, in which case, unlocking without data is only possible through the original Mi Account linked to the phone.
Method 1: Unlocking with Mi Account (official method)
The most reliable and secure way is to use a tied Mi Account. It works on all Xiaomi, Redmi and POCO models, if:
- ๐ Device connected to the Internet (Wi-Fi or mobile network)
- ๐ง You remember the email and password from the Mi Account tied to the phone
- ๐ On the lock screen there is a button "Forgot password?" or "Forgot pattern?"
Instructions:
- On the lock screen, tap "Forgot your password?" (if there are no buttons, try entering the key 5 times in a row until a lock message appears for 30 seconds).
- Enter your email and password from Mi Account. If two-factor authentication is enabled, confirm your login via SMS or Google Authenticator.
- Follow the instructions of the system: you will be asked to create a new pattern lock or PIN-code.
If the "Forgot Password?" button is missing, try connecting to Wi-Fi (on some firmwares, the option only appears when you're online). HyperOS models (e.g., Xiaomi 14 or Redmi Note 13) may require you to enter CAPTCHA to confirm that you're not a robot.
Check your internet connection
Make sure you remember the email from your Mi Account.
Have access to SMS/email for 2FA
Battery charge > 20% (in case of a long procedure)
-->
Method 2: Use ADB (if USB debugging is enabled)
If the phone has previously been activated debugging USB (USB Debugging, you can delete a file with a pattern lock via Android Debug Bridge (ADB). This method works with 90% of Xiaomi devices. MIUI HyperOS, but requires preparation:
- ๐ฅ๏ธ A computer with installed Xiaomi drivers and ADB
- ๐ USB-cable (preferably original)
- ๐ง Included debugging by USB developer-setting
Step-by-step:
- Connect your phone to your PC via USB.
- Open the command line (Windows) or terminal (macOS/Linux) and execute: adb devices Make sure the device is identified (its serial number should appear).
- 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 rebooting, the pattern lock will be reset.
If the su command is not working (no root rights), try an alternative way through ADB without root:
adb shell am start -n com.android.settings/.ChooseLockGenericโ ๏ธ Note: On HyperOS devices (e.g. Xiaomi) 13T or Redmi K70) The path to the key files may be different. If the lock remains after the reboot, check for the files in the key. /data/system/ via adb shell ls /data/system/.
Yeah, I remember the login/password.
Yeah, but I don't remember the password.
No, not tied.
I don't know, I need to check.-->
Method 3: Unlocking via Fastboot (for devices with unlocked bootloader)
If your Xiaomi bootloader unlocked, you can temporarily flash a modified kernel that bypasses the lock screen, a technique that is technically more complex but retains data.
- ๐ฑ Xiaomi Mi 11/12/13 series
- ๐ฑ Redmi Note 10/11/12 (except for the Chinese version)
- ๐ฑ POCO F3/F4/F5
Instructions:
- Download the archive with modified boot.img for your model (see the XDA Developers or 4PDA forums).
- Turn your phone into Fastboot mode: Turn off the device, then press Power + Volume Down.
- Connect to the PC and execute the command: fastboot flash boot patched_boot.img fastboot reboot
- After the reboot, the pattern lock will be reset. Return the original boot.img with the same command.
Warning: Incorrectly selected boot.img can cause a device to break down. Use only files confirmed by other users of your model.
What is an unlocked bootloader?
Method 4: Bypassing Emergency Call (for old firmware)
On devices with MIUI 10-12 (e.g. Redmi Note 8, Mi 9) there was a vulnerability that allows you to bypass the lock through the emergency call screen.
Instructions:
- On the lock screen, tap "Emergency Call".
- Enter the combination: ##4636## (test menu opens).
- Return to the lock screen and try swiping down the notification bar. If the panel opens, go to Settings โ Password and Security โ Lock the screen and change the pattern lock.
On new firmware (MIUI 13+ and HyperOS), this method is blocked, but sometimes an alternative version works:
- ๐ Enter any number in the emergency call (e.g. 112).
- ๐ Click the "Contact" or "Journal" button".
- ๐ If the contact list opens, try running Settings through it.
โ ๏ธ Note: On HyperOS devices (e.g. Xiaomi 14), trying to enter test codes can result in a full 24-hour lock on your phone.
Method 5: Restoring access through Xiaomi Service Center
If none of these methods work, the official way to do this is to contact Xiaomi Service Center, which is the only legal way to unlock a device without losing data, if:
- ๐ You have a check or a box of IMEI telephone (proof of possession)
- ๐ Passport or other identity document
- ๐ง The device is not on the blacklist (stolen/lost)
Procedure in the service:
- The specialist checks the IMEI and documents.
- Through service utilities (Mi Flash or EDL Mode) lock is reset without formatting /data.
- In some cases, firmware may be required via EDL (Emergency Mode), but this does not always result in data loss.
The cost of the service varies from 500 before 2000 In Moscow and St. Petersburg there are official Xiaomi service centers with addresses on the site. mi.com/ru/service/center.
| Method | Are the data stored? | Mi Account required | Difficulty | Suitable for HyperOS |
|---|---|---|---|---|
| Unlocking with Mi Account | โ Yes. | โ Yes. | โญ | โ Yes. |
| ADB (debugging included) | โ Yes. | โ No. | โญโญโญ | โ ๏ธ Partially. |
| Fastboot (unlocked bootloader) | โ Yes. | โ No. | โญโญโญโญ | โ Yes. |
| Emergency Call | โ Yes. | โ No. | โญโญ | โ No. |
| Service centre | โ Yes. | โ ๏ธ On request. | โญ | โ Yes. |
What NOT to do when unlocking Xiaomi
Some activities are guaranteed to cause data loss or device breakdown.
- ๐ซ Recovery (Wipe Data) โ erases everything without recovery.
- ๐ซ Firmware via Mi Flash in Clean All mode โ formats all partitions.
- ๐ซ Using programs like Dr.Fone or iMyFone โ often contain viruses and do not work on new firmware.
- ๐ซ Attempts to open the phone to extract the memory chip โ on Xiaomi this will lead to activation of eFuse and a blink.
Also not worth it:
- ๐ Relieving the phone to 0% in the hope of being reset โ this could damage the power controller.
- ๐จ Try to reflash the device through unofficial utilities (for example, SP Flash Tool โ high risk of turning your phone into a brick".
๐ก
If a timer appears on the lock screen (e.g., "Repeat in 1 hour"), plug the phone into charging and wait for the timer to unlock.
FAQ: Frequent questions about unlocking Xiaomi
Can you unlock Xiaomi without losing data if USB debugging is not enabled?
What to do if you forget your Mi Account password?
Does unlocking through ADB on Xiaomi with HyperOS work?
Can I recover data after resetting through Recovery?
How much does it cost to unblock in unofficial services?
๐ก
If your Xiaomi has Mi Cloud sync enabled, after unlocking (even with data loss), you can recover contacts, photos, and notes. Check this in Settings โ Mi Account โ Mi Cloud.