How to reflash Xiaomi Redmi 5A: official and custom firmware

Why do Redmi 5A owners decide to reflash their smartphone?

The budget Xiaomi Redmi 5A (codenamed riva) was released in 2017, but remains popular due to its reliability and ability to upgrade through firmware. Over time, users face slowdowns, lack of security updates or the desire to install custom firmware like LineageOS or Pixel Experience.

βœ… Return the β€œfactory” speed of work if the smartphone began to β€œbrake” after aΓ±os utilization.

βœ… Update the Android version (officially Redmi) 5A It only got Android 7.1 Nougat and it got it. MIUI 12, but custom firmware supports up to Android 13).

βœ… Remove pre-installed applications (bloatware) and optimize power consumption.

βœ… Fix critical errors if the smartphone is not turned on or hovers on the Mi logo.

However, the process has risks: missteps can lead to a β€œbrick” (complete device failure) or data loss. This article outlines the ways Redmi 5A flashbacks are relevant for 2026, given the changes in Xiaomi’s policy to unlock the bootloader.

Preparation for Flashing: What to Do Before Starting

Before you start firmware, follow the mandatory steps, which can lead to data loss or the inability to restore the smartphone.

  • πŸ“± Save all the data: contacts, photos, messages. The firmware erases internal memory (except microSD card). Use Settings β†’ Additionally. β†’ Backup or third-party utilities like Titanium Backup (requires root).
  • πŸ”‹ Charge the battery to at least 60%. interruption of the process due to battery discharge can make the smartphone inoperable.
  • πŸ”— Download the right firmware. 5A (riva) fit: Official firmware from Xiaomi (select the version for your region: Global, China, EEA). Castomic firmware from forums XDA Developers or 4PDA (For example, Havoc-OS, ArrowOS).
  • πŸ”“ Unlock the bootloader (if you plan to install custom firmware). MIUI Updater can be installed without unlocking.

⚠️ Note: If you install firmware for another region (e.g. China instead of Global), Google services may stop working, NFC Check compatibility on forums before choosing.

πŸ“Š Why do you want to re-interview Redmi? 5A?
Accelerate work
Install a new version of Android
Correcting errors
Put the custom firmware in.
Another option

Method 1: Update via MIUI Updater (official method)

The easiest and safest way is to upgrade through the built-in MIUI Updater app, which is suitable for installing official firmware without unlocking the bootloader and does not require a connection to a PC.

Instructions:

  1. Open Settings β†’ About the phone and tap 7 times on the MIUI version to activate the developer mode.
  2. Return to Settings β†’ Additional β†’ For developers and enable USB debugging.
  3. Download the firmware (.zip) to your smartphone or memory card (do not unpack!).
  4. Open the MIUI Updater app, click on the three dots in the upper right corner and select Select the firmware file.
  5. Specify the path to the downloaded file and confirm the installation. The smartphone will reboot to Recovery and begin firmware.

⏳ Time of installation: ~10-15 minutes. After you restart, check the version. MIUI In Settings β†’ The phone.

⚠️ Warning: If after the update the smartphone got stuck on the Mi logo, try to pinch the Volume up + 10 seconds power to force reboot, and if that doesn't work, you'll need firmware on Fastboot.

Download the firmware for your model (riva)|Check the battery charge (>50%)|Activate the Developer Mode|Enable debugging on USB|Keeping important data-->

Method 2: Fastboot firmware (for official and custom firmware)

Fastboot is suitable for installing official firmware (if the MIUI Updater doesn't work) or custom firmware after unlocking the bootloader. You'll need a computer with drivers installed. ADB/Fastboot and MiFlash utility.

Step-by-step:

  1. Unlock the bootloader (if not unlocked): Apply for unlocking through the official Xiaomi website (Mi Account will be required). Download Mi Unlock Tool, connect your smartphone in Fastboot mode (click Volume Down + Power) and follow the program instructions.

.tgz

.img

ADB/Fastboot Tools

MiFlash

Fastboot

MiFlash

Select

Refresh

Flash

Type of firmwareFile formatDo you need unlocking?Wipes data?
Official (MIUI).tgz or.zipNot (if via MIUI Updater)No (if upgraded)
Official (Fastboot).tgzYes (if the bootloader is locked)Yes.
Castomium (TWRP).zipYes.Yes (if you wipe)
Cast-boot (Fastboot).imgYes.Yes.

What if MiFlash can’t see the device?
1. Check if Qualcomm drivers are installed HS-USB QDLoader 9008 (downloadable XDA). 2. Try another one. USB-port (preferably) USB 2.0). 3. Disable the antivirus – it can block MiFlash. 4. Reinstall. ADB/Fastboot and run the command prompt on behalf of the administrator, then type: fastboot devices If the device is displayed but MiFlash can’t see – try another version of the program (for example, MiFlash). 2018 instead 2020).

