Xiaomi

Xiaomi Mi 5 / Prime / Pro (gemini): Mi Flash & EDL Guide

Complete firmware flashing guide for the Xiaomi Mi 5 / Mi 5 Prime / Mi 5 Pro using Mi Flash Tool. Covers unlocked Fastboot mode, locked-bootloader UFS EDL 9008 recovery, Official TWRP 3.7.0_9-0, and Xiaomi.eu MIUI 11.

Xiaomi Mi 5 / Mi 5 Prime / Mi 5 Pro February 2016
Models
2015105, 2015201, 2015628
CPU
Quad-core Kryo (1.8/1.36 GHz Standard or 2.15/1.6 GHz Prime/Pro)
GPU
Qualcomm Adreno 530
RAM
3 GB (Standard/Prime) / 4 GB LPDDR4 (Pro Ceramic)
Storage
32 GB / 64 GB / 128 GB UFS 2.0 (No microSD slot)
Display
5.15" FHD IPS LCD, 1080x1920 pixels (~428 ppi)
Battery
3000 mAh Li-Po, 18W Quick Charge 3.0 via USB Type-C
OS
Android 8.0 Oreo (MIUI 10.2 Global / Xiaomi.eu MIUI 11)
Connectivity
4G LTE Dual Nano-SIM, Dual-band Wi-Fi ac, BT 4.2, NFC, IR Blaster, 3.5mm jack
Colors: White Black Gold Ceramic Exclusive Black

About the Xiaomi Mi 5 / Mi 5 Prime / Mi 5 Pro

The Xiaomi Mi 5 / Mi 5 Prime / Mi 5 Pro (codename: gemini) debuted in February 2016 on Qualcomm's Qualcomm Snapdragon 820 MSM8996 (14nm) platform with high-speed UFS 2.0 flash storage, USB Type-C, and 4-axis OIS camera hardware.

Whether you need to revive a hard-bricked Mi 5 via Qualcomm EDL 9008 with gemini_global_images_V10.2.2.0.OAAMIXM_20190115.0000.00_8.0_global_d05f4a2bfd.tgz or upgrade to Xiaomi.eu MIUI 11 through twrp-3.7.0_9-0-gemini.img, follow the steps below.

Which Flash Mode Should You Use?

Mi Flash Tool / Fastboot CLI (Unlocked Bootloader)

Executes flash_all.bat or installs twrp-3.7.0_9-0-gemini.img directly over the Android Bootloader USB-C connection.

How to enter
Power off completely, then hold Volume Down + Power until the orange FASTBOOT screen appears
Requires
Unlocked bootloader via Mi Unlock, Google Platform-Tools, Android Bootloader drivers

TWRP / Local Updater (Recovery ZIP)

Flashes xiaomi.eu_multi_MI5_V11.0.2.0.OAACNXM_v11-8.0.zip inside Official TWRP 3.7.0_9-0 or installs miui_MI5Global_V10.2.2.0.OAAMIXM_d16c808eba_8.0.zip via stock Updater.

How to enter
Hold Volume Up + Power to launch Recovery, or pick System Update -> Choose update package inside MIUI Settings
Requires
Official TWRP 3.7.0_9-0 (for Xiaomi.eu) or running Global MIUI (for stock OTA ZIP)

Essential Setup Before Flashing Xiaomi Mi 5 (gemini)

1
64-Bit Windows & 64-Bit Mi Flash Tool

Legacy 32-bit Mi Flash tools fail on Snapdragon 820 UFS 2.0 sector maps. Always use a 64-bit build on 64-bit Windows.

2
Shielded USB Type-C Cable & Rear USB 2.0

Connect directly to a rear motherboard USB 2.0 port using a quality Type-C data cable to avoid EDL COM dropouts.

3
Double-Extracted Folder (C:\gemini_fw\)

Extract the .tgz download twice using 7-Zip into C:\gemini_fw\ without spaces so flash_all.bat and XML maps resolve cleanly.

4
Battery Charged Above 40%

Ensure the 3,000 mAh battery holds solid charge (or inspect the internal battery flex if opening the back for test points).

5
Back Up Photos & User Data (No microSD)

Mi 5 has no microSD slot and flash_all.bat erases internal UFS storage completely. Copy personal files to a PC first.

64-Bit Mi Flash & UFS EDL 9008 Steps for Snapdragon 820

5-step quick reference for the Xiaomi Mi 5 / Mi 5 Prime / Mi 5 Pro. Need visuals or troubleshooting help? The full Mi Flash Tool guide covers everything in detail.

  1. Install 64-bit Mi Flash Tool (2016.08.30+) and Qualcomm HS-USB QDLoader 9008 drivers
  2. Extract gemini_global_images_V10.2.2.0.OAAMIXM_20190115.0000.00_8.0_global_d05f4a2bfd.tgz twice to C:\gemini_fw\
  3. Boot to EDL 9008 (adb reboot edl / test points) if locked, or Fastboot (Vol Down + Power) if unlocked
  4. Select C:\gemini_fw\ inside 64-bit Mi Flash Tool and verify "clean all" is selected
  5. Click Flash, allow UFS 2.0 image writes to complete, and hold Power 10 seconds to reboot

Finding flash_all.bat & 8996 UFS Firehose Files in Snapdragon 820 Packages

Official Xiaomi Mi 5 Fastboot packages ship as double-packed .tgz archives. Unpacking twice with 7-Zip places flash_all.bat at the outer folder alongside the images subfolder containing prog_ufs_firehose_8996_ddr.elf plus multi-LUN rawprogram0–5 XML maps:

