How to flash Xiaomi Redmi 5A: all the ways from official updates to custom firmware

Why to Switch Redmi 5A and When to Do It

Xiaomi Redmi 5A (codenamed riva) was released in 2017, but is still popular due to its price and functionality balance, but over time, even this reliable device begins to β€œbrake”, discharge in a few hours or give out errors in the operation of applications, in 80% of cases, the cause is outdated firmware, cache or conflicts of system files.

Redmi 5A firmware can be required in several scenarios:

  • πŸ”„ Update to the current version MIUI (for example, MIUI 9 MIUI 12.5 Enhanced)
  • 🐌 Accelerating after a year of use (waste cleanup, kernel optimization)
  • πŸ”“ Remove Bloatware (pre-installed Chinese applications that cannot be removed by standard methods)
  • πŸ› οΈ Recovery after a crash (if the phone doesn’t turn on, hovers on the logo or gives a DM-Verity error)
  • πŸš€ Install custom firmware (e.g. LineageOS or Pixel Experience for advanced features)

But before you get started, it's important to understand that firmware isn't just an "air update"; it's a deep interference with system files that, if you don't do it right, can turn a phone into a "brick." On Redmi 5A with a Snapdragon 425 processor and 2GB of RAM, some custom firmware is unstable -- check compatibility on 4PDA or XDA forums before installing.

πŸ“Š Why do you want to send Redmi to you? 5A?
Update MIUI to the latest version
Speed up the phone's work
Install custom firmware
Remove unnecessary applications
Recovery after failure
Another option

Preparation for firmware: what to do before the start

Regardless of the firmware method chosen, preparation is 70 percent successful, and neglecting this stage is the main reason for the "bricking" of devices.

1. Verification of the model and firmware version

There are several modifications to the Redmi 5A:

  • πŸ“± Global version (Redmi) 5A Global - stitched through MIUI Updater without unlocking
  • πŸ‡¨πŸ‡³ Chinese version (Redmi) 5A China – requires unlocking the bootloader to install global software
  • 🌍 Indian/European – may have restrictions on certain regions

To find out your model, go to Settings β†’ About Phone β†’ MIUI version and write down:

  • πŸ“Œ Model of device (e.g, MDE6 global version)
  • πŸ“Œ Current version MIUI (for example, V12.5.1.0.OCKMIXM)
  • πŸ“Œ Assembly number (e.g, OPM1.171019.019)

Data backup

The firmware deletes all data from internal memory (except files on the computer). SD-Use these methods for backup:

  • ☁️ Xiaomi Cloud: Settings β†’ Mi Account β†’ Mi Cloud β†’ Backup
  • πŸ’» Computer: copy the folders DCIM, Downloads, WhatsApp via USB-cable
  • πŸ“± Third-party applications: Swift Backup (requires root) or Titanium Backup

⚠️ Warning: If you use Mi Cloud, make sure you have enough space – the free fare is limited to 5GB. Photos and videos take up the most space.

3. Download the necessary files

Depending on the method of firmware, you will need:

Firmware methodRequired filesDownload link
Official Update (MIUI Updater)Update file.zipOfficial MIUI website
Firmware through RecoveryRecovery-firmware update.zipSourceForge (firmware)
Firmware through FastbootFastboot firmware.tgz, Mi Flash ToolMi Flash Tool
Custom firmwareROM.zip, TWRP Recovery, Magisk (for root)XDA Developers

Important: Only download files from official sources or trusted forums. Firmware viruses are rare, but fake files may contain spyware.

β˜‘οΈ Checklist before firmware

Done: 0 / 5

Method 1: Official update via MIUI Updater (no PC)

The safest method, which does not require unlocking the bootloader or connecting to a computer, is suitable for upgrading the current version of MIUI to the latest stable build.

Step-by-step instruction

  1. Open Settings β†’ About the phone β†’ System update.
  2. Click on the three dots in the top right corner and select Select the Update File.
  3. Specify the path to the downloaded update.zip file (it should lie at the root of the internal memory).
  4. Confirm the installation and wait for the restart (it will take 5-10 minutes).

If the update is not automatically updated:

  • πŸ”Œ Check Wi-Fi connection (mobile internet updates may not load).
  • πŸ”„ Restart your phone and try again.
  • πŸ“₯ Download the update file manually from the official site and install it through Select the update file.

