From e7185eb6c19a61254ac8d537c8f942d6a3ead06a Mon Sep 17 00:00:00 2001 From: merothh Date: Wed, 6 Apr 2022 09:54:49 +0530 Subject: [PATCH] build.sh: Add a flag make a raw edl flashable image package --- src/build.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/build.sh b/src/build.sh index c4868c8..307f2c2 100755 --- a/src/build.sh +++ b/src/build.sh @@ -270,9 +270,9 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then sha256sum "$build" > "$ZIP_DIR/$zipsubdir/$build.sha256sum" find . -maxdepth 1 -name 'e-*.zip*' -type f -exec mv {} "$ZIP_DIR/$zipsubdir/" \; + SKIP_DYNAMIC_IMAGES="odm.img product.img system.img system_ext.img vendor.img" if [ "$BACKUP_IMG" = true ]; then if [ "$BUILD_SUPER_IMAGE" = true ]; then - SKIP_DYNAMIC_IMAGES="odm.img product.img system.img system_ext.img vendor.img" find . -maxdepth 1 -name '*.img' -type f $(printf "! -name %s " $(echo "$SKIP_DYNAMIC_IMAGES")) -exec zip "$ZIP_DIR/$zipsubdir/IMG-$build" {} \; elif [ "$SPARSE_PREBUILT_VENDOR_IMAGE" = true ]; then echo "Sparsing prebuilt vendor image" @@ -294,6 +294,15 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then md5sum "IMG-$build" > "IMG-$build.md5sum" cd "${OUT}" || return 1 fi + if [ "$EDL_RAW_SUPER_IMAGE" = true ]; then + echo "Unsparsing super image" + simg2img super.img super.raw.img || return 1 + find . -maxdepth 1 -name '*.img' -type f ! -name super.img $(printf "! -name %s " $(echo "$SKIP_DYNAMIC_IMAGES")) -exec zip "$ZIP_DIR/$zipsubdir/EDL-$build" {} \; + cd "$ZIP_DIR/$zipsubdir" || return 1 + sha256sum "EDL-$build" > "EDL-$build.sha256sum" + md5sum "EDL-$build" > "EDL-$build.md5sum" + cd "${OUT}" || return 1 + fi if [ "$RECOVERY_IMG" = true ]; then -- GitLab