How to reflash Xiaomi phone if it is locked: all working ways

A blocked Xiaomi smartphone is a problem faced by thousands of users after resetting settings, buying a used device or failing firmware. In 90 percent of cases, the phone becomes a brick because of a link to a Mi Account, an anti-rollback protection, or a system partition damage, POCO Mi can be brought back to life – if you follow a proven scheme.

In this article, we will analyze all the current ways to flash the blocked Xiaomi: from bypassing the lock through Fastboot to recovering through the Fastboot. EDL (You will learn how to determine the type of lock, where to download official and custom firmware, as well as how to avoid errors when unlocking the bootloader.

We warn you right away, the procedure is not easy, if you've never worked with a person. ADB, SP Flash Tool or Mi Flash, you better see a specialist, but if you're willing to take the risk, follow the instructions carefully, without skipping the instructions. One wrong step can turn a temporary lock into an irreversible hard brick (when the phone is not even detected by the computer).

1. Identify the type of lock: Mi Account, Fastboot or EDL

Before you start firmware, you need to understand what's blocking the phone, and that's what the recovery method is, and here are three main scenarios:

  • πŸ”’ Mi Account lock – the phone asks you to enter a username / password from the previous owner after reset (most often on the screen the inscription β€œThis device is locked.
  • πŸ“± Fastboot lock – the phone is turned on but only loads in Fastboot mode (a black screen with a rabbit and the words β€œFastboot”). Usually caused by damage to the system partition or a failed firmware.
  • 🚨 EDL-mode (emergency boot) – the phone does not respond to buttons, does not turn on, is not determined in Fastboot, but the computer β€œsees” it as Qualcomm HS-USB QDLoader 9008" The most difficult case, requires special tools.

How do you check?

  1. Connect your phone to charge for 30 minutes – sometimes a discharged battery simulates a lock.
  2. Squeeze the power. + The volume down for 10 to 15 seconds. If you see a Fastboot screen, you have a second case.
  3. If your phone doesn't respond, connect it to a PC with Qualcomm or Mediatek drivers installed. If an unknown device with code 9008 appears in the Device Manager, it's a device that's not known. EDL.

⚠️ Note: On Xiaomi devices with Mediatek processor (e.g. Redmi) 9A, POCO C31) regime EDL name BROM It requires other tools (SP Flash Tool).

πŸ“Š Your Xiaomi phone is blocked because of the
Mi Account (requests login/password)
Unsuccessful firmware (hangs on the logo)
System damage (not included)
Other causes

Unblocking Mi Account: Official and Unofficial Ways

If the phone asks for data from Mi Account after a reset, you have two ways:

Official method (if you know the previous owner’s information)

The easiest way is to enter the correct username and password. If you bought your phone from hand, try contacting the seller. Xiaomi allows you to unlock the device through account.xiaomi.com, but you need to:

  • πŸ“§ Have access to email/phone-linked.
  • πŸ”‘ Know your password or have backup codes.
  • ⏳ Wait 72 hours after your last account activity (if two-factor authentication is enabled).

If the data is lost, you can try to restore access through Xiaomi support, but the chances are minimal - the company requires confirmation of purchase (checks, box with the help of the company). IMEI).

Informal methods (if no data are available)

If you can’t contact the previous owner, you’ll find that the gray methods don’t work on all models and can lead to lockdown. IMEI (Your phone will lose the network. Use it at your own risk:

  1. Fastboot bypass: For some older models (Redmi Note) 4/5, Mi 5/6) There are patches that allow you to reset Mi Account via command: fastboot erase frp But on new devices (after the first time). 2019 This method does not work due to anti-rollback protection.
  2. Firmware through EDL: Full flashing through emergency mode removes the account binding, but requires an authorized Xiaomi account to unlock the bootloader.

⚠️ Attention: C 2020 Xiaomi tightened protection on devices with Qualcomm Snapdragon 8xx/7xx (for example, POCO F3, Mi 11) Bypassing Mi Account without an official unlocker is impossible.Attempts can result in permanent locking of the communication module.

List of models with Mi Account bypass without risk
According to community data XDA Developers, the following models can safely reset Mi Account via Fastboot (but require an unlocked bootloader): Redmi Note 4/4X (mido) Redmi Note 5 Pro (whyred) Mi A1/A2 (tissot/jasmine) POCO F1 (On new devices (e.g. Redmi Note) 10 Pro, POCO X3 Pro) these methods do not work due to hardware protection.

3. firmware preparation: drivers, tools and files

To reflash the blocked Xiaomi, you will need:

ComponentWhat do you need?Where to download
Qualcomm/Mediatek DriversTo recognize the phone in Fastboot/EDLOfficial website or XDA
Mi Flash ToolOfficial firmware ROM through Fastboot/EDLDownload page
SP Flash ToolDevice firmware on Mediatek (Redmi) 9A, POCO C31)Official website
Official firmware (.tgz or.zip)Files for System RecoveryXiaomi Firmware Updater
ADB and FastbootManaging the phone through the command lineAndroid SDK

