[General Topics] Kelexine:
How to install twrp recovery in a/b partitioned devices

First off, am not responsible for any damages that comes to your device while following this guide, am just sharing the general steps that works for most if not all devices with a/b partitioning scheme.

With that aside, let's proceed with the instructions.

I want to re-emphasize that if you're migrating from a different device, a clean flash with proper data formatting is mandatory. If you're transitioning from a stock ROM, data and file wiping is a necessary step. There's no bypass for it. Having clarified that, let's dive into the process of flashing TWRP.

It seems like you might be stuck in the era before Android devices with A/B partition schemes were introduced. Consequently, you could be improperly flashing the recovery because of misconstrued guides. Regardless, flashing a recovery shouldn't be this complicated. All you need to do is accurately follow the correct steps. Once you've done this a couple of times, it becomes second nature.

Always flash the files in the following sequence:

1) TWRP

2) Custom ROM

When it comes to flashing TWRP, it's crucial to understand why you're doing it and what exactly happens when you execute a command. This understanding is far better than blindly following some guide.

The first step is booting the TWRP Recovery and then flashing it onto your device.

Bear in mind that, unlike traditional partition devices, there's no separate recovery partition for A/B partition devices. What does this mean? It means you have to be smart and think about how to navigate this.

It's essential to remember that TWRP cannot be flashed directly via fastboot commands onto a neatly separated recovery partition because it resides inside the boot partition. Therefore, we will boot into recovery first and then flash it.

Use the following code to boot into recovery:

fastboot boot twrp.img

This will temporarily boot your device into recovery mode. Remember, this is temporary and won't be permanent.

Next, you have to delete all the data on your device. Navigate to 'Wipe', select 'System' and 'Data', and swipe right on the 'Swipe to Wipe' button to wipe the selected partitions.

Afterwards, go to 'Mount' and enable the 'MTP' option. Your device will now appear on your PC, allowing you to transfer the TWRP zip file, ROM, and anything else you need to move from your computer to your phone.

Flashing the actual TWRP zip file should now be simple. Go to 'Install', select the TWRP zip file, and swipe right on 'Swipe to confirm Flash'.

And here we go... At this point most of the people think they have flashed the TWRP and it should be installed. But it is not...

This is the part where most people stumble because they fail to follow the instructions carefully:

Reboot your device back into TWRP Recovery.

Navigate to the Advanced menu of TWRP and select "Install Recovery Ramdisk". (The "Install Recovery Ramdisk" option in TWRP is primarily used on A/B partition devices, which do not have a separate recovery partition. In these devices, the recovery is a part of the boot partition. The "Install Recovery Ramdisk" option allows you to install TWRP or another recovery onto the boot partition of your device. This effectively makes the chosen recovery the default recovery on the device, allowing you to access it every time you boot into recovery mode. This is commonly used to permanently install TWRP on devices with the A/B partition system.)

Once you understand this, select the "Install Recovery Ramdisk" option. The next step is to select the twrp.img file from your device's internal storage or wherever you've saved it, swipe to install, and then reboot. That's it! TWRP should now be successfully installed on your device.

It's not as complicated as it seems. In fact, typing all of this took longer than the process itself. Once you've done it a couple of times, you'll see what I mean.

Also this guide was meant for devices that support temporary booting of boot or recovery images, for instance MediaTek based devices have the habit of refusing to boot files temporarily, this might not be the case for all devices so you have to test it out before concluding anything.

If your device happens to fall into the category that doesn't support temporary booting, you will have to flash it directly (might lead to brick 🧱, if you don't know what you are doing), or just follow the guidelines from where you downloaded the twrp from.

HAPPY FLASHING