⚠️ Note: If after the update the phone is stuck on the logo MI more than 15 minutes, perform a hard reset: pinch the power + Volume up for 10 seconds. Data won't be lost, but settings will reset.

πŸ’‘

Officially updating via MIUI Updater is the only method that does not reset data and does not require unlocking the bootloader.

Method 2: Firmware through Recovery (for power users)

This method is suitable if:

  • πŸ”„ You want to go back to the previous version. MIUI.
  • πŸ› οΈ Restore your phone after a crash (for example, after a failed update).
  • 🚫 You have a bootloader blocked, but you need to reflash the system.

How to Sign In to Recovery Mode

Turn off the phone, then press the combination:

Power button + Volume up

Hold for 5-7 seconds until the Mi Recovery logo appears.

Installation of firmware

  1. From the Recovery menu, select the language (usually English).
  2. Click Install update.zip to System.
  3. Confirm the installation and wait until the completion (the process will take 3-5 minutes).
  4. Choose Reboot. β†’ Reboot to System.

Important nuances:

  • πŸ“ File. update.zip It should be called that (without numbers or additional characters).
  • πŸ”‹ Battery charge should be at least 50% - when discharged during firmware, the phone may fail.
  • πŸ”’ If Recovery requires a password, enter a pattern lock or PIN-phone-code.

What if Recovery doesn’t see the update.zip file?
Make sure the file is at the root of the internal memory (not in folders!). SD-map, move the file there and select the Install from option in Recovery SD card.

Method 3: Fastboot Firmware (complete reinstallation of MIUI)

This is the most reliable way to flash Redmi 5A, but it requires an unlocked bootloader and a PC connection.

  • πŸ”„ Transition from Chinese firmware to global (and vice versa).
  • πŸ› οΈ Recovery of the phone after a major crash (e.g. bootloop).
  • πŸš€ Installation of custom firmware (after unlocking).

Step 1: Unlock the bootloader

Xiaomi is blocking the bootloader on all devices to unlock it:

  1. Link your Mi Account to your phone: Settings β†’ Mi Account β†’ Link your account.
  2. Apply for unblocking via the official website (can take up to 72 hours).
  3. Download the Mi Unlock Tool and follow the instructions.

⚠️ Warning: Unlocking the bootloader resets all data on the phone, including photos and apps, and it can also void the warranty (if the phone was purchased less than a year ago).

Step 2: Install drivers and Mi Flash Tool

The computer must be installed:

  • πŸ–₯️ Drivers. ADB/Fastboot (download from Android).
  • πŸ› οΈ Mi Flash Tool (2018 version or newer).
  • πŸ“ Firmware in.tgz format (unpack it into a folder without Cyrillic characters).

Step 3: Firmware through Fastboot

  1. Turn off your phone and log in to Fastboot Mode: Press Power + Volume Down.
  2. Connect your phone to your PC through USB-cable.
  3. Launch the Mi Flash Tool, press Select and point the path to the unpacked firmware.
  4. Select firmware mode: Clean all - complete cleaning (recommended when changing the version of MIUI), Clean all and lock - cleaning + lock bootloader (if you need to return the warranty), Save user data - data storage (not always stable).

Flash

Common mistakes and their solutions:

Mistake.Reason.Decision
Couldn't flash or Critical partition flashing is not allowedbootloader lockedUnlock the bootloader through the Mi Unlock Tool
Device not foundDrivers not installed or cable is faultyReinstall the drivers, try another one. USB-port
The phone does not turn on after the firmwareIncorrectly selected firmware or interrupted processRepeat the firmware with the correct version of MIUI

πŸ’‘

If the Mi Flash Tool gives an error of 0x80070002, try running the program on behalf of the administrator or disable the antivirus (it can block access to system files).

Method 4: Install custom firmware (LineageOS, Pixel Experience)

Custom firmware gives Redmi 5A a second life: updated Android, no MIUI ads, advanced settings, but this method requires an unlocked bootloader and installing TWRP Recovery.

Step 1: Installation of TWRP Recovery

  1. Download TWRP for riva from the official website.
  2. Rename the file to twrp.img and place it in the folder with the platform-tools.
  3. Log in to Fastboot Mode and connect your phone to your PC.
  4. Enter the command: fastboot flash recovery twrp.img
  5. Recovery: fastboot boot twrp.img.

