Custom recovery TWRP (Team Win Recovery Project) is a de facto standard for advanced users Androidwho want to gain full control over their device. Unlike the stock recovery mode, which only allows you to reset to factory settings, TWRP opens the door to installing custom firmware, creating full system backups and deep modification of the software.

The installation process is not a trivial task and requires care, since any errors can lead to the smartphone not working. However, if the algorithm of actions is strictly followed, the risk of the device becoming โ€œbrickedโ€ is minimized. Below we will analyze in detail all the stages of preparation and the procedure for flashing the recovery image.

Before taking active steps, you need to realize that this procedure affects system memory partitions. Loader your device will be unlocked, which will automatically void the warranty in most service centers. In addition, all user data will be permanently deleted during the preparation process.

Preparation of tools and drivers

The success of the operation depends 90% on the quality of preparation of the workplace. You will need a personal computer or laptop running Windows, macOS or Linux. The first step is to install the platform Android SDK Platform-Tools, which contains the utilities adb and fastboot. Without these components, communication with the phone in bootloader mode is impossible.

A critical point is to install the correct USB drivers. They may differ for devices from different manufacturers. For example, for Samsung specific drivers are often required, while for Xiaomi or OnePlus standard Google drivers are sufficient.

โš ๏ธ Attention: If the device manager does not see your phone in the mode bootloader or fastboot, do not continue the procedure. The problem 99% lies in the absence or incorrect installation of drivers.

You will also need a high-quality USB cable. Cheap cables that come with some accessories often only support charging and do not transfer data. Use an original cable or a certified analogue that supports high-speed data transfer.

๐Ÿ’ก

Use a USB port soldered directly to the computer's motherboard (the rear panel of the system unit), and not ports on the front panel or USB hubs, to avoid problems with power and connection stability.

After installing the software, check the connection by entering a simple command in the command line. If you see the serial number of the device, then the environment is ready to work.

adb devices

Unlocking the bootloader

Most modern smartphones come with a locked bootloader, which prohibits the installation of unsigned images, which include TWRP. The unlocking procedure is radically different depending on the brand of your gadget.

For devices Xiaomi and Redmi an official utility is required Mi Unlock Tool and linking the account to the device for a period of 7 to 15 days. Devices Pixel i OnePlus allow you to unlock the bootloader directly through commands fastboot. Smartphones Samsung require switching a special switch in Download Mode.

  • ๐Ÿ”“ Unlocking erases all data from the internal storage of the device.
  • โณ On some models (for example, Xiaomi) there is a time delay before unlocking is possible.
  • ๐Ÿšซ Devices from American telecom operators (Verizon, AT&T) often have a permanently locked bootloader that cannot be unlocked.

After executing the unlock command, the device will reboot and perform a full reset (Wipe Data). This is a necessary security measure for the operating system Android. Only after re-configuring the phone can you proceed to the next step.

๐Ÿ“Š What brand of your smartphone?
Xiaomi / Redmi / POCO
Samsung
OnePlus
Google Pixel
Another brand

Searching and preparing a TWRP image

There is no universal TWRP file for all devices. Each image is compiled specifically for a specific processor model, screen and memory configuration. An attempt to flash an image from another model is guaranteed to break the device.

The official source of the files is the website twrp.me. In the site search, you must enter the exact code name of your device (codename), and not the marketing name. For example, for Xiaomi Mi 9 the code name is cepheus, and for Samsung Galaxy S10 โ€” beyond1.

โš ๏ธ Attention: Never use TWRP images downloaded from random forums or file hosting services if you are not sure of their authenticity. Modified images may contain malicious code.

The downloaded file usually has the extension .img. Rename it to twrp.img for convenience and place it in the same folder where the utilities adb i fastbootare installed. This will make it easier to enter commands in the terminal.

What to do if there is no official version of TWRP?

If there is no assembly for your model on the official website, look for the current versions on the w3bsit3-dns.com forum or XDA Developers in the thread dedicated to your device. Enthusiasts often create unofficial ports faster than the main TWRP team.

Flashing the image via Fastboot

