The Xiaomi Mi 5s, released in 2016, is still a popular smartphone thanks to its powerful hardware and custom firmware support. However, official updates from Xiaomi for this model have long been discontinued, and users are faced with security issues, bugs of older versions of MIUI or the desire to install fresh alternative firmware. In this guide, we will analyze all the current ways to update firmware on the Mi 5s β from standard OTA to manual firmware through Fastboot and TWRP, and also tell you how to avoid the βbrickβ of the device.
Itβs important to understand that the process of updating on outdated models like the Mi 5s has nuances, for example, official Xiaomi servers can block the download of old versions of firmware, and the wrong MIUI build will lead to a download cycle or loss of IMEI. We will discuss in detail at each stage, so that even a beginner can safely upgrade his smartphone.
1. Update Preparation: What to Do Before Firmware
Before you start the upgrade, make sure your Xiaomi Mi 5s is ready for the procedure.Neglecting preparation is the main reason for the devices to βbrickβ.
- π± Go to Settings. β The phone. β Version. MIUI. Remember or write down the current version (for example, MIUI 12.5.4 Stable).
- π The battery must be at least 60% charged, and when discharged during firmware, the device may turn off and not turn on.
- π Back up your data. The update can erase user files, especially when you switch to custom firmware.
- π Prepare. USB-cable (preferably original) and computer with drivers installed ADB/Fastboot.
If you plan to flash custom firmware (like LineageOS or Pixel Experience), check out:
- π Is the bootloader unlocked? on the Mi 5s Unlocking it takes up to 720 hours of waiting (by Xiaomi rules).
- π οΈ Is a custom recaveri installed (TWRP)? Without it, it is impossible to sew an unofficial firmware.
β οΈ Attention: On Mi 5s With Qualcomm Snapdragon 821, it is critical to use firmware collected specifically for the capricorn model. Installing firmware from Mi 5 (gemini) or other devices will cause the communication module to fail.
2. Method 1: Air Update (OTA) is the easiest method
If your Mi 5s is still getting official updates (which is unlikely for 2026), or you want to upgrade within a single MIUI branch (for example, from 12.0.2 to 12.5.4), use the built-in OTA feature.
Instructions:
- Connect to Wi-Fi (over-the-air update doesnβt work via mobile internet).
- Go to Settings β About the phone β System update.
- Click on "Check Updates." If the update is available, download it.
- After downloading, click "Install" and wait for the reboot.
If the system says βNo Updatesβ but youβre sure thereβs a newer version for your model, try:
- π Restart the phone and repeat the check.
- π Change your region in settings (e.g. India or Europe) as some regions updates come later.
- π₯ Download the full update package manually from the site MIUI Downloads and install it through System Update β Threefold β Select a Service Package.
β οΈ Attention: On Mi 5s loader-free OTA-Updates may not be installed due to a modified recovery partition, in which case use methods 2 or 3.
π‘
If OTA-Update "hang" during the installation phase (more than 20 minutes), do not turn off the phone! wait for battery discharge or force reboot in Recovery (click Volume)+ + Power) and select Reboot β System.
Method 2: Update via Recovery (MIUI or TWRP)
This method is suitable if:
- π¦ You have a downloaded firmware file in.zip format (for example, miui_CAPRICORNGlobal_V12.5.4.0.RAGMIXM_...).
- π You want to βswipe overβ the current version without losing data (provided versions are compatible).
- π οΈ You have a custom Recovery installed. TWRP (flat-fibre).
The following is a step-by-step guide for standard recovery (MIUI):
- Download the full firmware (Fastboot or Recovery) from the official Xiaomi website and rename the file to update.zip.
- Place the file in the root folder of the phoneβs internal memory (not in the folder!).
- Turn off the phone and press Volume++ Power to enter Recovery.
- Select the language (if required), then Install update.zip to System.
- Confirm the installation and wait until the completion (usually 5-10 minutes).
For TWRP Recovery (Castom Firmware):
- Download firmware (such as LineageOS or HavocOS) and, if necessary, GApps (Google services).
- Boot in. TWRP (Loudness+ + Nutrition).
- Make a backup of the current firmware (Backup) β Select sections β Swipe to Backup).
- Click Wipe β Advanced Wipe and tick Dalvik, Cache, System, Data (for clean installation).
- Return to the main menu, select Install, specify the firmware file and confirm the installation.
- If required, go through GApps and Magisk (for root rights).
- Reboot to the system (Reboot β System).
Backup in TWRP| Check firmware model (capricorn only)| Download correct GApps (ARM64, Android 10/11)| Disable signature verification in TWRP (Settings β Disable ZIP signature verification)| Charge your phone to 80%+
-->
4. Method 3: Fastboot Firmware (for power users)
Fastboot is the most reliable method for recovering a brick-and-brick device or installing an official firmware from scratch. ADB/Fastboot original USB-The Xiaomi Mi cable. 5s It is critical to use firmware marked βcapricornβ and version MIUI No newer than the one that supports your bootloader (for example, firmware). MIUI 13 Not gonna stand up for the old anti-rollback).
Instructions:
- Download Fastboot firmware for Mi 5s from MIUI Downloads (look for files with the.tgz or.zip extension).
- Unblock the firmware to a folder on your computer (for example, C:\Mi5s_Fastboot).
- Turn off the phone and press the volume.β + Food to enter the Fastboot (a hare in a hat-eared hat will appear).
- Connect your phone to your computer and check for device detection by command: fastboot devices If the device doesnβt show up, install Qualcomm or Mi Flash Tool drivers.
- Launch Mi Flash Tool (you can download from the official website), specify the path to the unpacked firmware.
- Select Clean All or Clean All and Lock (if you want to lock the bootloader after you have been firmware).
- Press Flash and wait until it is completed (the process will take 5-15 minutes).
If the Mi Flash Tool is making an error, try:
- π Use the other USB-port (preferably) USB 2.0 on the back of the PC).
- π₯οΈ Launch the program on behalf of the administrator.
- π₯ Download the firmware again (possibly the file is corrupted).
- π§ Manually flash individual sections through commands: fastboot flash boot boot.img fastboot flash system system.img fastboot flash recovery recovery.img
β οΈ Attention: On Mi 5s with an unlocked bootloader after firmware through Fastboot, communication may disappear (IMEI). To avoid this, save the nvram and nvdata partition before firmware using the command: adb pull /dev/block/bootdevice/by-name/nvram nvram.img adb pull /dev/block/bootdevice/by-name/nvdata nvdata.img After the firmware, return them back.
What if the Mi Flash Tool says "Cannot receive hello packet"?
5. Solving common errors in the update
Even with the instructions, Mi 5s users often face problems, and consider the most common errors and their solutions:
| Mistake. | Reason. | Decision |
|---|---|---|
| E3004: Can't verify package (in Recovery) | A damaged firmware file or incompatible version. | If the error persists, disable signature verification in TWRP (Settings β Disable ZIP signature verification). |
| phone is stuck on startup MI logo after firmware | Incompatible firmware or incomplete partition cleaning. | Log in to Fastboot and run the official firmware through the Mi Flash Tool with the Clean all option. |
| Error 7 in TWRP when installing | Incompatibility of firmware with the device or absence of firmware. | Install firmware for your MIUI version first, then firmware. |
| Loss of IMEI after firmware | Damage to the nvram/nvdata partitions. | Restore partition backup or use the SN Write Tool (requires authorization). |
| Anti-rollback check fail | Try to install the old version of MIUI on the new one. | Only run firmware that is newer than the current one or has the same Anti-Rollback number (e.g. ARB 4). |
If the phone doesnβt turn on after firmware (black screen, vibration without image), try:
- π Clutch power. + Loudnessβ 20 seconds for forced reboot.
- π₯οΈ Connect to a PC and check if the device is detected in Fastboot (fastboot devices).
- π§ Switch only the boot section through Fastboot: fastboot flash boot boot.img
π‘
On the Xiaomi Mi 5s, you can not install firmware newer than MIUI 12.5 if your bootloader has an antirollback (ARB) below 4. Check the current ARB through the fastboot getvar anti command.
6.How to return the official firmware after custom
If youβve experimented with LineageOS or other custom firmware and want to return to the official MIUI, follow this algorithm:
- Download Fastboot firmware for Mi 5s (e.g. MIUI 12.5 Stable).
- Unclose it to a folder on your computer.
- Load to Fastboot (Loudness)β + Nutrition).
- Connect your phone to your PC and check for detection (fastboot devices).
- Open the Mi Flash Tool, specify the path to the firmware and select Clean all mode.
- Press Flash and wait until it is completed.
- After rebooting, reset settings (Settings β Additional β Restore and Reset).
If the MIUI does not work after the return:
- πΆ Connection (IMEI): Restore the backup. nvram/nvdata or use SN Write Tool.
- π If it has been locked (Clean all and lock), unlock it again via the Mi Unlock Tool.
- π Download cycle: Only run the system partition without clearing the data.
7.Alternative firmware for Xiaomi Mi 5s in 2026
Official support for the Mi 5s has long since ceased, but enthusiasts continue to produce custom firmware. Here are the current options for 2026:
| Firmware | Android version | Features | Reference |
|---|---|---|---|
| LineageOS 18.1 | Android 11 | Stable, without any extra software, support OTA-update. | XDA |
| Pixel Experience | Android 12 | The interface is like Google Pixel, regular updates. | XDA |
| HavocOS | Android 11/12 | Maximum customization, support for themes and gestures. | XDA |
| MIUI EU | Android 10 (MIUI 12.5) | Official MIUI without Chinese software, weekly updates. | xiaomi.eu |
Before installing custom firmware:
- π Make sure the bootloader is unlocked (check: fastboot oem device-info - Device unlocked: true).
- π Check modem compatibility. Some firmware (e.g. Android 12) may not support VoLTE networks on Mi 5s.
- π§ Install the correct firmware (e.g. LineageOS 18.1 requires a firmware application). MIUI 12.5 firmware).