Step 2: Firmware custom ROM

  1. Download firmware (like LineageOS 18.1 for riva) and GApps (Google services).
  2. Transfer the files to your phone or SD-map.
  3. In TWRP, run Wipe β†’ Advanced Wipe and mark Dalvik / ART Cache System Data Cache

Install

GApps

Reboot to the system.

Advantages of custom firmware for Redmi 5A:

  • πŸ†• Up-to-date version of Android (for example, Android 11 instead of Android 7.1 in stock) MIUI).
  • ⚑ Improved performance (optimized core, no bloatware).
  • πŸ”’ More control over permits and security.

Disadvantages:

  • πŸ“΅ Possible problems with the camera or sensors (check the reviews on the forums).
  • πŸ”‹ Faster battery discharge (due to lack of optimizations) MIUI).
  • 🚫 No official support (updates coming from community).

How to return stock MIUI after custom firmware?
Download the official Fastboot firmware and run it through the Mi Flash Tool in Clean All mode. This will delete TWRP and all data, returning the phone to factory condition.

Frequent mistakes and their solutions

Even with the exact following of the instructions, there can be problems.

1. the phone does not turn on after firmware (bootloop)

Reasons:

  • πŸ”Œ Incorrectly selected firmware (for example, Chinese instead of global).
  • πŸ› οΈ Interrupted firmware process (cable disconnected, battery dead).
  • πŸ”’ The bootloader is blocked, but tried to sew the custom ROM.

Decision:

  • Repeat the firmware via Fastboot with the correct version of MIUI.
  • If the phone doesn't respond, try pinching Power + Volume up for 20 seconds for a forced reboot.

Error "This package is for riva devices; this is a ">

This error appears in Recovery if you're trying to install firmware that's not for your model, like downloading a file for Redmi 5 instead of Redmi 5A.

How to fix it:

  • Check the code name of your device (Riva for Redmi 5A).
  • Download firmware for riva from the official website or Xiaomi Firmware Updater.

3 Mi Flash Tool can't see phone

Possible causes:

  • πŸ–₯️ Qualcomm drivers not installed (required for Snapdragon 425).
  • πŸ”Œ Used. USB-hub.
  • πŸ”’ In the settings of the developer disabled debugging by USB.

Decision:

  • Install drivers manually through Device Manager (look for Qualcomm HS-USB QDLoader 9008).
  • Try another one. USB-port (preferably) USB 2.0 on the back of the PC).
  • Turn on debugging: Settings β†’ The phone. β†’ Press 7 times on "Version" MIUI" β†’ Back to Settings β†’ Additionally. β†’ For developers β†’ Debugging by USB.

πŸ’‘

90% of firmware errors are due to the wrong MIUI version or the locked bootloader. Always check the device code name (riva) and lock status (fastboot oem device-info).

FAQ: Answers to Frequent Questions

Can I flash Redmi 5A without unlocking the bootloader?
Yes, but only through MIUI Updater or Recovery (if you already have global firmware installed).To change the region (for example, from Chinese to global) or install custom ROM, unlocking is mandatory.
How to check if the bootloader is unlocked?
Turn off the phone, then press Power + Volume down to log into Fastboot. Connect to your PC and type in the command: fastboot oem device-info If there is a Device unlocked: true string in the answer, the bootloader is unlocked.
How long does it take to get through Fastboot?
On average, 10-15 minutes. If the process lasts more than 20 minutes, check: Stability USB-Free space on the PC system drive (Mi Flash Tool requires up to 5 GB of temporary files) No antivirus activity (it can slow down file writing).
Can I use Redmi 5A with a broken screen?
Yes, but only through Fastboot or EDL Mode (emergency mode). To do this: Connect your phone to your PC when it's off. Close the test points on the board (disassembly required) or use the command: fastboot oem edl Fastboot oem edl Flow through the Mi Flash Tool in EDL mode. Attention: This method is risky - if you make a mistake, the phone can finally fail.
Which firmware is best for Redmi 5A in 2026?
Depends on the goals: πŸ”Ή Stability: Official MIUI 12.5 Enhanced (last supported version). πŸ”Ή Performance: Pixel Experience (Android 11) or LineageOS 18.1. πŸ”Ή Maximum optimization: DerpFest or ArrowOS (requires custom experience) ROM). Before installing, check the reviews on 4PDA or XDA.