MANIFEST=git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git BRANCH=twrp-9.0 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 # # # # mkdir -p /tmp/rec cd /tmp/rec # Repo init command, that -device,-mips,-darwin,-notdefault part will save you more time and storage to sync, add more according to your rom and choice.Optimization is welcomed! Let's make it quit, and with depth=1 so that no unnecessary things. repo init --no-repo-verify --depth=1 -u "$MANIFEST" -b "$BRANCH" -g default,-device,-mips,-darwin,-notdefault git config --global user.name "Box In A Box" git config --global user.email "evanferrao@gmail.com" # Sync source with -q, no need unnecessary messages, you can remove -q if want! try with -j30 first, if fails, it will try again with -j8 repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j$(nproc --all) || repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j8 pwd ls #delete these lines, and replace with your own lines of device sauce git clone $TWRP_TREE $DEVICE_PATH cd /tmp/rec