How to flash a locked Xiaomi phone: unlock the bootloader, bypass the lock Mi Account and install firmware

A locked Xiaomi phone is a problem that users face after resetting, buying a used device or failing firmware. The main reasons for blocking are: linking to a Mi Account account (even after a hard reset), activating FRP (Factory Reset Protection), or damaging system files. In this article, we will discuss legal and technical ways to unlock, including bypassing account lock, unlocking the bootloader and installing custom / official firmware.

It is important to understand that the methods differ depending on the model (Redmi Note 10 Pro, POCO X3, Mi 11, etc.), the version of MIUI and the type of lock. For example, on new devices with HyperOS (2026), standard ways of bypassing Mi Account may not work due to enhanced protection. We will consider current solutions for modern and outdated models, as well as risks that are important to consider before starting the procedure.

1. Diagnostics of the type of lock: Mi Account, FRP or damaged firmware?

Before you start unlocking, determine what is blocking the phone, which affects the choice of method:

  • πŸ”’ Blocking Mi Account: After reset, a request for login/password from the previous owner appears.
  • πŸ”„ FRP (Factory Reset Protection: Google Account request after reset (if Settings were enabled) β†’ Google β†’ Security β†’ Find the device).
  • 🚨 Damaged firmware: Phone not turned on, stuck on the logo MI, or make a mistake Fastboot/Recovery.
  • πŸ”“ Blocked bootloader: On the Fastboot screen, the words Device is locked or This device is locked.

How to check:

  1. Connect your phone to your PC and start ADB (if the device is detected). Enter the command: adb devices If the answer is unauthorized, this is blocking Mi Account.
  2. Press Volume Up + Power to log in to Fastboot. If you see Locked, the bootloader is locked.
  3. When hanging on the logo or cyclical reboot - the firmware is damaged.
πŸ“Š What kind of blockage did you encounter?
Mi Account (request of Xiaomi login)
FRP (Google account request)
Locked loader
Damaged firmware (not included)
I don't know.

Important! On Xiaomi devices from 2023 to 2026 (e.g. Redmi Note 12, POCO F5), bypassing Mi Account via EDL or Fastboot often requires an authorized developer account. For older models (Redmi 4X, Mi A1), universal methods are suitable.

2 Unlock the bootloader on Xiaomi

Most firmware methods require an unlocked bootloader, and Xiaomi officially allows this, but with limitations:

  • ⏳ Waiting 7-360 days: New devices require a wait (from 7 days to a year) after linking an account to a phone!).
  • πŸ“± Official method: Through the Mi Unlock Tool app (download from the official website).
  • πŸ”§ Informal methods: Bypassing waiting EDL or exploits (the risk of device throwing!).

Step-by-step instructions for official unlocking:

  1. Download the Mi Unlock Tool and install it on PC.
  2. Turn on the phone Developer Mode (7 times click on the MIUI version in Settings β†’ About phone).
  3. Activate OEM Unlock and USB Debugging in Settings β†’ Additional β†’ For Developers.
  4. Link your Mi Account to your device in Settings β†’ Xiaomi Account.
  5. Launch the Mi Unlock Tool, log in to your account and connect your phone in Fastboot mode.

Link Mi Account to phone | Enable OEM Unlock and debugging by USB | Download Mi Unlock Tool from the official website | Connect phone in Fastboot | Wait for the end of the waiting timer (if any)

-->

⚠️ Attention! On HyperOS devices (2026), unlocking the bootloader can result in Mi Account being blocked for 30 days even after a successful procedure!

If the phone requires a login/password from the previous owner, there are several ways to solve:

MethodSuitable forRisks.Difficulty
Official reset via Mi AccountKnow the previous owner’s informationNo.⭐
Fastboot bypass (Miflash teams)Older models (Redmi 5, Mi 8)Brik is possible.⭐⭐⭐
Firmware via EDL (Emergency mode)All models, but you need an authorized accountHigh brood risk⭐⭐⭐⭐
Use of Custom Recovery (TWRP)Models with unlocked loaderLoss of guarantee⭐⭐

The most reliable way is to contact the previous owner and ask them to remove the device from their Xiaomi account via account.xiaomi.com. If that is not possible, consider the following options:

How to remove a device from the previous owner’s Mi Account
1.The previous owner goes to account.xiaomi.com. 2. Goes to Devices and finds your phone. 3. Clicks Delete Device and confirms the action. 4. After that, the Mi Account lock will be removed and you will be able to log in to your account.

For tech-savvy users, Fastboot firmware is suitable with Mi Account deletion, such as the Redmi Note 9 Pro:

fastboot erase frp


fastboot erase userdata




fastboot reboot

But this method does not work on all models and can lead to loss of IMEI or complete inoperability of the communication module.

4.Firmware blocked Xiaomi via Fastboot and EDL

If the bootloader is unlocked, you can flash the phone with official or custom firmware.

Fastboot (Mi Flash Tool)

Suitable for devices with unlocked bootloader.

  • πŸ–₯️ Windows PC;
  • πŸ”Œ Cable USB (preferably original);
  • πŸ“¦ Firmware in.tgz format for your model (download from the official website);
  • πŸ› οΈ The Mi Flash Tool.

