How to flash stock firmware on Xiaomi: a complete guide to unlocking the bootloader

Firmware Xiaomi smartphone on stock (official) version MIUI β€” a procedure that may be needed in a variety of situations: from recovery after a failure to returning to factory settings after experiments with custom firmware. However, many users face difficulties already at the stage of preparation - they can not unlock the bootloader, choose the right version of the firmware or avoid errors when installing via Fastboot or Recovery.

In this article, we will take a look at the entire process from A to Z, from checking the current firmware version to the final configuration after installation, focusing on unlocking the bootloader (without it, the stock firmware will simply not stand up), choosing between Global, China and the rest of the system. EEA The standard versions and common bugs that interrupt the firmware by 50% or turn the phone into a brick. POCO 2018–2026 issue.

Why would you want to use a stock firmware on Xiaomi?

Stock firmware (official) MIUI Xiaomi's software is not just a factory software, it's a guarantee of stability, security and compatibility with branded services:

  • πŸ”„ Recovery after a crash: If the phone is stuck on the logo, not turning on or is running with errors after a failed update.
  • πŸ”“ Custom firmware removal: Return to official software after experimenting with LineageOS, Pixel Experience or other builds.
  • πŸ“± Selling or transferring a phone: Stock firmware ensures that the new owner does not face compatibility issues.
  • πŸ”’ Security: Official updates close vulnerabilities that can be exploited by viruses or malicious actors.
  • 🎯 Functionality: Some features (such as Mi Pay, Game Turbo or Second Space) only work on stock MIUI.

Stock firmware is not without its drawbacks, however: Global versions often lack some features from China firmware (like App Lock with facial recognition or advanced camera settings), and official updates can come with a delay, especially for low-end Redmi models.

⚠️ Warning: Stockware erases all data on your phone, including photos, contacts and apps, and if you haven't backed up, it won't be possible to recover the information. Also note that unlocking the bootloader resets all security settings (including Find My Device), so unplug your Mi Account before the procedure.

πŸ“Š Why you are using Xiaomi for?
Recovery after failure
Custom firmware removal
Update to the new version of MIUI
Phone sale
Other

Preparation for firmware: what to do before the start

Unprepared firmware is a direct route to the "bricking" of the phone. To avoid errors, follow all the steps from this section before installing.

1. Check the current version of the firmware