Method 3: Install custom firmware through TWRP

Unofficial firmware installations (such as LineageOS or Pixel Experience) require custom TWRP recavators, which offer more opportunities but also risks.

Steps:

  1. Download. TWRP for Redmi 5A (twrp-3.7.0_9-0-riva.img).
  2. Install it with Fastboot: Fastboot Flash Recovery twrp-3.7.0_9-0-riva.img fastboot boot twrp-3.7.0_9-0-riva.img
  3. In TWRP, make a backup of the current firmware (Backup β†’ Select partitions β†’ Swipe to Backup).
  4. Flip custom firmware (.zip) through Install. After installation, run Wipe β†’ Format Data (if required).
  5. Reboot. The first launch can take up to 10 minutes.

πŸ’‘

If after firmware custom OS does not work mobile network, check the settings APN In Settings β†’ SIM-maps and mobile networks β†’ Access points (APN). Often helps manually enter operator parameters.

⚠️ Note: Some custom firmware does not support VoLTE and VoWiFi on Redmi 5A. Before installing, check this out on the developer forum.

Common mistakes and their solutions

Even with the correct following of the instructions, there can be problems, and here are the most common ones and ways to fix them:

  • 🚫 Error "This package is for riva devices": Reason: You're trying to flash the firmware for another model. 5A (riva).
  • πŸ”„ Smartphone is fixated on bootloop: Solution: Log in Recovery (Loudness up) + Power) and run Wipe Data. If it doesn't work, go back to the Fastboot.
  • πŸ”Œ Computer doesn't see device in Fastboot: Try another cable (original), disable everything USB-PC devices other than mouse and keyboard, and install drivers manually through Device Manager.
  • πŸ“΅ After firmware no network: Make sure the firmware is compatible with your region. ROM You may need to manually install Google services.

πŸ’‘

If the smartphone does not turn on and does not respond to buttons after firmware, do not panic: in 90% of cases it can be restored through the phone. EDL-This will require a Qualcomm box or help from a service center.

How to return the smartphone to factory settings after a failed firmware

If the firmware is faulty and the smartphone is not loading or is not running smoothly, reset to factory settings. There are two ways:

Method 1: Through Recovery

  1. Turn off your smartphone.
  2. Press Volume Up + Power to enter Recovery.
  3. Select Wipe Data β†’ Wipe All Data (use volume buttons for navigation, Power buttons for confirmation).
  4. Reboot (Reboot)

Method 2: Fastboot (if Recovery is not available)

  1. Connect your smartphone to your PC in Fastboot mode.
  2. In the command line, run: fastboot erase userdata fastboot erase cache fastboot reboot

If the reset didn’t help, repeat the firmware from scratch, following the instructions from the previous sections.

FAQ: Frequent questions about Redmi firmware 5A

Can I flash Redmi 5A without unlocking the bootloader?
Yes, but only official firmware via MIUI Updater.For custom firmware or firmware via Fastboot, unlocking is mandatory.
How long does it take to unlock the bootloader?
Since 2026, Xiaomi has increased the wait time to 168 hours (7 days) for new accounts.If the Mi Account is older than 30 days, unlocking can go faster (from 72 hours).
Which custom firmware is better for Redmi 5A?
The most stable options for 2026 are LineageOS 18.1 (Android 11) – the optimal balance of performance and features. Pixel Experience – the closest to β€œpure” Android with Google Pixel chips. Havoc-OS – flexible interface setting. Before installing, check reviews for XDA or 4PDA.
Can I roll back the firmware to an older version?
Yes, but with reservations: For official firmware: use Fastboot and run through the old version (for example, from MIUI 12 to MIUI 11). For custom firmware: run the Wipe System before installing the old version.
Where to download the original firmware for Redmi 5A?
Official firmware is available on the sites: Xiaomi Official Portal (choose Redmi 5A model); Xiaomi Firmware Updater - archive of all versions. Avoid third-party sources - they may contain viruses or modified files.