Xiaomi Redmi firmware 5A MiFlash with a locked bootloader: the full guide 2026

Firmware of the smartphone Xiaomi Redmi 5A (The codename riva, which has a locked bootloader, is a task that scares many users. Unlike models with an unlocked bootloader, you can't just plug a device into MiFlash and press Flash. The process requires bypassing Xiaomi’s limitations, properly preparing drivers, and often using additional tools like the one you need to use. EDL-In this article, we will analyze all working methods of firmware Redmi. 5A via MiFlash, even if the bootloader is blocked, and also warn against typical errors that turn the phone into a β€œbrickΒ».

The main problem with a blocked bootloader is the lack of official firmware support through Fastboot. Xiaomi deliberately restricts such operations to prevent unauthorized software changes. EDL (Emergency Download Mode) or use of authorized Mi accounts. We will look at both options, as well as alternative methods for cases where standard instructions do not work.

Important: If your Redmi is 5A It doesn't turn on or get stuck on the Mi logo, don't try to flash it right through MiFlash. First check if the device responds to charging or a combination of Power buttons + Volume Down: 30% of the time, the problem is solved by resetting through Recovery, not by completely reflashing.

πŸ“Š Why do you want to send Redmi to you? 5A?
The device is not switched on.
I want to install custom firmware.
We need to update the software after the failure.
Other

1. Firmware Preparation: What You Need to Know Before You Start

Before you start firmware, make sure you have everything you need. - Xiaomi Redmi 5A With a locked bootloader requires a special approach, and skipping even one point can lead to errors such as flash not done or invalid image format.

First, check the bootloader version of your device. To do this, go to Settings. β†’ The phone. β†’ Version. MIUI And you tap 7 times on the kernel line. In the menu that opens, you can find Version bootloader. If it says Locked, it means that the bootloader is locked, and the standard firmware will not pass through Fastboot.

Second, prepare a PC with Windows. 7/10/11 (MiFlash is not stable on macOS or Linux. Make sure your computer has disabled the antivirus, it can block Qualcomm drivers or the MiFlash utility itself.

  • πŸ“Œ Original. USB-cable (not cheap Chinese analogues – they often do not transmit data to the Internet) EDL-mode).
  • πŸ”‹ Charge at least 50% – if the phone runs out during firmware, it will be extremely difficult to restore it.
  • πŸ’Ύ Firmware for Redmi 5A (Download only from official sources: en.miui.com or Xiaomi Firmware Updater).

Critical detail: firmware through MiFlash with a blocked bootloader is possible only in the EDL-mode (9008). If you have a Redmi. 5A does not go into this mode, additional equipment is required - an authorized Mi Account with rights EDL boxing UFi/EasyJTAG.

πŸ’‘

If you do not have an authorized Mi Account for EDL, Try to find firmware in.tgz format for Fastboot and use the method with testpoint (more on this below in section 4).

2. Installation of drivers and configuration of MiFlash

Without the right drivers, MiFlash just won't see your device. - For Redmi 5A (Qualcomm Snapdragon 425 chipset will require QDLoader drivers HS-USB MiFlash.

Download the latest version of MiFlash from the official website:

https://bigota.d.miui.com/tools/MiFlash2020-3-14-0.zip

Unpack the archive into the root of the disk C:\ (for example, C:\MiFlash). Launch the utility on behalf of the administrator.

Now install the drivers:

  1. Download. Qualcomm_Drivers.rar (reference).
  2. Turn off the driver digital signature check in Windows (instruction below).
  3. Connect Redmi off. 5A To PC, press Volume Up + Volume Down and insert cable – the device must be determined as QHUSB_BULK.
  4. Manually update the driver through Device Manager, pointing the way to unpacked Qualcomm drivers.

If the driver is not installed, run in the command line (Win) + R β†’ cmd):

bcdedit /set testsigning on


bcdedit /set nointegritychecks on

After restarting the PC, repeat the installation.

How to disable driver signature verification in Windows 11?
1.Push Win. + I β†’ Update and security β†’ Recovery. 2. Under Special Download Options, click Reboot Now. 3. Select Troubleshooting and Troubleshooting β†’ Additional parameters β†’ Loading parameters β†’ Reboot. 4. Press when downloading. F7 (disable mandatory driver signature verification).

3. Transition to mode EDL (9008) on the Redmi 5A

