How to flash a locked Xiaomi smartphone: the full guide 2026

A locked Xiaomi smartphone is a problem that thousands of users face every year, and the reasons can be different: a forgotten password, a binding to a Mi Account after a reset, a software failure, or even buying a used device with an active lock. Unlike other brands, Xiaomi’s firmware is complicated by a secure bootloader and an account verification system. But there is a way out – and this guide will help unlock the phone even without access to the original account.

It is important to understand that the process of firmware locking Xiaomi requires technical training. Errors in the stage of unlocking the bootloader or selecting the firmware can turn the phone into a β€œbrick”. We will analyze all the current methods (via Fastboot, EDL and bypass Mi Account), specify the official and informal tools, and also warn against common mistakes. If you are a beginner, follow the instructions carefully and do not miss the steps.

Why is Xiaomi blocked and can it be circumvented?

Xiaomi smartphones are blocked for three main reasons:

  • πŸ”’ A forgotten pattern lock/PIN-The code is the most common case. The system requires you to enter a password after you reboot or reset.
  • πŸ“± Reconnect to Mi Account – After resetting via Recovery, the phone requires a login and password from the previous owner’s account (even if you made a hard reset).
  • 🚨 Software failure – for example, after a failed update or custom firmware installation.

Bypassing the lock is possible, but the methods depend on the model and version of MIUI. For example, new devices (released after 2021) are closed access to EDL (emergency mode), and unlocking the bootloader requires a wait of 7-30 days. Old models (up to the Redmi Note 8) are often unlocked in 5 minutes.

πŸ“Š Your Xiaomi is blocked because of...
Forgotten password
Mi Account after reset
Software failure
Other causes

⚠️ Note: If the phone is bought from hand and tied to someone else's Mi Account, official unlocking is possible only with the receipt or consent of the previous owner. Otherwise, you will have to use informal methods (risk of "bricking" up to 30%).

Preparation for firmware: what will be needed

Before starting the process, collect everything you need:

  • πŸ’» Computer on Windows 7/10/11 (64-bit). Nana Mac/Linux Possible problems with drivers.
  • πŸ”Œ Original. USB-Cheap cables often don't transmit data to Fastboot.
  • πŸ”‹ Charge at least 50%, discharge during firmware = brick-guaranteedΒ».
  • πŸ“‚ Firmware for your model (official or custom) download only from trusted sources (Xiaomi.eu, 4PDA, MIUI bootloader).

Special tools will also be installed:

Tool.AppointmentReference
Mi Unlock ToolOfficial utility for unlocking the bootloaderDownload
XiaoMiTool V2Automatic firmware and unlocking (for experienced)Website
QFil / MiFlashFirmware through EDL (for "bricks")XDA
ADB & FastbootManaging the phone through the command lineOfficial website

