How to flash Xiaomi Mi Box: official and custom firmware

Xiaomi Mi Box firmware is a process that can drastically change the functionality of your media player. Whether itโ€™s an official bug fix update or installing custom firmware to enhance features (like supporting Google Play Store on Chinese versions), the procedure requires care. TV-boxes have their own nuances: from locking the bootloader to the features of recovery through fastboot.

This guide is suitable for all popular models: Mi Box S (MDZ-22-AB), Mi Box 4K (MDZ-24-AA), We will analyze three main scenarios: update via the settings menu (the safest way), manual firmware through the settings menu (the safest way). USB-OTG and install custom firmware like LineageOS or AOSP. We will pay special attention to common errors, for example, when the device gets stuck on the Mi logo or does not see the update file.

Before you start, check that your Mi Box must be at least 50% charged (or connected to the network), and the USB-Type-C cable (for new models) or Micro-USB (for old ones) is working. If you are planning custom firmware, note that this voids the warranty and may result in Netflix being blocked from the service. 4K-permission because of Widevine L1.

1. Firmware Preparation: What You Need to Know

Xiaomi Mi Box firmware is different from the same procedure on smartphones.

  • ๐Ÿ”ง Official firmware is unpacked automatically, custom - require manual placement in the root folder USB-storage.
  • ๐Ÿ”’ Loader on new models (Mi Box S 2022)+) Unlocking it requires permission from Xiaomi (similar to smartphones).
  • โšก Power: When you run your fastboot, use the original power adapter. Cheap cables can cause a failure.
  • ๐Ÿ“ The name of the update file must be strictly update.zip (official) or conform to custom firmware instructions.

If your device is Chinese version (with firmware) MIUI TV), Note that after the firmware version of the global version, support for some local services (for example, iQiyi or Youku) may disappear.

โš ๏ธ Note: On Mi Box S models with Android 9+ If you fail to firmware, you might have an eMMC lock that makes the device a brick. CH341A ration.

๐Ÿ“Š What Mi Box Model Are You Using?
Mi Box S (2019-2023)
Mi Box 4K (2022+)
Mi Box 3/4 (model)
Another model

2. Method 1: Update via the settings menu (OTA)

The easiest and safest method is to upgrade by air" (OTA). It's good for official firmware, and it doesn't require a computer:

  1. Go to Settings โ†’ About the device โ†’ System update.
  2. Click Check Updates. If the update is available, the Download button will appear.
  3. After download, click Set and wait for the reboot (it will take 5-10 minutes).

If the update isnโ€™t there but you know itโ€™s out (like for the Mi Box S from Android 11 to Android 12), try:

  • ๐Ÿ”„ Restart the device and repeat the check.
  • ๐ŸŒ Connect to another Wi-Fi network (sometimes Xiaomi servers are blocked by the provider).
  • โณ Wait 24-48 hours โ€“ updates are often rolled out in waves.

โš ๏ธ Attention: If after OTA-Mi Box updates are slowing down, reset settings in Settings โ†’ System system โ†’ Reset.This is due to cache conflict between old and new versions of Android.

๐Ÿ’ก

OTA-update does not reset user data, but can delete the app cache.After updating, it is recommended to manually clear the cache through Settings โ†’ Annexes.

3. Method 2: Hand-held firmware through USB (Recovery)

If OTA It doesn't work, or you want to install a specific version of the firmware, use the manual method through the Recovery:

  • ๐Ÿ“ Official firmware in.zip format (download from miuirom.org or Xiaomi Firmware Updater).
  • ๐Ÿ’พ Empty. USB-accumulator (FAT32), formatted NTFS won't fit!
  • ๐Ÿ”Œ Cable USB-OTG (Connecting a flash drive to the Mi Box).

Step-by-step:

โ˜‘๏ธ Preparation for hand firmware

Done: 0 / 4
  1. Download the firmware and rename the file to update.zip (I don't know. Other names are not recognized).
  2. Copy the file to the root USB-storage device (not in folders!).
  3. Connect the flash drive to the Mi Box through USB-OTG.
  4. Go to Settings. โ†’ About the device โ†’ Updating the system โ†’ Menu (three dots) โ†’ Select the update file.
  5. Select update.zip and confirm the installation.

It takes 10-15 minutes. The device will restart several times - do not turn off the power (this can damage the boot partition). If the Mi Box does not turn on after restarting, try:

  • ๐Ÿ”„ Repeat firmware from another flash drive (sometimes it helps to change the device). USB-port).
  • ๐Ÿ”ง Use fastboot (see next section).
