Xiaomi Redmi 4 firmware: official and custom methods (Fastboot, Recovery, EDL)

Xiaomi Redmi 4 is one of the most popular budget smartphones of 2017, which is still actively used due to its reliability and the ability to upgrade through firmware. However, over time, official support from Xiaomi has ceased, and users face slowdowns, bugs or the desire to install custom firmware like LineageOS or Pixel Experience. In this guide, we will analyze all the current methods of firmware โ€“ from official updates through the Mi Flash Tool to manual recovery through EDL (emergency mode).

It is important to understand that firmware is not only a way to upgrade the system, but also the risk of turning the phone into a brick if you break the process. We will describe each step in detail, including unlocking the bootloader, choosing the right version of firmware (Global, China China or Europe). EEA) And you can solve common bugs like Invalid image or Anti-rollback, and if you're a beginner, start with the official methods. TWRP and custom kernels.

This article is updated in 2026 to include current versions of tools and firmware, and all links to files are virus- and health-tested.

1. Firmware Preparation: What You Need to Know Before You Start

Before you flash Redmi 4, you need to follow a few critical steps, and neglecting them can lead to data loss, bootloader failure, or even physical device failure (for example, if you connect in EDL mode).

First, determine the exact model of your device. Redmi 4 has several modifications:

  • ๐Ÿ“ฑ Redmi 4 Prime (codename markw) โ€“ with a Snapdragon processor 625 and 3/32 GB memory.
  • ๐Ÿ“ฑ Redmi 4 Pro (codename prada) is similar to Prime, but with 4/64 GB.
  • ๐Ÿ“ฑ Redmi 4 Standard (codename rolex) - Snapdragon 430, 2/16 GB.
  • ๐Ÿ“ฑ Redmi 4A (codename rolex, but with other hardware) โ€“ not to be confused with the main line!

The code name can be found in settings (Settings โ†’ About Phone โ†’ MIUI version) or through the adb shell command getprop ro.product.device.

Second, check the current firmware version and bootloader status:

  • ๐Ÿ”’ Blocked bootloader โ€“ requires official unlocking via Mi Unlock Tool (details in the next section).
  • ๐Ÿ”“ Unlocked loader - allows you to install custom firmware and TWRP.
  • โš ๏ธ Anti-rollback status โ€“ if the firmware is older than the current one, the phone may be blocked!

If you run a firmware version below the one already installed, without resetting the Anti-rollback flag, you get a brick, for example, if you have a MIUI 12 and you try to put a MIUI 10, the phone will stop turning on.

โš ๏ธ Note: If you bought Redmi 4 handheld, the previous owner may have already unlocked the bootloader or installed custom firmware. Check this through the command fastboot oem device-info - Device unlocked: true means unlock.

2 Unlock the bootloader: the official way through the Mi Unlock Tool

Without unlocking the bootloader, you can flash Redmi 4 only with official firmware through the Mi Flash Tool in Fastboot mode. For custom firmware (TWRP, LineageOS) or manual restoration through EDL, unlocking is mandatory.

The official unlock process from Xiaomi requires:

  1. Related Mi-account with phone (added to Settings โ†’ Accounts).
  2. Internet connection (necessarily via mobile data, Wi-Fi is not suitable!)
  3. Wait 7-15 days after the account is attached (if the account is new).

Download the Mi Unlock Tool (version no lower than 5.5.224.30) and follow the instructions:

Create a Mi-account and confirm email|Link your account to your phone in settings|Enable debugging on USB and OEM-unlock|Connect your phone to your PC in Fastboot mode (clamp Power) + Vol-)|Run Mi Unlock Tool on behalf of the administrator-->

Once successfully unlocked, the phone will automatically reset to factory settings! All data will be deleted. If the process is interrupted or if you get a Couldn't unlock error, try:

  • ๐Ÿ”Œ Use the other USB-cable (preferably original).
  • ๐Ÿ–ฅ๏ธ Run Mi Unlock Tool on Windows 10/11 (Windows 7 frequently).
  • โณ Wait 3-5 days (sometimes Xiaomi delays unlocking).
  • ๐Ÿ“ฑ Enable the aircraft mode before connecting to the PC.

โš ๏ธ Note: Once the bootloader is unlocked, Xiaomi can block your Mi Account for 72 hours if you try to unlock devices too often.

Official firmware through Mi Flash Tool|LineageOS (Pixel Experience)|Recovery through EDL|I haven't decided yet.-->

3.Redmi 4 firmware methods: which one to choose?

There are 4 basic methods of Redmi 4 firmware, each suitable for different situations, depending on your goals and the condition of the phone:

MethodWhen to useDo you need unlocking?The risk of bricks
Fastboot (Mi Flash Tool)Official update, recovery after failureโŒ No.โš ๏ธ Medium.
Recovery (via TWRP)Installation of custom firmware, backupsโœ… Yes.โš ๏ธโš ๏ธ High-pitched
EDL (Emergency mode)Recovery from a brick if the phone is not turned onโŒ No (but you need an authorized account)โš ๏ธโš ๏ธโš ๏ธ Very tall.
OTA-updateUpdate via phone menu (if available)โŒ No.โœ… Minimum

For most users, the best option is to run through Fastboot with the Mi Flash Tool. This method does not require unlocking the bootloader (if you use official firmware) and is suitable for recovering the phone after software failures. However, it completely erases data from the device!

