How to Install TWRP Recovery on Android

In this guide, we will list out detailed instruction steps to install the TWRP Recovery on any Android device. To begin with, we will make you aware of the steps to recognize if your device is A partition or A/B. This will help you in understanding whether you could directly flash it to the recovery partition or rather make use of the boot partition.

Likewise, we will also share the instructions on how to boot to TWRP or permanent installation of the recovery. Talking about which, you will be able to learn the type of recovery file you would be needing (twrp.img and twrp.zip) and more importantly when they would be needed. It’s going to be a long journey ahead, so stick with us!

The Need for a Custom Recovery

By default near about every OEM ships their device with a locked bootloader. They do so because they want you, the user, to only use the ecosystem that they have provided. But at the same time, they also leave a slight window open for the tech enthusiasts. Hence the interested users could make full use of this opportunity and unlock their device’s bootloader. Once you do so, you could then carry out a plentitude of tweaks on your device.

These include the likes of flashing custom ROMs, custom kernels, having access to the system partition by rooting via Magisk. Likewise, you could install ZIP and IMG files, flash mods, Magisk Modules, Substratum Themes, and the likes. However most of these tweaks to be effectively carried out, you would require a helping hand. And there is no better helping hand than a custom recovery.

Install Magisk Manager for Recovery Mode via TWRP
TWRP Recovery in Action!

Most of the tweaks that we have mentioned above could easily be carried out via the custom build recovery itself. In earlier times, users generally flocked to the CWM recovery. While it was able to successfully execute most of the tweaks, yet it wasn’t touch-based. This meant that you had to use the hardware keys to perform any action.

To overcome this issue, the Team Win Recovery Project made its way over to the custom development, and the rest, as you would say, is history. All in all, if you have unlocked the device’s bootloader, then this should usually be your go-to custom binary. On that note, here are the required instructions to install the TWRP Recovery on any Android device. Follow along.



How to Install TWRP Recovery on Android

We have broken down the installation steps into separate sections for ease of understanding. Proceed in the exact same sequence as mentioned. Droidwin and its members wouldn’t be held responsible in case of a thermonuclear war, your alarm doesn’t wake you up, or if anything happens to your device and data by performing the below steps.

STEP 1: Take a Backup

Installing the TWRP Recovery doesn’t usually lead to data loss. But it’s a prerequisite such as unlocking the bootloader does. Furthermore, in some instances, you might have to decrypt the data partition by performing a factory reset. All these scenarios would in turn erase the data from your device. So it is highly recommended to take a backup of all the data on your device.

STEP 2: Enable USB Debugging and OEM Unlocking

The steps to install the TWRP Recovery on Android requires you to enable USB Debugging and OEM Unlocking. [Don’t Miss: How to Enable USB Debugging on a Broken Android Devic’s Screen]. The first one is needed so that your device is able to interact with the PC in ADB Mode. This would in turn be used to boot your device to Fastboot to install the recovery.

oem unlock usb debugging

Likewise, OEM Unlocking is required to take permission for the bootloader unlocking. (If you have already unlocked the bootloader, then you don’t need to enable OEM Unlocking, rather you should only enable USB Debugging). With that said, here are the required instruction steps to enable both these options on your device:

  1. Head over to Settings on your device.
  2. Then go to the About Phone section and tap on Build Number 7 times. The developer option has now been enabled.
  3. After this, go back to Settings and tap on System
  4. Then go to Developer Options and Enable USB Debugging and OEM Unlocking.

STEP 3: Unlock Bootloader

Next up, you will also have to unlock the bootloader on your device. Until and unless you do so, you wouldn’t be able to install any custom binary, including TWRP Recovery on your Android device. But do keep in mind that the unlocking process will make the device’s warranty null and void, and would also erase all the data from your device. If that’s well and good, then refer to our device-specific guides:

STEP 4: Install ADB and Fastboot on PC

You will also have to install the Android SDK Platform Tools on your PC. This is the official ADB and Fastboot binary provided by Google which helps in establishing a successful connection between your device and the PC in ADB and Fastboot modes.

unlock bootloader oneplus pad

STEP 5: Download TWRP Recovery for your Android Device

Now get hold of your device’s TWRP Recovery file. The official builds have been hosted on TWRP official site. On the other hand, if your device isn’t on that list, then you may also download the unofficial builds from XDA. While some devices have both the TWRP IMG and ZIP files, others only have the TWRP IMG file. The reason for the same will be cleared later on in this guide. As of now, you simply download the available TWRP file/files for your device.

flash files twrp recovery usb otg pendrive

Furthermore, there is even an option of creating and porting TWRP Recovery for your Android device. While it does require technical expertise, but you may give it a try as well (if there’s no official/unofficial TWRP for your device): How to Create and Port TWRP Recovery to any Android Device. With that said, let’s proceed to the next step to install TWRP Recovery on any Android device.

