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}"