How to update the firmware on Xiaomi Mi 5s: 3 proven ways + error solving

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.

πŸ“Š What kind of update do you prefer?
Through OTA (over the air)
Through Recovery (MIUI or TWRP)
Through Fastboot (from PC)
Custom firmware (LineageOS, etc.)

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:

  1. Connect to Wi-Fi (over-the-air update doesn’t work via mobile internet).
  2. Go to Settings β†’ About the phone β†’ System update.
  3. Click on "Check Updates." If the update is available, download it.
  4. 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):

  1. Download the full firmware (Fastboot or Recovery) from the official Xiaomi website and rename the file to update.zip.
  2. Place the file in the root folder of the phone’s internal memory (not in the folder!).
  3. Turn off the phone and press Volume++ Power to enter Recovery.
  4. Select the language (if required), then Install update.zip to System.
  5. Confirm the installation and wait until the completion (usually 5-10 minutes).

For TWRP Recovery (Castom Firmware):

  1. Download firmware (such as LineageOS or HavocOS) and, if necessary, GApps (Google services).
  2. Boot in. TWRP (Loudness+ + Nutrition).
  3. Make a backup of the current firmware (Backup) β†’ Select sections β†’ Swipe to Backup).
  4. Click Wipe β†’ Advanced Wipe and tick Dalvik, Cache, System, Data (for clean installation).
  5. Return to the main menu, select Install, specify the firmware file and confirm the installation.
  6. If required, go through GApps and Magisk (for root rights).
  7. 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:

  1. Download Fastboot firmware for Mi 5s from MIUI Downloads (look for files with the.tgz or.zip extension).
  2. Unblock the firmware to a folder on your computer (for example, C:\Mi5s_Fastboot).
  3. Turn off the phone and press the volume.βˆ’ + Food to enter the Fastboot (a hare in a hat-eared hat will appear).
  4. 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.
  5. Launch Mi Flash Tool (you can download from the official website), specify the path to the unpacked firmware.
  6. Select Clean All or Clean All and Lock (if you want to lock the bootloader after you have been firmware).
  7. 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"?
This error is caused by problems with the driver or USB-Connection. Solutions: 1. Reinstall Qualcomm drivers HS-USB QDLoader 9008. 2. Try another cable (preferably original from Xiaomi). 3. Disable driver signatures in Windows (via command line: bcdedit) /set nointegritychecks on). 4. Use another computer with Windows 7/10 (Windows 11 Maybe there's a problem).

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 firmwareIncompatible 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 installingIncompatibility of firmware with the device or absence of firmware.Install firmware for your MIUI version first, then firmware.
Loss of IMEI after firmwareDamage to the nvram/nvdata partitions.Restore partition backup or use the SN Write Tool (requires authorization).
Anti-rollback check failTry 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:

  1. Download Fastboot firmware for Mi 5s (e.g. MIUI 12.5 Stable).
  2. Unclose it to a folder on your computer.
  3. Load to Fastboot (Loudness)βˆ’ + Nutrition).
  4. Connect your phone to your PC and check for detection (fastboot devices).
  5. Open the Mi Flash Tool, specify the path to the firmware and select Clean all mode.
  6. Press Flash and wait until it is completed.
  7. 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:

FirmwareAndroid versionFeaturesReference
LineageOS 18.1Android 11Stable, without any extra software, support OTA-update.XDA
Pixel ExperienceAndroid 12The interface is like Google Pixel, regular updates.XDA
HavocOSAndroid 11/12Maximum customization, support for themes and gestures.XDA
MIUI EUAndroid 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).
How to check the compatibility of the firmware with the modem?
Download the archive with firmware and find the BoardConfig.mk file or vendor/build.prop. Check the lines: - ro.vendor.rf_version (Must match your current modem version. - persist.radio.multisim.config (for two) SIM-If the parameters don't match, the link won't work.

8. Frequently Asked Questions (FAQ)

Can I upgrade the Mi 5s to Android 13?
No, it’s not because Xiaomi didn’t release Android. 13 But there are some unofficial builds of LineageOS. 20 Or ArrowOS based on Android 13, But they can be unstable (problems with the camera, modem or battery). 11/12 for everyday use.
The camera doesn't work after the firmware.
The problem is typical for custom firmware. Solutions: Install the right firmware (e.g., for MIUI 12.5). Swipe the camera module through Magisk (look for it) Mi5s_Camera_Fix.zip on XDA). Try another firmware (e.g., Pixel Experience usually has a work camera).
How to find out the anti-rollback (ARB) version on the Mi 5s?
The Anti-Rollback version can be checked in two ways: Through Fastboot: fastboot getvar anti, search for the line anti: [number] (e.g., anti: 4). Through the Device Info HW (Bootloader section) application, you can't install firmware with ARB higher than the current one on Mi 5s, for example, if your ARB = 3, the firmware with ARB 4 won't stand up.
Can I use Mi 5s without unlocking the bootloader?
No, installing any firmware (other than OTA) on the Mi 5s requires an unlocked bootloader. Except for official updates via Recovery or Fastboot with a locked bootloader (but this only works for firmware of the same or newer version). To unlock the bootloader: Apply on the Mi Unlock site. Wait 720 hours (30 days) is Xiaomi's rule for all devices. Connect the phone to Fastboot and unlock through Mi Unlock Tool.
Where to download the official firmware for the Mi 5s?
Official firmware can be downloaded from these resources: 🌍 MIUI Downloads (Global) - stable and development versions. πŸ‡¨πŸ‡³ MIUI China – Chinese builds (requires an unlocked bootloader). πŸ“¦ Xiaomi Firmware Updater - firmware archive and firmware. 5s Look for firmware codenamed capricorn!