Xiaomi Redmi Note 4X
mido
LineageOS
Pixel Experience
TWRP
Many users experience errors like FAILED (remote: 'dtb not found') or hanging on the Mi logo after a flawed firmware, most often due to missing steps: an unblocked bootloader, an inappropriate TWRP version, or ignoring file checksum checks. In this guide, we will look at all the steps from preparing a PC to the first boot to a new recovery, taking into account the specifics of the Redmi Note 4X (including versions with a Snapdragon 625) processor.
Important: If your smartphone is purchased in China or is linked to a Mi Account with an active Find Device function, unlocking the bootloader may require additional actions (see Frequent Problems section).
Preparation of the device and PC
Before you start installing TWRP, make sure your Redmi Note 4X meets the following key requirements:
- π Battery charge at least 70%, and the unlocking and firmware process can take up to 30 minutes, and discharging in the middle of the operation will lead to a brick.
- π± Version. MIUI No older than 12.5 (MIUI 13+) Vulnerabilities used to unlock can be blocked.
- π₯οΈ Windows computer 10/11 (64-bit) MacOS is not recommended due to problems with fastboot drivers.
- π Cable USB β It's original or certified. Cheap cables often don't fastboot data.
Also prepare the following tools:
| Tool. | Download link | Note |
|---|---|---|
| Mi Unlock Tool | Official Xiaomi website | Requires a Mi Account with a Linked Phone Number |
| Platform Tools (ADB & Fastboot) | Android Developers | Unpack into the root of the disk C:\platform-tools\ |
| TWRP for mido | Official website of TWRP | Choose a version. 3.7.0_9-0 or newer (for Android) 10+) |
| Xiaomi drivers | Mi PC Suite | Install even if you donβt plan to use the Mi Suite |
β οΈ Note: If you have previously installed custom firmware through fastboot, check the current status of the bootloader with the command: fastboot oem device-info In the answer, look for the line Device unlocked: true. If false - unlock is mandatory!
2 Unlocking the bootloader (Bootloader)
Without an unlocked bootloader, installing TWRP is impossible. Xiaomi officially allows unlocking, but the process can take up to 720 hours (30 days) for new accounts. Here's how to do it correctly:
- Activate Developer Options: Go to Settings β About Phone β MIUI version and tap 7 times on the build number.
- Back to Settings β Additionally. β For developers and include: π Unlocking OEM (It may not be available on some versions. MIUI) π Debugging by USB
Connect the phone to the PC, select File Transfer mode and confirm debugging permission.
Launch the Mi Unlock Tool, log in to your Mi Account and follow the instructions. If you see the message "Wait 168/720 hours" - wait for the timer to end.
Once successfully unlocked, the phone will automatically reset to factory settings. Don't miss this step - it's necessary for TWRP to work properly in the future.
3. Install TWRP via Fastboot
Now that the bootloader is unlocked, you can start running TWRP firmware. Importantly, only use official builds from twrp.me. Unofficial versions may contain malicious code or may not support features like /data encryption.
Step-by-step:
- Download the twrp-3.x.x-x-mido.img file to the platform-tools folder.
- Open the command prompt in this folder (Shift + right mouse button β βOpen PowerShell window hereβ).
- Turn off the phone and press Volume Down + Power to log into fastboot.
- Connect your phone to your PC and check for device detection by command: fastboot devices should show a serial number of the device.
- TWRP: fastboot flash recovery twrp-3.x.x-x-mido.img
- Important! Immediately after the firmware, go to recovery without booting into the system. twrp-3.x.x-x-mido.img Or manually: press the volume up + Power on-set.
It is further recommended that:
- Make a full backup of the current firmware (select the Boot, System, Data sections, EFS). Save the backup on SD-card.
- Format /data if you plan to install custom firmware (like LineageOS). To do this, go to Wipe β Format Data and type yes.
- Install Magisk for root rights (optional). Download the latest Magisk.zip from GitHub and stream through Install.
π‘
If TWRP asks for a password when mounting /data and you didn't set it, it means that the partition is encrypted. To reset encryption, run Format Data (all data will be deleted!).
5. Frequent errors and their solutions
Even when following instructions, users often encounter problems, and here are the most common ones and ways to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| FAILED (remote: 'dtb not found') | Incompatible version of TWRP or corrupted img file | Download the official build for mido |
| Hanging on the Mi logo after firmware | Wrong order of action (boot to the system instead of TWRP) | Repeat the TWRP firmware and immediately boot into recovery. |
| E: Unable to mount /data | Partition encrypted or damaged | Run Format Data in TWRP (Data Loss!) |
| Mi Unlock Tool Shows βCouldnβt Unlockβ | Account not tied to device or waiting is not completed | Check the binding in Settings β Mi Account β Mi Cloud β Find Device |
If the touch screen doesnβt work after installing the TWRP, try:
- π Re-flash another version TWRP (for example, XDA).
- π§ Connect OTG-mouse to navigate the menu.
What to do if your phone turns into a brick?
6. firmware custom OS through TWRP
Now that TWRP has been successfully installed, you can start firmware custom operating systems like LineageOS, Pixel Experience or HavocOS.
- Download. ZIP-firmware file and, if necessary, GApps (e.g., Open GApps in the pico or nano variant).
- Transfer files to your phone (via the phone) MTP into TWRP or SD-map).
- V TWRP run the Wipe β Advanced Wipe and mark: π§Ή Dalvik / ART Cache π§Ή System π§Ή Data (if a clean installation is required) π§Ή Cache
Install the firmware through Install, then (if necessary) GApps and Magisk.
Reboot to the system. The first boot can take up to 10-15 minutes.
Important for the Redmi Note 4X: Some custom firmware requires an additional patch to make the camera work properly (e.g., fix for libcamera). XDA or 4PDA.
π‘
Always check that the firmware is compatible with your deviceβs codename (mido for Redmi Note 4X). Installing firmware for another model (e.g., mido vs nikel) will result in a hard brick!
7. Stock firmware recovery
If the experiments with custom OSes were unsuccessful or you want to return the phone to its original state, you can restore stock MIUI in two ways:
- Through TWRP: Download the official ZIP mido firmware. Sweat it through Install to TWRP (without wipe if you want to save data).
Fastboot (if TWRP doesn't work):
- Download fastboot firmware from the official Xiaomi website.
- Unpack the archive and launch it. flash_all.bat (Windows or flash_all.sh (Linux/Mac).
Once the stock firmware is restored, the TWRP will be removed and the bootloader will remain unlocked. To return the stock recovery, do:
fastboot flash recovery stock_recovery.img(file stock_recovery.img You can get it from the official firmware).