zenfone9: Switch to py extract utils

Change-Id: Ia13b728464495ff208ca1a706847b11af5c93ae8
Signed-off-by: micky387 <mickaelsaibi@free.fr>
diff --git a/extract-files.py b/extract-files.py
new file mode 100755
index 0000000..a6a761e
--- /dev/null
+++ b/extract-files.py
@@ -0,0 +1,66 @@
+#!/usr/bin/env -S PYTHONPATH=../../../tools/extract-utils python3
+#
+# SPDX-FileCopyrightText: 2024 The LineageOS Project
+# SPDX-License-Identifier: Apache-2.0
+#
+
+from extract_utils.fixups_blob import (
+    blob_fixup,
+    blob_fixups_user_type,
+)
+from extract_utils.fixups_lib import (
+    lib_fixup_remove,
+    lib_fixups,
+    lib_fixups_user_type,
+)
+from extract_utils.main import (
+    ExtractUtils,
+    ExtractUtilsModule,
+)
+
+def lib_fixup_vendor_suffix(lib: str, partition: str, *args, **kwargs):
+    return f'{lib}_{partition}' if partition == 'vendor' else None
+
+lib_fixups: lib_fixups_user_type = {
+    **lib_fixups,
+    (
+    ): lib_fixup_vendor_suffix,
+    (
+    ): lib_fixup_remove,
+}
+
+blob_fixups: blob_fixups_user_type = {
+    ('system_ext/etc/permissions/vendor.qti.hardware.data.connection-V1.0-java.xml',
+     'system_ext/etc/permissions/vendor.qti.hardware.data.connection-V1.1-java.xml'): blob_fixup()
+        .regex_replace('system/product', 'system_ext')
+        .regex_replace('xml version="2.0"', 'xml version="1.0"'),
+     'vendor/bin/vendor.dpmd': blob_fixup()
+         .add_needed('libhidlbase_shim.so'),
+     'vendor/bin/hw/android.hardware.security.keymint-service-qti': blob_fixup()
+        .add_needed('android.hardware.security.rkp-V1-ndk.so'),
+    ('vendor/etc/media_codecs_cape.xml', 'vendor/etc/media_codecs_cape_vendor.xml'): blob_fixup()
+        .regex_replace('.*media_codecs_(google_audio|google_c2|google_telephony|google_video|vendor_audio).*\n', ''),
+    ('vendor/etc/seccomp_policy/atfwd@2.0.policy',
+     'vendor/etc/seccomp_policy/modemManager.policy',
+     'vendor/etc/seccomp_policy/sensors-qesdk.policy'): blob_fixup()
+        .add_line_if_missing('gettid: 1'),
+    'vendor/lib64/libQnnGpu.so': blob_fixup()
+        .strip_debug_sections(),
+    'vendor/lib64/libvendor.goodix.hardware.biometrics.fingerprint@2.1.so': blob_fixup()
+        .remove_needed('libhidltransport.so')
+        .replace_needed('libhidlbase.so', 'libhidlbase-v32.so'),
+}  # fmt: skip
+
+module = ExtractUtilsModule(
+    'zenfone9',
+    'asus',
+    blob_fixups=blob_fixups,
+    lib_fixups=lib_fixups,
+)
+
+module.add_proprietary_file('proprietary-files-product.txt')
+module.add_proprietary_file('proprietary-files-vendor.txt')
+
+if __name__ == '__main__':
+    utils = ExtractUtils.device(module)
+    utils.run()
diff --git a/extract-files.sh b/extract-files.sh
deleted file mode 100755
index 7dc408f..0000000
--- a/extract-files.sh
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2016 The CyanogenMod Project
-#           (C) 2018 The Omnirom Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-set -e
-
-DEVICE=zenfone9
-VENDOR=asus
-
-# Load extractutils and do some sanity checks
-MY_DIR="${BASH_SOURCE%/*}"
-if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
-
-CM_ROOT="$MY_DIR"/../../..
-
-HELPER="$CM_ROOT"/vendor/omni/build/tools/extract_utils.sh
-if [ ! -f "$HELPER" ]; then
-    echo "Unable to find helper script at $HELPER"
-    exit 1
-fi
-. "$HELPER"
-
-# Default to sanitizing the vendor folder before extraction
-CLEAN_VENDOR=true
-
-while [ "$1" != "" ]; do
-    case $1 in
-        -p | --path )           shift
-                                SRC=$1
-                                ;;
-        -s | --section )        shift
-                                SECTION=$1
-                                CLEAN_VENDOR=false
-                                ;;
-        -n | --no-cleanup )     CLEAN_VENDOR=false
-                                ;;
-    esac
-    shift
-done
-
-if [ -z "$SRC" ]; then
-    SRC=adb
-fi
-
-function blob_fixup() {
-    case "${1}" in
-    # Fix xml version
-    system_ext/etc/permissions/vendor.qti.hardware.data.connection-V1.0-java.xml | system_ext/etc/permissions/vendor.qti.hardware.data.connection-V1.1-java.xml)
-        sed -i 's|product|system_ext|g' "${2}"
-        sed -i 's|xml version="2.0"|xml version="1.0"|g' "${2}"
-        ;;
-    vendor/lib64/libvendor.goodix.hardware.biometrics.fingerprint@2.1.so)
-        "${PATCHELF}" --remove-needed "libhidlbase.so" "${2}"
-        sed -i "s/libhidltransport.so/libhidlbase-v32.so\x00/" "${2}"
-        ;;
-    vendor/bin/hw/android.hardware.security.keymint-service-qti)
-        "${PATCHELF}" --add-needed android.hardware.security.rkp-V1-ndk.so "${2}"
-        ;;
-    vendor/lib64/libQnnGpu.so)
-        "${CM_ROOT}"/prebuilts/clang/host/linux-x86/llvm-binutils-stable/llvm-strip "${2}"
-        ;;
-    vendor/bin/vendor.dpmd)
-        "${PATCHELF}" --replace-needed "libhidlbase.so" "libhidlbase-v32.so" "${2}"
-        ;;
-    vendor/etc/media_codecs_cape.xml|vendor/etc/media_codecs_cape_vendor.xml)
-        sed -Ei "/media_codecs_(google_audio|google_c2|google_telephony|google_video|vendor_audio)/d" "${2}"
-        ;;
-    vendor/etc/seccomp_policy/atfwd@2.0.policy | \
-        vendor/etc/seccomp_policy/modemManager.policy | \
-        vendor/etc/seccomp_policy/sensors-qesdk.policy)
-        echo "gettid: 1" >> "${2}"
-        ;;
-    esac
-}
-
-# Initialize the helper
-setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT" false "$CLEAN_VENDOR"
-
-extract "$MY_DIR"/proprietary-files-product.txt "$SRC" "$SECTION"
-extract "$MY_DIR"/proprietary-files-vendor.txt "$SRC" "$SECTION"
-extract "$MY_DIR"/proprietary-files.txt "$SRC" "$SECTION"
-
-"$MY_DIR"/setup-makefiles.sh
diff --git a/proprietary-files-product.txt b/proprietary-files-product.txt
index 380d8db..a1336c9 100644
--- a/proprietary-files-product.txt
+++ b/proprietary-files-product.txt
@@ -1,6 +1,6 @@
 # Alarm