Find out which version MIUI installed on your device:

  1. Go to Settings β†’ About Phone β†’ MIUI version.
  2. Remember or write down the full build number (for example, V14.0.5.0.TKLCNXM).
  3. Check the firmware region (Global, China, EEA, India is critical to choosing the right version.

If the phone does not turn on, you can find out the model and version by sticker under the lid (for devices with a removable battery) or through Fastboot mode (fastboot getvar product command).

Data backup

As mentioned, the firmware erases all data, and use these methods to store information.

  • πŸ“± Mi Cloud: sync contacts, notes, photos and SMS (If the phone still works).
  • πŸ’Ύ Local Copy: Copy files to your PC via MTP Or use apps like Swift Backup (requires root).
  • πŸ”§ TWRP-Backup: If you have custom recap installed, make a full backup section /data.

πŸ’‘

If the phone is not turned on but is detected by the computer in Fastboot mode, try extracting data using the Xiaomi Flash Tool (the "Save Data" option).

3. Choosing the Right Firmware

Official firmware for Xiaomi is divided into several types:

Type of firmwareDescriptionFor which regionsFeatures
Global StableOfficial stable versionThe whole world (except China)Google Services Support, No Chinese Apps
China StableChinese stable versionOnly for China.Without Google Services, more features MIUI
EEA StableEuropean versionEU countriesGDPR complies with Chinese services
Developer (Beta)Test versionFor developersFrequent updates, possible bugs

How do you choose the right version?

  • 🌍 If you bought your phone in Europe, take Global Stable or EEA Stable.
  • πŸ‡¨πŸ‡³ For devices from China (for example, Xiaomi 13 Ultra) – only China Stable (but you will have to install Google Services manually).
  • πŸ”§ Developer for experimentation, but not recommended for daily use.

Download the firmware only from official sources:

  • Official website MIUI (for Global/EEA).
  • MIUI ROM (alternative source with verified references).
  • Xiaomi Firmware Updater (for developers)

⚠️ Note: Firmware from torrent trackers or obscure forums may contain malware or be modified (e.g., with pre-installed advertising apps (MD5 or SHA-256) download.

Unlock the bootloader: without this, the stock firmware will not stand up

The bootloader on all Xiaomi smartphones is locked by default, a security measure that prevents unofficial software from being installed. To flash the stock firmware (even the official one!), the bootloader must be unlocked.

The unlocking process consists of three stages:

  1. Linking your Mi Account to your device.
  2. Getting permission to unlock through Mi Unlock Tool.
  3. Directly unlock the loader.

Step 1: Linking your Mi Account

If you haven't done it yet:

  1. Register your Mi Account at account.xiaomi.com.
  2. On your phone, go to Settings. β†’ Xiaomi account and log in to the system.
  3. Activate Find My Device (this is a must-have for unlocking).
  4. Connect your phone to the internet via a mobile network (Wi-Fi may not work!).

Step 2: Installation of Mi Unlock Tool

Download the official unlock tool from the site en.miui.com/unlock (Registration required. Install the program on a Windows PC 7/10/11 (on macOS/Linux It's not working).

Then:

  1. Turn off the phone.
  2. Hold the Loud down. + Power to enter Fastboot mode.
  3. Connect your phone to your PC through the original USB-cable.
  4. Open the Mi Unlock Tool and log in to your Mi Account.

Step 3: Unlocking the bootloader

In the program window, click Unlock. If done correctly, a countdown timer will appear (usually 168 hours for new accounts or 72 hours for old ones).

After the timer is completed:

  1. Go back to Fastboot mode.
  2. Connect your phone to your PC and start the Mi Unlock Tool.
  3. Press Unlock – the bootloader will be unlocked.
What if the Mi Unlock Tool can’t see the device?
1. Check if Xiaomi drivers are installed USB Drivers (you can download it on the official website). 2. Try another one. USB-cable (original) and port USB 2.0 (port USB 3.0 may not work). 3. Disable driver signatures in Windows: type in bcdedit command line /set nointegritychecks on and restart the PC. 4. If the phone is not detected in Fastboot, check if it is broken. USB-Port (try charging your phone).

⚠️ Warning: Unlocking the bootloader resets all data on the phone, even if you don't install the firmware! Also, after unlocking some features (such as Mi Pay or Face Unlock) may stop working on China firmware.

πŸ’‘

Unlocking the bootloader is a mandatory step for stock firmware MIUI. Without it, the phone will not accept the official firmware, even if it is downloaded from the Xiaomi website.

Firmware methods for stocking MIUI: Fastboot vs Recovery

There are two main methods of installing stock firmware on Xiaomi:

  • πŸ”§ Fastboot is suitable for β€œbrick” phones or when changing the firmware region (for example, from China to Global).
  • πŸ”„ Recovery is easier, but only works if the phone is turned on and the bootloader is unlocked.

Which method to choose?

CriteriaFastbootRecovery
Phone's off.βœ… It fits.❌ Not suitable.
Change of the firmware regionβœ… It fits.❌ Not suitable.
Data retention❌ Erase everything.⚠️ Maybe not if you choose Wipe Data)
Difficulty⭐⭐⭐⭐ (Requires PC and team knowledge)⭐⭐ (It can be done with a phone)

This method is more reliable, as it flashes all partitions (including boot, recovery and modem).

  • Changes in the firmware region (for example, from China to Global).
  • Recovery after "bricking."
  • Install firmware on a phone that does not turn on.

What you need:

  • Windows PC.
  • Original. USB-cable.
  • Archive with firmware in.tgz format (downloaded from the official website).
  • The Mi Flash Tool (you can download it here)

Step-by-step:

β˜‘οΈ Firmware through Fastboot

Done: 0 / 8

If the Mi Flash Tool is 0x80070002 or 0x80070005, try:

  • Launch the program on behalf of the administrator.
  • Disable the antivirus (it can block drivers).
  • Use the other USB-port (USB 2.0 instead USB 3.0).

Method 2: Firmware through Recovery

This is easier, but it is not suitable for changing the firmware region (for example, from China to Global).

  • The phone is turned on and the loader is unlocked.
  • You're running the same version. MIUI (Update the Global Stable to a new build).
  • You don’t want to lose data (although the risk remains!).

Instructions:

  1. Download the firmware in.zip format (not.tgz!).
  2. Rename the file to update.zip and place it in the root of internal memory.
  3. Turn off the phone.
  4. Press Volume Up + Power to enter Recovery.
  5. Select Install update.zip to System (control – volume buttons, choice – power button).
  6. Confirm the installation and wait for completion.

⚠️ Note: If after the firmware through Recovery phone is stuck on the logo MI, So the firmware is not suitable for your region, and then you have to use the Fastboot method with a complete data cleanup.

Common Firmware Mistakes and How to Avoid Them

Even when following the instructions, users often encounter errors, and here are the most common problems and solutions:

1. "This device is locked" error in Fastboot

Reason: The bootloader is not unlocked.

Decision:

  • Go through the unlocking procedure (see section above).
  • If unlocking has already been done, but the error remains – check if the bootloader is blocked again (for example, after updating via the browser). OTA).

2. "Invalid image" or "Flash is not allowed" error

Reason: Wrong firmware version (for example, trying to flash Global on a phone with China firmware without completely cleaning).

Decision:

  • Use the Fastboot method with the Clean All option.
  • Check that the downloaded firmware is suitable for your model (for example, the Redmi Note 11 Pro has veux versions for the global market and viva versions for India).

3.The phone is stuck on the MI logo after firmware

Reason: Incompatibility of the firmware with the region or damage to the data partition.

Decision:

  • Log in to Recovery and run Wipe Data.
  • If it doesn’t work, go through Fastboot with the Clean All and Lock option (this will lock the bootloader back, but bring the phone back to life).

4. "Anti-rollback check" error

Reason: Trying to flash an older version MIUI, Xiaomi is blocking rollbacks to older versions due to changes in drivers.

Decision:

  • Find a newer firmware (check the build date on the site) MIUI).
  • If you want the old version, use the Xiaomi Anti-Rollback Bypass Tool (risky!).
What if the phone doesn’t turn on after the firmware?
1. Check if the phone is detected in Fastboot (click Volume Down) + 10 seconds power. 2. If yes, repeat the firmware through the Mi Flash Tool with the Clean All. 3 option. If not, try charging your phone for 30 minutes (sometimes the battery drains to 0% during firmware). 4. If nothing helps, contact the service center (possibly damaged). EMMC-chip).

