How to flash Xiaomi Redmi 5A Prime: official and custom methods

Xiaomi Redmi 5A Prime

riva

Many users have trouble trying to upgrade the Redmi 5A Prime through standard methods. Official updates for this model have long been discontinued, and informal firmware requires care. In this article, we will analyze all working methods of firmware - from updating through MIUI Updater to installing custom Recovery and manual firmware through Fastboot. Particular attention will be paid to unlocking the bootloader, without which most methods simply will not work.

If your Redmi 5A Prime is slowing down, running out quickly, or not supporting new apps, firmware can be the solution. But it’s important to understand the risks: doing the wrong thing will cause the device to fail. So check your smartphone model in Settings β†’ About Phone β†’ Model before you start and make sure you have a Redmi 5A Prime (rather than the standard Redmi 5A version).

Preparation for firmware: what to do before the start

Xiaomi Redmi 5A Prime firmware requires pre-production. Without it, you risk losing data or getting a broken device. Start with a backup β€” copy photos, contacts and files to your computer or cloud. Use Mi Mover or Google Photos to back up your media.

Next, check the MIUI version and the status of the bootloader.

  1. Go to Settings β†’ About phone and write down the current version of MIUI (e.g. MIUI 12.5.3 Stable).
  2. Turn off your phone, then press Volume Down + Power to log in to the Fastboot. If you see Device unlocked, the bootloader is already unlocked. If not, you'll have to unlock it (more on that below).

Also prepare the tools:

  • πŸ–₯️ Windows computer 10/11 (For the Mi Flash Tool)
  • πŸ”Œ Original. USB-cable (faulty cable is a common cause of errors)
  • πŸ“± Charge your phone at least 60% (firmware can take up to 30 minutes)
  • πŸ”§ The Mi Unlock Tool, Mi Flash Tool, ADB/Fastboot

⚠️ Attention: If your Redmi is 5A Prime was purchased in China, and the firmware may contain restrictions (e.g., no Google services) in which case it will require firmware for a global version. MIUI.

πŸ“Š What kind of firmware method do you plan to use?
Official Update via MIUI Updater
Firmware through Fastboot
Installation of custom Recovery (TWRP)
I don’t know if I’ll choose after reading the article.

Unlock the bootloader on Redmi 5A Prime

Without an unlocked bootloader, you won’t be able to flash Redmi 5A Prime through either Fastboot or custom Recovery. Xiaomi blocks the bootloader by default, and unlocking it requires you to link your Mi Account to the device.

The process takes up to 720 hours (30 days) due to Xiaomi's policy.

  1. Link your Mi Account to your phone in Settings β†’ Xiaomi account.
  2. Enable OEM Unlock in Settings β†’ Additional β†’ For developers (if there is no item, tap 7 times on the MIUI version to activate the developer mode).
  3. Download the Mi Unlock Tool and launch it on PC.
  4. Connect your phone in Fastboot mode (clip Volume Down + Power when the device is off).
  5. Sign in to Mi Unlock Tool under the same Mi Account as your phone and follow the instructions.

You'll have to wait to send the unlock request, you can check the status in the same Mi Unlock Tool, and when the timer is zero, repeat the procedure, the bootloader will be unlocked.

⚠️ Warning: Unlocking the bootloader resets all the data on the phone!

Linked to Mi Account on phone|On. OEM Unlock in the Developer Settings|Download and install Mi Unlock Tool|Phone's 60-charged%+|Ready to wait 30 days-->

Redmi 5A Prime: Which one to choose?

There are 4 basic methods of firmware Xiaomi Redmi 5A Prime. the choice depends on your goals and level of training:

MethodDifficultyDo you need to unlock the bootloader?Suitable for
Update via MIUI Updater⭐ (simple)❌ No.Official Updates (if available)
Firmware through Recovery⭐⭐ (middle-of-the-road)❌ No (but I need a formal firmware)Recovery from disruption
Firmware through Fastboot⭐⭐⭐ (difficult)βœ… Yes.Installation of any version of MIUI
Installation of custom Recovery (TWRP) + firmware⭐⭐⭐⭐ (difficult)βœ… Yes.Castomic ROM (LineageOS, Pixel Experience)

For most users, Fastboot will be the best firmware to install any version of MIUI (including global or European), and if you need custom firmware (like LineageOS), you will need to install TWRP Recovery first.

Official updates through MIUI Updater for Redmi 5A Prime doesn’t come out anymore, but if your phone still gets them, it’s the safest method.

πŸ’‘

If you’re flashing Redmi 5A Prime for the first time, start with the Fastboot method, which is more reliable than installing it through Recovery, and allows you to bring your phone back to life even after serious crashes.

