From e8ddae939497984ce903012f2011444ea070c2f2 Mon Sep 17 00:00:00 2001 From: dianlujitao Date: Tue, 21 Apr 2020 23:01:13 +0800 Subject: [PATCH] extract_utils: Handle Brotli compressed block image Change-Id: I1b3ef34ebba9b43fd684c6abaa1dbc77c8786da7 --- build/tools/extract_utils.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/tools/extract_utils.sh b/build/tools/extract_utils.sh index cfbad5c..d757258 100755 --- a/build/tools/extract_utils.sh +++ b/build/tools/extract_utils.sh @@ -1478,6 +1478,11 @@ function extract() { for PARTITION in "system" "odm" "product" "vendor" do # If OTA is block based, extract it. + if [ -a "$DUMPDIR"/"$PARTITION".new.dat.br ]; then + echo "Converting "$PARTITION".new.dat.br to "$PARTITION".new.dat" + brotli -d "$DUMPDIR"/"$PARTITION".new.dat.br + rm "$DUMPDIR"/"$PARTITION".new.dat.br + fi if [ -a "$DUMPDIR"/"$PARTITION".new.dat ]; then echo "Converting "$PARTITION".new.dat to "$PARTITION".img" python "$DU_ROOT"/vendor/du/build/tools/sdat2img.py "$DUMPDIR"/"$PARTITION".transfer.list "$DUMPDIR"/"$PARTITION".new.dat "$DUMPDIR"/"$PARTITION".img 2>&1