Xiaomi Mi 5 is the legendary flagship of 2016, which is still popular thanks to the powerful hardware (Snapdragon 820, 3/4 GB of RAM) and the ability to install custom firmware. However, with the release of new versions of MIUI and Android owners are faced with the need to reflash: someone wants to upgrade to the current version, someone to install LineageOS to extend the life of the device, and someone needs to restore the โbrickโ after an unsuccessful update.
In this guide, we will analyze all the current methods of firmware (via Fastboot, TWRP staffed MIUI Updater, tell you how to unlock the bootloader without errors, and warn against typical errors that will turn your Mi. 5 In the brick, we'll focus on Android-based firmware. 10/11 โ The latest supported versions for this model, as official support has long since ceased.
1. Firmware Preparation: What to Do Before You Start
Xiaomi Mi 5 firmware is not a complicated process, but it requires preparation. Without it, you risk getting a device that doesn't turn on or constantly restarts.
- ๐ Charge the battery to at least 60%. When discharged during firmware through Fastboot, the device can "brickยป.
- ๐ฑ Backup important data. The firmware erases internal memory (except for a microSD card if installed).
- ๐ฅ๏ธ Install drivers for Xiaomi on PC. Without them, the computer will not see the phone in Fastboot mode.
- ๐ Unlock the bootloader (unlocked) without it custom firmware and even some official will not install.
Pay special attention to the choice of firmware. For Mi 5 (codename gemini) suitable:
- ๐ฆ Official firmware MIUI (Developer and stable versions before MIUI 12.5 based on Android 10).
- ๐ค Castom firmware: LineageOS 18.1 (Android 11), Pixel Experience, Havoc-OS.
- โ ๏ธ Unofficial ports of Android 12+ โ work with bugs (camera, sensors, mobile network).
โ ๏ธ Attention: Firmware for Mi 5s (capricorn or Mi capricorn 5s Plus (natrium) is not suitable for the Mi 5! Installing incompatible firmware will cause the device to fail completely.
Also check the current version of MIUI and Android in settings (Settings โ About Phone).If you have a MIUI 8/9 on Android 6.0, an interim upgrade to MIUI 10 may be required before running through Fastboot.
2 Unlock the bootloader: without it anywhere
The Xiaomi Mi 5 factory firmware has a bootloader locked, which means you can't install custom recavators (TWRP) or unofficial firmware until you unlock it, taking 3 to 720 hours (yes, it's not a typo) and requires a Mi Account to be linked.
Here's the step-by-step instruction:
- Link your Mi Account to your phone: Go to Settings โ Mi Account. Sign in or create a new account. Enable sync and confirm the link via SMS.
- Activate USB debugging: Open Settings โ About Phone. Click 7 times on MIUI to turn on Developer Mode. Return to Settings โ Additional โ Developer. Enable USB Debugging and OEM Unlock.
Request unlocking via Mi Unlock
- Download Mi Unlock Tool from the official website.
- Launch the utility on your PC, log in under the same Mi Account.
- Connect your phone in Fastboot mode (turn off the phone, then press Volume Down + Power).
- Press Unlock and wait for the process to be completed.
Once successfully unlocked, the phone will automatically reset to factory settings. Don't worry, that's okay. Now you can install any firmware and recoveries.
โ ๏ธ Warning: If you see a "Couldn't unlock" or "Device not bound" error when you unlock, then your Mi Account is not tied to your phone or 720 hours have passed since your last unlock.
Linked to Mi Account on phone|Debugging is on. USB|Unlocking enabled OEM|Installed drivers Xiaomi on PC|The phone is charged at more than 60%-->
3. Firmware through Fastboot: the official way from Xiaomi
Fastboot is the most reliable method for installing official MIUI firmware (stable or development) because it is signed by Xiaomi and tested for compatibility, minus all data from internal memory.
You'll need:
- ๐ฅ๏ธ Windows computer (or Linux/macOS with fastboot and adb installed).
- ๐ฑ Cable USB Type-C (preferably original).
- ๐ The firmware in.tgz format for your model (gemini.
- ๐ ๏ธ The Mi Flash Tool (download here).
Step-by-step:
- Unpack firmware from the.tgz archive into a folder without Cyrillic characters (for example, C:\Mi5_firmware\).
- Install the Mi Flash Tool and run it on behalf of the administrator.
- Connect your phone in Fastboot mode: Turn off your phone. Press Volume down + Power before the Fastboot logo appears.
In the Mi Flash Tool
- Press Select and specify the folder with the unpacked firmware.
- Select Clean All (Full Cleaning) or Clean All and Lock (Cleaning + Lock bootloader).
- Press Flash and wait until it is completed (5-10 minutes).
Once the firmware is successful, the phone will automatically restart. The first run can take up to 15 minutes - don't interrupt the process!
| Firmware mode in Mi Flash | What's he doing? | When to use |
|---|---|---|
| Clean all | Deletes all data, flashes the system | When changing the MIUI version or after resetting |
| Clean all and lock | Deletes data + blocks the loader | Only if you need to return the phone to the โfactoryโ state |
| Save user data | Switching the system without deleting data | Update only within one MIUI branch |
โ ๏ธ Note: If after firmware the phone is stuck on the logo MI It's more than 20 minutes, so the firmware is not suitable for your version of the bootloader. MIUI (for example, MIUI 10 before MIUI 12).
๐ก
If the Mi Flash Tool doesnโt see the phone, try reinstalling the drivers manually through Device Manager (select โXiaomi Mi Composite MDB Interfaceโ).
4. Installation of TWRP and custom firmware
If you want to install LineageOS, Pixel Experience or other custom firmware, you will need TWRP recavators. This is an alternative restore menu that allows you to stitch informal images.
Here's how to do it:
- Download TWRP for Mi 5: Official: twrp.me. or unofficial (like OrangeFox) - look up the XDA Developers forum.
- Please. TWRP Fastboot: Fastboot Flash Recovery twrp-3.7.0_9-0-gemini.img fastboot boot twrp-3.7.0_9-0-gemini.img After the second command, the phone will be loaded into TWRP.
- Backup in TWRP: Go to Backup. Mark Boot, System, Data. Swipe to backup (save it to a memory card or PC).
Sweep through the custom firmware
- Copy the firmware (.zip format) on the phone.
- In TWRP, select Install โ Select file โ Swipe to confirm.
- After installation, run Wipe โ Format Data (if required in the firmware instructions).
For Mi 5, we recommend the following custom firmware:
- ๐ฑ LineageOS 18.1 (Android 11) is the most stable.
- ๐ฑ Pixel Experience โ pure Android with Google Pixel chips.
- ๐ฑ Havoc-OS โ Maximum customization.
โ ๏ธ Note: After installing custom firmware, do not update through OTA! This can lead to a logo hanging, and install all updates only through the logo. TWRP.
How to return the official MIUI after custom firmware?
5. firmware via MIUI Updater (no PC)
If you donโt want to mess with Fastboot or TWRP, you can upgrade your firmware directly from your phone through the regular MIUI Updater app, which is only suitable for official MIUI firmware and works if:
- ๐ฒ You already have an official firmware installed.
- ๐ The loader is unlocked (for transitions between branches) MIUI).
- ๐ถ There is a stable connection to Wi-Fi.
Instructions:
- Open the application Update (MIUI Updater).
- Click on the icon ยซโฎยป (three points) in upper right corner.
- Select Select a firmware file.
- Specify the downloaded firmware file (.zip format).
- Confirm the installation and wait for the reboot.
If you update within a single branch (e.g. MIUI 12 โ MIUI 12.5), the data will not be erased. When you change the branch (e.g. MIUI 10 โ MIUI 12), reset to factory settings after the update.
โ ๏ธ Note: If, after updating, through MIUI Updater phone is stuck on startup boot, try to go to Recovery (click Volume up) + Power) and make Wipe Data. If that doesn't work, go through the Fastboot.
๐ก
Firmware via MIUI Updater is the easiest way, but it only works for official updates and requires an unlocked bootloader to change MIUI branches.
6.Typical errors and how to fix them
Even with strict adherence to the instructions, there can be problems, and here are the most common errors in the firmware Xiaomi Mi 5 and how to solve them:
| Mistake. | Reason. | Decision |
|---|---|---|
| Fastboot: FAILED (remote: 'Flashing is not allowed in Lock State') | bootloader locked | Unlock the bootloader through the Mi Unlock Tool |
| The phone does not turn on after firmware (black screen) | Incompatible firmware or interrupted process | Make it official. MIUI Fastboot is in Clean All mode. |
| E: Footer is wrong or E: Signature verification failed in TWRP | A damaged firmware file or incorrect signature | Download the firmware again, check the checksum (MD5) |
| Hanging on the MI logo after firmware | Version conflict or uncleaned cache | Go to TWRP and make Wipe โ Format Data |
| Mi Flash: "Flash Done. Reboot" but the phone doesn't turn on | The firmware is not suitable for the current version of the loader | Sweep through the intermediate version (e.g. MIUI 10 before MIUI 12) |
If none of these methods worked, try putting your phone in. EDL-This will require a box (Mi Flash Pro or UFi Box) or a special cable. This method is more complex and requires experience, so you should contact the service center.
Also check the battery status. If it is swollen or worn out, the phone may shut down during firmware, which will lead to "bricking".
7. How to check the success of the firmware
After the firmware, it's important to make sure that everything goes well and the phone is stable.
- Check the firmware version: Go to Settings โ About the phone. Compare the MIUI and Android version to the one you installed.
- Test the basic functions: ๐ Mobile and mobile phone calls (check both) SIM-cards, if any). ๐ท Camera (front and main). ๐ Sound (speakers, microphone, headphones). ๐ถ Wi-Fi, Bluetooth, GPS. ๐ Charging (connect the charger).
Check stability
- Reboot your phone 2-3 times.
- Run multiple applications at the same time.
- Play a game (like PUBG Mobile or Genshin Impact) to test the performance.
If you have installed custom firmware, pay attention to:
- ๐ Battery consumption โ some custom firmware can drain the battery faster.
- ๐ก Mobile network operation โ there may be problems with VoLTE or on unofficial firmware 4G.
- ๐ Security โ custom firmware is not certified by Google, so SafetyNet may not work (issues with banking applications).
โ ๏ธ Note: If the phone gets too hot or discharges quickly after firmware, it is likely that the firmware is not optimized for the Mi 5. MIUI.