Xiaomi

Xiaomi Mi 5s (capricorn): Mi Flash Tool & TWRP Flashing Guide

Complete firmware flashing guide for the Xiaomi Mi 5s using Mi Flash Tool. Covers official fastboot flashing with Mi Flash Tool, TWRP community installations, and bootloader requirements.

Xiaomi Mi 5s October 2016
Models
2015711
CPU
Quad-core (2x2.15 GHz Kryo & 2x1.6 GHz Kryo)
GPU
Adreno 530
RAM
3GB / 4GB LPDDR4
Storage
64GB / 128GB UFS 2.0 (no card slot)
Display
5.15" IPS LCD, 1080x1920
Battery
3200mAh (non-removable), QC 3.0
OS
Android 6.0 Marshmallow, upgradable to Android 8.0 Oreo
Connectivity
4G LTE, Dual Nano-SIM, Wi-Fi 802.11 a/b/g/n/ac dual-band, Bluetooth 4.2, NFC, USB Type-C
Colors: Silver Gray Gold Rose Gold

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?

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.

How to enter
Power off completely, then hold Volume Up + Power until the TWRP splash screen appears
Requires
Unlocked bootloader, TWRP recovery installed, ZIP package on 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.

How to enter
Short the two motherboard test points behind the rear cover while connecting the USB cable
Requires
Qualcomm QDLoader drivers, test point shorting or deep-flash cable

What You Need Before Flashing

1
Windows PC

Mi Flash Tool runs on Windows 7, 8, 10, or 11 (64-bit). Install the Qualcomm USB and Google fastboot drivers beforehand.

2
Unlocked Bootloader

Xiaomi devices enforce bootloader verification. An official unlock via Mi Unlock Tool is required before fastboot flashing will succeed.

3
Fully Extracted TGZ Package

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.

4
Quality USB Type-C Cable

Connect to a rear motherboard USB 2.0 port to prevent packet dropouts or timeout errors during partition writes.

5
Battery Charged to 40%+

The Mi 5s has a 3200mAh sealed battery. Prevent power cuts during critical system and vendor partition flashing.

6
Complete Storage Backup

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.

  1. Unlock the bootloader via official Mi Unlock tool
  2. Download the matching package for your target setup
  3. Extract the TGZ package completely with 7-Zip
  4. Boot Mi 5s into Fastboot mode
  5. Configure Mi Flash Tool and choose "clean all"
  6. 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

Ready to Flash?

Follow the full step-by-step Mi Flash Tool guide with interactive progress tracking, prerequisite checklist, and complete troubleshooting.

Open Full Guide