Build your first custom recovery from TeamWin Recovery Project.
git clone https://github.com/MrFluffyOven/custom_recovery_tree_samsung_gta9p.git -b twrp-12.1-s3 device/samsung/gta9p
export ALLOW_MISSING_DEPENDENCIES=true; . build/envsetup.sh; lunch twrp_gta9p-eng; mka recoveryimage
- cd-Crypton who made this tree and wrote nearly all the code