--system_ext/app/PowerOffAlarm/PowerOffAlarm.apk
--system_ext/framework/vendor.qti.hardware.alarm-V1.0-java.jar
+system_ext/app/PowerOffAlarm/PowerOffAlarm.apk
+system_ext/framework/vendor.qti.hardware.alarm-V1.0-java.jar
 system_ext/lib64/vendor.qti.hardware.alarm@1.0.so
 
 # Bluetooth
@@ -10,36 +10,36 @@
 system_ext/lib64/libQSEEComAPI_system.so
 
 # QTI Telephony
--product/app/uimgbaservice/uimgbaservice.apk
+product/app/uimgbaservice/uimgbaservice.apk
 product/etc/permissions/UimGba.xml
 product/etc/permissions/UimGbaManager.xml
--product/framework/uimgbalibrary.jar
--product/framework/uimgbamanagerlibrary.jar
--system_ext/app/DynamicDDSService/DynamicDDSService.apk
+product/framework/uimgbalibrary.jar
+product/framework/uimgbamanagerlibrary.jar
+system_ext/app/DynamicDDSService/DynamicDDSService.apk
 system_ext/etc/permissions/embms-noship_product_privapp_permissions_qti.xml
 
 # ROG 5
 product/etc/permissions/vendor.qti.hardware.data.connection-V1.0-java.xml:system_ext/etc/permissions/vendor.qti.hardware.data.connection-V1.0-java.xml
 product/etc/permissions/vendor.qti.hardware.data.connection-V1.1-java.xml:system_ext/etc/permissions/vendor.qti.hardware.data.connection-V1.1-java.xml
