Installing TWRP on Xiaomi Redmi 5A: a step-by-step guide

Despite its budget status and age, the Xiaomi Redmi 5A is still popular with enthusiasts looking to breathe new life into the device. The standard MIUI shell often limits the user’s ability to remove system debris or install custom firmware without root rights. This is where TWRP Recovery, a modified recovery menu that opens up full access to the gadget’s file system, comes to the scene.

The installation process requires careful and accurate steps, as any errors in the work with the bootloader can lead to the failure of the device. In this article, we will discuss in detail how to prepare the Redmi 5A, unlock the bootloader and hoist on board the current version of the Team Win Recovery Project.

Before you start, make sure you understand the risks. System software modification is always an interference with bootloader and memory partitions. Although the procedure has been worked out by thousands of users, the responsibility for the result lies solely with you. Next, we will consider the preparation of the toolkit and the necessary files.

Preparation for system modification

The first step is to assemble the tools you need, and you need a Windows computer that's working. USB-cable and smartphone Xiaomi Redmi 5A with a charged battery of at least 60%. ADB Fastboot drivers, which are a standard tool for communication of PC and Android devices at a low level.

Be sure to download the current TWRP image adapted specifically for the code name of your device. There are different versions for Redmi 5A (codename riva), and using a file for another model (like Redmi 5 Plus) will lead to a brick. Also remember to download the archive from SuperSU or Magisk if root rights are your ultimate goal.

⚠️ Warning: All data on the internal drive will be permanently deleted during the process of unlocking the bootloader. Create a full backup of important photos and contacts in advance.

For stable device-to-computer communication, install the official Xiaomi USB Driver drivers. Without them, the computer can only see the phone as a charging device, ignoring the Fastboot commands. After installing the drivers, restart the computer to apply the changes.

Unlocking the Bootloader bootloader

Xiaomi has implemented protection against unauthorized flashing, so the first step is to unlock Bootloader. To do this, find the “About Phone” option in the phone settings menu and click on the MIUI version seven times to activate the developer mode. Then, in the advanced settings, turn on “Debugging over USB” and “Unlock the bootloader”.

Once you have enabled these options, start the Mi Unlock Tool app on your computer. You need to log in to the same Mi Account that you have logged in to your smartphone. The system will warn you of the risks and require you to link the device to your account. Once you have linked the phone, you need to reboot, and it may take 72 to 168 hours for Xiaomi to give permission to unlock.

When the wait period expires, put the smartphone in Fastboot mode, holding the down volume and power buttons simultaneously. Connect the cable to the PC and press the Unlock button in the utility. The process will take a few seconds, after which the device will restart, and all data will be erased.

  • 🔓 Unlocking removes warranty on device software.
  • 📱 Fastboot mode is activated by a combination of buttons when the screen is off.
  • ⏳ Waiting for unlocking can take up to 7 days depending on policy MIUI.
📊 Have you ever waited to unlock Mi Unlock?
No, it unlocked right away.
Waited 72 hours.
Waited 168 hours (week)
I couldn't unlock it at all.

Install TWRP via Fastboot

Once successfully unlocked, you can start directly installing the recovery. Copy the downloaded image file (usually with the.img extension) into the ADB/Fastboot tool folder on your computer. For convenience, rename the file to twrp.img so you don't get confused by long version names.

Reset Redmi 5A to Fastboot mode and connect to your PC. Open the command line in the tool folder and type in the connection check command: fastboot devices. If you see the serial number of the device in response, then the connection is established correctly and you can proceed to the firmware.

fastboot flash recovery twrp.img

This command will write the TWRP image into the recovery section, but if you just reboot the phone now, the standard MIUI system will rewrite the TWRP back to stock Recovery, and to avoid this, you need to perform a special login procedure immediately after the firmware is completed.

⚠️ Note: Do not allow the system to boot into normal Android mode immediately after firmware TWRP, Otherwise, you will lose the modified Recovery and the procedure will have to be repeated.

There is an important nuance for Qualcomm-based devices, which include the Redmi 5A. After the firmware command, it is often necessary to manually reboot to Recovery mode, holding a certain key combination, even before the phone tries to start the OS.

First Start and Configure TWRP

