Home > Tips and Tricks > TWRP Recovery

How to Replace AOSP Recovery [Lineage/Pixel/etc] with TWRP

In this guide, we will show you the steps to replace the AOSP Recovery with the TWRP Recovery. From the past couple of years, many custom ROMs come with their own set of custom recoveries as well. For example, upon flashing LinegeOS, you get the Lineage Recovery, Pixel Experience will give you the Pixel recovery, and so on. However, there exists a major drawback with these recoveries.

They only support the flashing of a few handful of files. They are primarily designed to lash their own custom ROM or update it via ADB Sideload. Apart from that, some custom recoveries might also allow you to sideload Magisk, but that’s just about it. On the other hand, the TWRP Recovery allows you to flash any and every type of ZIP and even IMG files. Say, for example, you want to root a custom ROM.

Then [in most cases] you’ll have to extract the ROMs’ payload.bin, get the boot.img, patch it via Magisk, boot your device via that patched file and finally use Direct Install to obtain root. This involves quite a lot of steps as opposed to simply flashing Magisk via TWRP and your ROM stands rooted. So owing to all these benefits involved, your best bet is to replace the AOSP Recovery with the TWRP Recovery. And in this guide, we will show you how to do just that.

How to Replace AOSP Recovery [Lineage/Pixel/etc] with TWRP

Before starting, please take a backup of all the data on your device, just to be on the safer side. 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: Install Android SDK

install adb platform tools windows

First and foremost, you will have to install the Android SDK Platform Tools on your PC. This is the official ADB and Fastboot binary provided by Google and is the only recommended one. So download it and then extract it to any convenient location on your PC. Doing so will give you the platform-tools folder, which will be used throughout this guide to replace the AOSP Recovery with TWRP.

STEP 2: Enable USB Debugging

Next up, you will also have to enable USB Debugging and OEM Unlocking on your device. The former will make your device recognizable by the PC in ADB mode. This will then allow you to boot your device to Fastboot Mode. On the other hand, OEM Unlocking is required to carry out the bootloader unlocking process. So head over to Settings > About Phone > Tap on Build Number 7 times > Go back to Settings > System > Advanced > Developer Options > Enable USB Debugging and OEM Unlock.

Replace AOSP Recovery with TWRP

STEP 3: Unlock Bootloader

Next up, you will also have to unlock the device’s bootloader. Do keep in mind that doing so will wipe off all the data from your device and could nullify its warranty as well. So if that’s all well and good, then please refer to our detailed guide on How to Unlock Bootloader on any Android Device

Replace AOSP Recovery with TWRP

STEP 4: Download TWRP Recovery

  1. You may now grab hold of the TWRP Recovery corresponding to your device from the below link:
    TWRP OFFICIAL SITE
  2. Once downloaded, rename the TWRP IMG file to twrp.img and transfer it to the platform-tools folder.

STEP 5: Boot to Fastboot Mode

  1. Now connect your device to the PC via a USB cable. Make sure USB Debugging is enabled.
  2. Then head over to the platform-tools folder, type in CMD in the address bar, and hit Enter. This will launch the Command Prompt.
    command-prompt-inside-adb
  3. Type in the following command in the CMD window to boot your device to Fastboot Mode
    adb reboot bootloader

    Replace AOSP Recovery with TWRP

  4. To verify the Fastboot connection, type in the below command and you should get back the device ID.
    fastboot devices

    twrp poco f4

  5. If you are not getting any serial ID, then please install the Fastboot Drivers on your PC.

STEP 6: Temporary Replace AOSP Recovery with TWRP

If you just want to use TWRP for one-time usage, then it’s better to temporarily boot your device to TWRP. Once booted, you could then flash the desired file and reboot to the system. Once that happens, the TWRP will get replaced via the AOSP Recovery.

  1. Head over to the platform-tools folder, type in CMD in the address bar, and hit Enter. This will launch the Command Prompt.command-prompt-inside-adb
  2. Then type in the following command in the CMD window to temporarily boot your device to TWRP Recovery:
    fastboot boot twrp.img

    Replace AOSP Recovery with TWRP

  3. Your device will now boot to TWRP. Now proceed over to the next step to permanently install it.

STEP 7: Permanently Replace AOSP Recovery with TWRP

Do note that the method to permanently flash TWRP varies depending on your device, so double-check the instructions from your device-specific forum or ask us in the comments. Given below are two generic methods of installing the recovery, which “usually” works for most devices.

  1. First off, temporarily boot your device to TWRP as shown in the above step.
  2. Then go to Advanced and tap on Flash Current TWRP. It will now be flashed.Replace AOSP Recovery with TWRP
  3. Or, transfer the twrp.img to your device via any of these three methods.
  4. Then go to Advanced > Install Recovery Ramdisk > select twrp.img and flash it.Replace AOSP Recovery with TWRP
  5. Once you have flashed TWRP via either of the two methods, go to Reboot and select Recovery.Replace AOSP Recovery with TWRP
  6. Your device will reboot to TWRP. This signifies that TWRP has been permanently flashed onto your device.
  7. You may now flash the desired files and once, select Reboot > System to boot the device to the OS.

That’s it. These were the steps to replace the AOSP Recovery with the TWRP Recovery. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest.


Share: