Owners of Xiaomi, Redmi and Poco smartphones often face the limitations of a standard operating system: removing system debris, creating full backups or installing custom firmware require access to hidden memory partitions, which is the purpose of customized Recovery, which replace the standard engineering mode.
The process of replacing the stock recovery menu with a modified one, such as TWRP, is a fundamental step in modifying Android, which opens up access to the device's file system as a superuser, but it is important to understand that any manipulation of the bootloader carries certain risks.
In this article, we will go into detail about the algorithms required for successful installation, learn about tool preparation, unlock the bootloader and directly firmware images, and carefully follow the instructions to minimize the likelihood of errors.
Tool preparation and diagnostics of the device
Before you start taking action, you need to make sure that all the required components are available. You will need a computer with Windows, Linux or macOS operating system, as well as a high-quality computer. USB-A bad cable can cause a breakdown at a critical moment, which is unacceptable.
All necessary system updates should be installed on your smartphone if you plan to unlock the bootloader first through the official application. It is also critical to back up all important data. The Bootloader unlock process completely clears the device's internal memory.
β οΈ Attention: The bootloader unlock procedure permanently deletes all user data (photos, contacts, apps) and transfer important information to an external drive or cloud storage in advance.
Download and install the ADB and Fastboot drivers on your computer, without which the system will not be able to recognize the phone in special mode, and you will need a recovery image file adapted specifically for your device model, using files from other models can lead to bricking of the gadget.
π‘
Use the original. USB-High-quality cables or certified analogues: Cheap charging cables often lack data lines, making PC connectivity impossible.
Check out the MIUI or HyperOS version. In some cases, newer versions of the shell have an increased level of protection, requiring a wait of 168 hours (7 days) after applying for an unlock. Older models may require an account with a certain level of activity in the Mi Community community.
Unlocking the bootloader (Bootloader)
The first and most important step is to unlock the bootloader. Xiaomi's standard security doesn't allow you to flash third-party images without this step. You need to link your Mi Account to your device through the settings menu.
Go to Settings β About Phone and click on the MIUI version several times to activate the developer menu. Then, in the advanced settings, look for βTruckloader Statusβ and click βAdd Account.β After that, you can go to the utility on your PC.
- π± Download the official Mi Unlock Tool utility from the manufacturer's website.
- π Transfer the smartphone to Fastboot mode, clamping the volume and power buttons.
- π Connect the device to the computer and wait for the definition in the program.
- π Press the Unlock button and confirm the action.
The process can take anywhere from a few minutes to a few days, depending on the region's security policy and firmware version. Once successfully unlocked, the phone will automatically restart and reset to factory settings.
β οΈ Note: After unlocking the bootloader, some banking applications and services (Google Pay, Mir Pay) may stop working properly due to a breach of security integrity.
Make sure the battery is at least 60 percent charged, the firmware and subsequent setup process takes time, and a sudden power outage while writing flash memory partitions can cause permanent damage to the software part.
Installation of ADB and Fastboot drivers
To interact with a smartphone at a low level, the Android Debug Bridge toolkit is used. Windows often has problems with automatically installing drivers for Fastboot mode.
Download the Platform Tools archive from Google's official repository. Unpack the archive into the root of the disk, such as the C:\adb folder, so that the path does not contain Cyrillic characters and spaces, which will make it easier to enter commands into the console.
Open the command line in the tool folder. In Windows 10 and 11, you can do this by right-clicking the folder in an empty space and selecting the appropriate option, or by manually writing the path.
fastboot devicesIf you see the serial number of the device, the connection is established. If the list is empty, check the cable, USB port or reinstall the drivers. Device Manager in the "Other Devices" section may display an unknown Android Bootloader Interface device.
Solving driver problems in Windows
TWRP Image Impression Process
Now that you've got it all ready, you can go to the direct recording of the image. Download the twrp.img file that matches your device's codename (e.g., ginkgo for Redmi Note 8). Put the file in the ADB folder for convenience.
Put your smartphone into Fastboot mode. This is usually done by turning off your phone and then pressing the volume down and power button at the same time, and a bunny in a repair hat or FASTBOOT should appear on the screen.
Enter a command to temporarily start the Recovery without its constant firmware (optional) or to record directly:
fastboot flash recovery twrp.imgAfter the successful completion of the process, which will take a few seconds, you need to immediately put the device into recovery mode.Do not let the phone boot into a regular Android system, as stock firmware can overwrite custom recavers back to the original.
βοΈ Checklist before firmware
To enter the newly established TWRP If you see a menu with Install, Wipe, Backup, it's a success. ZIP-archives with firmware, patches and modules.
β οΈ Note: If after the firmware TWRP The phone is loaded into a normal system. MIUI/HyperOS, So, it means that the stock recavator has overwritten the custom. Repeat the procedure, but this time, immediately after the flash command, go to Recovery, preventing the system from booting.
Set up and work in the Recovery environment
The TWRP interface may seem complicated to a beginner, but it has a logical structure: the main menu contains sections for installation (Install), cleaning (Wipe), backup creation (Backup) and reboot (Reboot).
Backup function allows you to save the current state of the system to the archive. This is a full backup, including system partitions, application data and settings. SD-map or transmit.
| Section | Description | Recommendation |
|---|---|---|
| System | Operating system files | Definitely for the backup. |
| Data | User data and applications | Takes up the most space. |
| Boot | System kernel (Kernel) | Critical for launch |
| Vendor | Drivers and specific settings | Don't touch unnecessarily |
For installation of custom firmware (Custom) ROM) or a patch to obtain superuser rights (e.g., Magisk or KSU), Use the Install menu. Select ZIP-You can swipe the file and confirm the swipe. It takes 30 seconds to a few minutes.
π‘
TWRP allows you to mount partitions as an MTP storage. By connecting your phone with a cable to your PC in this mode, you can transfer firmware files directly without using a memory card.
Possible errors and methods of their elimination
Error 7 codes are usually used to indicate that Android version is not compatible or that signature is verified, and in such cases, you can disable DM-Verity or use special patches in TWRP.
If your phone goes into a bootloop, try running Wipe Dalvik/Cache and Data. If that doesn't work, it may be damaged by the boot image. You can bring the device back to life by reflashing the boot.img stock image via Fastboot.
A common problem on new HyperOS devices is blocking the Anti-rollback version. Firmware with a lower rollback version can permanently disable the device. Always check version compatibility before recording.
For diagnostics, use the log files that the recovers create, which are stored at the root of internal memory or on the back of the memory. SD-Log analysis helps to understand which file caused the failure in the installation.