Regime. EDL (Emergency Download Mode is the only way to flash Redmi 5A But it's not that easy to put the device into this mode: Xiaomi blocks forced entry. EDL newer versions.

There are three working methods of transitioning to EDL:

  1. The hardware method is to close contacts on the board, which is suitable if the phone is not turning on.
  2. The programmatic method - through ADB Fastboot (requires a working system).
  3. The button combination works on older versions MIUI (10.2).

Let's look at each one in detail.

Hardware method (testpoint)

If Redmi 5A It doesn't respond to the buttons, you'll need to disassemble the device and close the testpoint:

  1. Remove the back cover (a mediator or plastic card will be required).
  2. Disconnect the battery (required!).
  3. Find two contacts on the motherboard with the inscription EDL or TP (usually near the socket for the display plume).
  4. Close them with tweezers or screwdrivers, simultaneously connecting USB-plug-in.

The device should be identified as Qualcomm HS-USB QDLoader 9008.

Turn off the phone from charging|Remove the back cover carefully (do not damage the plumes)|Use an antistatic bracelet or ground|Prepare tweezers with thin ends-->

The program method through ADB

If the phone turns on but the bootloader is locked, try to transfer it to the phone. EDL through ADB:

adb reboot edl

If the command is not working (device unauthorized error), turn on debugging by USB In Settings β†’ For developers and confirm access on the phone.

For devices with MIUI 11+ This method is often blocked. In this case, use an alternative command:

adb shell


su




echo 1 > /sys/bus/msm_subsys/devices/subsys0/force_dload

3.3. button combination (for older versions) MIUI)

On the versions. MIUI Below 10.2, you can try to enter the EDL so:

  1. Turn off the phone.
  2. Hold Volume Up + Volume Down and connect USB-cable.
  3. Hold the buttons for 10-15 seconds until Qualcomm 9008 appears in Device Manager.

πŸ’‘

If none of the methods worked, it’s likely your Redmi. 5A new version installed MIUI patchy EDL. In this case, you will need an authorized Mi Account or contact the service center.

4. Firmware through MiFlash: step-by-step instructions

When the device is in mode EDL (It is defined as Qualcomm. HS-USB QDLoader 9008, you can start the firmware. Using the official MiFlash utility and the correct firmware.

Download the firmware for Redmi 5A (riva) in.tgz or.zip format. We recommend taking a stable global version (for example, a stable global version, V12.5.1.0.RCCMIXM) From the Xiaomi Firmware Updater, unpack the archive in a folder without Cyrillic characters (for example, C:\riva_firmware).

Now, follow the instructions:

  1. Run MiFlash on behalf of the administrator.
  2. Click Select and point the way to the folder with unpacked firmware.
  3. At the bottom, select firmware mode: clean all – complete cleaning (recommended in case of system failures). clean all and lock – cleaning + bootloader lock (if you need to return the stock state). save user data - saving user data (does not always work with a blocked bootloader).

Refresh

COM-port

COM3

Flash

If the firmware is terminated with the Flash not done error, check:

  • πŸ”Œ Are Qualcomm drivers properly installed.
  • πŸ“ The path to firmware does not contain Cyrillic or gaps.
  • πŸ”’ MiFlash Version (New Firmware May Require MiFlash 2020)+).
  • πŸ”„ Try another one. USB-port USB 2.0 on the back of the PC).

| Error | Reason | Decision |

|--------|---------|---------|

| flash not done | Wrong drivers or firmware | Reinstall Qualcomm drivers, download another firmware version |

| invalid image format | A damaged firmware file | Check the checksum (MD5) archive |

| device not found | Device out of mode EDL | Repeat the transition to EDL (see section 3) |

| mi flash not responding | Conflict with antivirus | Disable the antivirus and start MiFlash from the admin |

| firehose not found | There's no file. prog_emmc_firehose.mbn | Download full firmware (not Recovery!) |

-->

5. Alternative firmware methods

If MiFlash refuses to work, there are several alternative ways to flash Redmi. 5A lock-down.

5.1 Firmware through Fastboot with lock bypass

This will require:

  • πŸ”“ Unlock the bootloader through the official Mi Unlock tool (it will take 7-30 days of waiting).
  • πŸ“± Install TWRP (if you need custom software).
  • πŸ”„ Switch through fastboot flash.

However, this method is not suitable if:

  • The phone's not turning on.
  • There is no way to wait for unlocking.
  • Mi Unlock is a Couldn't unlock error.

