TREE_TYPE=omni TWRP_TREE=https://github.com/TeamWin/android_device_redmi_begonia.git ANDROID_VERSION=9 DEVICE_CODENAME=begonia DEVICE_PATH=device/redmi/begonia # # # # # # cd /tmp/rec rm -rf .repo source build/envsetup.sh lunch $TREE_TYPE_$DEVICE_CODENAME-eng #edit this export SKIP_API_CHECKS=true ##use additional flags if you need(optional) export SKIP_ABI_CHECKS=true ##use additional flags if you need(optional) export ALLOW_MISSING_DEPENDENCIES=true ##use additional flags if you need(optional) #necessary flags export CCACHE_DIR=/tmp/ccache export CCACHE_EXEC=$(which ccache) export USE_CCACHE=1 ccache -M 40G #ccache -o compression=true ccache -z ccache -c DATE=$(date +%Y%m%d) mka recoveryimage mkdir temporary cp -R out/target/product/$DEVICE_CODENAME temporary/$DEVICE_CODENAME cd temporary/$DEVICE_CODENAME mv recovery.img "$DEVICE_CODENAME"_TWRP_"$DATE"_recovery.img cd - echo " " curl --upload-file ./temporary/$DEVICE_CODENAME/"$DEVICE_CODENAME"_TWRP_"$DATE"_recovery.img https://transfer.sh/ #edit this echo " "