Now we move on to the most important stage. Put your smartphone into Fastboot (or Download Mode for Samsung, although the process is different there). This is usually done using a combination of the volume and power buttons when the device is turned off, or through the command adb reboot bootloader.

Connect the phone to the computer and make sure that the terminal sees the device. Enter the command to check the status:

fastboot devices

If the serial number is displayed, you can flash the firmware. The command writes the recovery image to a special memory section. The command syntax depends on the device architecture, but in most cases the following option is used:

fastboot flash recovery twrp.img

For some devices with dynamic partitions (A/B partition scheme), the command may differ. In such cases, you often need to use the command fastboot boot twrp.img to temporarily boot, and then perform a permanent installation inside TWRP.

โ˜‘๏ธ Firmware checklist

Done: 0 / 5

After successful completion of the process (inscription Finished) not hurry up to reboot your phone with the usual command. First, you need to boot directly into recovery mode so that the system does not have time to overwrite TWRP with stock recovery.

First launch and saving of TWRP

Using the volume buttons to navigate and the power button to confirm, select item Recovery Mode. If you see the TWRP logo and the touch interface works, congratulations, the installation was successful.

When you first launch TWRP, you may ask permission to make changes (Allow Modifications). Swipe the slider to the right. If this is not done, at the first reboot the stock system may replace the custom recovery with the original one.

Action Description Risk
fastboot flash recovery Write an image to the recovery partition Medium (image error)
Swipe to Allow Confirmation of modifications within TWRP Low
Wipe Data Full data clearing when unlocked High (data loss)
Reboot System Reboot to the main OS Low

Now your device is ready to install custom firmware, kernels or patches like Magisk to obtain root access. It is recommended to immediately make a full backup (Nandroid Backup) of a clean system in order to have a rollback point.

๐Ÿ’ก

The most common scenario for losing TWRP is rebooting into the system without first confirming modification rights (Swipe to Allow) at the first start.

Possible errors and their solutions

During the installation process, users often encounter errors. One of the most common is FAILED (remote: device is locked). This means that the bootloader is still locked and the firmware command is rejected by the device.

Another common problem is an error FAILED (remote: unknown command) or just a silent refusal. This may indicate that the version fastboot on your PC is incompatible with the phone protocol. Try updating Platform Tools to the latest version.

โš ๏ธ Attention: If after updating the firmware the phone goes into an endless reboot (bootloop), do not panic. Try going into TWRP (using a combination of buttons) and doing Wipe Dalvik/Cache, or restore the stock image through the same fastboot utility.

It is also worth considering that interfaces and methods may change with the release of new versions of Android. Always check the latest instructions for your specific model on specialized forums before starting work.

Sometimes antivirus software on your computer blocks ADB drivers from working. During the procedure, it is recommended to temporarily disable protective mechanisms or add the folder with utilities to exceptions.

Frequently asked questions (FAQ)

Will installing TWRP delete all my photos and applications?

Flashing the TWRP image itself does not delete data. However, the Bootloader Unlock step, which is a prerequisite, is guaranteed to perform a full device reset (Wipe Data). Be sure to back up your important files before starting the process.

Is it possible to update the system over the air (OTA) with TWRP installed?

As a rule, no. Official OTA updates check the integrity of the system partition. Having a modified recovery or root access will result in an installation error. Typically, the update occurs manually through a downloaded zip archive of the firmware inside TWRP itself.

Is it safe to use banking applications with TWRP?

By default, no. The security flag Play Integrity (formerly SafetyNet) will be marked as failed, and applications like Google Pay or banking clients may refuse to work. To solve this problem, you need to use utilities for hiding root access, such as Magisk Hide or Zygisk.

What to do if the computer does not see the phone in Fastboot mode?

Try another USB cable, preferably a short and original one. Connect the device to another USB port (preferably USB 2.0). Check the device manager: if there is a device with a yellow exclamation mark, reinstall the drivers manually, specifying the path to the folder with Google USB drivers.

Is it possible to return the stock recovery back?

Yes, it is possible. You will need the original stock recovery image for your model. It can be extracted from the complete firmware (ROM) or found separately. It is flashed in the same way via Fastboot with the command fastboot flash recovery stock_recovery.img.