4. Build TWRP from source - SebaUbuntu/TWRP-device-tree-generator Wiki

Now that you have a device tree for your device, it's time to build a TWRP recovery image

Clone minimal TWRP environment

https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni

Remember to clone the correct version of TWRP based on what Android version your phone have! If your phone have Android 8.0, clone twrp-8.0 branch

Move device tree to TWRP sources

Example:

Building

. build/envsetup.sh

to initialize the environment

lunch omni_codename-eng

where codename is the codename of your phone

mka recoveryimage

to build the recovery

Go to [[5. Boot the recovery image]]