How to reflash Xiaomi Redmi Note 5 Pro: a complete guide to unlock the bootloader

Xiaomi Redmi Note 5 Pro (codenamed Whyred) remains a popular smartphone even years after its release, thanks to its powerful hardware and strong support for custom firmware. However, standard software from Xiaomi eventually begins to slow down, and official updates stop coming out.

In this guide, we will analyze all the ways of flashing: from official updates via MIUI Updater to install custom builds via TWRP and Fastboot. Particular attention will be paid to unlocking the bootloader - without it it it is impossible to install alternative software. You will also learn how to avoid typical errors (for example, Anti-Rollback or EDL Mode) and what to do if the smartphone stopped turning on after firmware.

Preparation for Firmware Reflashing: What You Need to Know Before Starting

Flashing is not just a system upgrade, it's a complete software replacement. The wrong actions can lead to data loss, device locking, or even physical damage to the board. Before you start, answer three key questions:

  • πŸ”Ή Why do you need it? Want to speed up your smartphone, install a fresh version of Android or fix bugs?
  • πŸ”Ή What type of firmware do you choose? Official (stable/developer), custom (like LineageOS or Pixel Experience) or stockware with modifications?
  • πŸ”Ή Are you prepared for the risks? Loss of warranty, possible brick, and the need for manual repair.

If you're a beginner, start with the official firmware through MIUI Updater, which is the safest method. For experienced users, installing via Fastboot or TWRP will be fine, but you'll need to unlock the bootloader and work with the command line.

⚠️ Warning: The Redmi Note 5 Pro has Anti-Rollback protection, which means you can't roll back to an older version. MIUI after updating to a certain firmware (for example, with MIUI 9 MIUI Trying to do this will lead to a brick-y device!

