How to log into TWRP Recovery on Xiaomi: a step-by-step guide

Xiaomi smartphones are famous for their flexibility in customization, and a key element for system modification is the recovery mode. Standard Recovery from the manufacturer is often limited to basic features such as reset or simple upgrade, while TWRP (Team Win Recovery Project) provides access to full file system management. This allows you to create full backups, install custom firmware and obtain superuser rights.

But the process of entering this mode on the Chinese brand’s devices has its own technical features that distinguish it from other Android gadgets. The main difficulty lies in the bootloader protection system, which by default blocks any changes. You will not only need to press the button combination, but also pre-do a series of preparatory actions to allow the system to let you into the recovery menu.

In this article, we will take a detailed look at the entire journey from unlocking to the first successful launch of the modified menu. ADB-Drivers and methods of bypassing possible locks characteristic of new versions MIUI hyperos.

Preparation of the device and unlocking the loader

Before you try to run third-party software, you need to make sure that the bootloader of your device is unlocked.Without this step, the phone will refuse to download any image other than the official one and will give an error when you try to log in to TWRP. The procedure requires you to associate your Mi Account and wait for a certain time set by the manufacturer.

First, activate the developer mode. To do this, go to Settings. → About the phone and seven times quickly click on the version MIUI. Once the notification appears, go back to the main settings menu, find the Additional section and select For Developers. USB» and “Facilities release».

⚠️ Warning: The process of unlocking the bootloader will completely remove all data from the internal drive. Pre-save important photos and documents to a cloud server or computer.

Next, you'll need the Mi Unlock Tool on your computer. Connect your smartphone when it's off, press the power and volume buttons to get into Fastboot mode. The program will check your account status and, if all the conditions are met, allow unlocking. This is a critical step without which further manipulation is impossible.

☑️ Checking before unlocking

Done: 0 / 4

Installation of drivers and preparation of PC

For successful communication of the computer and smartphone, correctly installed ADB-Drivers: Without them, the system will not see the device in the right modes, and commands will not be executed. It is recommended to download the official Platform-tools package from the Android developer site, as third-party builds may contain errors.

Once you unpack the archive, open the command line in the tool folder. Check the connection by entering the adb device command. If a window appears on the phone screen requesting debugging permission, confirm it. The list should show the serial device, which indicates a successful connection.

It's also important to make sure that the USB cable is working and supports data transfer, not just charging. Cheap cables from powerbanks often don't have the right contacts to transmit signals, leading to false connection errors. Use the original cable or quality analogue with the data labeling.

💡

Use it. USB-port located directly on the motherboard (back of the system unit) rather than on the front panel of the case to avoid power and data transmission problems.

Finding and downloading the right TWRP image

The key is to choose the right version of the recovery. For each Xiaomi device, there is a unique code (codename), for example, cepheus for the Mi 9 or ursa for the Mi 8 Explorer. Downloading an image for another model will lead to a brick (brick) of the device or a cyclic reboot.

The official TWRP website lists supported devices, but new Xiaomi models often require unofficial builds, which can be found on the XDA Developers profile forum. Search for a theme that matches your codename and download a file with the.img extension.

Xiaomi modelCodename (Codename)Type of imageSource
Redmi Note 9 Procurtana / joyeuseUnofficial / OfficialXDA / TWRP.me
Xiaomi Mi 9cepheusOfficialTWRP.me
Poco F1berylliumOfficialTWRP.me
Redmi Note 8ginkgoUnofficialXDA / Telegram

Once downloaded, place the image file in the same folder as the ADB tools. Rename the file to twrp.img for convenience, so as not to type a long name when working with the console. This will simplify the input of commands and reduce the risk of typos.

📊 What is your current status as a loader?
Blocked.
Unlocked.
I don't know.
Planning to unlock.

Instructions: Entry via Fastboot and ADB

There is a basic login method that is considered the “gold standard” for Xiaomi devices, which involves temporarily running a recovery image through Fastboot mode. It’s important to understand that we don’t install TWRP permanently right away, but only download it to perform primary tasks.

Turn off your smartphone completely. Then press the volume down button and the power button at the same time. Hold them until you see a picture of a hare repairing an android on the screen or the words FASTBOOT. Connect the phone to your computer.

Open the command line in the ADB folder and enter the following command to check the connection:

fastboot devices

If the serial number is displayed, execute the command to download the image:

fastboot boot twrp.img

This command loads TWRP into RAM without affecting the phone's internal memory. Once executed, the smartphone should automatically reboot to the TWRP Recovery menu. If you see the Team Win logo and button menu, then the login is successful.

⚠️ Please note: Do not use the fastboot flash recovery command. twrp.img encrypted A/B-partitions without prior preparation, this can block the loading of the regular system.

Saving TWRP and installing Root rights

After the first successful TWRP login, the Android system can overwrite the modified recovery partition the next time you download. To avoid this, you must immediately install a patch or reflash the receptacles. From the TWRP menu, go to the Install section and select a zip file if you have one, or use the save function.

To obtain superuser rights, download the Magisk archive. Upload it to your phone (via MTP or ADB Sideload) and install it through the Install menu in TWRP. This will embed root rights into the boot image of the system.

What if the TWRP crashed after the reboot?
If you see the standard Recovery menu again after the reboot or the phone goes into the boot cycle, repeat the login procedure via Fastboot (fastboot boot twrp.img command). Immediately, while in TWRP, install Magisk or a special script patcher that modifies the boot partition and prevents the system from replacing the Recovery.

Also on the TWRP menu, it is recommended to make a full backup of Boot, System and Data partitions, which will save you in case of a failed modification. Select Backup, mark the desired partitions and slide the slider to start creating a copy.

💡

Using the command "fastboot boot" is safer than direct firmware, as it allows you to test the work of the Recovery without the risk of damage to system partitions.

Addressing common problems

Users often face a situation where, after installation, TWRP The phone stops loading in Android or goes to Bootloop, which can be due to damage to the header of the boot partition or conflict versions / ART Cache via Wipe menu.

Another common problem is the inability to read internal memory. TWRP It's because of encryption. MIUI They use strong encryption that the old recovery can't decrypt. Disable_Dm-Verity_ForceEncrypt or use of the current version TWRP, Supporting your version of Android.

If the phone hangs on the Mi logo after installing the modifications, try to enter the Restore mode and perform a Wipe Data/Factory Reset (Wipe Data/Factory Reset) that will delete all user data, but often allows you to restore the system to work.

Why does TWRP not see internal memory?
This is because the data partition is encrypted. To fix this, you need to format the Data partition (not just Wipe, but Format Data) through the Wipe menu in TWRP, entering the word "yes." Remember, this will delete all files!
Can I upgrade MIUI with TWRP installed?
The official Air Update (OTA) usually doesn’t work or causes errors because the integrity of system files is compromised. It’s recommended to manually update through the Update menu in the settings, selecting a firmware zip file but pre-made a full backup.
Is it dangerous to unlock the bootloader for the average user?
Yes, it carries risks. In addition to losing warranty (in some regions), you become more vulnerable to malware that has access to a low level of the system, and some banking applications may stop working without further manipulation to hide root rights.