STEP 6: Check if your Device has Recovery Partition

Now comes the most important part of this guide. You’ll now have to verify if your device has a recovery partition or not. If it does, then you could directly flash the TWRP Recovery to its recovery partition. However, if it doesn’t have a recovery partition, then you’ll have to take the help of the boot partition. So either refer to our detailed guide to check your device’s partition scheme or refer to the shorter instructions given below:

  1. First off, Download and extract the Android SDK Platform Tools folder.
  2. Having USB Debugging enabled, connect your device to your PC via USB.
  3. Launch CMD inside the platform tools and execute the below command
    adb shell 
    cd /dev/block/platform 
    ls -la /dev/block/bootdevice/by-name

  4. Check if the output has recovery or recovery_a or recovery_b keywords.
  5. If it does, then your device has a recovery partition, otherwise, it doesn’t.

STEP 7: Check if the Device has A/B Partition or A Partition [Not Needed]

UPDATE: This step is no longer needed

If your device is A-only, then it would have the recovery partition. Hence you could directly flash the TWRP IMG file to the recovery partition. On the other hand, if it is A/B, then there wouldn’t be any recovery partition, rather it is now taken care of by the boot partition. Accordingly, the fastboot command to flash TWRP Recovery has been set up.

So it is of paramount importance to check if your device is a single partition or dual partition. So refer to the below instructions for the same. [Furthermore, I would highly suggest that you get acquainted with these A and A/B partition schemes on your device via this guide: How to Check and Change Current Active Slot on Android].

  1. Download and install the Treble Check app from Play Store.
  2. Launch it and have a look at the Seamless System Updates section.
  3. If the line reads as follows, then you have a dual A/B Partition (slot) device.
    ......and is detected to have an A/B system partition

    check for seamless system update

  4. On the other hand, if it reads out as follows, then your device has only a single partition/slot (i.e A):
    ....and is detected to have an A-only system partition

    is my device ab partition dual slot

  5. Remember the answer as it would be used in the subsequent sections to install TWRP Recovery on your Android device.

STEP 7: Boot Device to Fastboot Mode

  1. It’s now time to boot your device to the Fastboot Mode. So with USB Debugging enabled, connect your device to the PC via USB cable.
  2. Then head over to the platform-tools folder, type in CMD in its address, and hit Enter. This should bring up the Command Prompt.
    python cmd window
  3. Now execute the below command in the CMD window to boot your device to the Fastboot Mode:
    adb reboot bootloader

    oneplus-7t-fastboot-mode

Once done, proceed to the next step to install TWRP Recovery on your Android device. If the result from the test in STEP 6 came out to be A/B partition, then move to STEP 8B. Whereas if your device has only A partition then check out STEP 8A. if you wish to know more on this A/B vs A-only and its relation with TWRP, check out our guide on TWRP: fastboot flash vs fastboot boot: Which command to use?

STEP 8A: Install TWRP on Devices Having Recovery Partition

If your device does have a recovery partition, then you could directly flash it to that partition. Here’s how:

  1. To test TWRP for one-time usage, then type in the below command:
    fastboot boot twrp.img

    install twrp android

  2. Type in the below command to permanently install TWRP Recovery to the recovery partition
    fastboot flash recovery twrp.img

    install twrp android

  3. If the TWRP is booted to any other language, then refer to our guide to change TWRP language
  4. Next up, use the following command to boot your device to the recovery mode
    fastboot reboot recovery
  5. Your device will now boot to TWRP and you could now carry out the desired task.
  6. Apart from that, you could also boot your device to TWRP and then flash TWRP to the Recovery partition itself, as shown in this guide.

STEP 8B: Install TWRP on Device without Recovery Partition

if your device does not have a recovery partition, then you’ll have to take the help of boot partition to flash TWRP on your Android device.

  1. Execute the below command in the CMD window to ‘boot’ your device to the TWRP Recovery
    fastboot boot twrp.img

    install twrp android

  2. If the TWRP is booted to any other language, then refer to our guide to change TWRP language.
  3. Now if you want TWRP just for one-time usage, then simply go to Reboot and select System.install twrp recovery android
  4. Your device will boot to the OS and TWRP will be replaced with stock recovery.
  5. On the other hand, if you want to permanently install TWRP, then go to its Install section.
    install-twrp-zip-android
  6. Then navigate to the twrp.zip file, select it, and perform a right swipe to flash it.

    If your TWRP doesn’t have the ZIP file, and only comes with the IMG file, then you could either flash TWRP IMG file to the Ramdisk partition or use Flash Current TWRP.

  7. Once done, go to Reboot and select Recovery. Your device will reboot to TWRP.reboot-recovery-twrp
  8. You may now flash the desired file. Once done, boot to the OS via Reboot > System.reboot-system-twrp
  9. If you can’t boot to the System and stuck in a bootloop, refer to this guide: How to Fix Soft brick/Bootloop after installing TWRP Recovery.