Important: download firmware only from trusted sources. Files from torrents or obscure sites can contain viruses or be corrupted. Xiaomi has the best resources:

  • 🌍 Xiaomi Firmware Updater – official and modified firmware.
  • πŸ”§ XDA Developers - custom recovery and patches.
  • πŸ“¦ Official archives - stock ROM for all models.

Before the firmware be sure to check:

Install drivers for your model|Download the firmware with the correct anti-rollback version|Charge your phone at least 50 times%|Disable the antivirus (it can block Mi Flash)|Prepare the cable. USB (better-than-original)

-->

4. Unlocking the bootloader: without this firmware is not possible

On all Xiaomi devices (except for devices with the default unlocked bootloader, for example, POCO F1 For the global market, you need to unlock the bootloader before you run the firmware, and without that, the phone won't accept the new firmware.

Official method:

  1. Transfer the phone to Fastboot (clip Power + Volume down).
  2. Connect to your PC and start the Mi Unlock Tool (download here).
  3. Sign in with the same Mi Account as you do on your phone.
  4. Follow the instructions of the program. Usually, unlocking takes 72-168 hours (3-7 days).

Unofficial ways (if there is no time to wait):

  • πŸ”“ Use the patched version of the Mi Unlock Tool (risk of blocking your account).
  • πŸ› οΈ Sweep TWRP Fastboot (not working on all models).
  • πŸ”§ Use services that unlock the bootloader for money (for example, miunlock.ru).

⚠️ Note: On devices with a Qualcomm processor (e.g, POCO X3 Pro, Redmi Note 10 Pro) data on the loader is reset after the loader is unlocked DRM-This means that they will stop working: Wide dynamic range (HDR) into Netflix/YouTube. Camera in mode. 4K 60 FPS (Banking applications (due to the lack of SafetyNet) can only be restored by flashing the stock ROM Mi Flash with clean all and lock checkbox.

  1. Turn off the Internet on the PC before launching the tool.
  2. Use a different version of the program (e.g. 3.5.503.30 for older devices).
  3. Connect the phone to USB 2.0 (Port 3.0 sometimes causes errors).

5. Firmware through Fastboot: step-by-step instructions

If the phone is detected in Fastboot, but does not boot into the system, the most reliable way is to flash the official phone. ROM This method works on 90% of Xiaomi devices (except those that require authorization in the mobile device). EDL).

Step 1. Download the correct firmware

  • πŸ“Œ For your model (for example, Redmi Note 9 Pro - joyeuse, POCO X3 NFC β€” surya).
  • πŸ”’ With an anti-rollback version, no lower than the one that was before the lock. Check the current version by command: fastboot getvar anti If the phone does not answer, see the version by serial number on the site Xiaomi Firmware Updater.
  • 🌐 Regional firmware (Global, China, EEA). It is usually a global or EEA.

Step 2: Install drivers and prepare tools

  1. Download and install the Mi Flash Tool (version 2020.3.14.0 or later).
  2. Unpack the firmware (.tgz) β†’.tar β†’ file-folder).
  3. Connect your phone to Fastboot and check the connection with the command: fastboot devices If the device does not appear, install the drivers manually through the Task Manager.

Step 3. Run the phone.

  1. Open the Mi Flash Tool and select the firmware folder.
  2. At the bottom, select Clean All mode (if you want to save data, save user data, but it is risky).
  3. Press Refresh β†’ Flash. It takes 5-15 minutes.
  4. Once complete, the phone will restart. The first turn on can last up to 10 minutes.

⚠️ Note: If Mi Flash is an anti-rollback check fail, you are trying to flash an older version. ROM, Solution: Download the firmware with a newer build date, or run through the newer build date. EDL Authorization (see the next section).

  • The phone is not defined in Fastboot.
  • It is worth blocking Mi Account without the possibility of bypassing.
  • Boot or recovery section is damaged.

6. Firmware through EDL: When the Fastboot is not working

