extract_utils: Support A/B OTAs
Change-Id: I52e66fa392f7a8fb5401db179b1242d5d216d137
This commit is contained in:
committed by
Michael Bestas
parent
37be75976f
commit
47851781e7
@@ -1519,10 +1519,9 @@ function extract() {
|
||||
unzip "$SRC" -d "$DUMPDIR"
|
||||
echo "$MD5" > "$DUMPDIR"/zipmd5.txt
|
||||
|
||||
# Stop if an A/B OTA zip is detected. We cannot extract these.
|
||||
# Extract A/B OTA
|
||||
if [ -a "$DUMPDIR"/payload.bin ]; then
|
||||
echo "A/B style OTA zip detected. This is not supported at this time. Stopping..."
|
||||
exit 1
|
||||
python3 "$ANDROID_ROOT"/tools/extract-utils/extract_ota.py "$DUMPDIR"/payload.bin -o "$DUMPDIR" -p "system" "odm" "product" "system_ext" "vendor" 2>&1
|
||||
fi
|
||||
|
||||
for PARTITION in "system" "odm" "product" "system_ext" "vendor"
|
||||
@@ -1541,6 +1540,9 @@ function extract() {
|
||||
extract_img_data "$DUMPDIR"/"$PARTITION".img "$DUMPDIR"/"$PARTITION"/
|
||||
rm "$DUMPDIR"/"$PARTITION".img
|
||||
fi
|
||||
if [ -a "$DUMPDIR"/"$PARTITION".img ]; then
|
||||
extract_img_data "$DUMPDIR"/"$PARTITION".img "$DUMPDIR"/"$PARTITION"/
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user