If you want to install custom firmware (like LineageOS 16 based on Android 9), youโ€™ll need to:

  1. Unlock the loader (Section 2).
  2. Install TWRP Recovery (instruction below).
  3. Switch firmware and GApps (Google services) through TWRP.

TWRP

Redmi 4

twrp.me

๐Ÿ’ก

For custom firmware, be sure to install a compatible version of TWRP. For example, for Redmi 4 Prime (markw) TWRP 3.5.2 is suitable, and for Redmi 4 Standard (rolex) 3.3.1 is suitable.

4. Fastboot (Mi Flash Tool): step-by-step instructions

This method is suitable for installing official firmware (for example, the latest version of MIUI 12.5 for Redmi 4) or recovering your phone after a crash.

  • ๐Ÿ–ฅ๏ธ Windows computer (7/10/11).
  • ๐Ÿ”Œ Original. USB-cable (low-quality cables cause errors).
  • ๐Ÿ“ Firmware in.tgz or.zip format (download from the official Xiaomi website).
  • ๐Ÿ› ๏ธ Mi Flash Tool (Last version - download here).

Firmware steps:

  1. Turn off your phone and press Power + Vol- to enter the Fastboot (a hare in a hat will appear on the screen).
  2. Connect your phone to your PC. Make sure the drivers are installed (if not, download the Mi USB Driver).
  3. Unpack the firmware in a folder without Cyrillic characters (for example, C:\ROM\redmi4).
  4. Launch the Mi Flash Tool, press Select and specify the path to the firmware folder.
  5. At the bottom, select the firmware mode: ๐Ÿ”„ Clean all โ€“ complete cleaning (recommended). ๐Ÿ”„ Clean all and lock - cleaning + Locking the boot loader (if it was unlocked). ๐Ÿ”„ Save user data โ€“ data retention is not always stable).

Flash

If the process is successful, the phone will automatically restart. The first turn on can take up to 15 minutes - do not interrupt it!

  • ๐Ÿšซ Invalid image โ€“ the wrong firmware for your model (check the code name!).
  • ๐Ÿšซ Flash Not Done โ€“ Problems with Drivers or Cable.
  • ๐Ÿšซ Anti-rollback: Trying to roll back to the old version (swipe the same or newer version).
What to do if the Mi Flash Tool can't see your phone?
1. Check that the phone is really in Fastboot mode. 2. Try another one. USB-port (preferably 2.0, not 3.0). 3. Install drivers manually through Device Manager (select "Qualcomm" HS-USB QDLoader 9008" if the phone is in the EDL). 4. disable the antivirus (it can block the Mi Flash Tool). 5. Launch the Mi Flash Tool on behalf of the administrator.

5. Installation of TWRP and custom firmware

If you want to install LineageOS, Pixel Experience or other custom firmware, you first need to flash TWRP Recovery. This process requires an unlocked bootloader (see section 2).

Instructions for installing TWRP:

  1. Download the latest version of TWRP for your model from the official website (file with the extension.img).
  2. Move the twrp-3.x.x-x-markw.img file to the fastboot folder (e.g., C:\platform-tools).
  3. Turn on Fastboot on your phone (Power + Vol-).
  4. Connect your phone to your PC and execute the command: fastboot flash recovery twrp-3.x.x-x-markw.img fastboot boot twrp-3.x.x-x-markw.img After that, the phone will be loaded into TWRP.

Now you can use the custom firmware:

  1. Download firmware (e.g. LineageOS 16 for markw) and GApps (e.g. Open GApps pico).
  2. Transfer files to your phone (via MTP to TWRP or memory card).
  3. V TWRP run the Wipe โ†’ Advanced Wipe and mark: ๐Ÿงน Dalvik / ART Cache ๐Ÿงน System ๐Ÿงน Data ๐Ÿงน Cache

Then swipe for cleaning.

Install

GApps

Reboot โ†’ System

โš ๏ธ Note: Some custom firmware (such as Havoc-OS) require additional kernel or camera fixes. Always read the instructions on the XDA-Developers forum before installing!

๐Ÿ’ก

Before you run custom firmware, back up the TWRP (Backup section) to restore the system if something goes wrong. Save the backup to your PC or memory card!

6. EDL recovery: if the phone doesn't turn on

EDL (Emergency Download Mode) is an emergency mode that allows you to flash the phone even if it does not respond to buttons or is stuck on the Mi logo. For Redmi 4, EDL is logged in via circuiting contacts on the board or using a command:

fastboot oem edl

However, an authorized Xiaomi account is required to run the firmware in EDL (usually only service centers have such access).An alternative way is to use a patched version of the Mi Flash Tool (such as the Mi Flash Pro), but this violates Xiaomi's rules and can lead to a device lock.

If you do decide to take a risk, follow the instructions:

  1. Download firmware for EDL (usually in.mbn or.elf format).
  2. Connect your phone in EDL mode (the screen should be black, Qualcomm HS-USB QDLoader 9008) will appear in Device Manager.
  3. Start the Mi Flash Tool, select the firmware and press Flash.

โ“ Can I use Redmi 4 to help you? OTG-computer-free?
Technically, yes, but it's a very unreliable method. OTG-Adapter, mouse and pre-downloaded firmware on the memory card, but without a Fastboot or TWRP The chances of success are minimal.