Before you flash: Flashing firmware will erase all data on your device. Back up contacts, photos, and apps before proceeding. FlashGuideHub is not responsible for any damage caused by following this guide.
About the Xiaomi Mi 5s
The Xiaomi Mi 5s (codename: capricorn, model: 2015711) is Xiaomi's 2016 flagship phone powered by the Qualcomm Qualcomm Snapdragon 821 (MSM8996 Pro-AB) SoC. Software restoration differs between official factory fastboot packages and community recovery ROMs.
Official restoration packages are distributed as compressed TGZ archives containing raw partition binaries, written through Mi Flash Tool in fastboot mode. Community multi-language builds such as xiaomi.eu use ZIP archives installed via TWRP recovery.
Which Flash Mode Should You Use?
Mi Flash Tool (Fastboot TGZ)
The official factory flashing method for Xiaomi devices. Flashes partition-by-partition via Qualcomm fastboot scripts. Requires an officially unlocked bootloader. Erases all user data when "clean all" is used.
TWRP Recovery (Custom ZIP)
Used for flashing community packages like xiaomi.eu or custom kernels. Requires fastboot installation of the TWRP recovery image on an unlocked bootloader, followed by flashing the ZIP from internal storage.
Qualcomm EDL 9008 Mode
Emergency unbricking method for devices that cannot boot to fastboot. Detects as Qualcomm HS-USB QDLoader 9008 via hardware test points or an EDL deep-flash cable. Handled via Mi Flash Tool or QFIL.
What You Need Before Flashing
Mi Flash Tool runs on Windows 7, 8, 10, or 11 (64-bit). Install the Qualcomm USB and Google fastboot drivers beforehand.
Xiaomi devices enforce bootloader verification. An official unlock via Mi Unlock Tool is required before fastboot flashing will succeed.
Do not load the compressed .tgz or .tar file directly into Mi Flash Tool. Extract with 7-Zip until the flash_all.bat file is visible in the root folder.
Connect to a rear motherboard USB 2.0 port to prevent packet dropouts or timeout errors during partition writes.
The Mi 5s has a 3200mAh sealed battery. Prevent power cuts during critical system and vendor partition flashing.
Flashing with flash_all.bat clears userdata and cache partitions. Move photos and essential files to a PC or cloud storage.
How to Flash the Xiaomi Mi 5s β Quick Overview
A condensed step-by-step summary specific to the Xiaomi Mi 5s. Follow the full Mi Flash Tool guide for screenshots, an interactive progress checklist, and complete troubleshooting.
-
Unlock the bootloader via official Mi Unlock tool
-
Download the matching package for your target setup
-
Extract the TGZ package completely with 7-Zip
-
Boot Mi 5s into Fastboot mode
-
Configure Mi Flash Tool and choose "clean all"
-
Flash and await automatic reboot
Firmware Package Layout for MSM8996 Pro-AB
Official fastboot archives for the Xiaomi Mi 5s extract to a folder containing batch and shell scripts (flash_all.bat, flash_all_except_storage.bat, flash_all_lock.bat) alongside an images/ subfolder. The images subfolder contains the partition binaries (boot.img, system.img, recovery.img, cust.img, userdata.img, and non-hlos modem images). There is no scatter file; that format is MediaTek-specific and does not apply to this Qualcomm Snapdragon 821 device. Point Mi Flash Tool at the root extracted directory that contains flash_all.bat.
Xiaomi Mi 5s Firmware Versions
The complete set of 3 known firmware packages for the Xiaomi Mi 5s, covering official Global Stable, official China Stable, and the European community release.
| Version | Region | Android Version | Size | MD5 | Download |
|---|---|---|---|---|---|
V10.2.3.0.OAGMIXM |
Global Stable (MIUI 10) β Google Services Included | Android 8.0 | 1.56 GB | β | β¬οΈ Download |
V11.0.2.0.OAGCNXM |
China Stable (MIUI 11) β Final Official China Release | Android 8.0 | 2.04 GB | β | β¬οΈ Download |
V11.0.2.0.OAGCNXM (v11-8.0) |
xiaomi.eu Community (MIUI 11) β Multi-Language / TWRP | Android 8.0 | 1.3 GB | 9b08dfdf3e7d973ec8fa565e50e5c3ee |
β¬οΈ Download |
This device has 3 known files across official and community channels. See the complete archive on AndroidFirmwareFile.com β
Common Errors on the Xiaomi Mi 5s
Mi Flash: "cannot receive hello packet" / "error: write timeout"
Indicates a USB communication stall or driver conflict. Connect the device to a native USB 2.0 port directly on the PC motherboard rather than a USB 3.0/hub port, and verify Qualcomm QDLoader / Android bootloader drivers in Device Manager.
Fastboot: "FAILED (remote: Device is locked. Cannot flash images)"
The bootloader is still locked. You must boot the device to system, link your account under Developer Options β Mi Unlock Status, wait out the designated Xiaomi waiting period if prompted, and complete the unlock with the Mi Unlock PC client before flashing.
Device stuck on Mi logo with progress bar stalled for over 15 minutes
A first boot after a clean fastboot flash takes up to 10 minutes. If it exceeds 15 minutes, force reboot into Fastboot mode and re-flash ensuring "clean all" was selected to prevent cached userdata corruption from the previous OS build.
Ultrasonic fingerprint scanner fails to recognize inputs after flashing
Occurs when the persist partition has been formatted or corrupted. Re-flash the persist image from the extracted fastboot archive via fastboot flash persist images/persist.img while preserving hardware calibration tables.
For the full database of Xiaomi fastboot and Mi Flash Tool troubleshooting steps: Mi Flash Tool Error Directory β
Frequently Asked Questions β Xiaomi Mi 5s
Selecting "clean all and lock" executes flash_all_lock.bat, which re-locks the bootloader after partition writing. If you flashed an official build matching your hardware origin (e.g. China ROM on Chinese hardware), it locks safely. If you cross-flashed Global firmware onto Chinese hardware or flashed modified software, the locked bootloader fails signature verification and boots to a recovery screen reading "This MIUI version can't be installed on this device".
Confirm the directory path to the extracted ROM contains no spaces, non-ASCII characters, or overly deep folder nesting. Move the extracted folder directly to C:\capricorn_images\. Also verify that you pointed Mi Flash Tool at the parent folder containing flash_all.bat, not the images/ subfolder.
No. Mi Flash Tool only processes raw fastboot packages containing .bat scripts and raw image binaries. The xiaomi.eu build is an updater-script package designed for recovery installation; flash TWRP to the recovery partition using fastboot flash recovery twrp.img, boot into TWRP, and install the ZIP from internal storage.
The device has entered Emergency Download (EDL) mode due to a corrupted boot partition. Mi Flash Tool can flash fastboot packages in EDL mode if the proper Qualcomm QDLoader drivers are installed. Select the same extracted TGZ directory, connect in EDL mode, click Refresh to see "COM[X]", and click Flash.
Ready to Flash?
Follow the full step-by-step Mi Flash Tool guide with interactive progress tracking, prerequisite checklist, and complete troubleshooting.