Reflashing Xiaomi Redmi Note 5: a complete guide to unlock the bootloader

Why users are flashing Redmi Note 5 and when you really need it

Xiaomi Redmi Note 5 (codenamed whyred) is still popular among customization enthusiasts despite its launch in 2018. The main reasons for flashing are to install the current version of Android (official updates have long been discontinued), remove preinstalled MIUI software, improve performance or restore the device after a software failure. However, firmware through informal methods automatically voids the warranty and can lead to a β€œbrick” (complete failure) if errors occur in the process.

It is important to understand the difference between firmware types: Official (from Xiaomi) updates via Settings β†’ About Phone β†’ System Update and does not require unlocking the bootloader. Custom (for example, LineageOS, Pixel Experience) is installed via TWRP and gives access to new versions of Android, but deprives the user of data encryption and some camera functions. Stock modified (for example, MIUI EU) retains the branded interface, but removes Chinese services and advertising.

When is the firmware really needed?

βœ… The device brakes or overheats on the stock MIUI.

βœ… Android is required 12/13 instead of official Android 8.1 (latest version for Note 5).

βœ… You need to remove Bloatware (pre-installed Chinese apps).

βœ… The smartphone will not turn on after a failed update (bootloop").

❌ Don’t stitch it up if you just want to β€œtry something new” – the risk outweighs the benefits.

Preparation for firmware: what to do before the start

Unprepared firmware is the main reason for the "bricking" Redmi Note 5.

  • πŸ”‹ Battery charge of at least 60%, and when discharged during the process, the device can turn into a brick".
  • πŸ’» Computer on Windows 10/11 (for the Mi Flash Tool or Linux/macOS (For fastboot through the terminal, virtual machines are not suitable!
  • πŸ”Œ Original. USB-Cheap cables often don't transmit data in fastboot mode.
  • πŸ“± Backup of all the data. The firmware formats the partition. /data, The restoration of information is not possible.

It will also be necessary:

βœ” Firmware (official or custom) for your model. 5 (whyred) tagged files are appropriate whyred_global or whyred_images.

βœ” Mi Unlock Tool to unlock the bootloader (if it is blocked).

βœ” ADB Fastboot (part of Google’s Platform Tools).

βœ” Drivers for Xiaomi (installed automatically when connected to a PC in fastboot mode).

πŸ“Š You’ve already done Xiaomi before?
Yes, many times.
Yeah, but long ago.
No, first time.
I tried it, but it turned out a brick.

Warning about unlocking the loader:

⚠️ Attention: Xiaomi links the unlock to the Mi Account. If you forget your password or delete your account, it will be impossible to restore access to the bootloader. DRM-The key that will stop Widevine L1 (no HD Netflix, Disney.+ and other services).

Unlocking the loader: step-by-step instructions

The bootloader on the Redmi Note 5 is locked by default.

  1. Link your device to your Mi Account: Go to Settings β†’ Mi Account β†’ Sync and enable device find.
  2. Enable Developer Options: Open Settings β†’ About Phone and 7 times click on MIUI Version. Then go back to Settings β†’ Additional β†’ For Developers and activate USB Debugging and OEM Unlock.
  3. Connect the phone to the PC, confirm the debugging permission and execute in the terminal: adb reboot bootloader The device will reboot in fastboot mode (black screen with a rabbit and the inscription FASTBOOT).
  4. Download Mi Unlock Tool from the official website, log in to your Mi Account and follow the instructions of the program. the process will take up to 72 hours (Xiaomi imposes a wait for new accounts).

Unblocking errors and their solutions:

Mistake.Reason.Decision
Couldn’t unlockThe account is not tied to the deviceLog in to the Mi Account on your phone and turn on Find the device
Current account is differentThe phone was linked to another account.Untie the old device in your personal account
Device is lockedIt was 72 hours since the first attempt.Wait or use another account (risk of blocking)

Mi Account linked to device | USB |OEM |OEM enabled debugging enabled |ADB/Fastboot drivers installed |Mi Unlock Tool-->

⚠️ Note: Once the bootloader is unlocked, all data, including photos in internal memory, will be reset, and some banking applications (such as SberBank Online) may stop working due to the lack of SafetyNet certificate.

Install firmware via Fastboot (official method)

The fastboot method is suitable for installing official Xiaomi firmware (files with the extension.tgz or.zip from the MIUI Downloads section) It is more reliable than using Recovery, but requires a computer.

Step-by-step:

  1. Download the firmware for Redmi Note 5 (whyred) and unpack it into a folder with Platform Tools (where fastboot.exe and adb.exe are located).
  2. Transfer the phone to fastboot mode: adb reboot bootloader Or turn off the device and press Power + Volume down.
  3. Connect your phone to your PC and check for device detection: fastboot devices should show a serial number.
  4. Run the firmware: For Windows: flash_all_except_storage.bat For Linux/macOS: chmod +x flash_all_except_storage.sh./flash_all_except_storage.sh Attention: Script flash_all.bat Deletes all data, including internal memory!

If the process is suspended on Waiting for device:

βœ… Check the cable and port USB (try USB 2.0 instead of 3.0).

βœ… Install drivers manually through Device Manager (select Android Bootloader Interface).

βœ… Disable the antivirus (it can block fastboot).

πŸ’‘

If the phone doesn’t turn on after firmware, try pinching Power + Volume up for 10 seconds for a forced reboot.

Installation of custom firmware through TWRP

To install LineageOS, Pixel Experience or other custom firmware, you will need TWRP Recovery, an alternative recovery menu. The official version for whyred can be downloaded from twrp.me.

Instructions for installing TWRP:

  1. Download the image twrp-3.7.0_9-0-whyred.img (Or newer) and put it in a folder with Platform Tools.
  2. Translate your phone to fastboot and execute: fastboot flash recovery twrp-3.7.0_9-0-whyred.img fastboot boot twrp-3.7.0_9-0-whyred.img The phone will load into TWRP.
  3. In TWRP, go to Wipe β†’ Format Data, type in yes and confirm. This will remove encryption and allow custom firmware to be installed.

Installation of custom firmware:

  1. Download firmware (e.g. LineageOS 20 for whyred) and GApps (if you need Google services) on OpenGApps (select arm64 β†’ 11.0 β†’ pico).
  2. Transfer files to your phone (via the phone) MTP into TWRP or SD-map).
  3. In TWRP, select Install, specify the firmware file, then add GApps (if necessary) and swipe for installation.
  4. Once complete, press Reboot System. The first run can take 10-15 minutes.
What to do if TWRP asks for a password
If after installation, TWRP requests a password, it means that the /data partition is encrypted. Solution: 1. In TWRP, select Wipe β†’ Format Data (this will delete all data!). 2. Reboot to TWRP and re-install the firmware. 3. If it doesn't help, go back to stock MIUI via fastboot and start over.

Solving common errors in firmware

Even with the correct following of the instructions, problems can arise, and here are the most common ways to eliminate them:

Mistake.Reason.Decision
Error: Failed to boot into fastbootLoader damaged.Try to pinpoint Power + Volume down for 30 seconds. If it doesn't work, you need to sell EDL.
Invalid sparse file format at headerFirmware file damagedDownload the firmware again (preferably via torrent) and check the MD5 checksum.
Device is locked. Relockingbootloader locked after failed unlockWait 72 hours and re-unlock through the Mi Unlock Tool.
Phone vibrates and turns off after MI logoIncompatible firmware or damaged boot-partitionInstall stock firmware via fastboot with full formatting (flash_all.bat).

If the phone does not respond to buttons and is not detected by a computer:

βœ” Try charging it. 1-2 Sometimes a battery is drained and blocks access to fastboot.

βœ” Use Testpoint (closing contacts on the board) to transfer to EDL mode (requires a soldering iron and experience).

βœ” Contact the service center – self-repair without skills can aggravate the problem.

πŸ’‘

If the sensor, Wi-Fi or camera doesn’t work after the firmware is installed, chances are you’ve installed firmware for another model (like the Redmi Note 5 Pro instead of the Redmi Note 5).

Recovery of IMEI and serial number after firmware

When installing custom firmware or unofficial MIUI builds, the /persist partition, where the IMEI, serial number and calibration data of the NFC module, can be erased. Without IMEI, the phone will not catch the network, and without a serial number, it will not be possible to activate some functions (for example, Mi Pay).

To restore the IMEI:

  1. Find out the original IMEIs: These are listed on the device box and under the battery (on the sticker).
  2. Install MIUI via fastboot (any official version).
  3. Download. QCN Rebuilder and create a file whyred_qcn.qcn yours IMEI.
  4. Sweat QCN through QPST or Maui META in Diag mode (to do this, you need to enable Diag Mode via the engineering menu: ##36446337##).

⚠️ Attention: Incorrect recording IMEI It can lead to a network lock by an operator. Use only the original values from the box! IMEI On phones with MediaTek (e.g. Redmi Note 5 on Snapdragon 636), you need special tools like this. SN Writer or Maui META.

FAQ: Frequent questions about the Redmi Note firmware 5

Can I flash Redmi Note 5 without unlocking the bootloader?
No. Any unofficial firmware (including stock MIUI via fastboot) requires an unlocked bootloader. The only exception is an update through Settings β†’ System Update, but it only works for official versions.
Will I lose my warranty after I have been slapped?
Xiaomi will cancel the warranty when unlocking the bootloader or installing custom firmware, but most service centers can return the stock firmware before contacting the warranty (unless the problem is related to hardware).
Which is the best custom firmware for the Redmi Note 5 in 2026?
Current options: LineageOS 20 (Android 13) - stable, but without branded features Xiaomi. Pixel Experience (Android 13) - interface like Google Pixel, but there may be bugs with the camera. MIUI EU (weekly builds) - stock MIUI without Chinese applications. Havoc-OS - maximum customization, but less stable. For everyday use, we recommend LineageOS or MIUI EU.
How to return the stock firmware if the phone does not turn on?
If the device doesn't boot, but it's determined in fastboot: Download the official firmware for whyred. Unpack it and launch it. flash_all.bat (Windows or flash_all.sh (Linux/macOS). If the phone is not responding, try the mode. EDL (requires an authorized Xiaomi account or a UFi box. If the device is not identified at all, contact the service.
Can I use the Redmi Note 5 to make it OTG-computer-free?
Technically, yes, but it's extremely unreliable. TWRP It's a computer (you can't do without it). OTG-The storage device. TWRP But without a PC, you can't unlock the bootloader or restore the device in case of an error.