5.2 Use of third-party tools (QFil, QFIL)

Qualcomm Flash Image Loader (QFil) is an alternative to MiFlash for Snapdragon devices. Download QFil from Qualcomm's official website and follow the instructions:

  1. Connect the phone in EDL mode.
  2. In QFil, select Flat Build and specify the path to the file. prog_emmc_firehose.mbn firmware.
  3. Click Load XML and select rawprogram0.xml and patch0.xml files.
  4. Press Download and wait until it is completed.

Warning: QFil can flash the device even with a damaged one NVRAM, which will lead to loss IMEI. Check the firmware after you've done it. IMEI team:

*#06#

If zeros are displayed instead of the number, you will need to restore through SN Writer or Maui META.

5.3 Contact the service centre

If all methods fail and the phone fails to turn on, there are two options:

  • πŸ”§ Contact the authorized Xiaomi service (they have access to official Xiaomi service) EDL-firmware).

πŸ’‘

Xiaomi service centers in 90% of cases stitch devices through the EDL without unlocking the bootloader, but it is a paid service (from 1500 to 3000 rubles depending on the region).

6. Post-firmware recovery

After a successful firmware Redmi 5A Additional adjustments may be required:

  • πŸ”„ Reset to factory settings (via Recovery): eliminates possible glitches after firmware.
  • πŸ“Ά Verification IMEI: If he has fallen, restore him through SN Writer.
  • πŸ”’ Unlock the bootloader (if you plan to install custom firmware).
  • πŸ”‹ Battery calibration: After firmware may show incorrect charge level.

For reset via Recovery:

  1. Turn off the phone.
  2. Hold the Power. + Volume Up until the Mi logo appears.
  3. Choose Wipe Data β†’ Wipe All Data (Management – Volume buttons, Confirmation – Power).
  4. Reboot the device (Reboot).

Attention: ⚠️ If the phone loads into Fastboot or Recovery after firmware, but doesn't turn on any further, it probably doesn't fit your version of the phone. Try another build (e.g., take China Stable instead of Global).

7. Frequent errors and their solutions

Even if you follow the instructions accurately, you can get errors, and let's look at the most common ones and how to fix them.

Mistake.Reason.Decision
SLA Auth Error in MiFlashYou need to log in to your Mi Account for EDLUse an authorized account or contact the service
Phone is not defined in EDLIncorrectly closed testpoint or old driversRepeat the closure of contacts, update the Qualcomm drivers
Invalid sparse file formatA damaged firmware file or incompatible versionDownload the firmware again, check MD5
After firmware no network (IMEI reset)Damaged. NVRAM when firmware through QFilRestore IMEI through SN Writer or Maui META
MiFlash is on waiting for a deviceConflict with an antivirus or USB-portDisable the antivirus, try another port (USB 2.0)

Attention: ⚠️ If after the Redmi firmware 5A It doesn't turn on, don't try to flash it back in. First, check if it's defined in the EDL If not, the problem may be in the hardware (for example, the battery plume fell off).

8. FAQ: Answers to Frequent Questions

Can I get Redmi to flash? 5A lock-down EDL?
No, if the bootloader is locked, the firmware is only possible through EDL (9008) or after official unlocking via Mi Unlock, methods like fastboot flash won't work.
What if MiFlash says "flash not done"?
Check: Qualcomm Driver Installation Correctness. firmware integrity (compare) MD5 Firmware mode in MiFlash (try clean all). USB-port (better to use) USB 2.0 on the back of your PC. If nothing helps, try flashing through QFil.
How to recover IMEI after firmware through EDL?
If IMEI Reset (reset) with zeros, restore it with the help of: SN Writer Tool (requires an authorized Mi Account). META (It's for Mediatek processors, but it's also good for some Snapdragon. NVRAM through QPST (for experienced users. Attention: ⚠️ Incorrect recovery IMEI It could lead to a network lockdown. If you're not sure, contact the service.
How long does it take to get through MiFlash?
On average, 3 to 10 minutes, depending on: USB-The size of the firmware (full firmware takes up) ~2-3 GB) PC performance, if the process is delayed by 20+ Minutes – most likely an error has occurred (check the logs in MiFlash).
Can I get Redmi to flash? 5A on a custom firmware with a blocked loader?
No, to install custom firmware (for example, LineageOS or Pixel Experience), you must unlock the bootloader through Mi Unlock. TWRP or other recovery will not be installed.