Why to Switch Xiaomi Mi 5 and What Risks It Can Have
The Xiaomi Mi 5, released in 2016, is still a popular device thanks to its powerful hardware (Snapdragon 820, 3/4 GB of RAM) and support from the development community. However, over time, official MIUI updates stop coming out, and users face slowdowns, errors or the desire to install the latest version of Android.
Incorrect actions lead to a βbrickingβ (completely inoperable) device, loss of warranty or problems with communication modules (for example, Baseband unknown). In this article, we will analyze all the ways of firmware β from official updates via Updater to install custom ROMs like LineageOS or Pixel Experience, and you will learn how to avoid typical errors and what to do if something goes wrong.
Before you start, answer three questions: 1. What is your goal? MIUI, switching to Android 12+, Bloat removal, performance overclocking) 2. Are you ready for possible data loss? (Backup is mandatory!) 3. Do you have experience with data loss ADB, Fastboot or TWRP?
If the answer is no to at least one question, start with the official firmware methods.
Firmware Preparation: Backup and Necessary Tools
The first step is to save all the important data, and even if you plan to run the firmware on top (without resetting), a failure can result in the loss of photos, contacts, or messages.
- π± Local Copying: Transfer Files to PC via MTP (in data mode) or use Mi Mover (a backup app from Xiaomi).
- βοΈ Cloud Storage: sync your contacts with Google Account and photos with Google Photos or Mi Cloud.
- π§ Titanium Backup: If you already have root rights, Titanium Backup will save apps with settings.
- π Recording. IMEI: Enter the dialer *#06# and save both IMEI β They will be needed if the network disappears after the firmware.
Now, prepare the tools. You'll need:
| Tool. | Appointment | Download link |
|---|---|---|
| Mi Flash Tool | Official utility for firmware through Fastboot | Official Xiaomi website |
| ADB & Fastboot | Command Tools to Unlock the Booter | Android Developers |
| TWRP Recovery | Castomy recovery for installation ZIP-firmware | TWRP Site |
| Xiaomi Unlock Tool | Unlock the bootloader (requires a Mi Account) | Unlocking page |
β οΈ Note: If you are using Windows, turn off the driver digital signature check before installing the Mi Flash Tool. To do this, type in the command line on behalf of the administrator: bcdedit /set nointegritychecks on and restart the PC. After the firmware, return the settings back with bcdedit /set nointegritychecks off.
Step 1: Unlock the bootloader on Xiaomi Mi 5
Without unlocking the bootloader, you wonβt be able to install custom firmware or TWRP. Xiaomi has introduced this protection to prevent unauthorized changes, but the unlocking process is legal β the company provides an official utility.
- π Unlocking erases all data on the device (including internal memory!).
- β³ Linking a Mi Account to a device takes 72 hours (if the account is new).
- π± The device must be installed official firmware MIUI (custom ROM unsupported).
- π Battery charge - at least 60%.
Instructions for unlocking:
- Link your Mi Account to your phone: Go to Settings β Mi Account β Sync and enable all options.
- Activate Developer Mode: Go to Settings β About Phone and click on MIUI Version 7 times.
- Back to Settings β Additionally. β For developers and include: π§ Debugging by USB π Unlocking OEM (point-of-point!)
Mi Unlock Tool
Sign in to the program under the same Mi Account as on your phone.
Mi 5
Fastboot
Loudness down + Nutrition
Unlock
β οΈ Note: If the utility gives you a "Couldn't unlock" error with code 86006 or 86012, then your account is not tied to the device for long enough. Wait 72 hours, actively using the phone with this account (synchronize data, install apps from the Mi App Store).
Linked Mi Account to the phone|Debugging is on. USB|Unblocking permitted OEM|Drivers installed ADB/Fastboot|Battery charge >60%-->
Step 2: Choosing a firmware for Xiaomi Mi 5
The type of firmware depends on the functionality of the device. Let's consider all the options:
1. Official. MIUI (Stable/Beta)
Suitable for those who want to stay on stock firmware with support for OTA updates. Download only from the official website, choosing the Mi 5 model (codename gemini).
- π Global β International version (supported by Google Services).
- π¨π³ China β Chinese version (without Google, but with more features) MIUI).
- πͺπΊ EEA β European version (corresponding to the GDPR).
2. Castomic ROMs (LineageOS, Pixel Experience, crDroid)
If you want Android 12/13 or pure Android without Xiaomi's blobate, opt for custom firmware. Popular options for the Mi 5:
| Firmware | Android version | Features | Reference |
|---|---|---|---|
| LineageOS | 12/13 | Stable, minimalistic, regular updates | Official website |
| Pixel Experience | 12/13 | Google Pixel interface, good optimization | Pixel Experience website |
| crDroid | 12 | Maximum customization, good productivity | Page crDroid |
| Havoc-OS | 12 | Many functions for fine tuning | Official website |
Critical information: Android 11+ firmware may not support the NFC module on Xiaomi Mi 5 due to lack of drivers. Check reviews on the 4PDA or XDA forum before installing.
3. port firmware (MIUI from other devices)
Some enthusiasts are adapting MIUI from Xiaomiβs new smartphones for the Mi 5, like MIUI ports 12.5 or 13, which is risky: there may be bugs with a camera, sensors or communication, such firmware look for on 4PDA or XDA Developers.
π‘
Before downloading custom firmware, check the release date. If the last update was more than a year ago, there is a risk of incompatibility with modern applications (for example, banking).
Step 3: Fastboot (Mi Flash Tool)
This is the most reliable way to install an official MIUI or bring your phone back to life after a failed firmware.
- Download firmware in.tgz or.zip format (for example, gemini_global_images_V12.5.1.0.RFAMIXM_20210310.0000.00_10.0_global_1234567890.tgz).
- Unpack the archive in a folder without Cyrillic characters (for example, C:\Mi5_Fastboot).
- Install the Mi Flash Tool and drivers (if you havenβt done it before).
- Turn the phone into Fastboot mode (turn it off, then press Volume Down + Power).
- Connect the Mi 5 to your PC and start the Mi Flash Tool.
- In the program, click Select and specify the path to the unpacked firmware.
- Select firmware mode: π Clean all β complete cleaning (recommended when changing version) MIUI). π Clean all and lock - cleaning + Loader lock (if you want to return the official status). π Save user data β saving data (risky, can lead to bugs).
Flash
Once the firmware is in place, the phone will automatically restart. The first run can take up to 15 minutes - don't interrupt the process!
β οΈ If the Mi Flash Tool is making an error "flash_all_lock.bin βnot foundβ means you downloaded the firmware for the locked bootloader. Download the fastboot version without lock in the title or use Clean all instead of Clean all and lock.
What to do if the Mi Flash Tool is 99% deficient?
Step 4: Install custom firmware through TWRP
To install LineageOS, Pixel Experience or other ZIP-The scaling will require custom recovery β TWRP. The process is more complicated than firmware via Fastboot, but gives more options.
Installation of TWRP Recovery
Download the latest version TWRP for Mi 5 (file twrp-3.6.2_9-0-gemini.img) and do it:
fastboot flash recovery twrp-3.6.2_9-0-gemini.img
fastboot boot twrp-3.6.2_9-0-gemini.imgAfter that, the phone will load into TWRP. Important: immediately make a backup of the EFS partition (contains IMEI and modem data)! To do this, go to TWRP Backup β Select EFS β Swipe for confirmation.
Firmware custom ROM
Installation algorithm:
- Download the firmware (ZIP-file) and, if necessary, Gapps (e.g. OpenGapps for Android 12).
- Transfer files to your phone or flash drive (TWRP has a file manager).
- V TWRP run the Wipe β Advanced Wipe and mark: π§Ή Dalvik / ART Cache π§Ή System π§Ή Data π§Ή Cache
Then swipe for confirmation.
Install
Gapps
Install
Wipe β Format Data
yes
Reboot β System
β οΈ Note: If you have a customized ROM phone doesn't see SIM-Some builds (especially Chinese ports) don't have a module for European operators. Solution: run modem and EFS squirt TWRP.
π‘
Always check firmware compatibility with the Mi 5 model (codename gemini). Installing firmware for Mi 5s (capricorn) or Mi 5c (meri) will cause the device to fail!
Step 5: Solving Common Errors After Firmware
Even with the right actions, there can be problems, and let's look at the most common ones and how to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| Baseband unknown | Modem damaged (no communication) | Sweat modem from stock firmware via Fastboot or TWRP. |
| Hanging on the Mi logo | Incompatible firmware or installation error | Log in to Fastboot and run the official MIUI through the Mi Flash Tool. |
| No command in recovery | Recovery section damaged | Refuse TWRP or stock recovery through fastboot flash recovery. |
| No IMEI. | EFS section damaged | Restore the EFS backup or use the IMEI Tool (requires root). |
| Fast battery discharge | Unoptimized core in custom firmware | Install another core or return to stock MIUI. |
If the phone doesnβt turn on at all (black screen, no button response), try EDL emergency mode.
- Download the firmware for EDL (see 4PDA).
- Connect your phone to your PC by holding Volume Up + Volume Down + Power (should be defined as Qualcomm HS-USB QDLoader 9008).
- Use the Mi Flash Tool in EDL mode to recover.
Important: EDL mode requires an authorized Xiaomi account with unlocked rights. Unauthorized use can result in permanent locking of the device.