extract_utils: Add helper function for carriersettings_extractor.py
Change-Id: Iaa0196054f39fccc86a34dea1243db0963216f31
diff --git a/extract_utils.sh b/extract_utils.sh
index 80a309c..e0bf784 100644
--- a/extract_utils.sh
+++ b/extract_utils.sh
@@ -1808,6 +1808,20 @@
}
#
+# extract_carriersettings:
+#
+# Convert prebuilt protobuf CarrierSettings files to CarrierConfig vendor.xml
+#
+function extract_carriersettings() {
+ local CARRIERSETTINGS_EXTRACTOR="$ANDROID_ROOT"/lineage/scripts/carriersettings-extractor/carriersettings_extractor.py
+ local SRC="$ANDROID_ROOT"/"$OUTDIR"/proprietary/product/etc/CarrierSettings
+ local CARRIERSETTINGS_OUTPUT_DIR="$ANDROID_ROOT"/"$OUTDIR"/rro_overlays/CarrierConfigOverlay/res/xml
+
+ mkdir -p "$CARRIERSETTINGS_OUTPUT_DIR"
+ python3 "$CARRIERSETTINGS_EXTRACTOR" -i "$SRC" -v "$CARRIERSETTINGS_OUTPUT_DIR"
+}
+
+#
# extract_firmware:
#
# $1: file containing the list of items to extract