That’s it. This was all from this guide on how to install TWRP Recovery on any Android device. If you have any queries concerning the aforementioned steps, do let us know in the comments section below. We will get back to you with a solution at the earliest. With that said, let’s turn our attention towards some of the other useful resources that might help you out.

How to Install TWRP without a ZIP File?

As I had earlier mentioned A/B devices need to have two sets of TWRP files: IMG and ZIP. However recently I came across a device (Motorola One Action), that is an A/B partition but only had the TWRP IMG file but no ZIP file. Turns out, that this wasn’t the only device and there were quite a few others belonging to this domain.

METHOD 1: Install TWRP to Ramdisk

install twrp img from twrp

I did some research and found out that for these devices, you would have to flash the TWRP IMG to their Ramdisk as well. In other words, first off you will boot to TWRP via fastboot boot twrp.img, and then from TWRP flash the IMG file to the Ramdisk for permanent installation. If your device falls under this category as well, then please refer to this guide:  How to Permanently Install TWRP without TWRP ZIP File (only using TWRP.img file).

METHOD 2: Using Flash Current TWRP

On some devices, you wouldn’t find the Install Recovery Ramdisk, rather that has now been replaced with the Flash Current TWRP option. This feature would also come in handy in case your device only has the TWRP.img file but no ZIP. For the unaware, this feature automatically picks up the twrp.img that is currently temporarily booted to your device and would then permanently flash it.

  1. To try it out, start by booting your device to TWRP using the below command:
    fastboot boot twrp.img
  2. After that, go to the Advanced section and tap on Flash Current TWRP.
    install twrp recovery android
  3. The TWRP will now be permanently flashed onto your device.
  4. Just to be on the safer side, it is recommended to reboot your device to TWRP.
    install twrp recovery android
  5. For that, go to Reboot and select Recovery. That’s it, the process stands complete.

METHOD 3: Flash TWRP IMG from TWRP

If your device has the recovery partition, then you might not see the Install Recovery Ramdisk option. This is because you wouldn’t even need this feature in the first place.  You could directly flash the TWRP to the recovery partition from the TWRP Recovery itself. Here’s how:

  1. First off, place the twrp.img file to the platform-tools folder on your PC and to your device’s internal storage as well.
  2. Then temporary boot your device to TWRP using the below command:
    fastboot boot twrp.img
  3. After that, go to the Install section and tap on the Install Image button.
  4. Now select the twrp.img file and subsequently choose the Recovery partition.
    install twrp recovery android
  5. TWRP will now be permanently flashed onto your device.
  6. Once done, it is recommended to reboot your device to TWRP from Reboot > Recovery.
    install twrp recovery android
  7. After that, you may reboot the device to the OS via Reboot > System.

METHOD 4: Flash TWRP to Vendor_Boot Partition

How to Flash TWRP Recovery in the vendor boot partition

How to Boot to TWRP Recovery on Android

Now that you have successfully installed TWRP Recovery on your Android device, you might occasionally need to boot to it. For that, please refer to our detailed guide on How to Boot into Recovery TWRP Recovery. If you don’t wish to check out that guide then here are the shorter instructions: use the adb reboot recovery command or the fastboot reboot recovery command. You may also use your device’s hardware key combinations.

How to Update TWRP Recovery on Android

TWRP usually gets blessed with updates that fix underlying bugs and make it more stable to use. While the frequency of updates in the official TWRP is quite low as everything has been already taken care of by the developers before releasing it officially. However, if you have downloaded an unofficial build, then you might have to occasionally update the recovery. On that note, you may refer to our comprehensive guide to Update TWRP Recovery on any Android Device.

How to Install TWRP Recovery on Samsung Devices

You cannot flash TWRP Recovery on Samsung devices by using Fastboot Commands. Rather there is a completely different set of rules to carry out this task. If you wish to know more about the same, then refer to our detailed coverage on How to Install TWRP Recovery on Samsung via Odin. If you don’t wish to check out that guide, then here are the instructions in short:

install-twrp-recovery-samsung-odin

  1. Boot your device to Download Mode.
  2. Download the TWRP TAR file for your Samsung device.
  3. Load this TAR file in Odin’s AP slot and click Start.

How to Remove/Uninstall TWRP from my Device?

If you no longer require TWRP Recovery and wish to revert to stock, then this guide shall help you out: How to Uninstall TWRP and Restore Stock Recovery on Android.

On that note, we conclude this tutorial on how to install TWRP Recovery on any Android device. We have tried to cover all the important aspects of this custom recovery. However, if you feel we missed any, do share your views with us in the comments section below.


Share: