Include twrp in /e/ docker

I’ve read that twrp can be added to a lineageOS build, but the information is not very clear on how to do so. I build /e/ using Docker for two devices and would like to add twrp to the build. Any documents or information will be appreciated.

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

You want to add the twrp recovery into the OS image?
That are two different things.
twrp is the recovery image
/e/OS the OS image.

Or do I understand it completly wrong?

If you’re referring to TWRP app, it’s completely useless.

If it’s about TWRP Recovery image, I’m doubtful about including it in /e/ ROM image : you need TWRP to install /e/, so it has to be installed first.
Or, maybe you plan to install /e/ + TWRP from Bootloader ?

My device is mata, it has recovery as part of the boot.img and doesn’t have a recovery partition. The official twrp for mata is old, based Android 8.1, and will not boot with Android 11. So basically I would like to replace /e/ recovery with twrp in the boot.img.

I want to add twrp to the boot.img. From there I can flash the .img in the bootloader or sideload the ROM.

When I first read your post this seemed unlikely, you can find the method to build your own TWPR here How can I get TWRP for my device? (how to compile TWRP).

Is it perhaps a misunderstanding? In some (maybe many/all, idk) LineageOS builds, a LineageOS Recovery is produced in the output.

When you build /e/ I have seen an /e/ Recovery in the output. (again maybe always?)

I would expect the /e/ recovery to meet installation needs.

But not backup and restore. And maybe not some of the other operations that TWRP implements (format data, file manager, etc.).

Yes, /e/ recovery work well for installation ROMs and the GUI is much better than lineage recovery in my opinion.

Yes I want twrp for all the reasons you listed. With docker I have a device tree, vendor source, kernel source and was hoping to add a twrp source. With maybe some flags in board.conf file for twrp.

Note : this is highly hypothetical !

I’ll try to add WITH_TWRP, set to True, to Docker vars.
Reference : config/ · v1-q · e / os / android_vendor_lineage · GitLab (line #93)

Also, you may have to find if it’s mata specific in device tree … (sorry, no knowledge about devices without recovery partition here :frowning: ).

Thanks, I did not think of trying to add twrp that way. It may work.