What to do if the Mi Box can't see the file update.zip?
The problem is often associated with an incorrect file system of the flash drive or a corrupted file. Try: 1. Reformat the flash drive to FAT32 via Rufus (select partition scheme) MBR). 2. Download the firmware again (possibly the file has not downloaded completely). 3. Use a flash drive with a volume โ‰ค32GB (some models donโ€™t support large drives).

4. Method 3: Fastboot Firmware (for experienced)

If the Mi Box is not turned on or you need custom firmware installation, use fastboot mode. This method requires a computer with drivers installed. ADB/Fastboot and unlocked loader (for new models).

Download the necessary tools:

  • ๐Ÿ–ฅ๏ธ Platform Tools (from Google).
  • ๐Ÿ“„ Firmware in.tgz or.img format (this repository will suit the Mi Box S).

Instructions:

  1. Connect the Mi Box to your computer via a USB-Type-C cable (for the Mi Box S) or Micro-USB (for older models).
  2. Press the button. OK on the remote and connect the power - the device will go to fastboot mode (the screen will be black).
  3. Open the command line in the Platform Tools folder and execute: fastboot devices If the device is determined, continue. If not, install the drivers.
  4. For the installation of the official firmware: fastboot flash boot boot.img fastboot flash system system.img fastboot flash recovery recovery.img For customization, follow the instructions of its developer (fastboot flash vendor may be required). vendor.img).

After the firmware is installed, the first switch can take up to 10 minutes. If the Mi Box is stuck on the logo, reset through the Recovery:

  1. Hold the Menu. + Back on the remote when switched on.
  2. Select Wipe data/factory reset.
  3. Reset the device.

๐Ÿ’ก

If the sound is lost after firmware through fastboot, check the settings. HDMI-CEC Sometimes reset the sound settings to the Mi Box (in Settings) โ†’ Sound solves the problem.

5. Unlock the bootloader on new models

Starting with Mi Box S 2022 and Mi Box 4K, Xiaomi blocks the default bootloader. To install custom firmware, it must be unlocked through the official Mi Unlock Tool (similar to smartphones), which takes up to 720 hours (30 days) of waiting, unless you have previously unlocked Xiaomi devices on your account.

Step-by-step:

  1. Link your Mi Box to your Xiaomi account in Settings โ†’ Accounts.
  2. Download the Mi Unlock Tool and install it on PC.
  3. Put the Mi Box into fastboot mode (as in the previous section) and connect to your computer.
  4. Launch the Mi Unlock Tool, log in to your account and follow the instructions.

After unlocking, you can install custom firmware, but you will lose:

  • ๐Ÿ” Guarantee (if any).
  • ๐ŸŽฌ Widevine Certification L1 (Netflix, Disney+ Other services will only work in 720p).
  • ๐Ÿ›ก๏ธ Protection against counterfeiting DRM (Some applications may not be running).
ModelPossibility to unlockEffects of consequences
Mi Box S (MDZ-22-AB)Yes (via Mi Unlock Tool)Widevine loss L1, guarantee
Mi Box 4K (MDZ-24-AA)Yes (30-day wait)Same thing. + There are problems with Dolby Vision.
Mi Box 3/4Yeah (no waiting)Minimum (Widevine) L3 persistence)

Installation of custom firmware (LineageOS, AOSP)

Castom firmware, such as LineageOS or AOSP, You can upgrade the Mi Box to a fresh version of Android (for example, from 9 to 12), remove unnecessary Xiaomi apps and improve performance:

  • ๐Ÿšจ Brick (turning into a brick) with incorrect installation.
  • ๐Ÿ“บ Loss of Netflix Certification 4K Amazon Prime Video HDR.
  • ๐Ÿ”Š Problems with sound through HDMI (It is solved by editing build.prop).

The following are the Mi Box S firmware:

  • ๐Ÿ“ฑ LineageOS 18.1 (Android 11).
  • ๐Ÿค– AOSP 10/11 (minimalist).
  • ๐ŸŽฎ Gaming Edition (optimized for emulators).

