From 0327a627cd9302b5a710d8b5d88fbd33f0129f09 Mon Sep 17 00:00:00 2001 From: Tad Date: Mon, 26 Jun 2023 15:33:57 -0400 Subject: [PATCH] Ensure fastboot.zip is generated if necessary As dtbo is necessary on avicii, hotdog, hotdogb, instantnoodle, instantnoodlep, kebab, lemonades, pro1x Which all don't currently have a fastboo.zip provided Signed-off-by: Tad --- Scripts/Common/Functions.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Scripts/Common/Functions.sh b/Scripts/Common/Functions.sh index 12bdb144..ec7b06c8 100644 --- a/Scripts/Common/Functions.sh +++ b/Scripts/Common/Functions.sh @@ -332,7 +332,9 @@ processRelease() { #Image unzip -l $OUT_DIR/$PREFIX-target_files.zip | grep -q recovery.img; local hasRecoveryImg="$?"; - if [ "$hasRecoveryImg" == "1" ]; then + unzip -l $OUT_DIR/$PREFIX-target_files.zip | grep -q dtbo.img; + local hasDtboImg="$?"; + if [ "$hasRecoveryImg" == "1" ] || [ "$hasDtboImg" == "0" ]; then echo -e "\e[0;32mCreating fastboot image\e[0m"; "$RELEASETOOLS_PREFIX"img_from_target_files "$OUT_DIR/$PREFIX-target_files.zip" \ "$OUT_DIR/$PREFIX-fastboot.zip"; @@ -368,7 +370,7 @@ processRelease() { fi; #Extract signed recovery - if [ "$hasRecoveryImg" == "0" ]; then + if [ "$hasRecoveryImg" == "0" ] && [ "$hasDtboImg" == "1" ]; then echo -e "\e[0;32mExtracting signed recovery.img\e[0m"; mkdir "$OUT_DIR/rec_tmp"; unzip "$OUT_DIR/$PREFIX-target_files.zip" "IMAGES/recovery.img" -d "$OUT_DIR/rec_tmp";