--system_ext/framework/qti-telephony-common.jar|07B2B91F5D547C5B5E0752F0F5534321BC93A2C1
--system_ext/framework/vendor.qti.data.factory-V1.0-java.jar
--system_ext/framework/vendor.qti.data.factory-V2.0-java.jar
--system_ext/framework/vendor.qti.data.factory-V2.1-java.jar
--system_ext/framework/vendor.qti.data.factory-V2.2-java.jar
--system_ext/framework/vendor.qti.data.factory-V2.3-java.jar
--system_ext/framework/vendor.qti.data.factory-V2.4-java.jar
--system_ext/framework/vendor.qti.data.factory-V2.5-java.jar
--system_ext/framework/vendor.qti.data.factory-V2.6-java.jar
--system_ext/framework/vendor.qti.data.factory-V2.7-java.jar
--system_ext/framework/vendor.qti.data.slm-V1.0-java.jar
--system_ext/framework/vendor.qti.hardware.data.connection-V1.0-java.jar
--system_ext/framework/vendor.qti.hardware.data.connection-V1.1-java.jar
--system_ext/framework/vendor.qti.hardware.data.dynamicdds-V1.0-java.jar
--system_ext/framework/vendor.qti.hardware.data.dynamicdds-V1.1-java.jar
--system_ext/framework/vendor.qti.hardware.data.latency-V1.0-java.jar
--system_ext/framework/vendor.qti.hardware.data.qmi-V1.0-java.jar
--system_ext/framework/vendor.qti.latency-V2.0-java.jar
--system_ext/framework/vendor.qti.voiceprint-V1.0-java.jar
+system_ext/framework/qti-telephony-common.jar|07b2b91f5d547c5b5e0752f0f5534321bc93a2c1
+system_ext/framework/vendor.qti.data.factory-V1.0-java.jar
+system_ext/framework/vendor.qti.data.factory-V2.0-java.jar
+system_ext/framework/vendor.qti.data.factory-V2.1-java.jar
+system_ext/framework/vendor.qti.data.factory-V2.2-java.jar
+system_ext/framework/vendor.qti.data.factory-V2.3-java.jar
+system_ext/framework/vendor.qti.data.factory-V2.4-java.jar
+system_ext/framework/vendor.qti.data.factory-V2.5-java.jar
+system_ext/framework/vendor.qti.data.factory-V2.6-java.jar
+system_ext/framework/vendor.qti.data.factory-V2.7-java.jar
+system_ext/framework/vendor.qti.data.slm-V1.0-java.jar
+system_ext/framework/vendor.qti.hardware.data.connection-V1.0-java.jar
+system_ext/framework/vendor.qti.hardware.data.connection-V1.1-java.jar
+system_ext/framework/vendor.qti.hardware.data.dynamicdds-V1.0-java.jar
+system_ext/framework/vendor.qti.hardware.data.dynamicdds-V1.1-java.jar
+system_ext/framework/vendor.qti.hardware.data.latency-V1.0-java.jar
+system_ext/framework/vendor.qti.hardware.data.qmi-V1.0-java.jar
+system_ext/framework/vendor.qti.latency-V2.0-java.jar
+system_ext/framework/vendor.qti.voiceprint-V1.0-java.jar
 system_ext/lib64/vendor.qti.data.factory@1.0.so
 system_ext/lib64/vendor.qti.data.factory@2.0.so
 system_ext/lib64/vendor.qti.data.factory@2.1.so
@@ -52,7 +52,7 @@
 system_ext/lib64/vendor.qti.hardware.data.connection@1.0.so
 system_ext/lib64/vendor.qti.hardware.data.connection@1.1.so
 system_ext/lib64/vendor.qti.hardware.data.dynamicdds@1.0.so
-system_ext/lib64/vendor.qti.hardware.data.dynamicdds@1.0.so
+system_ext/lib64/vendor.qti.hardware.data.dynamicdds@1.1.so
 system_ext/lib64/vendor.qti.hardware.data.latency@1.0.so
 system_ext/lib64/vendor.qti.hardware.radio.qtiradio@1.0.so
 system_ext/lib64/vendor.qti.hardware.radio.qtiradio@2.0.so
@@ -76,24 +76,24 @@
 
 # IMS
 product/etc/permissions/UimService.xml
--product/framework/uimservicelibrary.jar
+product/framework/uimservicelibrary.jar
 system_ext/etc/permissions/com.qualcomm.qti.imscmservice-V2.0-java.xml
 system_ext/etc/permissions/com.qualcomm.qti.imscmservice-V2.1-java.xml
 system_ext/etc/permissions/com.qualcomm.qti.imscmservice-V2.2-java.xml
