How to Reset the Lock Code on Xiaomi Phone: All Working Ways

A forgotten password or pattern lock on a Xiaomi smartphone is a situation that every fifth user faces. According to statistics from service centers, 18% of calls are related to unlocking devices after unsuccessful attempts to enter code.Problem is that the manufacturer actively implements protection against unauthorized access: starting with MIUI 12, a reset via Recovery requires confirmation of a Mi Account account, and on new models (for example, Xiaomi 14 or Redmi Note 13 Pro+), even this may not be enough.

In this article, we will discuss all the current ways to reset the lock code, from official (via Find Device) to technical (via Fastboot or flashing). It is important to understand that some methods lead to complete loss of data, while others can lock the device permanently if you disrupt the sequence of actions. So before you start, assess the risks and prepare backups (if the phone still reacts to the connection to the PC).

1. Reset via Mi Account (official method)

The safest method is to use a linked Mi Account, which works if:

  • πŸ“± The phone is connected to the Internet (Wi-Fi or mobile data).
  • πŸ”‘ You remember the username and password from Mi Account that was tied to the device.
  • πŸ”„ Find Device has been activated in the settings.

Instructions:

  1. Go to account.xiaomi.com and log in.
  2. Select the Find Device tab β†’ find your phone in the list.
  3. Press Unlock Device (Unlock Device).
  4. Confirm the action via SMS or email.

⚠️ Note: If the phone has Mi Cloud Lock enabled, it may be necessary to enter the old password when it is first activated after unlocking, which works on Xiaomi and Redmi models released after 2021.

πŸ“Š What is the way to unlock Xiaomi you tried?
Through the Mi Account.
Through Fastboot.
Through Recovery.
I went to the service center.
I haven't tried it yet.

2.Reset via Recovery Mode (with loss of data)

This method is suitable if the Mi Account is not tied or you do not remember the login details. However, on modern devices (MIUI 13/14), this method often requires confirmation of the account even after a reset.

  • πŸ“± Redmi 9/10/Note 11 and older 2022 year-end).
  • πŸ“± Poco X3/X4, Mi 10/11 Lite.
  • ❌ It doesn't work for Xiaomi. 12/13/14 free-account.

Step-by-step:

  1. Turn off the phone with a long press of the power button.
  2. Press Volume Up + Power before the Mi logo appears.
  3. From the Recovery menu, select Wipe Data β†’ Wipe All Data.
  4. Confirm the action and wait for the reboot.

Turn off the phone.|Charge the battery at least 50%|Prepare. SIM-Internet card (required for activation after resetting)|Make sure you know the data from your Mi Account (if tied)

-->

⚠️ Attention: On devices with MIUI 14 and Snapdragon 8 Gen 2 chip (such as Xiaomi 13 Ultra) after reset via Recovery may appear message "This device is locked.

3. Unlock via Fastboot (for advanced users)

It works if Recovery asks for a password from Mi Account and you don't remember it. It requires a computer with ADB/Fastboot drivers installed and a Bootloader unlocked. All data will be deleted!

Tools required:

  • πŸ–₯️ PC Windows/Linux and installed Android SDK Platform-Tools.
  • πŸ”Œ Cable USB (preferably original).
  • πŸ“„ Firmware file for your model (download from the official Xiaomi website).

Instructions:

1. Transfer the phone to Fastboot mode:


- Turn off the device.




- Press Volume Down + Nutrition until the rabbit with the inscription Fastboot appears.





2. Connect the phone to the PC and check the connection:


   fastboot devices


(Serial number of the device must be displayed).





3. Unlock the bootloader (if not unlocked):


   fastboot oem unlock


(New devices will require a Mi Account binding).





4. Squeeze the stock firmware:


   fastboot flash all [name file firmware.zip]

πŸ”Ή Important: Xiaomi models with MediaTek processors (such as the Redmi Note 12) may require an additional fastboot oem enable-charger command before firmware.

What if the Fastboot can’t see the device?
If the fastboot device command doesn't show your phone: 1. Install Google drivers USB Driver. 2. Try another one. USB-port (preferably) USB Disable driver signatures in Windows (reboot to Advanced Startup for this purpose) β†’ Disable driver signature enforcement. 4. Use the original Xiaomi cable (cheap cables often don't transfer data to Fastboot).

