TWRP Recovery For Any Android Phone: How To Install It
We’ll show you how to install TWRP Recovery on any Android device in this guide. The first thing we’ll do is tell you the steps to tell if your device is an A partition or an A/B partition. That’ll help you figure out if you should flash it directly to the recovery partition or if you should use the boot partition.
Furthermore, we’ll walk you through how to boot into TWRP or install it permanently. Talking about recovery files, you’ll learn about the types (twrp.img and twrp.zip) and especially when you’ll need them. You’ve got a long road ahead of you, so stick with us!
Why you need a custom recovery
Most OEMs ship their devices with locked bootloaders by default. That’s because they want you to use only the ecosystem they’ve provided. In the meantime, they also leave a small window for techies. Therefore, interested users can unlock their device’s bootloader by taking advantage of this opportunity. Your device can then be tweaked in countless ways once you do that.
This includes flashing custom ROMs, custom kernels, and rooting via Magisk to get to the system partition. Additionally, you can install ZIP and IMG files, flash mods, Magisk Modules, Substratum Themes, etc. It would be best if you had someone help you out with most of these tweaks. There’s no better-helping hand than a custom recovery.
There’s a good chance that most of the tweaks we mentioned above can be done within the custom build recovery. It used to be that users flocked to the CWM recovery. Even though it was able to do most of the tweaks, it wasn’t touch-based. Basically, you could only do things with the hardware keys.
The Team Win Recovery Project moved over to custom development to overcome this issue. The rest, as they say, is history. Overall, if you’ve unlocked your device’s bootloader, this should be your go-to custom binary. Here are the instructions for installing TWRP Recovery on any Android device. Let’s get started.
Installing TWRP Recovery on Android
To make it easier to understand, we’ve broken down the steps into separate sections. You’ll need to follow the exact same sequence as before. In the event of a thermonuclear war, or if your alarm doesn’t wake you up, or if anything happens to your device and data by performing the below steps, AMS won’t be responsible.
1: The first step is to take a backup
Data usually doesn’t get lost when you install TWRP Recovery. However, it’s a prerequisite just like unlocking the bootloader. The data partition might also need to be decrypted by a factory reset in some cases. The data on your device would be erased in all these scenarios. Make sure you take a backup of everything on your device.
2: Activate USB Debugging and OEM Unlocking
Android requires you to enable USB Debugging and OEM Unlocking before installing TWRP Recovery. Don’t miss: How to Enable USB Debugging on a Broken Android Device. In ADB Mode, your device needs the first one so it can communicate with the PC. Once you do that, your device will boot into Fastboot for recovery installation.
OEM Unlocking is also required to take permission to unlock the bootloader. (If you’ve already unlocked your bootloader, then you shouldn’t enable OEM Unlocking, just USB Debugging). So, here are the steps you need to follow on your device to enable both of these options:
Go to your device’s Settings.
Go to the About Phone section and tap Build Number 7 times. Now you can enable the developer option.
Once that’s done, go back to Settings and click System
Make sure USB Debugging and OEM Unlocking are enabled in Developer Options.
3: The third step is unlocking the bootloader
You’ll also need to unlock your device’s bootloader. If you don’t do that, you won’t be able to install any custom binary, including TWRP Recovery. However, remember that unlocking will void your warranty and wipe all your data, as well as void your device’s warranty. We have device-specific guides if that’s fine with you:
- The Google Pixel Bootloader: How To Unlock It
- Unlock Bootloader On Samsung Galaxy Phones
- Realme Unlock Bootloader Step-by-Step Guide
- How To Unlock Motorola Bootloader
- OnePlus Bootloader Unlock, Root, Recovery, Tool
- Vivo Bootloader Unlocking Guide
4: Install ADB and Fastboot on your PC
The Android SDK Platform Tools will also need to be installed on your PC. G: google’s ADB and Fastboot binary enable a successful connection between your device and the PC in ADB and Fastboot modes.
5: Download TWRP Recovery for your Android Device
You’ll need your device’s TWRP Recovery file now. On the TWRP official site, you can download the official builds. However, if your device isn’t on that list, you can also download unofficial builds from XDA. There are devices that have TWRP IMG and ZIP files, and some devices only have TWRP IMG. We’ll get to the reason for it later on in the guide. So far, you just download the TWRP file/files that apply to your device.
6: Check if the device has an A/B partition or an A partition
When it comes to A-only devices, the recovery partition is installed. That’s why you can flash the TWRP IMG file directly on the recovery partition. In contrast, if it’s A/B, they won’t have a recovery partition, instead, they’ll take care of it with the boot partition. Therefore, we’ve set up the fastboot command to flash TWRP Recovery. So it is of paramount importance to check if your device is a single or dual partition.
From the Play Store, download and install Treble Check.
Open it up and check out Seamless System Updates.
If the line reads like this, you have a dual A/B partition (slot) device.
......and is detected to have an A/B system partition
On the other hand, if it reads out as follows, your device only has one partition (A):
- In the subsequent sections, TWRP Recovery will be installed on your Android device using the answer you provide.
7: Boot the device into Fastboot mode
Now that we have reached the Fastboot mode, we will proceed to boot our device into that mode. With USB Debugging enabled on your device, you will need to connect the device via a USB cable to your PC.
Then, you will need to navigate to the platform tools folder, type in CMD in its address, and then hit enter. Upon clicking this, you should be able to access the Command Prompt.
- To boot your device into Fastboot mode, you now need to enter the following command into the CMD window in order to boot it:
adb reboot bootloader
When you are done with this, proceed to the next step to install TWRP Recovery on your Android device. In case the result from the STEP 6 test shows that your device has both A and B partitions, then you will need to move on to STEP 8B. If your device has only one partition, then you will need to move to STEP 8A.
8A: Install TWRP on an A-only Android Device
Due to the existence of the recovery partition in these devices, the TWRP IMG file can be flashed to the recovery partition. Additionally, TWRP IMG files will only be available for these devices since ZIP installers are not required. That being said, rename the downloaded recovery to twrp, hence the complete name becomes twrp.img.
You should now move the twrp.img file to the platform tools folder. Additionally, verify that the CMD window is still open in this platform-tools directory, and if not, open it as soon as possible (by typing CMD in its address bar).
Connect your A-only Android device to a PC via a USB cable and boot into Fastboot. In the CMD window, enter the following command to install TWRP Recovery
fastboot flash recovery twrp.img
- The last step is to boot your device by using the following command:
STEP 8B: Install TWRP on A/B Android Device
It is most likely that your device does not have a recovery partition if you have reached this section because it has an A/B partition. The recovery partition cannot be directly flashed with TWRP because of this. We will first boot your device to TWRP via its IMG file, and then permanently flash it via its ZIP file since the boot partition takes care of everything. Additionally, you may have noticed that these devices come with both TWRP ZIP and IMG files. So be sure to download both variants (.zip and .img).
If your A/B device has only the TWRP IMG file but no TWRP ZIP, then refer to the “A/B Device but no TWRP ZIP file? Here’s the Fix” section written at the end of this guide.
Upon downloading, rename both files to twrp.zip and twrp.img, so that their complete names are twrp.zip and twrp.img. The twrp.zip file needs to be transferred to your device, while the twrp.img file needs to be transferred to the platform tools folder on your PC. Additionally, verify that the CMD window is still open in this platform-tools directory, if it is not then open it right away (by typing CMD in its address bar).
- In order to ‘boot’ your device to the TWRP Recovery, connect your device to your PC via a USB cable and boot to Fastboot. Execute the following command in the CMD window to execute the below command.
fastboot boot twrp.img
- In contrast, if you wish to ‘flash’ TWRP Recovery to the boot partition, then follow these instructions:
fastboot flash boot twrp.img
- Once TWRP has been booted, go to its Install section. You will now need to navigate to the twrp.zip file, select it, and perform a right swipe to flash it. If your TWRP only comes with an IMG file, then you would need to flash this IMG file to the Ramdisk partition. The instructions for doing so are provided at the end of this guide. Please refer to the section “How to Install TWRP without ZIP File”].
- Go to the Reboot menu and select Recovery. Your device will reboot to the TWRP Recovery.
It’s that simple. The guide on how to install TWRP Recovery on any Android device ended here. Please let us know if you have any questions regarding the aforementioned steps in the comments section below. We will get back to you as soon as possible with a solution. Having said that, let’s take a look at some of the other resources that might be useful to you.