--system_ext/framework/com.qualcomm.qti.imscmservice-V2.0-java.jar
--system_ext/framework/com.qualcomm.qti.imscmservice-V2.1-java.jar
--system_ext/framework/com.qualcomm.qti.imscmservice-V2.2-java.jar
--system_ext/framework/com.qualcomm.qti.uceservice-V2.0-java.jar
--system_ext/framework/com.qualcomm.qti.uceservice-V2.1-java.jar
--system_ext/framework/com.qualcomm.qti.uceservice-V2.2-java.jar
--system_ext/framework/vendor.qti.ims.callcapability-V1.0-java.jar
--system_ext/framework/vendor.qti.ims.callinfo-V1.0-java.jar
--system_ext/framework/vendor.qti.ims.factory-V1.0-java.jar
--system_ext/framework/vendor.qti.ims.factory-V1.1-java.jar
--system_ext/framework/vendor.qti.ims.rcsconfig-V1.0-java.jar
--system_ext/framework/vendor.qti.ims.rcsconfig-V1.1-java.jar
--system_ext/framework/vendor.qti.ims.rcsconfig-V2.0-java.jar
--system_ext/framework/vendor.qti.ims.rcsconfig-V2.1-java.jar
+system_ext/framework/com.qualcomm.qti.imscmservice-V2.0-java.jar
+system_ext/framework/com.qualcomm.qti.imscmservice-V2.1-java.jar
+system_ext/framework/com.qualcomm.qti.imscmservice-V2.2-java.jar
+system_ext/framework/com.qualcomm.qti.uceservice-V2.0-java.jar
+system_ext/framework/com.qualcomm.qti.uceservice-V2.1-java.jar
+system_ext/framework/com.qualcomm.qti.uceservice-V2.2-java.jar
+system_ext/framework/vendor.qti.ims.callcapability-V1.0-java.jar
+system_ext/framework/vendor.qti.ims.callinfo-V1.0-java.jar
+system_ext/framework/vendor.qti.ims.factory-V1.0-java.jar
+system_ext/framework/vendor.qti.ims.factory-V1.1-java.jar
+system_ext/framework/vendor.qti.ims.rcsconfig-V1.0-java.jar
+system_ext/framework/vendor.qti.ims.rcsconfig-V1.1-java.jar
+system_ext/framework/vendor.qti.ims.rcsconfig-V2.0-java.jar
+system_ext/framework/vendor.qti.ims.rcsconfig-V2.1-java.jar
 system_ext/lib64/com.qualcomm.qti.imscmservice@2.0.so
 system_ext/lib64/com.qualcomm.qti.imscmservice@2.1.so
 system_ext/lib64/com.qualcomm.qti.imscmservice@2.2.so
@@ -137,7 +137,7 @@
 system_ext/lib64/vendor.qti.ims.rcsconfig@2.1.so
 system_ext/lib64/vendor.qti.imsrtpservice@3.0.so
 system_ext/lib64/vendor.qti.imsrtpservice@3.1.so
--system_ext/priv-app/ims/ims.apk
+system_ext/priv-app/ims/ims.apk
 
 # IOP
 system_ext/lib64/vendor.qti.hardware.iop@2.0.so
diff --git a/proprietary-files-vendor.txt b/proprietary-files-vendor.txt
index 8badc52..67b3dea 100644
--- a/proprietary-files-vendor.txt
+++ b/proprietary-files-vendor.txt
@@ -1,6 +1,5 @@
 vendor/app/CACertService/CACertService.apk
 vendor/app/CneApp/CneApp.apk
-vendor/app/CneApp/lib/arm64/libvndfwk_detect_jni.qti_vendor.so
 vendor/app/IWlanService/IWlanService.apk
 vendor/app/TimeService/TimeService.apk
 vendor/app/powermodule_java/powermodule_java.apk
@@ -1121,32 +1120,32 @@
 vendor/etc/thermal_atd.conf
 vendor/etc/usb_audio_policy_configuration.xml
 vendor/etc/usecaseKvManager.xml