Once the Fastboot firmware process is complete, press the combination of the Up Volume and Power buttons. Hold them until the MI logo appears, then release the power button, but continue to hold the Volume Up until the TWRP menu appears. If you see the familiar button interface, the installation is a success.

When you first start up, the system can request confirmation of the changes. Select the language (usually available in English and Russian if the package is loaded) and swipe the Allow Modifications slider. This action is critical, as it prevents you from returning to the drain state the next time you restart.

☑️ Installation verification TWRP

Done: 0 / 4

Now your Redmi 5A is ready to install custom firmware or patches. However, before installing new ROMs, it is highly recommended to make a full backup of the current system.

  • 💾 Backup section allows you to save the current state of the system to the archive.
  • 🗑️ Wipe partition is required to clean data before installing a new firmware.
  • 📂 File Manager section gives access to the Android file system.

Obtaining Root Rights and Working with Sections

One of the main reasons for installing TWRP is to get superuser rights, which you will need to have Magisk.zip or SuperSU.zip archives, upload this file to a memory card or internal memory of the phone (if it is available in recovery mode).

From the TWRP menu, go to Install. Find the downloaded root archive and click on it. Once the swipe is confirmed, the /system partition will start to be modified, and when it is completed, a successful installation message will appear.

SectionDescriptionIt can be formatted.
SystemAndroid and MIUI system filesOnly when you change firmware.
DataUser data and applicationsYes (full reset)
CacheTemporary system filesYeah (safe)
DalvikCash of the ART virtual machineYes (after updates)

Once root permissions are installed, you need to clear the Dalvik and Cache cache to avoid conflict on the first run, a standard procedure that takes a couple of minutes to ensure the stability of the modified system.

Why do you need a Vendor section?
The vendor section contains proprietary drivers and libraries specific to your smartphone’s hardware (camera, display, sensors). When installing custom firmware, it is best not to touch this section unless the firmware author has indicated otherwise, as damage to it can lead to hardware components being inoperable.

It is important to understand the difference between formatting and conventional cleaning. Data formatting removes everything, including internal memory and encryption, whereas regular Wipe Data leaves files on internal storage. It is often formatting that is required to move from MIUI to pure Android.

Possible problems and solutions

When modifying the Xiaomi Redmi 5A, users may experience a variety of errors, such as if TWRP doesn’t see internal memory, it could mean an encryption or file system problem, and formatting the Data partition via the Wipe menu helps.

If the phone goes into an endless bootloop after installing the firmware, try clearing the Cache, Dalvik, and Data partitions. If that doesn't help, it may be that the firmware version is incompatible with the current version of the underlying software or that the system image is damaged.

⚠️ Warning: If your phone screen is white or the device vibrates but doesn’t show signs of life after firmware, you may have used an image TWRP In this case, only flashing the stock image through the Fastboot will help.

Also a common problem is the inability to connect to the PC in mode TWRP. Make sure that the correct PC is installed ADB-drivers, and cable USB It is good and supports data transfer, not just charging.

💡

Use the original cable or high-quality analogue with thick wires. Cheap cables “only for charging” often cause errors in firmware, interrupting data transmission at a critical moment.

Always check the hash amounts of downloaded firmware files and TWRP images. A damaged file can be written to memory, but contain errors that will only appear when you try to run.

Frequently Asked Questions (FAQ)

Will the warranty fly off after installing TWRP?
Technically, unlocking the bootloader and installing third-party software will void the software warranty. However, you can always return the stock bootloader and the original firmware, making the software traces of the interference virtually invisible to the service center if they don't check physical tags.
Can I use banking applications with TWRP?
TWRP itself does not block NFC and banking applications, but problems arise with Root rights, but using Magisk Hide or similar features, you can hide the superuser rights from banking applications and restore them to work.
How do I get back to the store if something goes wrong?
To return to the factory software, you need to download the Fastboot ROM for your regional version, unpack it and flash it through the Mi Flash Tool in Clean All mode. This will completely remove TWRP and return the phone to factory condition.
Does Redmi 5A support encryption in TWRP?
Standard TWRP builds often cannot decrypt the Data partition on Android 7 and higher without entering a password or special build. If TWRP asks for a password you didn't set, you may need a special version of the backup or reset encryption through Data formatting.

💡

Installing TWRP is the first step to fully customize your Redmi 5A, allowing you to install any version of Android, make full system backups, and manage access rights at a deep level.