Forgot the lock code on Xiaomi: what to do and how to unlock your phone without losing data

The forgotten lock code on Xiaomi’s smartphone is a situation that almost one in five users face. According to service center statistics, 18% of calls on the phone of this brand are due to unlock problems. The reasons are different, from banal forgetfulness to buying a used device with a password set. Fortunately, the manufacturer has provided several formal and informal ways to solve the problem, from a simple reset via Mi Account to complex manipulations in Fastboot mode.

The main rule is: do not panic and do not try to find the code at random. After 5 unsuccessful attempts, Xiaomi will lock the device for 30 seconds, after 10 – for 5 minutes, and after 20 attempts, it may even require you to enter data from your Mi Account. In this article, we will discuss all working methods of unlocking, from the most secure (without loss of data) to radical (full reset). MIUI and having an associated account.

1 Unlocking through Mi Account (official method)

Xiaomi’s most reliable and recommended method is to use a tied Mi Account. It works on all devices with MIUI (except some models for the Chinese market) and does not require technical skills. The main condition is that the phone must be connected to the Internet (via Wi-Fi or mobile network), and you must remember the username and password from the account.

If after 5 failed attempts to enter the code on the screen appeared a window with a suggestion to enter data from Mi Account, follow the instructions:

  1. Enter the email or phone number associated with the account.
  2. Please specify your password (if you forgot, restore it through the official website).
  3. Confirm unlocking via SMS or email (if two-factor authentication is enabled).
  4. Create a new lock code or disable it altogether.

⚠️ Note: If the phone was purchased from hand and the previous owner did not untie his account, this method will not work, in which case you will need to contact the seller or contact the service center with proof of purchase (check, contract).

Make sure your phone is connected to the internet|Remember the username/password from Mi Account|Check the balance SIM-cards (for SMS-code)|Have access to email to confirm-->

πŸ’‘

If you often forget passwords, turn on a backup email in your Mi Account settings and link your phone number, which will speed up recovery in the future.

2. Reset password via Find Device (remote unlock)

Google’s Find Device feature not only allows you to track Xiaomi’s location, but also manage some settings remotely β€” including password resetting.

  • πŸ“± Phone's connected to the Internet (Wi-Fi/mobile).
  • πŸ”„ Find Device has been activated in settings (Settings) β†’ Mi Account β†’ Find Device).
  • πŸ”‘ You are logged in to the same Mi Account as your phone.

Step instructions:

  1. Go to i.mi.com and log in.
  2. Select a locked phone from the list of devices.
  3. Press Unlock Device (unlock device).
  4. Confirm the action via SMS or email.
  5. Wait for notification of a successful reset (can take up to 5 minutes).

⚠️ Note: After remotely unlocking, all data on the phone will remain intact, but you may need to re-enter your password from Wi-Fi and some applications (for example, Mi Pay or banking services).

Yeah, looking for a lost phone.|Yeah, I remotely blocked the device.|No, but I know about that function.|No, and no planning.-->

3. Unlocking through Recovery Mode (hard reset)

If previous methods have failed (e.g., no linked account or no phone network), the hardware resets through Recovery Mode, which will remove all data from the device, including photos, messages and installed apps, and use it only as a last resort!

Instructions for most Xiaomi models (including Redmi Note 10/11/12, POCO X3/X4, Mi 11/12):

  1. Turn off the phone (press the power button for 10 seconds).
  2. Press the Power button + Volume up at the same time and hold for 10-15 seconds until the Mi logo appears.
  3. From the Recovery menu, select the language (usually English or Chinese).
  4. Go to Wipe Data β†’ Wipe All Data (use volume buttons for navigation, power button for selection).
  5. Confirm the reset by selecting Confirm.
  6. Once completed, select Reboot to reboot.

⚠️ Note: Some models (e.g. Xiaomi) 13T or Redmi K50) Recovery menu can be in Chinese. Look for characters (clear data) and (confirm).

What if Recovery Mode asks for a password?
On some devices (especially MIUI 13+), even logging into Recovery may require a password, which can only be unlocked via Fastboot (see next section) or contacted by a service center.

Xiaomi modelCombination of buttons for RecoveryFeatures
Redmi Note 8/9/10Food + Volume upMenu in English, reset takes ~3 minutes
POCO F3/F4Food + Volume upRequires confirmation via the Yes button
Mi 11 UltraFood + Volume upThe menu is in Chinese, look for it.
Redmi K40/K50Food + Volume upAfter the reset, activation via Mi Account may be required.

4. Unlock via Fastboot (for advanced users)