--vendor/etc/vintf/manifest/android.hardware.gnss-aidl-service-qti.xml
--vendor/etc/vintf/manifest/android.hardware.gnss@2.1-service-qti.xml
--vendor/etc/vintf/manifest/android.hardware.neuralnetworks-shim-service-qti.xml
--vendor/etc/vintf/manifest/android.hardware.security.keymint-service-qti.xml
--vendor/etc/vintf/manifest/android.hardware.sensors@2.1-multihal.xml
--vendor/etc/vintf/manifest/android.hardware.thermal@2.0-service.qti.xml
--vendor/etc/vintf/manifest/c2_manifest_vendor.xml
--vendor/etc/vintf/manifest/c2_manifest_vendor_audio.xml
--vendor/etc/vintf/manifest/dataconnection-saidl.xml
--vendor/etc/vintf/manifest/manifest_android.hardware.drm@1.4-service.widevine.xml
--vendor/etc/vintf/manifest/manifest_lahaina_identity.xml
--vendor/etc/vintf/manifest/manifest_non_qmaa.xml
--vendor/etc/vintf/manifest/manifest_non_qmaa_extn.xml
--vendor/etc/vintf/manifest/memtrack_qti.xml
--vendor/etc/vintf/manifest/qtiradio-saidl.xml
--vendor/etc/vintf/manifest/vendor.qti.diag.hal.service.xml
--vendor/etc/vintf/manifest/vendor.qti.gnss-service.xml
--vendor/etc/vintf/manifest/vendor.qti.hardware.limits-service.xml
--vendor/etc/vintf/manifest/vendor.qti.hardware.perf.xml
--vendor/etc/vintf/manifest/vendor.qti.hardware.power.powermodule.xml
--vendor/etc/vintf/manifest/vendor.qti.hardware.qconfig@1.0-service.xml
--vendor/etc/vintf/manifest/vendor.qti.hardware.qxr-service.xml
--vendor/etc/vintf/manifest/vendor.qti.hardware.radio.ims.xml
--vendor/etc/vintf/manifest/vendor.qti.hardware.servicetracker@1.2-service.xml
--vendor/etc/vintf/manifest/vendor.qti.hardware.vpp@2.0-service.xml
--vendor/etc/vintf/manifest/vendor.qti.hardware.wifi.wificfr@1.0-service.xml
+vendor/etc/vintf/manifest/android.hardware.gnss-aidl-service-qti.xml
+vendor/etc/vintf/manifest/android.hardware.gnss@2.1-service-qti.xml
+vendor/etc/vintf/manifest/android.hardware.neuralnetworks-shim-service-qti.xml
+vendor/etc/vintf/manifest/android.hardware.security.keymint-service-qti.xml
+vendor/etc/vintf/manifest/android.hardware.sensors@2.1-multihal.xml
+vendor/etc/vintf/manifest/android.hardware.thermal@2.0-service.qti.xml
+vendor/etc/vintf/manifest/c2_manifest_vendor.xml
+vendor/etc/vintf/manifest/c2_manifest_vendor_audio.xml
+vendor/etc/vintf/manifest/dataconnection-saidl.xml
+vendor/etc/vintf/manifest/manifest_android.hardware.drm@1.4-service.widevine.xml
+vendor/etc/vintf/manifest/manifest_lahaina_identity.xml
+vendor/etc/vintf/manifest/manifest_non_qmaa.xml
+vendor/etc/vintf/manifest/manifest_non_qmaa_extn.xml
+vendor/etc/vintf/manifest/memtrack_qti.xml
+vendor/etc/vintf/manifest/qtiradio-saidl.xml
+vendor/etc/vintf/manifest/vendor.qti.diag.hal.service.xml
+vendor/etc/vintf/manifest/vendor.qti.gnss-service.xml
+vendor/etc/vintf/manifest/vendor.qti.hardware.limits-service.xml
+vendor/etc/vintf/manifest/vendor.qti.hardware.perf.xml
+vendor/etc/vintf/manifest/vendor.qti.hardware.power.powermodule.xml
+vendor/etc/vintf/manifest/vendor.qti.hardware.qconfig@1.0-service.xml
+vendor/etc/vintf/manifest/vendor.qti.hardware.qxr-service.xml
+vendor/etc/vintf/manifest/vendor.qti.hardware.radio.ims.xml
+vendor/etc/vintf/manifest/vendor.qti.hardware.servicetracker@1.2-service.xml
+vendor/etc/vintf/manifest/vendor.qti.hardware.vpp@2.0-service.xml
+vendor/etc/vintf/manifest/vendor.qti.hardware.wifi.wificfr@1.0-service.xml
 vendor/etc/vmmgr.conf
 vendor/etc/wifi/p2p_supplicant_overlay.conf
 vendor/etc/wifi/vendor_cmd.xml
@@ -1357,7 +1356,6 @@
 vendor/firmware/widevine.b08
 vendor/firmware/widevine.mbn
 vendor/firmware/widevine.mdt
-vendor/firmware/wlanmdsp.otaupdate
 vendor/firmware_waipio/CAMERA_ICP.b00
 vendor/firmware_waipio/CAMERA_ICP.b01
 vendor/firmware_waipio/CAMERA_ICP.b02
@@ -2258,7 +2256,6 @@
 vendor/lib/libxml.so
 vendor/lib/libxtadapter.so
 vendor/lib/mediadrm/libwvdrmengine.so
-vendor/lib/modules
 vendor/lib/qcrilInterfaces.so
 vendor/lib/qcrilMarshal.so
 vendor/lib/qcrilNrQmiModule.so
diff --git a/proprietary-files.txt b/proprietary-files.txt
index b9ad654..00748c8 100644
--- a/proprietary-files.txt
+++ b/proprietary-files.txt
@@ -1,15 +1,15 @@
 # ANT+
--system_ext/app/AntHalService-Soong/AntHalService-Soong.apk
+system_ext/app/AntHalService-Soong/AntHalService-Soong.apk
 system_ext/lib64/com.qualcomm.qti.ant@1.0.so
 
 # Audio
--system/priv-app/AudioWizardView/AudioWizardView.apk
--system/priv-app/DiracAudioControlService/DiracAudioControlService.apk
+system/priv-app/AudioWizardView/AudioWizardView.apk
+system/priv-app/DiracAudioControlService/DiracAudioControlService.apk
 system_ext/etc/cdma_call_conf.xml
 
 # Bluetooth
 system_ext/etc/permissions/audiosphere.xml
--system_ext/framework/audiosphere.jar
+system_ext/framework/audiosphere.jar
 
 # Camera
 system/lib64/DataSet/arch/DIT_List.cfg
