How to flash Xiaomi Redmi Note 5A Prime via Fastboot: the complete guide from unlock to install firmware

Fastboot is one of the most reliable ways to bring the Xiaomi Redmi Note 5A Prime (codename ugg) back to life if it stops loading, freezes on the logo or requires updating to the current version of MIUI. Unlike Recovery, Fastboot allows you to install firmware even on a fully β€œbrick” device when the system does not respond to buttons.

However, the process has its nuances, from the mandatory unlocking of the bootloader to choosing the right firmware version for your modification (Prime differs from the standard version of the Redmi Note 5A in hardware and software support). In this article, we will discuss a unique algorithm for the 5A Prime model, taking into account its hardware features, which minimizes the risks of errors such as EDL mode or anti-rollback.

Preparation for firmware: what to do before the start

Before you start firmware, make sure you have everything you need. Xiaomi Redmi Note 5A Prime requires a special approach due to the closed MIUI ecosystem and the company's policy of locking the bootloader.

  • πŸ“± Battery charge of at least 60% – with a low charge, the device can turn off during firmware, which will lead to a hard brick.
  • πŸ’» Computer on Windows 7/10/11 (on macOS/Linux Possible problems with Qualcomm drivers).
  • πŸ”Œ Original. USB-cables – cheap cables often don’t transfer data to Fastboot.
  • πŸ”“ Unlocked bootloader (if you are stitching through an informal firmware).

Pay special attention to the firmware version. Two branches are relevant for the Redmi Note 5A Prime:

  • πŸ“¦ Stable MIUI β€” Stable versions with monthly security updates.
  • πŸ§ͺ Developer MIUI β€” Weekly builds with new features but possible bugs.
πŸ“Š What kind of firmware do you plan to install?
Official MIUI Stable
Official MIUI Developer
LineageOS (Pixel Experience)
I don't know, I need help.

If you are flashing the device for the first time, we recommend starting with a stable version. Custom firmware (for example, LineageOS) requires an unlocked bootloader and can deprive you of warranty.

⚠️ Attention: Fastboot firmware resets all data on the device. If the smartphone is still on, back up through Settings. β†’ Additionally. β†’ Backup or Mi Cloud Backup.

Unlock the bootloader on the Redmi Note 5A Prime

Without unlocking the bootloader, you can only install the official Xiaomi firmware via Fastboot. For custom firmware or modified cores, unlocking is mandatory. The process takes up to 72 hours due to Xiaomi's policy.

Instructions for unlocking:

  1. Link your Mi Account to your device: Go to Settings β†’ Mi Account β†’ Link your device.
  2. Activate USB debugging: go to Settings β†’ About Phone β†’ MIUI version (click 7 times to enable Developer Mode), then to Settings β†’ Additional β†’ Developers β†’ Debugging over USB.
  3. Install Mi Unlock Tool on your PC and log in to the same Mi Account.
  4. Connect your phone in Fastboot mode (press Power + Volume Down when the device is off) and follow the program instructions.

You will have to wait until you have sent the unlock request, you can check the status in the Mi Unlock Tool, and if you have a Couldn't unlock error, try again in 24 to 72 hours.

What if the Mi Unlock Tool can’t see the device?
Make sure Qualcomm drivers are installed (download them from Xiaomi's site. USB-port (preferably 2.0) Disable the antivirus, it can block the connection.

⚠️ Warning: Unlocking the bootloader resets the device to factory settings. If you plan to return to the official firmware after custom, the bootloader locks again.

Select firmware for Redmi Note 5A Prime

For the Redmi Note 5A Prime (ugg model), only firmware marked β€œPrime” is suitable. Installing firmware from the standard version of the Redmi Note 5A (ugglite) will lead to errors in the NFC module, camera or sensors.

Where to download the firmware:

  • 🌐 Official Xiaomi website: MIUI Downloads (select Global or China region depending on your model).
  • πŸ”§ Forum 4PDA: Redmi Note 5A (There are modified and custom assemblies).
  • πŸ“¦ Xiaomi Firmware Updater: firmware archive (convenient to search by ugg code).

Please note the Android version:

Redmi Note 5A Prime was released with Android 7.1 Nougat and received an update to Android 9 Pie.

Install firmware based on Android 10+ is possible only through custom builds (for example, LineageOS 17), but it requires experience.

Type of firmwareAndroid versionDownload linkDo you need unlocking?
MIUI Stable Global9.0 PieDownloadNo.
MIUI Developer China7.1–9.0DownloadNo.
LineageOS 16 (Android 9)9.0 PieXDAYes.
Pixel Experience10.0 QXDAYes.

Before downloading, check the hash amount of the file (usually indicated on the site), which will help to avoid errors when firmware due to broken archives.

Installation of drivers and preparation of PC

Without the right drivers, Windows won’t recognize Redmi Note 5A Prime in Fastboot mode.

  1. Qualcomm Drivers: Official Page
  2. Mi Flash Tool: Download the latest version (for firmware via Fastboot).
  3. ADB and Fastboot: Included in Android SDK Platform-Tools.

After installing the drivers, check the connection:

  1. Turn off the phone.
  2. Press Power + Volume Down to log in to Fastboot.
  3. Connect to your PC and type in the command line: fastboot devices If the device is displayed (for example, 1234567890abcdef fastboot), the drivers are installed correctly.

πŸ’‘

If the fastboot device command doesn’t show the device, try disabling the driver signature in Windows: run the command prompt on behalf of the administrator and perform bcdedit/set nointegritychecks on, then restart the PC.

Step-by-step instructions for firmware through Fastboot

Now, to the process itself, we'll look at two options: firmware through the Mi Flash Tool (for official firmware) and Fastboot commands (for power users).

This method is suitable for installing official MIUI firmware.

β˜‘οΈ Preparation for firmware through Mi Flash Tool

Done: 0 / 4
  1. Unpack the downloaded firmware (.tgz file) into a folder, for example, C:\MIUI\ugg_global_images_....
  2. Run the Mi Flash Tool on behalf of the administrator.
  3. Click Select and point the way to the firmware folder.
  4. Connect your phone in Fastboot mode.
  5. In the program, press Refresh - the device should appear.
  6. Select firmware mode: πŸ”„ Clean all – complete cleaning (recommended when changing version) MIUI). πŸ“¦ Clean all and lock - cleaning + Loader lock (only for official firmware!). πŸ”§ Save user data – data retention is not always stable).

