Xiaomi Redmi 5A (codenamed riva) remains a popular budget smartphone even years after its release. However, over time, its performance declines and official updates stop coming out. Flashing the device can return it to a โsecond lifeโ: speed up work, add new features or even install the current version of Android. But the process requires care โ a mistake at any stage can turn the phone into a โbrickโ.
In this guide, we will look at all the ways Redmi 5A firmware is run, from official updates via MIUI Updater to custom firmware installations like LineageOS or Pixel Experience. We will focus on unlocking the bootloader, without which most methods simply wonโt work, and how to avoid common errors (such as anti-rollback) and what to do if the phone stops turning on after a failed firmware.
Before you start, check out your Redmi. 5A The device must have a battery charge of at least 60%, and the Mi Flash Tool drivers are installed on the computer. ADB. If you're a beginner, start with the official firmware on Fastboot, which is the most reliable method. ROM.
1. Firmware Preparation: What to Do Before Starting
Flashing is not just pressing a couple of buttons; wrong actions can lead to data loss, system failure, or even hardware damage (for example, if you interrupt the process during the boot partition writing phase), so preparation is half the success.
First, back up all the important data, and even if you plan to flash your phone without resetting (clean all in the Mi Flash Tool), you still have the risk of losing your files.
- ๐ฑ Local Copying: Transfer photos, videos and documents to a computer or external drive.
- โ๏ธ Cloud services: Google Drive, Mi Cloud or Yandex Disk (but note that after resetting, you will have to re-enter your accounts).
- ๐ง Specialized utilities: TWRP Backup (if you already have custom recapaveri) or SP Flash Tool to create a full firmware dump.
Second, check the model and the firmware version.
- Open the Settings. โ The phone.
- Find the Model line (should be Redmi 5A or riva) and the MIUI version.
- Write down the current version of Android (e.g. 7.1.2) and MIUI (e.g. MIUI 12.5).
This data will be useful for choosing the right firmware, for example, if your Redmi 5A is running MIUI 9, you can not immediately install MIUI 12, this will cause an anti-rollback error, in which case you will need an intermediate firmware.
โ ๏ธ Attention: If your Redmi is 5A purchased in China (version for the domestic market), firmware global MIUI It can block the network. Check the region in Settings. โ The phone. โ Version. MIUI. Chinese versions usually have a suffix. CN.
2 Unlocking the bootloader: a mandatory step before the firmware
By default, all Xiaomi smartphones have bootloader blocked, a security measure that prevents unofficial software from being installed. To flash a phone through Fastboot or install TWRP, the bootloader must be unlocked.
The unlocking process consists of three stages:
- Linking your Mi Account to your device (required!).
- Apply for the unlock through the official Mi Unlock Tool.
- Waiting (usually 3-7 days, but sometimes up to 30 days)
Detailed instructions:
- Download Mi Unlock Tool from the official website.
- Turn on the phone Developer Mode (7 times click on the MIUI version in Settings โ About phone).
- Activate OEM unlock and USB debugging in Settings โ Additional โ For developers.
- Connect Redmi 5A to your PC, launch the Mi Unlock Tool, and log in to your Mi-account (it should be tied to your phone!).
- Press Unlock and follow the instructions. If you have a message to wait, wait until the time is set.
Once successfully unlocked, the phone will automatically reset to factory settings. Thatโs fine, because Xiaomi protects user data.
โ ๏ธ Note: If you have purchased a Redmi 5A In this case, you will not be able to unlock the bootloader - you will need to contact the seller or contact Xiaomi support.
๐ก
If the Mi Unlock Tool gives you a "Couldn't unlock" error, try using a different version of the program (e.g. 5.5.224.30) or connect your phone to another version. USB-port (preferably 2.0).
3. Official firmware via Fastboot: the most reliable method
If you want to work smoothly without experimentation, the best choice is Xiaomiโs official firmware, which can be installed via Fastboot using the Mi Flash Tool, a method that is suitable for:
- ๐ Recovery of the phone after a failure.
- ๐ Updates to the latest version MIUI.
- ๐ง Correct errors (such as freezes or network problems).
Step-by-step:
- Download the official firmware for Redmi 5A (Select the Fastboot version. Pay attention to the region (Global, China, EEA).
- Unpack the archive in a folder (for example, C:\MIUI\fastboot_riva).
- Download and install the Mi Flash Tool.
- Turn off your phone and press Volume Down + Power to enter Fastboot mode (a bunny with the words Fastboot will appear on the screen).
- Connect Redmi 5A to your PC, launch the Mi Flash Tool, and point the way to the unpacked firmware.
- At the bottom, choose clean all (full cleaning) or clean all and lock (clean + lock bootloader).
- Press Flash and wait until it is completed (usually 5-10 minutes).
Once the firmware is successful, the phone will automatically restart. The first run can take up to 15 minutes -- that's okay.
Download the correct firmware version (Global/China/EEA)| Check battery power (>60%) | Install ADB and Fastboot drivers | Unlock the bootloader (if not done earlier) | Create a backup of the data-->
| Type of firmware | Method of installation | Do you need unlocking? | Data dump? |
|---|---|---|---|
| Official (Fastboot) | Mi Flash Tool | Yes. | Yeah (clean all) |
| Official (Recovery) | MIUI Updater or Adb sideload | No. | No (if upgraded) |
| Castomium (TWRP) | TWRP Recovery | Yes. | If you wish, |
| Cast-boot (Fastboot) | Fastboot teams or OrangeFox | Yes. | Yes. |
4. Install custom firmware: LineageOS, Pixel Experience and others
If you want to upgrade Android to a newer version (for example, from 7.1.2 to 10 or 11), the official MIUI will not help - Xiaomi no longer releases updates for the Redmi 5A.
- ๐ฑ LineageOS โ pure Android without unnecessary applications.
Requirements for installing custom firmware:
- Unlocked bootloader.
- Installed TWRP Recovery (Riva version)
- Download firmware and GApps (if you need Google services).
Installation instructions:
- Download TWRP for Redmi 5A and run it through Fastboot: fastboot flash recovery twrp.img fastboot boot twrp.img
- In TWRP, make a backup of the current firmware (Boot, System, Data sections).
- Run Wipe โ Advanced Wipe and mark Dalvik, Cache, System, Data.
- Install the downloaded firmware (e.g. lineage-17.1-20230510-UNOFFICIAL-riva.zip).
- If you need GApps, flash them right after you have firmware (no reboot!).
- Reboot the phone.
Important: Some custom firmware for Redmi 5A doesn't support encryption, so if the phone asks for a password after you install it and you didn't set it, reset it via TWRP.
What if the network does not work after installing custom firmware?
5. Typical errors and their solutions
Even with strict adherence to the instructions, there can be problems, and here are the most common errors in the Redmi 5A firmware and how to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| Anti-rollback | Trying to install the old version of MIUI after the new version | Swipe the intermediate version or use MIUI bootloader to find compatible firmware |
| This package is for "riva" devices; this is a "" | Improper firmware (not for Redmi 5A) | Download firmware specifically for riva (check the name of the archive) |
| The phone does not turn on after the firmware | Failure to write a boot or system partition | Repeat the firmware via Fastboot or EDL-Regime (Authorized Account Required) |
| E: Unknown command [log] in TWRP | An outdated version of Recaveri | Update TWRP to the latest version for riva |
If the phone hangs on the MI logo after firmware, try:
- Press Volume up + Power to log in to Recovery and make Wipe Data.
- Fastboot phone with a clean all choice.
- If nothing helps, use it. EDL-Mode (requires a special cable and the program Mi Flash Pro).
โ ๏ธ Warning: If a phone fails to respond to buttons and is not detected by a computer, don't panic. 90% of the time, it can be recovered through a computer. EDL-However, this requires an authorized Xiaomi account (or paid access to the service). EDL-service).
6.How to get back the official MIUI after custom firmware
If the custom firmware experiments didnโt live up to expectations, you can always go back to the official MIUI.
- Download Fastboot firmware for your region (e.g. Global).
- Unpack it in a folder and launch the Mi Flash Tool.
- Sign in to Fastboot on your phone (Loudness down + Power).
- In the Mi Flash Tool, select clean all and lock, and this will return the stock bootloader and remove the TWRP.
- Press Flash and wait until it is completed.
After the reboot, you will have a clean MIUI without any custom firmware. Note that if you block the bootloader (clean all and lock), to re-install the TWRP or custom ROM, you will have to re-unblock it through the Mi Unlock Tool.
Important: If you have installed Magisk or other modifications, do the following before returning to the official firmware:
fastboot flash boot stock_boot.img(where stock_boot.img โ Original boot file from official firmware).
๐ก
You can return to the official MIUI at any time, but after blocking the bootloader, re-unblocking will take up to 30 days.
7.Alternative firmware methods: without PC and through ADB
Not everyone has the option to use a computer for firmware. Fortunately, there are ways to upgrade the Redmi 5A without a PC:
1. Update via MIUI Updater (OTA):
- ๐ฑ Go to Settings. โ The phone. โ Updating the system.
- ๐ Click on the icon ยซโฎยป (three dots) and select Select the Service Pack.
- ๐ Specify the path to the downloaded firmware file (.zip format for Recovery).
- ๐ Confirm the installation and wait for the restart.
2. firmware via ADB Sideload:
- Download the firmware for Recovery (.zip format).
- Connect your phone to your PC and execute: adb sideload firmware.zip
- Wait until the installation is complete.
3.Use of OrangeFox Recovery:
It's an alternative to TWRP with a more user-friendly interface, and you can install it through Fastboot:
fastboot flash recovery orangefox.img
fastboot boot orangefox.imgAfter installing OrangeFox, you can flash custom ROMs directly from your phone, without connecting to a PC.