Installation process (LineageOS example):

  1. Unlock the bootloader (see the previous section).
  2. Download firmware and GApps (if you need Google services).
  3. Translate the Mi Box to fastboot mode and execute: fastboot flash system lineage-18.1-20230510-UNOFFICIAL-miboxs.zip fastboot flash recovery twrp-3.6.0-miboxs.img fastboot reboot recovery
  4. V TWRP Run GApps and run Wipe Dalvik/Cache.

โš ๏ธ Attention: Custom firmware may not work on Google Assistant via a button on the remote, due to the lack of proprietary Xiaomi drivers, and the solution is to use alternative launchers like the Leanback Launcher.

7.Typical errors and their solutions

Even if you follow the instructions, you can have problems, and here are the most common ways to correct them:

Mistake.Reason.Decision
Hanging on the Mi logoIncompatible firmware or failure during installationSwitch to fastboot or use MiFlash
The "Update failed" errorDamaged update.zip file or lack of spaceTo format the flash drive, download the firmware again
No image after firmwarePermission mismatch HDMI driver failureConnect to another port HDMI, reset
fastboot does not see the deviceThere is no driver or faulty cableInstall the drivers ADB, try out another cable

If the Mi Box does not turn on after a failed firmware:

  1. Try to load up in the Recavรฉre (Menu) + Back when on).
  2. If it doesnโ€™t work, use MiFlash for full flashing (instructions at xiaomiflash.com).
  3. In extreme cases, contact the service center (for devices under warranty).
How to recover the Mi Box after the brick?
If the device does not respond to buttons and is not detected in fastboot, you will need a programmer. CH341A And it's a ration-based technique that requires a lot of experience -- it's best to trust it to professionals: ~1500โ€“30 rubles.

8 How to Get Back the Official Firmware

If custom firmware is unstable or you want to return the warranty, install the official version.

  1. Download the latest official firmware for your model with Xiaomi Firmware Updater.
  2. Unpack the archive and find the file. flash_all.bat (for Windows or flash_all.sh (for Linux/Mac).
  3. Put the Mi Box into fastboot mode and connect to your computer.
  4. Launch it. flash_all.bat โ€” The script will automatically stitch all sections.

After installation of the official firmware:

  • ๐Ÿ”„ Perform reset to factory settings.
  • ๐Ÿ”’ The bootloader will remain unlocked (to block it back, you need to flash it back). anti_rollback.img).
  • ๐Ÿ“บ Widevine Certification L1 Restore only after re-associating the device to the Xiaomi account.

If some features are lost after returning to the official firmware (for example, Google Play in Chinese), install them manually through the official firmware. ADB:

adb install com.google.android.tvlauncher-5.1.1.apk


adb install com.google.android.apps.tvlaunchx-1.4.0.apk

FAQ: Frequent questions

Can I use Mi Box without a computer?
Yes, if you have official firmware in the format update.zip. To do this, download the file to USB-Connect it to the Mi Box via OTG and select the update manually through the settings menu.
Why is there no sound through HDMI after the firmware?
This is a typical problem when installing custom firmware. Solutions: Check the sound settings in Settings โ†’ Display and sound โ†’ Exit HDMI. Install the patch. audio_policy_configuration.xml Try another one. HDMI-cable.
How to find out the firmware version on the Mi Box?
Go to Settings. โ†’ About the device โ†’ Software version: It will indicate: Android version (e.g. Android 10) build number (e.g., Android 10, QT200.0.1.123.20230315). Model of device (e.g, MDZ-22-AB For the Mi Box S).
Can I get a Mi Box? 4K firmware from the Mi Box S?
No, these models have different hardware: the Mi Box S is an Amlogic processor. S905X, 2 GB RAM. Mi Box. 4K โ€” processor S905X3, 2/4 GB RAM: Installing incompatible firmware will result in a brick. Always check the model in the settings!
How to Switch Mi Box if it is not turned on?
If the device does not respond to buttons and does not boot: Try booting into fastboot (clamp down). OK If it doesn't work, use MiFlash for full flashing (computer required). In extreme cases, contact the firmware service via eMMC (disassembly required).