Methods of payment Abuse

Installing TWRP via Fastboot

25.01.2022, 00:57

TWRP is called a popular recovery menu for Android with which you can flash various third-party firmware, do root, system backups, restore your phone in case of problems. One of the frequent questions that users ask is how to install TWRP via Fastboot. Let's consider the instructions on the example of Xiaomi Mi A2. Please note that to follow these instructions you need unlock bootloader and preferably enable USB debugging.

Preparing the smartphone

As mentioned above, first of all you should unlock the bootloader. It doesn't hurt to enable USB debugging. Once you have completed these steps, you can move on to the next step. The next step is to install TWRP.

Installing

You can download TWRP on the official website or on a specialized forum, for example, 4pda. On the official website for this device, the installation files are available at the link. You will need two files. This is the *.zip file that will be installed on the system and the *.img file from which the download will be performed.

Download and install the latest version available.

Reboot

Now everything is ready for installation. Reboot your phone into fastboot mode. To do this, you can use the command:

$ adb reboot bootloader

Or you can press the volume key down and the power key. After the inscription Fastboot appears on the screen of the smartphone you can start. Next we move on to formatting.

Formatting

If you are an Android 10 user or your Android lower version has user data encryption enabled, you will have to disable it because TWRP doesn't know how to work with encrypted systems. In doing so, you will lose your data. To delete all user data in fastboot, run the command:

$ fastboot -w

Boot Recovery

Now make sure that your PC is connected to the phone via USB, preferably USB 2.0 and the computer can see the phone. To do this, run the command:

$ fastboot devices

To boot into the recovery menu you will need the *.img file you downloaded earlier. Execute the boot command and pass it the path to the *.img file. For example:

$ fastboot boot ~/Downloads/twrp-3.6.0_9-0-jasmine_sprout.img

The smartphone will go to reboot and start the TWRP recovery already.

First TWRP setup

The utility will notify you that it can mount partitions on the device in read-only mode, but then you won't be able to install TWRP and other zip packages. To allow you to mount write-only partitions, swipe right and you will be taken to the main menu immediately afterwards.

ADB flashing

Now you should open Advanced, ADB Sideload and swipe right to start waiting for commands from your PC:

On PC you need to execute adb sideload command and in its parameters pass the path to *.zip archive in ADB. For example:

$ adb sideload ~/Downloads/twrp-installer-3.6.0_9-0-jasmine_sprout.zip

After flashing is complete, the system will notify you that everything is ready and you can reboot. Just press the Reboot button.

In order for the Android system not to revert the encryption back after booting, you need to flash another archive. To do this, tap the Back button and select ADB Sideload again. On your computer you need to download the archive DM-VERITY, FORCED ENCRYPTION, AND DISC QUOTA DISABLER and send it to the device as in the previous example:

$ adb sideload ~/Downloads/Disable_Dm-Verity_ForceEncrypt_11.02.2020.zip

After that, you can reboot the system and use your TWRP.

How to solve problems

While working with fastboot, one of two common problems usually occurs:

You are trying to connect Fastboot via USB 3.0. This doesn't work on all devices, use USB 2.0. If there are no such ports on your PC, use a USB 2.0 hub.

You are using an outdated version of fastboot. Just download a new version from the official website. You don't have to install it, just unzip it to some folder and you can use it instead of the system one.

Next, every time you go to the recovery TWRP will be opened. As you can see, installing twrp via fastboot is not an easy task, but even a beginner can cope with it if you follow all the steps described in the instructions.