extract_firmware: Unsparse images before copying

Some OEMs like motorola ship sparse images which can't be flashed as-is

Change-Id: I6f5a7e058e02167c242b0a5053fa4f6cc3a351ea
This commit is contained in:
Michael Bestas
2024-01-02 23:08:02 +02:00
parent 696f89ff21
commit f33c681acf

View File

@@ -1969,6 +1969,10 @@ function extract_firmware() {
elif [ -f "$SRC/$DST_FILE" ]; then
COPY_FILE="$SRC/$DST_FILE"
fi
if [[ $(file -b "$COPY_FILE") == Android* ]]; then
"$SIMG2IMG" "$COPY_FILE" "$SRC"/"$(basename "$COPY_FILE").raw"
COPY_FILE="$SRC"/"$(basename "$COPY_FILE").raw"
fi
fi
if [ -f "$COPY_FILE" ]; then