Xiaomi Redmi Note 5A firmware via Fastboot: a complete guide with unlocking the bootloader

Xiaomi Redmi Note 5A (codenamed ugg for global and ugglite for Chinese) is one of the brand’s most popular budget smartphones, released in 2017. Despite its age, the device is still in active use, and its firmware through Fastboot may be required to recover from failures, install a new version of MIUI or even custom builds like LineageOS. However, the process has nuances, from the mandatory unlock of the bootloader to the risk of β€œbricking” if errors occur.

This guide will take a look at all the steps from driver preparation to final reboot, and we will focus on common errors (such as anti-rollback or problems with EDL- mode), and give you firmware recommendations. If you are a beginner, start with the data backup section – this is critical!

Preparation for firmware: what to do before the start

Fastboot firmware isn't just about copying files, it's about completely rewriting system partitions. Before you start, make sure that:

  • πŸ”‹ Battery charge of at least 60% (when discharged during the process, the device can turn into a "brick").
  • πŸ’» The PC has Mi USB Driver and ADB/Fastboot drivers installed (you can download from the official Xiaomi website or through the Mi Flash Tool).
  • πŸ“ Backed up important data, contacts, photos, messages, and the firmware erases internal memory!
  • πŸ”“ You have a Mi Account tied to your phone (required to unlock the bootloader).

Pay special attention to the firmware version. The Redmi Note 5A has two modifications: ugglite (2/16 GB, Snapdragon 425) and ugg (3/32 GB, Snapdragon 435). Installing firmware from another modification will cause the device to fail! Check your model in the settings (Settings β†’ About Phone β†’ Model).

Also prepare:

  • πŸ”— Cable USB Type-C (preferably original to avoid connection issues)
  • πŸ–₯️ Computer running Windows 7/10/11 (Mi Flash Tool requires.NET Framework 4.5+).
  • πŸ“‚ Firmware in.tgz or.zip format (official from the MIUI Downloads site or custom from the XDA Developers forum).

⚠️ Warning: If your Redmi Note 5A was purchased in China, check if the firmware is blocked for other regions.Some Chinese versions require additional manipulation with region unlock.

πŸ“Š Why do you flash Redmi Note 5A?
Update to the new version of MIUI
Installation of custom firmware
Recovery after failure
Unlocking the bootloader for rooting
Another option

Unlocking the bootloader: a mandatory step before the firmware