The method via Fastboot is suitable if:

  • πŸ”§ You have a computer with drivers installed. ADB/Fastboot.
  • πŸ“± The phone is determined by the PC in Fastboot mode (checked by the team of fastboot devices).
  • πŸ”“ You are prepared for possible data loss (on some models).

Step-by-step:

  1. Install Platform Tools (includes fastboot and adb).
  2. Turn off the phone and put it in Fastboot mode: pinch Power + Volume down for 10 seconds.
  3. Connect your phone to your PC through USB-cable.
  4. Open the command line (Windows) or terminal (macOS/Linux) in the folder with Platform Tools.
  5. Enter the command to check the connection: fastboot devices If the device is determined (the serial number appears), continue.
  6. For password reset, type fastboot erase userdata fastboot erase frp fastboot reboot.

⚠️ Note: On new models (Xiaomi) 13/14, Redmi Note 12) The fastboot erase frp command may not work due to anti-Rollback protection. EDL-The mode (only for experienced users!).

πŸ’‘

Unlocking through Fastboot only removes data on some models. File-Based Encryption devices will require a full reset via Recovery.

5 Unlocking through EDL Mode (Emergency Method)

EDL (Emergency Download Mode) is a flashing firmware mode that allows you to reflash your phone even with a locked bootloader. It's a complex and risky method: if you make a mistake, your device can turn into a brick.

  • πŸ› οΈ Are you a user or follow the instructions on the video.
  • πŸ“„ You have an original firmware for your model.
  • πŸ”Œ Phone is not defined in Fastboot.

For more information, see the XDA Developers or 4PDA forums:

  1. Download the firmware for your model from the Xiaomi Firmware Updater website.
  2. Install the Qualcomm HS-USB QDLoader 9008 driver (for Windows).
  3. Transfer the phone to EDL: Hold the volume up + Loudness down + USB-cable (on the phone turned off).
  4. Swipe the device through the Mi Flash Tool or QFil.

⚠️ Note: On models with a MediaTek processor (e.g. Redmi) 10A or POCO C40) regime EDL In this case, the unlocking is only possible through an authorized service center.

6. Contact the Xiaomi Service Center

If all of the above methods fail, the official service remains, and this is the most reliable, but also the longest way, Xiaomi will unlock the device if you have:

  • πŸ“„ Check or warranty card (proof of purchase).
  • πŸ†” Passport holder (to confirm identity).
  • πŸ“± Phone with a charge of at least 50%.

The cost of the service varies from 500 to 2000 rubles depending on the model and region. In some cases (for example, when buying a used phone without documents), the service may refuse to unlock.

⚠️ Warning: Avoid gray services that offer 1 day unlock, often using illegal methods that can lead to blocking IMEI or problems with future updates.

Yeah, if it's fast and cheap.|Official services only|I tried it, but I was not happy.|Never treated.-->

7.How to avoid blocking in the future

To avoid the problem of forgotten passwords again, follow these simple tips:

  • πŸ” Use biometric unlocking (fingerprint or facial recognition) in addition to PIN-code.
  • πŸ“ Write the lock codes in a secure location (for example, in Google Keep with encryption or in a notebook at home).
  • πŸ”„ Update regularly MIUI β€” In new versions, the access recovery system has been improved.
  • πŸ“± Link backup email and phone number to Mi Account.

It’s also worth enabling Smart Lock (in security settings) that automatically unlocks your phone in trusted places (such as at home or work).

πŸ’‘

If you often forget passwords, install a password manager app (like Bitwarden or 1Password) and save the lock code there.

FAQ: Frequent questions about unlocking Xiaomi

Can I unlock Xiaomi without losing data?
Yes, but only if you have a Mi Account tied and active, or if your phone is connected to the Internet and Find Device is enabled, otherwise resetting your password will result in deletion of your data.
What to do if you forget your Mi Account password?
Restore it through the official website, you will need access to an email or phone number associated with your account, and if you do not remember any data, contact Xiaomi with proof of ownership of the device.
Why does the phone ask for an old password after resetting via Recovery?
This is due to Factory Reset Protection (FRP) feature, which means that to remove a request, you need to enter data from the last active Mi or Google account that was on the phone before the reset.
Can I unlock Xiaomi through my Google Account?
No, Xiaomi does not support unlocking through Google Account (unlike many other Android devices), the only official way is through Mi Account.
How much does it cost to unlock in the service center?
Cost depends on the model and region. On average: Redmi (budget models): 500-1000 rubles. POCO: 800-1500 rubles. Xiaomi (flagships): 1500-2500 rubles. The cost usually includes diagnostics and firmware (if required).