If the phone doesn’t turn on, doesn’t respond to buttons and is defined as Qualcomm HS-USB QDLoader 9008 will be used. EDL (Emergency Download Mode: This mode allows you to flash your phone even with a damaged system, but requires you to do so:

  • πŸ”‘ Authorized Xiaomi Account (for new devices).
  • πŸ–₯️ Special cable. EDL (or the ability to solder resistor).
  • πŸ“¦ Firmware in.mbn or.elf format.

Step 1. Put your phone in mode. EDL

There are three ways:

  1. Hardware: Close the Test Point contacts on the board (you need a soldering iron and a circuit for your model). For example, on the Redmi Note 8 Pro, these are contacts near the battery.
  2. Software (if the phone reacts at all): Enter the command: adb reboot edl or for Fastboot: fastboot oem edl
  3. Short-circuit: Connect your phone to your PC, then close the contacts for 2-3 seconds GND and EDL (You need a special cable).

Step 2. Run your phone through Mi Flash

  1. Download the firmware for EDL (usually files with the.mbn extension).
  2. In Mi Flash Tool, select the mode flash_all_except_storage (if data are to be retained; or flash_all (clean-up).
  3. Press Flash. It'll take 10 to 20 minutes.

Step 3: Unlock the bootloader (if necessary)

After the firmware through EDL The bootloader can stay locked to unlock it:

  1. Please. TWRP Fastboot: Fastboot Flash Recovery twrp.img fastboot boot twrp.img
  2. V TWRP Do a Format Data reset (this will remove encryption).
  3. Squeeze Magisk to obtain root rights (optional).

⚠️ Note: On devices with Mediatek (Redmi) 9A, POCO C31) instead EDL mode BROM. I need firmware. SP Flash Tool and scatter.txt files. Detailed instruction: Mediatek firmware via SP Flash Tool Download SP Flash Tool and firmware for your model (e.g. here for Mi) A2). Unpack the firmware and find the file scatter.txt. SP Flash Tool download scatter, select Download Only mode. Connect the phone turned off to the PC (drivers must be installed). Press Download. The firmware will take 5-10 minutes. Important: Don't turn off the phone during the process! This can cause damage. NAND-memory.

7. Frequent mistakes and how to avoid them

Even if you follow the instructions, you can run into problems, and here are the most common mistakes and solutions.

Mistake.Reason.Decision
anti-rollback check failTrying to re-shoot an older version ROMDownload the firmware with a new assembly date or stitch through EDL authorization
Invalid sparse file format at headerA damaged firmware fileDownload the firmware again, check the checksum (MD5)
Phone is not defined in FastbootLack of drivers or damaged USB-portInstall drivers manually, try another cable/port
Mi Flash is 99% frozen.Conflict with an antivirus or USB 3.0Disable the antivirus, use the port USB 2.0
After the firmware no network (IMEI invalid)The modem or nvram partition is damagedSwitch modem separately or restore IMEI via SN Write Tool

If after the firmware phone:

  • πŸ”„ Hangs on the logo: Squeeze boot.img separately or perform a reset through TWRP.
  • πŸ“΅ Not catching net: Check IMEI *#06# If it is missing, restore it via Maui META (for Mediatek or QCN (for Qualcomm).
  • πŸ”‹ Fast discharge: Make a full reset and calibrate the battery (discharge to 0%, then charge to 100% without interruption).
  1. Switch boot and recovery separately through Fastboot.
  2. Hold the power button for 30–60 seconds (sometimes helps with a soft brique).
  3. Repeat the firmware with a checkmark clean all and lock.

8. Alternative methods: custom firmware and service centers

If the official methods did not help, there are two options:

1. Installation of custom firmware (TWRP + LineageOS)

Custom firmware like LineageOS, Pixel Experience or Havoc OS They can bypass some locks, but they require:

  • πŸ”“ Unlocked loader.
  • πŸ› οΈ Established TWRP (or other custom recovery).
  • πŸ“² Compatibility with your model (check on the XDA).

Pros:

  • βœ… Bypassing the Mi Account lock (on some models).
  • βœ… No restrictions on the region (you can flash global firmware on the Chinese model).
  • βœ… More opportunities to set up.

Cons:

  • ❌ Loss of guarantee.
  • ❌ Possible problems with the camera, module NFC or 5G (firmware-dependent).
  • ❌ Banking applications may not work (due to lack of SafetyNet).

Instructions:

  1. Unlock the bootloader (see section 4).
  2. Please. TWRP Fastboot: Fastboot Flash Recovery twrp.img fastboot boot twrp.img
  3. V TWRP Make Format Data (required, otherwise the firmware will not stand up).
  4. Install custom firmware and GApps (if you need Google services).

2. Contact the service center

If the independent firmware failed or you are afraid to take risks, contact the service.The cost of unlocking Xiaomi in 2026:

  • πŸ”“ Unlocking Mi Account: 1,500–3,000 β‚½.
  • πŸ“± Firmware through EDL: 2 000–5 000 β‚½ (model-wise).
  • πŸ› οΈ Recovery IMEI: 1 000–2 000 β‚½.

Where to look:

  • 🏒 Xiaomi Official Service Centers: Warranty is maintained, but may be refused if a phone with root rights or custom firmware.
  • πŸ”§ Unofficial services: Often taken on difficult cases (for example, recovery from anti-rollback), but the risk of running into scammers is higher.

⚠️ Note: Official Xiaomi services may be refused repair if: The phone is purchased in China (models for the domestic market. IME