How to reflash Xiaomi Redmi Note 4: official and custom firmware

Xiaomi Redmi Note 4 (codenamed mido) remains one of the most popular smartphones for firmware experiments even 7 years after its release, the reasons are obvious: reliable hardware (Snapdragon 625), removable battery and a huge community that supports the device with current builds. However, the firmware of this device has nuances that many forget about – from locking the bootloader to problems with anti-rollback.

In this article, you will find 3 proven ways to flash: through the official Mi Flash Tool, using the custom TWRP recavator, as well as instructions for installing LineageOS or Pixel Experience. We will analyze how to avoid the device's blink if the firmware is wrong downgrade (relevant for MIUI versions below 9.5.2.0), what drivers are needed for Windows 11, and what to do if the smartphone is stuck on the Mi logo after a failed firmware.

1. Preparation for flashing: what to do before the start

The first step is to save all data. Fastboot or TWRP flashing erases the device's internal memory, including photos, contacts and messages. Use Mi Cloud, Google Photos or physical copying on your PC.

  • πŸ“± IMEI (Write it down via *#06# - useful for network recovery after firmware)
  • πŸ”‘ Mi Account (make sure you remember the login / password - without it, you can not unlock the bootloader)
  • πŸ“‘ Settings APN (Take pictures or export if you use non-standard mobile internet settings)

The second critical point is to check the version of the bootloader. 4 There are two versions: mido (global/Chinese) and mido_india (You can't install firmware from another modification, which will cause the communication module to be completely inoperable. β†’ The phone. β†’ Version. MIUI (the last symbols after the dot, for example NMF26Q global).

πŸ“Š What kind of firmware do you plan to install?
Official MIUI (Stable/Developer)
LineageOS or Pixel Experience
Other custom (AOSP, HavocOS, etc.)
I haven't decided yet.

Also prepare:

  • πŸ–₯️ Windows PC 7/10/11 (on macOS/Linux Possible problems with Qualcomm drivers)
  • πŸ”Œ Original. USB-cable (cheap cables may not transmit data to Fastboot)
  • πŸ”‹ Battery charge of at least 60% (when discharged during firmware, the risk of a breeze increases)

πŸ’‘

If you’re reflashing the Redmi Note 4 for the first time, start with the official firmware through the Mi Flash Tool – this is the safest way, as it doesn’t require unlocking the bootloader on new devices (unless you’ve done it before).

2 Unlock the loader: without this can not do

Xiaomi blocks the bootloader on all devices, including the Redmi Note 4. Without unlocking, you can flash only official versions of MIUI through the Mi Flash Tool. Unlocking is mandatory for custom firmware (TWRP, LineageOS) or modified MIUI (xiaomi.eu).

The process takes up to 72 hours (due to Xiaomi’s policy) and consists of three stages:

  1. Linking your Mi Account to your device: - Enable Settings β†’ Additional β†’ Developers β†’ Unlock OEM - Go to Settings β†’ Mi β†’ Mi Unlock Status account and link the device to your account
  2. Download Mi Unlock Tool: - Official utility: en.miui.com/unlock (version no lower than 5.5.224.30)
What if Mi Unlock Tool says "Couldn't unlock"?
This error occurs if: - You try to unlock too often (wait 30 minutes between attempts) - Use an unoriginal cable or USB-Hub - Utility version is outdated (download the latest from the official website) - Mi Account is not tied to the device (check in Mi Unlock Status) Solution: try another PC, disable the antivirus and use the back USB-port (on laptops, the front port may not provide enough power).

⚠️ Warning: Once the bootloader is unlocked, the smartphone will automatically reset to factory settings. All data will be deleted, including files on internal memory.

3. Install official firmware via Mi Flash Tool

This method is suitable if you want to:

  • πŸ”„ Back on the stock. MIUI post-stitch
  • 🐌 Fix system errors without loss of warranty
  • πŸ”’ Update to the latest version without unlocking the bootloader

Step-by-step:

  1. Launch Mi Flash Tool: - Select folder with unpacked firmware - Connect phone in Fastboot mode (click Volume Down + Power) - Press Refresh, then Flash

Make sure the firmware model matches your device|Disable the antivirus (it can block Mi Flash)|Use the back. USB-port 2.0 (not 3.0!)|Do not disconnect the cable until the process is complete (10-15 minute)

-->

⚠️ Note: If you are running an older version than the one you are currently running (e.g., with a MIUI 10. MIUI 12), be sure to reset to factory settings after firmware through Settings β†’ Additionally. β†’ Recovery and reset. Otherwise, errors with bootloop (infinite reboot) are possible).

Type of firmwareCompatibilityDo you need unlocking?Firmware time
Official (Fastboot)Any version of MIUINo.10-15 minutes.
Official (Recovery)Only a new version.No.5-10 minutes
Castomium (TWRP)Only after unlocking.Yes.15-30 minute
Port firmware (e.g. xiaomi.eu)Requires patched TWRPYes.20-40 minutes.

4. Install custom firmware through TWRP

To install LineageOS, Pixel Experience or other AOSP-You will need a custom recycler. TWRP. There are two versions for Redmi Note 4 TWRP:

  • πŸ”§ Official (from TeamWin) – supports encryption, but may not work with some custom firmware
  • πŸ› οΈ Unofficial (OrangeFox) - better compatibility with AOSP, but requires manual installation

Instructions for installing TWRP:

  1. Download the latest TWRP image for mido: - Official: twrp.me - OrangeFox: orangefox.download
  2. Rename the file to twrp.img and place it in a folder with fastboot
  3. Connect your phone in Fastboot mode and execute the command: fastboot flash recovery twrp.img
  4. Immediately after that, execute: fastboot boot twrp.img (this will load the phone into TWRP without overwriting the stock recave)

⚠️ Attention: If after installation TWRP You will immediately reboot to the system, stock recavery MIUI re-write TWRP. To avoid this, in TWRP Go to Reboot. β†’ Recovery.

Installation of custom firmware:

  1. Download firmware (e.g. LineageOS 18.1) and GApps (if you need Google services)
  2. Transfer files to your phone or flash drive (FAT32 format)
  3. In TWRP, run: - Wipe β†’ Advanced Wipe (tag Dalvik, Cache, System, Data) - Install β†’ Select firmware β†’ Swipe to Confirm - Repeat for GApps (if necessary)
  4. Restart to the system (the first start can take up to 10 minutes)

πŸ’‘

Always check firmware compatibility with your device’s bootloader version. For example, Android 10+-based firmware won’t work on Redmi Note 4 with a bootloader older than 2019 without patches.

5. Solving common firmware errors

Even with the right instructions, there can be problems, and here are the most common ways to solve them:

Mistake.Reason.Decision
Fastboot: FAILED (remote: 'Flashing is not allowed in Lock State')The bootloader is not unlockedUnlock the bootloader through the Mi Unlock Tool
Phone stuck on Mi logo after firmwareIncompatible firmware or no resetDownload to TWRP and run Wipe β†’ Format Data (enter yes)
E: Unknown command [log] in TWRPDamaged TWRP imageReinstall TWRP from another version (e.g. OrangeFox)
No network after firmwareDisparity of modification (mido/mido_global)Sweat the correct version or restore modem via TWRP
Mi Flash Tool doesn't see the deviceThere are no Qualcomm driversInstall drivers manually through Device Manager

If your IMEI is missing or your mobile network is not working, restore it using the SN Write Tool (requires authorization through your Xiaomi account).

  1. Download the SN Write Tool and drivers
  2. Enter Meta Mode (Put Volume Up + Volume Down + Power on the phone off)
  3. Connect your phone and follow the instructions (IMEI is indicated without the last digit)

6 How to Return Stock Firmware After Failed Experiments

If after installing custom firmware, the device is unstable (for example, quickly discharges, overheats or does not support some functions), the best option is to return to the official MIUI.

  1. Download the latest stable firmware for your modification (mido_global mido)
  2. Unpack the archive and find the file. flash_all.bat (for Windows or flash_all.sh (for Linux/macOS)
  3. Connect your phone in Fastboot mode and launch the script: flash_all.bat (If the script does not start, use manual commands: fastboot flash boot boot.img fastboot flash recovery recovery.img fastboot flash system system.img fastboot flash userdata userdata.img)
  4. Reset with Mi Recovery (Wipe Data β†’ Wipe All Data)

⚠️ Note: If you have installed a custom recavator (TWRP), The stock firmware will re-write it to save it. TWRP, After the firmware, immediately perform:

fastboot boot twrp.img

already TWRP plough disable_dm-verity_forceencrypt.zip (Otherwise, the system may be stuck on the load).

7.Firmware optimization after installation

After successful firmware (especially custom firmware), it is recommended to follow several steps to improve performance and stability:

  • πŸ”§ Disable unnecessary Google services (if you use firmware without GApps): - Delete or freeze through ADB Packages like com.google.android.gms (unless you need push notifications)
  • ⚑ Set up the kernel: - Install Kernel Adiutor or FrancoKernel for fine-tuning CPU/GPU - For the Redmi Note 4 Optimal settings: Governor interactive, maximum frequency 2.0 GHz
  • πŸ—ƒοΈ Move the cache to SD-(if you use it as an internal memory): TWRP run the Wipe β†’ Advanced Wipe β†’ Choose Cache. β†’ Repair or Change File System β†’ Change File System β†’ F2FS
  • πŸ”’ Block Ads Systemically: - Scroll through Magisk AdAway module or add to /system/etc/hosts lock-in

For firmware based on Android 10+ is also useful:

  • 🎯 Enable navigation gestures through Settings β†’ System system β†’ Gestures
  • πŸ”Š Optimize the sound by using ViPER4Android (Magisk demands)
  • πŸ“Ά Improve network reception by asking for modem from a newer version MIUI (look 4PDA)

FAQ: Answers to Frequent Questions

Can I flash Redmi Note 4 without unlocking the bootloader?
Yes, but only official MIUI firmware via Mi Flash Tool or Recovery. For custom firmware (LineageOS, Pixel Experience), unlocking is mandatory, and without unlocking, you can not install TWRP or get root rights.
Why is the camera or fingerprint sensor not working after the firmware?
This is a typical problem when installing firmware ports (e.g., xiaomi.eu on the Indian version).Solutions: Squeeze vendor from stock firmware through TWRP Install a patch for the camera (search for the XDA Developers) Get back to stock MIUI Repeat the firmware with the correct version for LineageOS and others AOSP-The firmware camera may work unstable due to the lack of proprietary drivers Xiaomi.
How to check if the bootloader is unlocked?
Turn off your phone and press Volume Down + Power to log into Fastboot. Connect to your PC and execute the command: fastboot oem device-info If there is a line Device unlocked: true in the answer, the bootloader is unlocked. If false is locked.
Which firmware is better to choose for everyday use?
Depending on your goals: Maximum stability: official MIUI (stable branch) Pure Android: Pixel Experience or LineageOS (but can be worse optimized for iron) Performance: HavocOS or CorvusOS (with 4.4.237 kernel support) Maximum running time: MIUI with Google services disabled + FrancoKernel kernel.For Redmi Note 4, Android 11+ firmware is not recommended - they can run slowly due to outdated iron.
Can I flash Redmi Note 4 over OTG without a PC?
Technically yes, but with reservations: You will need to OTG-cable and flash drive with firmware The loader must already be unlocked TWRP via PC (without PC it is impossible) Firmware must be in.zip format for installation via TWRP Completely do without a PC will not work – at least to unlock the bootloader it is needed.