All Xiaomi smartphones have a bootloader by default, and without it, the firmware through the Fastboot is impossible. The process takes up to 72 hours (due to Xiaomi's security policy) and requires:

  1. Device binding to Mi Account (in phone settings).
  2. Submit applications for unlocking through the official Mi Unlock Tool app.
  3. Expect confirmation from Xiaomi servers.

Instructions for unlocking:

  1. Download Mi Unlock Tool from the official website and install it on PC.
  2. Turn on the developer mode on the phone (7 times click on the MIUI version in the settings) and activate OEM Unlock in the developer menu.
  3. Connect your phone to your PC in Fastboot mode (clip Volume Down + Power when the device is off).
  4. Launch the Mi Unlock Tool, log in to your Mi Account and follow the program's hints.

If the program is running a "Couldn't unlock" or "Device not connected" error:

  • πŸ”Œ Check the cable and port USB (try the rear port of the PC).
  • πŸ”„ Reinstall drivers manually through Device Manager (select Mi Flash Driver).
  • ⏳ Wait 3-7 days if Xiaomi server requires time to verify your account.

⚠️ Warning: Once the bootloader is unlocked, all data on the phone will be reset! and some features (like Find Device or Mi Pay) may stop working.

πŸ’‘

If the Mi Unlock Tool doesn’t see the device, try disabling the driver signature in Windows. To do this, type bcdedit /set nointegritychecks on on on the command line (on behalf of the administrator) and restart the PC.

Firmware selection: official MIUI vs custom builds

The type of firmware depends not only on the functionality, but also the stability of the Redmi Note 5A. Let’s consider the main options:

Type of firmwareAdvantagesDeficienciesWhere to download
Official MIUI (Stable)Maximum stability, support OTA-Updates, all functions work out of the box".It can contain bloatware (preinstalled applications), restrictions by region.MIUI Downloads
Official MIUI (Developer)New features are earlier than the stable version, less restrictions for developers.There may be bugs, more frequent updates (which can drain the battery).MIUI Downloads
LineageOS (Pixel Experience)Pure Android without Blaatware, extended support (relevant for older devices).The camera, NFC or other modules may not work. No OTA- updates.XDA Developers
Port from other devices (e.g. MIUI from Redmi 5)Sometimes it adds new features or improves performance.High risk of failure, errors with sensors or network.Forums of enthusiasts (not recommended for beginners).

For most users, the best choice is the official stable MIUI of the latest available version. If you want to get rid of advertising in MIUI or get a clean Android, look at LineageOS 16/17.1 (based on Android 9/10).

  • πŸ”“ The bootloader is already unlocked.
  • πŸ“² Established custom recovery (TWRP).
  • πŸ› οΈ Knowledge of fastboot and adb commands.

For the Redmi Note 5A, it is critical to avoid firmware with a lower version of Android (for example, if the phone was running Android 7, do not install firmware on Android 6), which will lead to an anti-rollback error and β€œbricking”.

What is an anti-rollback and why is it dangerous?
Anti-rollback is a protection mechanism in Xiaomi firmware that blocks the rollback to an older version of Android or MIUI. If you try to install firmware with a lower version number than the one already on the phone, the device will lock at the bootloader level and stop turning on. The only way to restore in this case is through the EDL- mode with an authorized Xiaomi account (which is difficult to do yourself).

Step-by-step: Firmware via Fastboot

When the bootloader is unlocked, the firmware is selected and the drivers are installed, you can start the main process. We will look at the firmware through the Mi Flash Tool, the official utility from Xiaomi.

β˜‘οΈ Firmware preparation

Done: 0 / 5

Step 1 Installation of the Mi Flash Tool

  1. Download the Mi Flash Tool from the official website (Tools section).
  2. Install the program by following the instructions (administrator rights are required).
  3. Run the utility on behalf of the administrator (right click β†’ Launch on behalf of the administrator).

Step 2: Preparation of firmware

  1. Download the firmware archive (e.g., ugg_global_images_V12.0.1.0.QCGMIXM_20210112.0000.00_7.1_global_1234567890.tgz) to a short-path folder (e.g., C:\MIUI\ugg).
  2. Inside, you should see a file called flash_all.bat (for Windows) or flash_all.sh (for Linux/Mac).

Step 3: Firmware via Mi Flash Tool

  1. Connect your phone in Fastboot mode (click Volume Down + Power before the Fastboot logo appears).
  2. In Mi Flash Tool, click Select and specify the path to the folder with the unpacked firmware.
  3. Select firmware mode: Clean all – complete cleaning (recommended when changing the version of MIUI); Clean all and lock – cleaning + lock the bootloader (only if you do not plan to experiment further); Save user data – saving user data (not always working correctly).

Refresh

Redmi Note 5A

Flash

Step 4: Completion

After successful firmware, the phone will automatically restart. It can take up to 15 minutes to start up -- don't interrupt! If the device has been stuck on the MI logo for longer than 20 minutes, try:

  • πŸ”„ Remove the battery (if removable) for 30 seconds.
  • πŸ“± Go to Recovery (Loudness up + Power) and make Wipe data.
  • πŸ”§ Repeat the firmware with a different mode (Clean all instead of Save user data).

⚠️ Warning: If the Mi Flash Tool is flashing "flash not done" or "critical partition flashing is not allowed," you are trying to flash the firmware with a lower version of the anti-rollback, which requires firmware to be run through EDL- mode or contact the service center.

πŸ’‘

Always check the firmware of the phone model (ugg or ugglite) and the anti-rollback version.

Solving typical firmware errors

Even with the correct following of the instructions, errors can occur, and let's consider the most common ways to eliminate them:

Mistake.Reason.Decision
device not found in Mi Flash ToolNo drivers or problems with USB- connection are installed.Reinstall drivers manually through Device Manager, try another cable/port.
anti-rollback check failTry to flash firmware with an older version of anti-rollback.Find firmware with the same or newer version of anti (check in the file name).
The phone does not turn on after the firmwareIncompatible firmware or interrupted process.Repeat the firmware with Clean All mode or run through EDL.
invalid sparse fileA damaged firmware file or lack of disk space.Download the firmware again, unpack into a folder on a disk with free space (minimum 5 GB).
Mi Flash Tool is 99% FreezingAntivirus conflict or memory partition problem.Disable the antivirus, try flashing from another PC or in Clean All mode.

If none of the methods worked, and the phone does not even include in the Fastboot, there are two options:

  1. Firmware via EDL- mode (requires an authorized Xiaomi account and a special cable).
  2. Contact the service center (if the device is guaranteed, inform that the firmware flew "by itself").

To run through EDL on Redmi Note 5A, you need to short test points on the board or use an authorized Xiaomi account with EDL rights. Self-manipulation of the board can lead to irreversible damage!

Custom firmware (TWRP + LineageOS)

If you don't like the official MIUI, you can install custom firmware, like LineageOS or Pixel Experience.

  1. Unlocked bootloader.
  2. Installed Custom Recovery (TWRP)
  3. The firmware is.zip (not for Fastboot!).

Step 1: Installation of TWRP

Download the current version of TWRP for Redmi Note 5A from the official website.

fastboot flash recovery twrp-3.7.0_9-ugg.img


fastboot boot twrp-3.7.0_9-ugg.img

Step 2. Firmware through TWRP

  1. Copy the firmware file (e.g., lineage-17.1-20210310-ugg.zip) to your phone.
  2. In TWRP, select Wipe β†’ Advanced Wipe and select Dalvik, Cache, System, Data.
  3. Press Install, select a firmware file and confirm the installation.
  4. Once completed, restart (Reboot β†’ System).

The first launch of custom firmware can take up to 15-20 minutes. If the device is stuck on the logo, try:

  • πŸ”„ Repeat firmware with full Wipe.
  • πŸ“² Install another kernel or firmware.
  • πŸ› οΈ Check firmware compatibility with phone modification (ugg or ugglite).

⚠️ Warning: Castom firmware often doesn't pass Google certification, so features like Google Pay or Widevine L1 (for Netflix viewing in HD) may not work.

Recovery after a failed firmware

If something goes wrong and the Redmi Note 5A doesn't turn on or hangs on the logo, don't panic. In most cases, the device can be restored.

Scenario 1: The phone is included in the Fastboot

If you click Volume Down + Power and the Fastboot logo appears, repeat the firmware through the Mi Flash Tool with Clean all mode. If the error repeats, try another firmware version (preferably the one that was originally on the phone).

Scenario 2: The phone doesn't respond to the buttons

This could mean:

  • πŸ”‹ Full battery discharge (plug in to charge for 30 minutes, then try to pinch Power + Volume up for 20 seconds).
  • πŸ› οΈ Loader damage (requires firmware via EDL).
  • πŸ’₯ Hardware failure (e.g. battery plume dump).

Scenario 3: The phone is loaded into a cyclical reboot (bootloop)

Reasons:

  • πŸ“± Incompatible firmware or kernel.
  • πŸ—ƒοΈ Damaged partitions of system or boot.

Decision:

  1. Download to TWRP (if installed) and make Wipe β†’ Format Data (carefully! This will delete everything, including internal memory!).
  2. Please run your firmware through Fastboot.

If none of the methods worked, and the phone does not respond even to the connection to the PC, you need to contact the service center, and tell the wizard that you need firmware through EDL with authorization, this will increase the chances of recovery.

FAQ: Frequent questions about the Redmi Note firmware 5A

Can I flash Redmi Note 5A without unlocking the bootloader?
No, you can't officially flash through Fastboot without unlocking the bootloader. The only workaround is through the EDL- mode, but you need an authorized Xiaomi account (usually only available from service centers).
How to find out the anti-rollback version of your firmware?
The anti-rollback version can be viewed in the firmware file name (e.g., V12.0.1.0.QCGMIXM is anti-rollback version 5). It can also be found through ADB command: adb shell getprop ro.build.version.incremental or in TWRP in the Info section.
Why is the camera or sensors not working after the firmware?
This is a typical problem when installing custom firmware. Reasons: Lack of proprietary drivers (you need to install vendor and firmware from stock firmware), kernel incompatibility with hardware (try firmware with another kernel), Solution: find a patch for your model on the XDA forum or return to the official MIUI.
How to return the official MIUI after custom firmware?
To return to stock firmware: Download the official Fastboot firmware from Xiaomi. Run it through the Mi Flash Tool with Clean all and lock mode (this will block the bootloader back). If necessary, unlock the bootloader again (if you plan to put the cast again).
Can I use Redmi Note 5A to save money?
Xiaomi’s official Recovery does not support firmware through.zip files – only.update updates in OTA format. To install firmware through Recovery, you first need to install TWRP (custom recovery).