⚠️ Note: If your Xiaomi model is released after 2022 (e.g. Redmi Note 12, Xiaomi 13), to unlock the bootloader you will need to link the device to the Mi Account in advance (before locking.

Step 1: Unlock the bootloader (Bootloader)

Without an unlocked bootloader, you can't flash the phone, the official way is through the Mi Unlock Tool, but it doesn't always work.

Official method (for new models):

  1. Download the Mi Unlock Tool and install it on PC.
  2. Sign in to Mi Account (should match your phone account!).
  3. Transfer your phone to Fastboot: Turn it off, press Power + Volume Down.
  4. Connect to your PC, start Mi Unlock and follow the instructions.

On 2023-2026 devices (e.g., Redmi Note 13, POCO X6), unlocking takes up to 30 days of waiting, even with the correct account binding.

Informal method (for older models):

  • Use utilities like XiaoMiTool or Fastboot Scripts (available on 4PDA).
  • Some models (Redmi 4X, Redmi Note 5) have exploits that allow you to unlock the bootloader without waiting.

β˜‘οΈ Preparation for unlocking the loader

Done: 0 / 4

Step 2: Firmware via Fastboot (for unlocked bootloader)

If the bootloader is unlocked, you can flash the phone through Fastboot, which is suitable for official and custom firmware.

Instructions:

  1. Download the firmware in.tgz format (for example, with MIUI ROM).
  2. Unpack the archive in a folder with Fastboot (where fastboot.exe is located).
  3. Transfer your phone to Fastboot (Power + Volume Down).
  4. Launch the file. flash_all.bat (For Windows, or type in the command: fastboot flash all

It takes 5-15 minutes, and when it's done, it automatically reboots.

πŸ’‘

If the firmware is interrupted during the system step, try using the fastboot flash system.img command separately, and then repeat the process.

Step 3: Firmware through EDL (for β€œbricks”)

EDL (Emergency Download Mode) is an emergency mode that allows you to flash your phone even if it doesn't turn on, a risky method that requires special cable or test points.

How to log into EDL:

  • For older models (Redmi 4/5): Press Power + Volume Up + Volume Down.
  • For new models: you will have to close the test points on the board (see instructions for a specific model on 4PDA).

Firmware via EDL is performed using MiFlash or QFil:

  1. Install the Qualcomm 9008 driver (you can download it on XDA).
  2. Connect the phone in mode EDL (I have to decide how. QHSUSB_BULK device-manager).
  3. Start MiFlash, select firmware in.mbn format and press Flash.

⚠️ Attention: Firmware through EDL on models with a MediaTek processor (for example, Redmi) 9A, POCO C31) It requires an authorization file (auth.ini). SP Flash Tool will not start the process.

What if MiFlash can’t see the device?
1. Check that the phone is actually in mode EDL (must be defined as COM-port in Device Manager. 2. Install the Qualcomm driver manually (download from the site) QPST). 3. Try another one. USB-port (preferably 2.0, not 3.0). 4. If you use testpoint, check the quality of the circuit (sometimes you need to keep contacts before you start firmware).

Step 4: Bypassing Mi Account after resetting

If the phone requires a login from the previous owner after a reset, there are several ways to get around:

Method 1: Through Fastboot (for unlocked bootloader)

  • Try custom Recovery (such as TWRP).
  • In TWRP, delete files: /data/system/gesture.key /data/system/locksettings.db
  • Reset, the lock will be reset.

Method 2: EDL (for blocked models)

  • Sweep through the modified firmware with the Mi Account removed (see 4PDA for the model).
  • Use utilities like Mi Account Remove Tool (not all models).

Method 3: Official (if there is a check)

  • Contact the Xiaomi service center with a check or documents on the phone.
  • By providing proof of purchase, you can request that your account be unlocked.

πŸ’‘

Bypassing Mi Account on new models (2023-2026) is virtually impossible without official unlocking, the only way to work is through EDL with an authorization file, but it is paid and only available to trusted developers.

Common mistakes and their solutions

When Xiaomi firmware users often face typical problems.

Mistake.Reason.Decision
Couldn't unlock in Mi UnlockAccount not tied to phone or waiting is not overLink your device to your account in advance or wait 7-30 days
Fastboot not recognizedNo drivers are installed or paths to ADB are not prescribedInstall Google USB Driver and add the path to platform-tools to the environment variables
The phone does not turn on after the firmwareWrong firmware version or interrupted processSweat through EDL with the right firmware for your model
MiFlash: Flash is not doneLack of rights or blocking antivirusRun MiFlash on behalf of the administrator, disable the antivirus
After the firmware, there's no network.Implemented firmware for another regionInstall firmware with the correct region code (e.g. RU for Russia)

⚠️ Note: If after the scaling of the EDL The phone is not switched on, but is defined as Qualcomm. HS-USB QDLoader 9008, so the firmware was incorrect. Repeat the process with another version of the software or check the integrity of the files.

FAQ: Frequent questions about unlocking Xiaomi

Can I unlock Xiaomi without losing data?
No. Any unlocking of the bootloader or firmware via Fastboot/EDL results in a complete reset (format data). The only way to save data is to unlock the phone through Mi Account (if you remember the username/password).
How much does it cost to unlock in the service center?
Official unlocking (if you have a check) is free. Unofficial unlocking through services costs from 1,000 to 5,000 rubles depending on the model. ~2 500 β‚½, Xiaomi 13 - up to 5,000 β‚½.
Can I flash Xiaomi with a MediaTek processor without an authorization file?
No. Starting in 2020, all Xiaomi devices on MediaTek (e.g. Redmi 9/10, POCO M3) require an auth.ini file to be firmware through the SP Flash Tool. Without it, the process will be interrupted with the SLA Auth Fail error.
What to do if Mi Unlock Tool says "Current account is different from the account info on the device"?
This error means that the account on the phone is not the same as the one you signed in to Mi Unlock. Solutions: If the phone is turned on, log in to the same account and try again. If the phone is locked, EDL will delete the Mi Account (see Step 4).
How to know if the bootloader is unlocked on Xiaomi?
Turn off your phone, press Power + Volume Down to log in to Fastboot. If the bottom of the screen says Unlocked, the bootloader is unlocked. If Locked is locked. On some models (POCO F3, Xiaomi 11T), status is displayed only after you connect to the PC.