From 85adc821bdc0709db6f50b754ca0f0c7cb72b429 Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Mon, 22 Jan 2024 12:21:08 +0000 Subject: [PATCH] walleye: Allow extracting only firmware images Change-Id: Icab3f013661304e3a9ec89b0816a8139f6b8e8e5 --- extract-files.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/extract-files.sh b/extract-files.sh index 1c2d8e0..56b5f6e 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -27,11 +27,15 @@ source "${HELPER}" # Default to sanitizing the vendor folder before extraction CLEAN_VENDOR=true +ONLY_FIRMWARE= KANG= SECTION= while [ "${#}" -gt 0 ]; do case "${1}" in + --only-firmware ) + ONLY_FIRMWARE=true + ;; -n | --no-cleanup ) CLEAN_VENDOR=false ;; @@ -78,8 +82,10 @@ function blob_fixup() { # Initialize the helper setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}" -extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" -extract "${MY_DIR}/proprietary-files-vendor.txt" "${SRC}" "${KANG}" --section "${SECTION}" +if [ -z "${ONLY_FIRMWARE}" ]; then + extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" + extract "${MY_DIR}/proprietary-files-vendor.txt" "${SRC}" "${KANG}" --section "${SECTION}" +fi if [ -z "${SECTION}" ]; then extract_firmware "${MY_DIR}/proprietary-firmware.txt" "${SRC}"