Forgot the pattern lock or PIN-The situation is familiar to many: the device is locked after several failed attempts to enter, and access to important data seems lost. There are often tips on hacking phones through engineering menus or questionable software on the internet, but most of them either donβt work on current models (Redmi Note 12, POCO X5, Xiaomi 13T), This article is based on official Xiaomi recommendations and verified user reports β only legal methods that will not harm your device.
It's important to understand that the term "hacking" in the context of Xiaomi is a myth. Modern smartphones based on MIUI use File-Based Encryption (FBE), so bypassing the lock without losing information is possible only through the tied account Mi Account. All other ways will lead to a complete reset and deletion of user data. If the phone is enabled Find Device, the chances of recovering access without reset increase - but only if the key conditions are met.
Before proceeding to the instructions, answer two questions:
- Is your Mi Account linked to your phone (you have previously logged in)?
- Is the device enabled by debugging USB (USB Debugging)?
The answer is the unlock method, and if you both say no, you'll only need a hardware reset via Fastboot or Recovery, but it will delete all the data.
1 Unlocking through Mi Account (if the phone is linked to the account)
The most reliable way to regain access is to use Xiaomiβs official Find Device feature, which works even if the phone is turned off (provided that Power Off Charging mode was previously enabled).
- π Go to account.xiaomi.com and log in with the same account as you do on your phone.
- π± Select the Find Device tab (or Device Management in the Russian version).
- π Press Unlock Device and confirm the action via SMS email.
- β³ Wait 5-10 minutes β the phone unlocks automatically (requires an Internet connection).
β οΈ If the message "This device is locked. Sign in with a Mi Account" is displayed on the phone screen, but you do not remember your account details, restore access to it via email or the linked number. Xiaomi does not provide services for recovery of accounts to third parties, so the only way out is to remember the username / password or confirm ownership via a backup email.
If Find Device is disabled, try an alternative path:
- On the locked screen, press Emergency Call.
- Enter #4636## and it will open the test menu.
- Go to Usage Statistics β click on the Mi Account icon in the upper right corner.
- Enter your account details β the phone will be unlocked.
Why is it that Mi Account unlocking is not working?
2.Reset via Recovery Mode (will delete all data)
If your Mi Account is not tied or you donβt remember the login details, the only official way is to reset to factory settings, which works on all Xiaomi models, including the Redmi 10, POCO F4 and Xiaomi 12 Pro, but deletes all user data (photos, contacts, messages).
Instructions for entering Recovery Mode:
- Turn off the phone with a long press of the power button.
- Press the Power button + Volume up at the same time and hold for 10-15 seconds.
- When the Mi logo appears, release the buttons β you will be taken to the Recovery menu.
In the Recovery menu, use the volume buttons for navigation and the power button to confirm the selection.
- π Select Wipe Data (or Clear Data on new models).
- π Confirm the reset by selecting Wipe All Data.
- π Wait for the process to be completed (it will take 2-5 minutes).
- π± Reboot your phone via Reboot β Reboot to System.
Backup important data (if your phone has been previously unlocked)
Charge your phone at least 50%
Prepare. SIM-re-activation card
Make sure you have your Mi Account data on hand (required to set up after resetting)-->
β οΈ Note: On some models (Redmi Note 9 Pro, POCO X3 NFC) After resetting via Recovery, you may need to enter data Mi Account, which was previously associated with the device. If you do not remember the username / password, the phone will turn into a βbrickβ, in this case, only unlocking through Fastboot will help (see the next section).
3. Unlock via Fastboot (for power users)
The method via Fastboot is suitable if:
- π§ You've been on before. OEM Unlock in the Developer Settings.
- π₯οΈ You have a computer with Xiaomi drivers installed and Mi Flash Tool program.
- π¦ You are ready to download the official firmware for your model.
Step-by-step:
- Download the firmware for your model from en.miui.com (select the Fastboot version).
- Unpack the archive in a folder on your computer.
- Install Xiaomi drivers (you can use Mi PC Suite).
- Put your phone in Fastboot mode: Turn off your phone β Press <Power button + Volume down> β Connect to your PC
- Launch the Mi Flash Tool, select the firmware folder and press Refresh (should appear) COM-port).
- Press Flash and wait until it is completed (10-15 minutes).
β οΈ Note: After you have Fastboot, the phone will be completely reset and the Mi Account data deleted from the device. If the phone has enabled the Anti-Rollback feature, using the old version of the software can lead to a permanent lockdown of the bootloader. Always check the compatibility of the firmware with your model!
1. Reinstall drivers manually through Device Manager (select "Xiaomi Composite MDB Interface").
2. Use another USB-cable (preferably original).
3. Run the Mi Flash Tool on behalf of the administrator.-->
4. Bypassing the lock via ADB (if USB debugging is enabled)
If the phone has previously been debugged USB (USB Debugging, you can try to delete the file with the password through ADB. This method works with Xiaomi version MIUI 12 and below, but on new firmware (MIUI 13/14) It may not work because of increased protection.
Instructions:
- Connect your phone to your computer via USB.
- Open the command line (Windows) or terminal (Mac/Linux) and type: adb shell rm /data/system/gesture.key rm /data/system/password.key rm /data/system/locksettings.db rm /data/system/locksettings.db rm /data/system/locksettings.db-wal rm /data/system/locksettings.db-shm
- Reboot your phone with the reboot command.
Once the reboot is over, the lock should disappear, and if the error "adb: device unauthorized" appears, then the USB debugging has not been confirmed on the phone before - the method will not work.
π‘
ADB-The method works only if the debugging is USB The device was activated before the phone lock, and on new Xiaomi models (released after 2021), this method is often blocked by security systems.
5. Official Unlocking through Service Center
If none of the methods worked and the data on the phone is critical, contact the authorized Xiaomi service center.
- π Checks or warranty card (proof of purchase).
- π Passport of the holder (to confirm the identity).
- π± Serial number of the device (can be found on the box or under the battery).
The cost of the service varies from 1,500 to 5,000 rubles depending on the model and region, and in some cases, service centers may refuse to unlock if the phone is purchased informally (for example, brought from abroad).
| Model phone | The cost of unlocking (β½) | Time limit for implementation |
|---|---|---|
| Redmi Note 11/12 | 1 800β2 500 | 1-3 days |
| POCO X4/X5 | 2 000β3 000 | 2-4 days |
| Xiaomi 12/13 | 3 500β5 000 | 3-5 days |
| Black Shark 5 | 4 000β6 000 | 5-7 days |
β οΈ Attention: Informal service centers often offer hacking of phones through firmware exploits (for example, through the DirtyCOW vulnerability:
- π¨ Disrupt the module NFC Widevine (problems with banking applications and streaming services).
- π Continuous locking of the loader (brick).
- π΅ Deprive warranty (if the device is still in warranty service).
6.How to avoid blocking in the future
To avoid the problem of a locked phone, follow the simple rules:
- π Use biometric unlocking (fingerprint or facial recognition) in addition to PIN-code.
- π§ Link your Mi Account and make sure that Find Device is enabled.
- π Regularly back up through Settings β System system β Backup.
- π Write it down. PIN-a code or pattern lock to a secure location (for example, a password manager).
If you often forget passwords, set up Smart Lock in Xiaomi:
- Go to Settings β Password and Security β Smart Lock.
- Add reliable devices (such as Mi Band smartwatches or home Wi-Fi).
- Activate unlocking by voice or location (if the feature is supported by your model).
π‘
On Xiaomi models with MIUI 14+ Emergency function SOS β Five quick presses of the power button send SOS-You'll be sending a message to your contacts and unlocking the screen for an emergency call!