Instructions:

  1. Unpack the firmware in a folder without Cyrillic symbols.
  2. Run the Mi Flash Tool and select the folder with the firmware.
  3. Connect your phone in Fastboot mode (clip Volume Down + Power).
  4. In the utility, press Refresh, then Flash.
  5. Wait for completion (5-10 minutes).

Firmware via EDL (Emergency mode)

EDL (Emergency Download Mode) - a mode for recovery of "bricks" requires an authorized Xiaomi account or a special box (for example, UFi Box).

How to log into EDL:

  1. Turn off the phone.
  2. Press Volume Up + Volume Down and connect the USB cable to the PC.
  3. Hold the buttons for 10-15 seconds until the Qualcomm HS-USB QDLoader 9008 port appears in the Device Manager.

For firmware via EDL, use Mi Flash Pro or QFil. Without an authorized account, firmware through EDL will lock the device permanently (hard brick).

πŸ’‘

Before you run your firmware through EDL, check if your model supports this method. For example, Redmi Note 10 and later requires authorization, and Redmi 4X can be flashed without it.

5. Factory Reset Protection (FRP) bypasses Xiaomi

If after resetting the phone requires a Google account that was previously linked, use one of the methods:

  • πŸ“± If the phone is turned on but asks for an account, try connecting to Wi-Fi and entering any existing Google account (sometimes it works).
  • πŸ”§ Through ADB: Connect your phone to your PC, start it up. ADB And do it: adb shell am start -n com.google.android.gsf.login/ adb shell am start -n com.google.android.gsf.login.LoginActivity Then add a new account.
  • πŸ› οΈ Through Recovery: Install custom Recovery (e.g, TWRP) and delete the files /data/system/gesture.key and /data/system/locksettings.db.

On new Android 12+ devices, FRP circumvention is complicated, for example, on the POCO X5 Pro, you may need to firmware through Fastboot to remove the frp partition:

fastboot erase frp


fastboot reboot

⚠️ On some models (Redmi Note 11, Mi 12) FRP And then you can use Fastboot to lock the bootloader, and then you can only use the firmware through the bootloader. EDL authorization.

6.Recovery of IMEI and serial number after firmware

Once you've run a firmware through a Fastboot or EDL, you can lose your IMEI, your serial number, or your model data, and you can make your phone unsuitable for calls and mobile Internet, and you can restore your IMEI in a number of ways:

6.1. Through the engineering menu

Suitable for Qualcomm chip-based devices:

  1. Dial on the phone keyboard ##4636##.
  2. Go to Phone Information and check your current IMEI.
  3. If you don’t have an IMEI, use the SN Write Tool or Maui META to rewrite.

Through Fastboot (for devices with unlocked bootloader)

If the IMEI is missing after the firmware, restore it with the command:

fastboot oem writeimei [IMEI_1] [IMEI_2]

Where [IMEI_1] and [IMEI_2] β€” original IMEI Your phone (indicated on the box or under the battery).

Important! On devices with MediaTek (e.g. Redmi 9A) to recover IMEI, use the SP Flash Tool utility with a stock firmware NVRAM file.

πŸ’‘

IMEI recovery is a critical step after firmware: Without the correct IMEI, the phone will not be able to connect to mobile networks, and some features (such as GPS) may not work smoothly.

7. Frequent errors and their solutions

When you run Xiaomi, you're going to have a problem with the typical ones.

Mistake.Reason.Decision
Fastboot: unknown commandMi Flash Tool or drivers incorrect versionInstall the latest version of the utility and drivers Qualcomm/MediaTek
This device is lockedbootloader lockedUnlock the bootloader through the Mi Unlock Tool
The phone does not turn on after the firmwareIncorrect firmware or interrupted processRe-sweep through EDL or Fastboot
Invalid sparse file formatFirmware file damagedDownload the firmware again and check the MD5 checksum

If after firmware the phone is getting stuck on the MI logo, try:

  1. Press Volume up + Power to log in to Recovery and make Wipe Data.
  2. Swipe back with the Clean All mark in the Mi Flash Tool.
  3. Use a different firmware version (e.g., try China or EEA instead of Global).

FAQ: Frequent questions about unlocking and firmware Xiaomi

Can I unlock my Mi Account without the previous owner?
Technically, but legally, only through a formal reset (see Section 3). Unofficial methods (e.g., firmware via EDL) require an authorized account and can lead to a hard brick.
What if the Mi Flash Tool can't see the phone?
Check: Are Qualcomm or MediaTek drivers installed (depending on the processor). If you use the original USB cable. The phone is in Fastboot mode. If the problem persists, try running the Mi Flash Tool on behalf of the administrator.
How do I know if my Xiaomi bootloader is unlocked?
Turn off your phone and press Volume Down + Power. If you see Device is unlocked, the bootloader is unlocked. If Locked is locked.
Can I use Xiaomi without a PC?
Partially. For example, update the firmware through Recovery (if the phone turns on) or install it. OTA-But to unlock the bootloader, bypass the Mi Account or firmware through Fastboot/EDL PC is mandatory.
What happens if you interrupt the firmware?
Interrupting the firmware process (especially through EDL) is almost guaranteed to lead to a hard brick – the phone will stop turning on and will not be detected by the PC.