flash_all.bat

Extracting gemini_global_images_V10.2.2.0.OAAMIXM_20190115.0000.00_8.0_global_d05f4a2bfd.tgz twice with 7-Zip puts flash_all.bat at the outer level next to the images folder containing prog_ufs_firehose_8996_ddr.elf and rawprogram0–5 XML maps. Point 64-bit Mi Flash Tool at the outer folder.

Codename gemini spans ONLY the Xiaomi Mi 5 Standard (32GB), Prime (64GB), and Ceramic Pro (128GB). Never flash images built for the Mi 5s (capricorn) or Mi 5s Plus (natrium).

Always point 64-bit Mi Flash Tool to the outer directory holding flash_all.bat (for example C:\gemini_fw\), never the nested images subfolder.

Keep "clean all" highlighted; relocking a bootloader on cross-regional software will freeze startup.

Xiaomi Mi 5 / Mi 5 Prime / Mi 5 Pro Firmware Versions

Verified Global MIUI 10, China MIUI 10, Xiaomi.eu MIUI 11, and Official TWRP 3.7.0_9-0 packages for the Xiaomi Mi 5 / Mi 5 Prime / Mi 5 Pro (gemini). Browse the full archive below for CDN mirrors and China Recovery ZIP details.

Version Region Android Version Size MD5 Download
V10.2.2.0.OAAMIXM Global (MI / MI5Global) β€” MIUI 10.2 Android 8.0 (Oreo), Jan 2019 1.58 GB d05f4a2bfd2d26057998d23c86e97b72 ⬇️ Download
V10.2.2.0.OAAMIXM (OTA) Global Recovery ZIP Android 8.0 (Oreo), Jan 2019 1.38 GB d16c808eba4f89e329138b84518799d7 ⬇️ Download
V10.2.1.0.OAACNXM China (CN / MI5) β€” MIUI 10.2 Android 8.0 (Oreo), Dec 2018 1.80 GB 1b761a2ea8bf1c096e8927fab461f2bd ⬇️ Download
V11.0.2.0.OAACNXM (Xiaomi.eu) Europe / Multilingual MIUI 11 (TWRP) Android 8.0 (Oreo), Jan 2020 1.4 GB 9ca4c8e07a358249964b7215824f6a3b ⬇️ Download
TWRP 3.7.0_9-0 Official Custom Recovery (gemini) Fastboot / TWRP IMG 21.52 MB a79f6e3aa35997d2259fc5e0eebe07e3 ⬇️ Download

Browse all 6 Android 8.0 MIUI 10, Xiaomi.eu MIUI 11 & TWRP files for Mi 5 on AndroidFirmwareFile.com β†’ View full archive on AndroidFirmwareFile.com β†’

Choosing UFS EDL 9008, Fastboot & TWRP Recovery Options

The Xiaomi Mi 5 / Prime / Pro (codename gemini) runs Qualcomm's Snapdragon 820 (MSM8996) paired with UFS 2.0 storage. With gemini_global_images_V10.2.2.0.OAAMIXM_20190115.0000.00_8.0_global_d05f4a2bfd.tgz, both locked and unlocked handsets restore cleanly via EDL 9008 or Fastboot.

For running Global MIUI 10 phones, miui_MI5Global_V10.2.2.0.OAAMIXM_d16c808eba_8.0.zip installs through the Updater app. Unlocked owners wanting Xiaomi.eu's final MIUI 11 Android 8.0 port (xiaomi.eu_multi_MI5_V11.0.2.0.OAACNXM_v11-8.0.zip) should flash twrp-3.7.0_9-0-gemini.img and format Data before installation.

Fixing Mi 5 (gemini) UFS Storage, TWRP Encryption & Driver Errors

Tool Error: "Not enough storage" / UFS Sector Write Failure

Older 32-bit Mi Flash releases fail on UFS 2.0 4096-byte LUN mapping and hit memory limits transferring 1.5GB+ MSM8996 images over EDL. Uninstall legacy 32-bit Mi Flash and install a 64-bit build (2016.08.30 Beta or 2017+ release) on 64-bit Windows.

Status: "FAILED (remote: Partition flashing is not allowed)"

Occurs when Fastboot commands target a Mi 5 with a locked bootloader. Switch into Qualcomm EDL 9008 mode ("adb reboot edl" from an intact ROM, a deep-flash USB-C cable, or shorting the two motherboard EDL test points) and flash via COM port instead.

TWRP Prompt: "Enter Password" / "Unable to mount /data"

Android 8.0 Oreo encryption prevents recovery from reading /data cleanly when migrating from MIUI Global to Xiaomi.eu V11.0.2.0.OAACNXM. Inside twrp-3.7.0_9-0-gemini.img, go to Wipe -> Format Data (type "yes"), reboot straight back to Recovery, and then flash the Xiaomi.eu ZIP.

Device Manager Warning: "QHSUSB_BULK" Driver Missing

Windows detected the Snapdragon 820 emergency port without signed Qualcomm 9008 drivers. Run Mi Flash Tool -> Driver -> Install on 64-bit Windows (or temporarily disable Windows Driver Signature Enforcement) until it registers under Ports as QDLoader 9008.

Need help troubleshooting another UFS COM or Fastboot message? Mi Flash & UFS Qualcomm EDL Error Directory β†’

UFS Firehose, 4-Axis OIS /persist & TWRP RAM Boot Q&A

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