@@ -26,17 +26,17 @@
 system/lib64/libxditk_ditBSP_JNI.so
 
 # CNE
--system_ext/framework/com.quicinc.cne.api-V1.0-java.jar
--system_ext/framework/com.quicinc.cne.api-V1.1-java.jar
--system_ext/framework/com.quicinc.cne.constants-V1.0-java.jar
--system_ext/framework/com.quicinc.cne.constants-V2.0-java.jar
--system_ext/framework/com.quicinc.cne.constants-V2.1-java.jar
--system_ext/framework/vendor.qti.hardware.data.cne.internal.api-V1.0-java.jar
--system_ext/framework/vendor.qti.hardware.data.cne.internal.constants-V1.0-java.jar
--system_ext/framework/vendor.qti.hardware.data.cne.internal.server-V1.0-java.jar
--system_ext/framework/vendor.qti.hardware.data.cne.internal.server-V1.1-java.jar
--system_ext/framework/vendor.qti.hardware.data.cne.internal.server-V1.2-java.jar
--system_ext/framework/vendor.qti.hardware.data.cne.internal.server-V1.3-java.jar
+system_ext/framework/com.quicinc.cne.api-V1.0-java.jar
+system_ext/framework/com.quicinc.cne.api-V1.1-java.jar
+system_ext/framework/com.quicinc.cne.constants-V1.0-java.jar
+system_ext/framework/com.quicinc.cne.constants-V2.0-java.jar
+system_ext/framework/com.quicinc.cne.constants-V2.1-java.jar
+system_ext/framework/vendor.qti.hardware.data.cne.internal.api-V1.0-java.jar
+system_ext/framework/vendor.qti.hardware.data.cne.internal.constants-V1.0-java.jar
+system_ext/framework/vendor.qti.hardware.data.cne.internal.server-V1.0-java.jar
+system_ext/framework/vendor.qti.hardware.data.cne.internal.server-V1.1-java.jar
+system_ext/framework/vendor.qti.hardware.data.cne.internal.server-V1.2-java.jar
+system_ext/framework/vendor.qti.hardware.data.cne.internal.server-V1.3-java.jar
 system_ext/lib64/com.quicinc.cne.api@1.0.so
 system_ext/lib64/com.quicinc.cne.api@1.1.so
 system_ext/lib64/com.quicinc.cne.constants@1.0.so
@@ -54,13 +54,13 @@
 system_ext/lib64/vendor.qti.hardware.data.cne.internal.server@1.3.so
 
 # Device
--system_ext/app/DeviceStatisticsService/DeviceStatisticsService.apk
+system_ext/app/DeviceStatisticsService/DeviceStatisticsService.apk
 system_ext/lib64/libsystemhelper_jni.so
 
 # Display
 product/etc/permissions/com.qti.snapdragon.sdk.display.xml
--product/framework/com.qti.snapdragon.sdk.display.jar
--system_ext/app/colorservice/colorservice.apk
+product/framework/com.qti.snapdragon.sdk.display.jar
+system_ext/app/colorservice/colorservice.apk
 system_ext/lib64/libsd_sdk_display.qti.so
 system_ext/lib64/libsdm-disp-apis.qti.so
 system_ext/lib64/vendor.display.color@1.0.so
@@ -70,69 +70,68 @@
 system_ext/lib64/vendor.display.postproc@1.0.so
 system_ext/lib64/vendor.qti.hardware.qdutils_disp@1.0.so
 
-vendor/lib64/libsdmextension.so|F80E85481D8F2CE991E4CCBA3958A575B39ECE09
+vendor/lib64/libsdmextension.so|f80e85481d8f2ce991e4ccba3958a575b39ece09
 
 # DPM
--system/framework/tcmclient.jar
+system/framework/tcmclient.jar
 system_ext/bin/dpmd
 system_ext/etc/dpm/dpm.conf
 system_ext/etc/init/dpmd.rc
 system_ext/etc/permissions/com.qti.dpmframework.xml
 system_ext/etc/permissions/dpmapi.xml
--system_ext/framework/com.qti.dpmframework.jar
--system_ext/framework/dpmapi.jar
+system_ext/framework/com.qti.dpmframework.jar
+system_ext/framework/dpmapi.jar
 system_ext/lib64/com.qualcomm.qti.dpm.api@1.0.so
 system_ext/lib64/libdpmctmgr.so
 system_ext/lib64/libdpmfdmgr.so
 system_ext/lib64/libdpmframework.so
 system_ext/lib64/libdpmtcm.so
--system_ext/priv-app/dpmserviceapp/dpmserviceapp.apk
+system_ext/priv-app/dpmserviceapp/dpmserviceapp.apk
 
 # GPS
 system_ext/etc/permissions/com.qti.location.sdk.xml
 system_ext/etc/permissions/com.qualcomm.location.xml
 system_ext/etc/permissions/com.qualcomm.qti.izattools.xml
 system_ext/etc/permissions/privapp-permissions-com.qualcomm.location.xml