Firmware through Fastboot: step-by-step instructions

This method is suitable for installing any official MIUI firmware (including downgrade).

Steps:

  1. Download the firmware for riva (codename Redmi) 5A Prime from the official website: 🌍 Global version (recommended) πŸ‡¨πŸ‡³ Chinese version (without Google services) πŸ‡ͺπŸ‡Ί Xiaomi.EU (unofficial but stable)

Choose files with the.tgz or.zip extension (for the Mi Flash Tool).

C:\MIUI\

Mi Flash Tool

Loudness down + Nutrition

Fastboot

Mi Flash Tool

Select

Clean all

Clean all and lock

Flash

Once the firmware is in place, the phone will automatically restart. The first launch can take up to 15 minutes - don't turn off the device!

⚠️ Warning: If the Mi Flash Tool gives you a can't find fastboot error, check the drivers. Install the Qualcomm driver and try again.

What to do if the firmware is 99% frozen?
If the process is 99 percent stopped and it doesn't move for more than 10 minutes: Turn off your phone from your PC. Press Power + Volume up for 20 seconds for a forced reboot. Repeat the firmware by selecting Clean all mode. If the error repeats, download the firmware again (possibly damaged archive).

Install custom Recovery (TWRP) and firmware

If you want to install custom firmware (like LineageOS or Pixel Experience), you first need to replace standard Recovery with TWRP. This method requires an unlocked bootloader and is suitable for power users.

Instructions:

  1. Download the latest version of TWRP for riva from the official website: https://twrp.me/xiaomi/xiaomiredmi5a.html (select a file with the.img extension).
  2. Rename the file to twrp.img and place it in the folder with ADB/Fastboot (e.g., C:\platform-tools\).
  3. Turn off the phone and press Volume Down + Power to log into the Fastboot.
  4. Connect your phone to your PC and open the command line in the folder with ADB. Enter the command: fastboot flash recovery twrp.img
  5. After successful installation, type: fastboot boot twrp.img The phone will boot to TWRP.
  6. In TWRP, run Wipe β†’ Format Data (this will delete all data!).
  7. Copy the firmware (e.g. lineage-18.1-20230510-UNOFFICIAL-riva.zip) to your phone and install it via Install.

If the phone doesn’t turn on for more than 20 minutes after firmware, try going to Fastboot (Loudness Down). + Power, and repeat the process. If that doesn't work, it's probably damaged. EMMC-storage device (repair required).

How to return a standard firmware if something goes wrong

If after experimenting with custom firmware Redmi 5A Prime stopped working stably, you can return the original MIUI.

  1. Download the official firmware for riva (global or Chinese, depending on the original version).
  2. Unpack the archive and launch the Mi Flash Tool.
  3. Select Clean all and lock mode – this will return the standard Recovery and block the bootloader.
  4. Connect your phone in Fastboot mode and press Flash.

After that, the device will be like new, with all the standard Xiaomi restrictions, and if you need to unlock again, you will have to wait 30 days.

πŸ’‘

If Google services are lost after returning to standard firmware, install them manually through Google Installer (you can download it on APKMirror).

FAQ: Answers to Frequent Questions

Can I flash Redmi 5A Prime without unlocking the bootloader?
Yes, but only through MIUI Updater (if official updates are available) or through Recovery (if you already have official firmware installed). ROM or firmware through Fastboot unlocking is mandatory.
How do I know if I have a Redmi 5A Prime bootloader unlocked?
Turn off your phone and press Volume Down + Power to log in to Fastboot. If the bottom of the screen says Device unlocked, the bootloader unlocked. If Device locked, locked.
Which firmware is the best to choose for Redmi 5A Prime in 2026?
Recommended for stable operation: πŸ“± Official global MIUI β€” If you want maximum compatibility. πŸ“± Xiaomi.EU – if you want advanced settings without advertising. πŸ“± LineageOS 18.1 (Android 11) – if you want an up-to-date version of Android, avoid Chinese firmware without Google services unless you plan to install them manually.
What if the sensor or camera doesn’t work after the firmware?
This is a typical problem when installing incompatible firmware. Solutions: Go back to the firmware for the riva model (Redmi). 5A If you've used custom firmware, try another build (e.g. from another developer) and reset to factory settings in Recovery (Wipe). β†’ Factory Reset. If the problem persists, the kernel drivers may have been damaged, and in this case, only a full-cleaning flashing through Fastboot will help.
Can I get Redmi to flash? 5A Prime through OTG-computer-free?
Technically, yes, but it's complicated and not recommended. TWRP Fastboot (which requires a PC) OTG-The storage device. TWRP And you can flash a file from a flash drive, and you can't flash a phone without an unlocked bootloader and a PC.