4. Use of service codes (for older models)

On devices before MIUI 10 (2018 and older), service codes to reset the pattern lock were sometimes triggered. Today, this method works extremely rarely, but you can try:

ModelService codeAction.Probability of success
Redmi 4/5/Note 4##7780##Resetting settings (without deleting data)⚠️ Low (5-10%)
Mi 5/6##3646633##Engineering menu β†’ Wipe Data⚠️ Medium (30%)
Redmi 3S/Note 3##4636##Test menu β†’ Factory Resetβœ… Tall (70%)

⚠️ Note: Entering service codes on modern devices (MIUI 12+) This can lead to a hard lock requiring you to enter your Mi Account password even after you reset!

5. Contact the Xiaomi Service Center

If all previous methods did not work, the official service remains: Xiaomi provides the unlock service according to documents confirming ownership of the device, the cost is from 1,500 to 5 000 rubles depending on the model.

What will be required:

  • πŸ“„ Passport of the owner (or power of attorney if the phone is not purchased with you).
  • πŸ›’ Check or box IMEI (if they survive).
  • πŸ“± The device itself (discharged by at least 20%).

πŸ”Ή Important: Xiaomi service centers in Russia after 2022 may refuse to unlock if the device was purchased abroad (due to sanctions restrictions), in this case, only an informal service with equipment for flashing through the Internet will help. EDL-regime.

πŸ’‘

Before visiting the service center, take a screenshot of your device’s IMEI verification page, which will speed up the process of proving ownership.

Alternative methods (risky)

If none of the official methods worked, users resort to "grey" methods, and we do not recommend using them without experience, but for the sake of completeness, we will list:

  • πŸ”§ Flip-through EDL (Requires an authorized Xiaomi account to download firmware and special cable.Risk: Brik (complete failure).
  • πŸ› οΈ Use of exploits (e.g., DirtyCOW vulnerability for the MIUI 8-9). The new versions are not working.
  • πŸ’» Passage ADB (if it was on USB Debugging. Commands: adb shell su rm /data/system/gesture.key It only works on rooted devices.

⚠️ Note: Use of unofficial firmware or modified Recovery (e.g, TWRP) on devices with a locked boot loader (Xiaomi) 12S Ultra, Redmi K50) This will lead to hard-brick – the phone will stop turning on even in Fastboot mode.

πŸ’‘

The only legal way to unlock without losing data is to contact the service center with documents, all other methods lead to the deletion of information or the risk of damage to the device.

FAQ: Frequent questions about code resetting on Xiaomi

Can I reset the pattern lock without losing data?
All reset methods (except through the official Mi Account) result in complete deletion of data from internal memory. If the phone is synchronized with the Mi Cloud, some of the information (contacts, photos) can be restored after unlocking.
What if after resetting via Recovery, the phone asks for an old password?
This is FRP (Factory Reset Protection) protection. Solutions: Enter the password from the last Mi Account you've tied. If you don't remember, contact the service center with documents. Some models are supported by Fastboot firmware with FRP disabled (experience required).
Can I unlock Xiaomi without a Mi Account?
On devices older than 2020 (e.g. Redmi Note 8 Pro) – yes, via Recovery or Fastboot. On newer models (Xiaomi 13T, Redmi Note 12 Pro+) – no, without an attached account, unlocking is impossible without a service center.
How much does it cost to unblock in an unofficial service?
Cost varies: πŸ”“ Unlocking through EDL β€” 2,000-4,000 rubles. πŸ”§ Firmware bypass FRP β€” 3,000-6,000 rubles. ⚠️ Risk: Unofficial services may install malware or use unlicensed firmware.
What is Mi Cloud Lock and How to Get Around It?
Mi Cloud Lock is a theft protection that is activated when you reset your Mi Account without detachment, and you can only get around it: through the official Xiaomi service (with documents), through an authorized seller (if the phone was purchased less than 30 days ago), forums offer "circumventions" through changing the IMEI or the modified Recovery firmware, but this violates the law and leads to a loss of warranty.