What to do after the firmware: the initial setting

Once the firmware is successful, the phone will start as new.

1.Initial setting

Follow the instructions on the screen:

  • Choose a language and region.
  • Connect to Wi-Fi (don’t use mobile data at this stage!)
  • Skip the Mi Account (unless you want to link your account right away).
  • Set up Find My Device (recommended for security).

2. Verification of the firmware version

Make sure the scoring is installed correctly:

  1. Go to Settings β†’ About Phone β†’ MIUI version.
  2. Check that the build number matches what you downloaded.
  3. If the version is not the same, repeat the firmware.

3. Update to the latest version

After installing the stock firmware, it is recommended to upgrade to the latest stable version through OTA:

  1. Go to Settings. β†’ Updating the system.
  2. Click Check for updates.
  3. If you have an update, download it and install it.

4. Data recovery

If you have made a backup copy, restore the data:

  • πŸ“± From Mi Cloud: Sign in to your account and sync contacts, notes, photos.
  • πŸ’Ύ From local backup: copy files back to your phone via MTP.
  • πŸ”§ Isa TWRP-Backup: If you have custom recaveri, restore the section /data (But it can cause errors if the firmware changes).

5. Checking the performance

Make sure everything works correctly:

  • πŸ“Ά Network: Check the mobile Internet and Wi-Fi.
  • πŸ“Έ Camera: Take a test shot.
  • πŸ”Š Sound: Test the speakers and microphone.
  • πŸ”‹ Charging: Connect the charger and check the indication.
  • πŸ‘† Sensors: check the operation of the proximity sensor, gyroscope, fingerprint scanner.

⚠️ Note: If some functions have stopped working after firmware (for example, NFC or IR-The blaster, you probably didn't install the firmware for your region, so you'll have to re-flash it with the right version.

FAQ: Frequent questions about Xiaomi firmware

Can I use the scaling machine without unlocking the scaling machine?
No. Even the official stock firmware requires an unlocked bootloader if you install it through Fastboot or Recovery. OTA (If the phone is also running in the same region).
How do I know which firmware is right for my Xiaomi model?
Check the code name of your device in Settings β†’ The phone. β†’ Model (e.g. surya for the POCO X3). Then look up the firmware with this code on the official website. Also pay attention to the region: Global, China, EEA India.
What to do if the phone does not turn on after the firmware?
If the phone doesn't respond to the power button: Connect it to charging for 30 minutes (possibly the battery has gone down). + If you can, go through the Mi Flash Tool with the Clean All option. If it doesn't work, contact the service center (possibly damaged hardware module).
Can I return the warranty after the firmware?
Formally, unlock the bootloader and firmware stock MIUI However, if you lock the bootloader back (the Clean All and Lock option in the Mi Flash Tool), the service center may not notice the interference, but this does not guarantee the restoration of the warranty, it depends on the policy of the particular service center.
How to flash Xiaomi if the power button does not work?
If the power button is not working, but the phone is determined by the computer: Connect the phone to the PC when it is off. Enter in the command line: adb reboot bootloader (if debugging is enabled). USB) Or use the Mi Flash Tool in mode. EDL (If nothing helps, you will need to repair the button.