--system_ext/framework/com.qti.location.sdk.jar
--system_ext/priv-app/com.qualcomm.location/com.qualcomm.location.apk|768cab025cf8427b349a8358ca86a964fe8803ee
+system_ext/framework/com.qti.location.sdk.jar
+system_ext/priv-app/com.qualcomm.location/com.qualcomm.location.apk|768cab025cf8427b349a8358ca86a964fe8803ee
 
 # HotwordEnrollment
--product/priv-app/HotwordEnrollmentOKGoogleHEXAGON_NARROWBAND/HotwordEnrollmentOKGoogleHEXAGON_NARROWBAND.apk;PRESIGNED
--product/priv-app/HotwordEnrollmentXGoogleHEXAGON_NARROWBAND/HotwordEnrollmentXGoogleHEXAGON_NARROWBAND.apk;PRESIGNED
+product/priv-app/HotwordEnrollmentOKGoogleHEXAGON_NARROWBAND/HotwordEnrollmentOKGoogleHEXAGON_NARROWBAND.apk;PRESIGNED
+product/priv-app/HotwordEnrollmentXGoogleHEXAGON_NARROWBAND/HotwordEnrollmentXGoogleHEXAGON_NARROWBAND.apk;PRESIGNED
 system_ext/etc/permissions/com.android.hotwordenrollment.common.util.xml
--system_ext/framework/com.android.hotwordenrollment.common.util.jar
+system_ext/framework/com.android.hotwordenrollment.common.util.jar
 
 # MirarCast
 system_ext/bin/sigma_miracasthalservice
 system_ext/bin/sigma_miracasthalservice64
 system_ext/etc/init/com.qualcomm.qti.sigma_miracast@1.0-service.rc
-system_ext/lib/vendor.qti.hardware.sigma_miracast@1.0.so
 system_ext/lib64/hw/vendor.qti.hardware.sigma_miracast@1.0-impl.so
 system_ext/lib64/libmiracastsystem.so
 system_ext/lib64/vendor.qti.hardware.sigma_miracast@1.0-halimpl.so
 system_ext/lib64/vendor.qti.hardware.sigma_miracast@1.0.so
 
 # Power
--system/framework/QPerformance.jar
--system/framework/UxPerformance.jar
+system/framework/QPerformance.jar
+system/framework/UxPerformance.jar
 
 # Telephony
 product/etc/permissions/telephony_product_privapp-permissions-qti.xml
--system_ext/app/QtiTelephonyService/QtiTelephonyService.apk
+system_ext/app/QtiTelephonyService/QtiTelephonyService.apk
 system_ext/etc/permissions/qcrilhook.xml
 system_ext/etc/permissions/qti_libpermissions.xml
 system_ext/etc/permissions/qti_permissions.xml
 system_ext/etc/permissions/telephony_system-ext_privapp-permissions-qti.xml
 system_ext/etc/sysconfig/qti_whitelist_system_ext.xml
--system_ext/framework/qcrilhook.jar
--system_ext/priv-app/qcrilmsgtunnel/qcrilmsgtunnel.apk
+system_ext/framework/qcrilhook.jar
+system_ext/priv-app/qcrilmsgtunnel/qcrilmsgtunnel.apk
 
 # VNDK
 system_ext/lib64/libvndfwk_detect_jni.qti.so
 system_ext/lib64/libvndfwk_detect_jni.qti_system.so
 
 # Wlan
--system_ext/framework/vendor.qti.hardware.data.iwlan-V1.0-java.jar
--system_ext/framework/vendor.qti.hardware.data.iwlan-V1.1-java.jar
+system_ext/framework/vendor.qti.hardware.data.iwlan-V1.0-java.jar
+system_ext/framework/vendor.qti.hardware.data.iwlan-V1.1-java.jar
 system_ext/lib64/vendor.qti.hardware.data.iwlan@1.0.so
 system_ext/lib64/vendor.qti.hardware.data.iwlan@1.1.so
diff --git a/regen-vendor.sh b/regen-vendor.sh
index ebcfe3c..b176995 100755
--- a/regen-vendor.sh
+++ b/regen-vendor.sh
@@ -466,6 +466,9 @@
     # Camera
     "etc/camera/camxoverridesettings.txt"
 
+    # CNE
+    "app/CneApp/lib/arm64/libvndfwk_detect_jni.qti_vendor.so"
+
     # config.fs
     "etc/fs_config_dirs"
     "etc/fs_config_files"
@@ -1168,6 +1171,7 @@
     "lib64/vendor.qti.hardware.wifi.supplicant@2.0.so"
     "lib64/vendor.qti.hardware.wifi.supplicant@2.1.so"
     "lib64/vendor.qti.hardware.wifi.supplicant@2.2.so"