Flash

Method 2: Fastboot commands (for power users)

This method gives more control and is suitable for custom firmware or individual components (e.g. boot.img only).

Open the command line in the firmware folder (where the images files are located) and do:

fastboot flash boot boot.img


fastboot flash recovery recovery.img




fastboot flash system system.img




fastboot flash vendor vendor.img




fastboot flash modem NON-HLOS.bin




fastboot flash fsb fsb.img




fastboot flash bluetooth BTFM.bin




fastboot flash dsp dspso.bin




fastboot flash logo logo.bin




fastboot flash bootloader bootloader.img




fastboot flash radio radio.img




fastboot flash tz tz.mbn




fastboot flash rpm rpm.mbn




fastboot flash hyp hyp.mbn




fastboot flash keymaster keymaster.mbn




fastboot flash cmnlib cmnlib.mbn




fastboot flash cmnlib64 cmnlib64.mbn




fastboot flash devcfg devcfg.mbn




fastboot flash aboot emmc_appsboota.mbn




fastboot flash abootb emmc_appsbootb.mbn




fastboot flash splash splash.img




fastboot flash cust cust.img




fastboot flash cache cache.img




fastboot flash userdata userdata.img




fastboot reboot

If you are flashing custom firmware, some files (for example, vendor.img) may be missing – skip them.

⚠️ Note: When running through Fastboot commands, don’t interrupt the process, even if it’s stuck in the sending β€˜system’ phase. 5A Prime is normal and can take up to 15 minutes.

Common mistakes and their solutions

Even with the correct instructions, errors can occur, and here are the most common ones and how to correct them:

Mistake.Reason.Decision
fastboot: error: Failed to boot into fastbootdThe wrong version of Fastboot or drivers.Update Platform-Tools and reinstall Qualcomm drivers.
This package is for "ugg" devices; this is a "ugglite".The firmware is not suitable for the Prime version.Download the firmware marked ugg, not ugglite.
Anti-rollback check failTrying to install an older version of MIUI.Sweep through a newer firmware or use EDL mode (requires an authorized Xiaomi account).
The phone does not turn on after the firmwareIncorrectly selected mode in Mi Flash Tool or broken firmware.Repeat the firmware with a full clean (Clean all).

If the device does not respond to buttons and does not boot, try to log into EDL mode (emergency mode):

  1. Turn off the phone.
  2. Press Volume Up + Volume Down and connect to the PC.
  3. Install firmware through the Mi Flash Tool in EDL mode (Mi Account authorization required).

πŸ’‘

If the phone is stuck on the MI logo after the firmware, wait 10-15 minutes β€” the first download can take a long time.

What to do after the firmware

After successful firmware Redmi Note 5A Prime will require initial configuration:

  1. Select the language and region (for Global firmware, we recommend Russia or India – there are no restrictions on Google).
  2. Connect to a Wi-Fi network and log in to your Mi Account (if required).
  3. Update Google Play Services and other apps through the Play Market.
  4. Check the operation of the main functions: πŸ“Ά Network: calls, mobile Internet, Wi-Fi. πŸ“· Camera: front and main. πŸ”‹ Charging: Connect the charger. πŸ” Fingerprint sensor (if any).

If something is not working (for example, it is not determined) SIM-map), probably not suitable for your region. Try changing it to Global Stable.

πŸ’‘

After you have firmware custom (like LineageOS) install GApps (Google Apps) through Recovery, otherwise there will be no Play Market or other Google services.

FAQ: Answers to Frequent Questions

Can I flash Redmi Note 5A Prime without unlocking the bootloader?
Yes, but only official firmware Xiaomi through the Mi Flash Tool. for custom firmware (LineageOS, Pixel Experience) unlock is mandatory.
How do I know if the bootloader is unlocked on my phone?
Turn off your phone and press Power + Volume Up to enter Recovery. If the bottom of the screen says This device is unlocked, the bootloader is unlocked.
What if the Mi Flash Tool gives you a flash error called "Flash Done. Reboot to system manually"?
This is not a bug, but a notification of a successful firmware: disconnect the phone from the PC, press the Power for 10-15 seconds to force the device to restart.
Can I roll back the firmware to an older version?
Technically, yes, but Xiaomi uses the Anti-Rollback mechanism, and if you try to roll back, the device can lock, and we recommend that you flash only new versions.
Where to get the firmware for Redmi Note 5A Prime if the official website is not working?
Alternative sources: πŸ”— Xiaomi Firmware Updater πŸ”— Forum 4PDA (Redmi Note 5A) πŸ”— SourceForge (firmware archive)