extract_utils: Add support to generate carriersettings file list
Change-Id: Ia92e4f12c22eaf1a25f116f6928540345e3a5e1d
diff --git a/extract_utils.sh b/extract_utils.sh
index 7a3dc4a..69a816f 100644
--- a/extract_utils.sh
+++ b/extract_utils.sh
@@ -1733,7 +1733,8 @@
local output_list="$2"
local output_list_tmp="$EXTRACT_TMP_DIR/_proprietary-blobs.txt"
local -n skipped_files="$3"
- local partition="$4"
+ local component="$4"
+ local partition="$component"
mkdir -p "$image_dir"
@@ -1747,8 +1748,17 @@
echo "Unsupported "$image_file""
fi
+ if [ -z "$component" ]; then
+ partition="vendor"
+ elif [[ "$component" == "carriersettings" ]]; then
+ partition="product"
+ fi
+
find "$image_dir" -not -type d | sed "s#^$image_dir/##" | while read -r FILE
do
+ if [[ "$component" == "carriersettings" ]] && ! prefix_match_file "etc/CarrierSettings" "$FILE" ; then
+ continue
+ fi
if suffix_match_file ".odex" "$FILE" || suffix_match_file ".vdex" "$FILE" ; then
continue
fi
@@ -1756,11 +1766,7 @@
if array_contains "$FILE" "${skipped_files[@]}"; then
continue
fi
- if [ -z "$partition" ]; then
- echo "vendor/$FILE" >> "$output_list_tmp"
- else
- echo "$partition/$FILE" >> "$output_list_tmp"
- fi
+ echo "$partition/$FILE" >> "$output_list_tmp"
done
# Sort merged file with all lists