+    "firmware/wlanmdsp.otaupdate"
 
     # WifiDisplay
     "bin/wfdhdcphalservice"
@@ -1226,39 +1230,6 @@
 function presign() {
     sed -i "s|vendor/$1$|vendor/$1;PRESIGNED|g" $_output_file
 }
-function as_module() {
-    sed -i "s|vendor/$1$|-vendor/$1|g" $_output_file
-}
 function add_on() {
     sed -i "s|vendor/$1$|vendor/$1:vendor_dlkm/$1|g" $_output_file
 }
-
-as_module "etc/vintf/manifest/android.hardware.gnss@2.1-service-qti.xml"
-as_module "etc/vintf/manifest/android.hardware.thermal@2.0-service.qti.xml"
-as_module "etc/vintf/manifest/android.hardware.usb@1.2-service.xml"
-as_module "etc/vintf/manifest/c2_manifest_vendor.xml"
-as_module "etc/vintf/manifest/vendor.qti.diag.hal.service.xml"
-as_module "etc/vintf/manifest/vendor.qti.hardware.servicetracker@1.2-service.xml"
-as_module "etc/vintf/manifest/android.hardware.gnss-aidl-service-qti.xml"
-as_module "etc/vintf/manifest/android.hardware.neuralnetworks-shim-service-qti.xml"
-as_module "etc/vintf/manifest/android.hardware.security.keymint-service-qti.xml"
-as_module "etc/vintf/manifest/android.hardware.sensors@2.1-multihal.xml"
-as_module "etc/vintf/manifest/android.hardware.usb.gadget@1.1-service.xml"
-as_module "etc/vintf/manifest/c2_manifest_vendor_audio.xml"
-as_module "etc/vintf/manifest/dataconnection-saidl.xml"
-as_module "etc/vintf/manifest/manifest_android.hardware.drm@1.4-service.widevine.xml"
-as_module "etc/vintf/manifest/manifest_lahaina_identity.xml"
-as_module "etc/vintf/manifest/manifest_non_qmaa.xml"
-as_module "etc/vintf/manifest/manifest_non_qmaa_extn.xml"
-as_module "etc/vintf/manifest/memtrack_qti.xml"
-as_module "etc/vintf/manifest/ozonotify-1.0.xml"
-as_module "etc/vintf/manifest/qtiradio-saidl.xml"
-as_module "etc/vintf/manifest/vendor.qti.gnss-service.xml"
-as_module "etc/vintf/manifest/vendor.qti.hardware.limits-service.xml"
-as_module "etc/vintf/manifest/vendor.qti.hardware.perf.xml"
-as_module "etc/vintf/manifest/vendor.qti.hardware.power.powermodule.xml"
-as_module "etc/vintf/manifest/vendor.qti.hardware.qconfig@1.0-service.xml"
-as_module "etc/vintf/manifest/vendor.qti.hardware.qxr-service.xml"
-as_module "etc/vintf/manifest/vendor.qti.hardware.radio.ims.xml"
-as_module "etc/vintf/manifest/vendor.qti.hardware.vpp@2.0-service.xml"
-as_module "etc/vintf/manifest/vendor.qti.hardware.wifi.wificfr@1.0-service.xml"
diff --git a/setup-makefiles.py b/setup-makefiles.py
new file mode 100755
index 0000000..32947cf
--- /dev/null
+++ b/setup-makefiles.py
@@ -0,0 +1 @@
+#!./extract-files.py --regenerate_makefiles
diff --git a/setup-makefiles.sh b/setup-makefiles.sh
deleted file mode 100755
index ce8f1ee..0000000
--- a/setup-makefiles.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2016 The CyanogenMod Project
-#           (C) 2017 The LineageOS Project
-#           (C) 2018 The Omnirom Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-set -e
-
-# Required!
-DEVICE=zenfone9
-VENDOR=asus
-
-INITIAL_COPYRIGHT_YEAR=2022
-
-# Load extractutils and do some sanity checks
-MY_DIR="${BASH_SOURCE%/*}"
-if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
-
-CM_ROOT="$MY_DIR"/../../..
-
-HELPER="$CM_ROOT"/vendor/omni/build/tools/extract_utils.sh
-if [ ! -f "$HELPER" ]; then
-    echo "Unable to find helper script at $HELPER"
-    exit 1
-fi
-. "$HELPER"
-
-# Initialize the helper
-setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT"
-
-# Copyright headers and guards
-write_headers "zenfone9"
-
-# The standard blobs
-write_makefiles "$MY_DIR"/proprietary-files.txt
-
-write_makefiles "$MY_DIR"/proprietary-files-product.txt
-
-write_makefiles "$MY_DIR"/proprietary-files-vendor.txt
-
-cat << EOF >> "$ANDROIDMK"
-
-EOF
-
-# We are done!
-write_footers
-