Type of firmwareDo you need to unlock the bootloader?Data loss?Difficulty
Official (via MIUI Updater)❌ No.❌ Not if the update)⭐
Official (via Fastboot)βœ… Yes.βœ… Yes (full reset)⭐⭐
Custom (via TWRP)βœ… Yes.βœ… Yeah (unless you back up)⭐⭐⭐
Recovery through EDLβœ… Yes (Xiaomi's authorization)βœ… Yes.⭐⭐⭐⭐
πŸ“Š What kind of firmware you plan to use?
Official Update via MIUI Updater
Installation via Fastboot
Custom firmware through TWRP
Recovery through EDL
I haven't decided yet.

Step 1: Unlock the bootloader on the Redmi Note 5 Pro

Without the bootloader, you can’t install custom software or official firmware through Fastboot. Xiaomi requires account confirmation for this operation, and the process takes up to 720 hours (30 days) of waiting.

  1. Connect your device to your Mi Account Go to Settings β†’ Mi Account and log in. Make sure your account is free of restrictions (for example, it is not blocked for suspicious activity).
  2. Activate USB Debugging In Settings β†’ About your phone, click 7 times on the MIUI version to turn on Developer Mode. Then in Settings β†’ Additional β†’ For developers, turn on USB Debugging and OEM Unlock.
  3. Connect to Mi Unlock Tool Download the official utility from Xiaomi, install it on your PC and log in under the same account as on your phone. Connect Redmi Note 5 Pro in Fastboot mode (click Volume Down + Power When your phone is off).
  4. Start the unlock process In the utility, press Unlock. If you do this for the first time, you'll see a 30-day wait message. Try again every 24 hours until the timer is reset.

⚠️ Note: If you bought Redmi Note 5 Pro used, the previous owner could have linked the device to his Mi Account. In this case, unlocking without his data is impossible - you will need to contact Xiaomi with proof of purchase.

Mi Account linked to device

USB debugging and OEM unlocking enabled

Installed ADB/Fastboot drivers on PC

Download the latest version of the Mi Unlock Tool

Battery Charge > 60%-->

Step 2: Install the official firmware through Fastboot

If you need clean official firmware (for example, to recover from a crash or remove custom software), the best way to do this is to flash it through Fastboot. This method is also useful if the smartphone is not turning on or stuck on the MI logo.

You'll need:

  • πŸ–₯️ Computer with Windows/Linux and established ADB/Fastboot.
  • πŸ”Œ Cable USB (preferably original).
  • πŸ“± Firmware in.tgz format for whyred (you can download it on the official website).
  • πŸ”§ The Mi Flash Tool (download here).

Instructions:

  1. Unpack the firmware in a folder without Cyrillic characters (for example, C:\MIUI\whyred_global_images_...).
  2. Launch the Mi Flash Tool, press Select and specify the path to the firmware folder.
  3. Connect the Redmi Note 5 Pro turned off in Fastboot mode (clamp Volume down + Power).
  4. In the utility, press Refresh - a device with an ID should appear.
  5. Select firmware mode: Clean all - complete cleaning (recommended in case of failures); Clean all and lock - cleaning + lock bootloader (if you want to return the warranty); Save user data - data storage (not always stable).

Flash

πŸ’‘

If the Mi Flash Tool is a can't find fastboot error, try running it on behalf of the administrator or update the drivers using the Android SDK Platform Tools.

Step 3: Install custom firmware through TWRP

Custom firmware (such as LineageOS, Pixel Experience or HavocOS) provide advanced settings, fresh Android versions and no bloat from Xiaomi. TWRP β€” custom recovery.

Pre-launch warnings:

  • 🚨 Anti-Rollback protection also applies to custom firmware.
  • 🚨 Some firmware may not support the camera or VoLTE – check the reviews on forums (e.g., the app, XDA).
  • 🚨 Backup is a must! Without it, you can't recover data from firmware.

Step-by-step:

  1. Install TWRP Download the latest version of TWRP for whyred (e.g., from here). Rename the file to twrp.img and place it in a folder with ADB. Follow the command: fastboot flash recovery twrp.img fastboot boot twrp.img
  2. Make a backup in. TWRP Select Backup and select Boot, System, Data, EFS. Save the backup on SD-card.
  3. So, you can run the firmware. ZIP-a firmware file (e.g. LineageOS 20) and place it on your phone. TWRP Choose the Wipe β†’ Advanced Wipe and mark Dalvik, Cache, System, Data. Then press Install and select ZIP-file.
  4. For Google services, download OpenGapps (select ARM64 platform, Android 10/11/12) and install it similarly to firmware.
  5. Reboot After installation, press Reboot System. The first run can take up to 15 minutes.
What to do if TWRP asks for a password?
If you have previously used data encryption in MIUI, TWRP will require a password to decrypt the /data partition. To get around this: 1. In TWRP, select Wipe β†’ Format Data (this will delete all data!). 2. Reboot to recovery and re-install the firmware. 3. If it doesn't, run the stock firmware through Fastboot and start over.

Step 4: Update via MIUI Updater (without unlocking)

If you don’t need custom firmware, but just need to update MIUI to the latest version, use the built-in MIUI Updater, which does not require unlocking the bootloader and saves all the data.

How to update:

  1. Go to Settings β†’ About the phone β†’ System update.
  2. Click on the three dots in the top right corner and select Select Service Pack.
  3. If an update is available, download it (or download it in advance from the official website and select the file manually).
  4. Wait for the check and click Reboot and Update.

If the update is β€œhang” during the verification phase:

  • πŸ”„ Restart your phone and try again.
  • πŸ”Œ Connect to another Wi-Fi network (sometimes Xiaomi servers are blocked by providers).
  • ⏳ Wait 1-2 days – sometimes updates roll out gradually.

πŸ’‘

Official updates via MIUI Updater are the only way to get firmware without losing warranty and unlocking the bootloader, but they often contain bloatware and ads.

Step 5: Restore the Brick through EDL Mode

If the Redmi Note 5 Pro doesn’t turn on, is stuck on the MI logo, or shows a Fastboot Mode error, but the Mi Flash Tool doesn’t help – there’s a last chance: EDL (Emergency Download Mode) mode. This method requires authorization through a Xiaomi account and a special cable (or circuit of contacts on the board).

What you need:

  • πŸ–₯️ PC with Qualcomm QDLoader and Mi Flash Tool installed.
  • πŸ”Œ EDL-cable (or ability to solder test points).
  • πŸ“± Firmware in.mbn format (for example, EDL firmware for whyred).
  • πŸ”‘ Authorization in Mi Account (without it, Xiaomi will block the firmware).

Instructions (simplified):

  1. Connect the phone in EDL mode (this may require disassembling the device and closing contacts on the board).
  2. In the Mi Flash Tool, select the firmware.mbn and press Flash.
  3. Wait until the process is completed (it can take up to 30 minutes).
  4. Turn off the phone and try to turn it on (the first run is long).

⚠️ Attention: Method EDL If you are not sure about your skills, contact the service center. Also note that Xiaomi can block an account for frequent use. EDL (suspicion).

Solving typical firmware errors

Even if you follow the instructions accurately, you can get errors, and here are the most common ways to correct them:

Mistake.Reason.Decision
This package is for "whyred" devices; this is a ""The firmware is not suitable for your model.Download the firmware for Redmi Note 5 Pro (whyred).
Anti-Rollback Check FailTrying to revert to the old version of MIUI.Try a newer version or the same version.
Device is locked in the Mi Flash ToolThe bootloader is not unlocked.Unlock the bootloader through the Mi Unlock Tool.
TWRP asks for password after installationThe data is encrypted (FDE or FBE).Format /data to TWRP or type in an old PIN.
The phone does not turn on after the firmwareIncompatible firmware or interrupted process.Try flashing through Fastboot or EDL.

If the error is not shown in the table:

  • πŸ” Find a solution on XDA-Developers or 4PDA.
  • πŸ“Έ Take a picture of the screen with an error and ask a question in thematic chats (for example, in Telegram channels on Xiaomi).
  • πŸ”„ Try repeating the firmware from another PC or cable.

FAQ: Frequent questions about the Redmi Note firmware 5 Pro

Can I flash Redmi Note 5 Pro without unlocking the bootloader?
Yes, but only through MIUI Updater (official updates). To install custom firmware or firmware through Fastboot, unlocking is mandatory.
How do I find the Anti-Rollback version on my device?
Enter the command in the engineering menu ##4636##, Then go to the phone information. Look for the line. anti_version. You can also see the version in Fastboot command: fastboot getvar anti
Will I lose my IMEI after I get the firmware?
IMEI stored in EFS. If you were backing up. EFS into TWRP or did not format this section, IMEI Otherwise, it can be restored through an engineering menu or specialized utilities (for example, in the case of a computer, SN Writer Tool for Qualcomm).
Which custom firmware is better to choose for the Redmi Note 5 Pro?
Popular options: LineageOS is pure Android without bloat. Pixel Experience is an interface like Google Pixel. HavocOS is maximum customization. MIUI EU is the official MIUI without Chinese apps. Before choosing, check your model support on XDA.
How to return the warranty after the firmware?
Theoretically, you can flash the official firmware through Fastboot with the Clean all and lock option, but: πŸ”΄ Xiaomi can determine the fact of unlocking by logs. πŸ”΄ Some service centers check the status of the loader with special utilities. 🟒 If the warranty case is not related to the software (for example, a broken screen), there are chances of repair.