diff options
| author | Cosmin Tanislav <demonsingur@gmail.com> | 2024-10-27 15:08:31 +0200 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2024-11-06 13:10:04 +0200 |
| commit | 9d72fafd0eab2b4f57619e7beb1994a9909041ef (patch) | |
| tree | 67d51aaa45ceeaf54ddd185465f120af6a5353be | |
| parent | 7d27c86735f318a9d3b6f88f68b2ffa5ac65f536 (diff) | |
barbet: switch to python extract-utils
Change-Id: Ia2d6a0235d9343d7de0ef69d4197cac7f276af84
| -rw-r--r-- | barbet/HbmSVManager.patch (renamed from blob-patches/HbmSVManager.patch) | 0 | ||||
| -rwxr-xr-x | barbet/extract-files.py | 149 | ||||
| -rw-r--r-- | barbet/osaifu-keitai.patch | 24 | ||||
| -rw-r--r-- | barbet/proprietary-files-carriersettings.txt (renamed from proprietary-files-carriersettings.txt) | 0 | ||||
| -rw-r--r-- | barbet/proprietary-files-vendor.txt (renamed from proprietary-files-vendor.txt) | 8 | ||||
| -rw-r--r-- | barbet/proprietary-files.txt (renamed from proprietary-files.txt) | 0 | ||||
| -rw-r--r-- | barbet/proprietary-firmware.txt (renamed from proprietary-firmware.txt) | 0 | ||||
| -rwxr-xr-x | barbet/setup-makefiles.py | 1 | ||||
| -rw-r--r-- | barbet/skip-files-vendor.txt (renamed from skip-files-vendor.txt) | 14 | ||||
| -rwxr-xr-x | extract-files.py | 13 | ||||
| -rwxr-xr-x | extract-files.sh | 157 | ||||
| -rwxr-xr-x | setup-makefiles.py | 13 | ||||
| -rwxr-xr-x | setup-makefiles.sh | 82 |
13 files changed, 218 insertions, 243 deletions
diff --git a/blob-patches/HbmSVManager.patch b/barbet/HbmSVManager.patch index bfc5baa..bfc5baa 100644 --- a/blob-patches/HbmSVManager.patch +++ b/barbet/HbmSVManager.patch diff --git a/barbet/extract-files.py b/barbet/extract-files.py new file mode 100755 index 0000000..cf49084 --- /dev/null +++ b/barbet/extract-files.py @@ -0,0 +1,149 @@ +#!/usr/bin/env -S PYTHONPATH=../../../../tools/extract-utils python3 +# +# SPDX-FileCopyrightText: 2024 The LineageOS Project +# SPDX-License-Identifier: Apache-2.0 +# + +from extract_utils.extract import extract_fns_user_type +from extract_utils.extract_pixel import ( + extract_pixel_factory_image, + extract_pixel_firmware, + pixel_factory_image_regex, + pixel_firmware_regex, +) +from extract_utils.file import FileArgs, FileList +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, +) + +namespace_imports = [ + 'hardware/google/interfaces', + 'hardware/google/pixel', + 'hardware/qcom/sm7250/display', + 'hardware/qcom/sm7250/gps', + 'hardware/qcom/wlan/legacy', + 'vendor/qcom/opensource/display', +] + + +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, + ( + 'vendor.qti.hardware.tui_comm@1.0', + 'vendor.qti.imsrtpservice@3.0', + ): lib_fixup_vendor_suffix, + 'libwpa_client': lib_fixup_remove, +} + +blob_fixups: blob_fixups_user_type = { + 'product/etc/felica/common.cfg': blob_fixup() + .patch_file('osaifu-keitai.patch'), + 'product/etc/sysconfig/nexus.xml': blob_fixup() + .regex_replace('qulacomm', 'qualcomm'), + 'system_ext/priv-app/HbmSVManager/HbmSVManager.apk': blob_fixup() + .apktool_patch('HbmSVManager.patch', '-r'), + ( + 'vendor/bin/hw/android.hardware.rebootescrow-service.citadel', + 'vendor/lib64/android.hardware.keymaster@4.1-impl.nos.so', + ): blob_fixup() + .add_needed('libcrypto_shim.so'), + 'vendor/lib64/libgooglecamerahal.so': blob_fixup() + .add_needed('libmeminfo_shim.so'), +} # fmt: skip + +extract_fns: extract_fns_user_type = { + pixel_factory_image_regex: extract_pixel_factory_image, + pixel_firmware_regex: extract_pixel_firmware, +} + +module = ExtractUtilsModule( + 'barbet', + 'google', + device_rel_path='device/google/barbet/barbet', + blob_fixups=blob_fixups, + lib_fixups=lib_fixups, + namespace_imports=namespace_imports, + add_generated_carriersettings_file=True, + add_firmware_proprietary_file=True, + extract_fns=extract_fns, +) + + +def fix_vendor_file_list(file_list: FileList): + file_list.get_file( + 'vendor/app/adreno_graphics_driver/adreno_graphics_driver.apk' + ).set_arg(FileArgs.PRESIGNED, True) + + file_list.get_file('vendor/app/CneApp/CneApp.apk').set_arg( + FileArgs.REQUIRED, 'CneApp.libvndfwk_detect_jni.qti_symlink' + ) + + file_list.get_file('vendor/lib/egl/libEGL_adreno.so').set_arg( + FileArgs.SYMLINK, 'vendor/lib/libEGL_adreno.so' + ) + file_list.get_file('vendor/lib/egl/libGLESv2_adreno.so').set_arg( + FileArgs.SYMLINK, 'vendor/lib/libGLESv2_adreno.so' + ) + file_list.get_file('vendor/lib/egl/libq3dtools_adreno.so').set_arg( + FileArgs.SYMLINK, 'vendor/lib/libq3dtools_adreno.so' + ) + file_list.get_file('vendor/lib64/egl/libEGL_adreno.so').set_arg( + FileArgs.SYMLINK, 'vendor/lib64/libEGL_adreno.so' + ) + file_list.get_file('vendor/lib64/egl/libGLESv2_adreno.so').set_arg( + FileArgs.SYMLINK, 'vendor/lib64/libGLESv2_adreno.so' + ) + file_list.get_file('vendor/lib64/egl/libq3dtools_adreno.so').set_arg( + FileArgs.SYMLINK, 'vendor/lib64/libq3dtools_adreno.so' + ) + + # 32bit libmmcamera_faceproc is unable to resolved the following symbols: + # __aeabi_memcpy@LIBC_PRIVATE, __aeabi_memset@LIBC_PRIVATE, __gnu_Unwind_Find_exidx@LIBC_PRIVATE + # lowi-server, libcne, libwqe depend on libwpa_client, which is a gnu makefile target + disable_checkelf_file_paths = [ + 'vendor/bin/lowi-server', + 'vendor/lib/libcne.so', + 'vendor/lib/libmmcamera_faceproc.so', + 'vendor/lib/libwqe.so', + 'vendor/lib64/libcne.so', + 'vendor/lib64/libmmcamera_faceproc.so', + 'vendor/lib64/libwqe.so', + ] + for file_path in disable_checkelf_file_paths: + file_list.get_file(file_path).set_arg(FileArgs.DISABLE_CHECKELF, True) + + module_suffix_file_paths = [ + 'vendor/lib/vendor.qti.hardware.tui_comm@1.0.so', + 'vendor/lib/vendor.qti.imsrtpservice@3.0.so', + 'vendor/lib64/vendor.qti.hardware.tui_comm@1.0.so', + 'vendor/lib64/vendor.qti.imsrtpservice@3.0.so', + ] + + for file_path in module_suffix_file_paths: + file_list.get_file(file_path).set_arg(FileArgs.MODULE_SUFFIX, '_vendor') + + +module.add_generated_proprietary_file( + 'proprietary-files-vendor.txt', + partition='vendor', + skip_file_list_name='skip-files-vendor.txt', + fix_file_list=fix_vendor_file_list, +) + +if __name__ == '__main__': + utils = ExtractUtils.device(module) + utils.run() diff --git a/barbet/osaifu-keitai.patch b/barbet/osaifu-keitai.patch new file mode 100644 index 0000000..83d6d0e --- /dev/null +++ b/barbet/osaifu-keitai.patch @@ -0,0 +1,24 @@ +From aab255f2807cfc460c0dce40decd5554d49c0076 Mon Sep 17 00:00:00 2001 +From: jabashque <jabashque@gmail.com> +Date: Mon, 5 Feb 2024 21:36:03 +0000 +Subject: [PATCH 1/1] Enable Osaifu-Keitai on non-Japanese SKUs + +--- + common.cfg | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/common.cfg b/common.cfg +index 3b78765..00f53cb 100644 +--- a/common.cfg ++++ b/common.cfg +@@ -11,6 +11,5 @@ + 02030001,0 + 02030002,0 + 02030003,intent:#Intent;action=android.settings.NFC_SETTINGS;end +-00000014,content://com.google.android.pixelnfc.provider.DeviceInfoContentProvider/isJapanSku +-00000015,is_japan_sku + 00000016,0001 ++00000018,1 +-- +2.47.0 + diff --git a/proprietary-files-carriersettings.txt b/barbet/proprietary-files-carriersettings.txt index 2c5d261..2c5d261 100644 --- a/proprietary-files-carriersettings.txt +++ b/barbet/proprietary-files-carriersettings.txt diff --git a/proprietary-files-vendor.txt b/barbet/proprietary-files-vendor.txt index ba0f6d6..dc6c46c 100644 --- a/proprietary-files-vendor.txt +++ b/barbet/proprietary-files-vendor.txt @@ -993,7 +993,7 @@ vendor/lib/vendor.qti.hardware.soter@1.0.so vendor/lib/vendor.qti.hardware.trustedui@1.0.so vendor/lib/vendor.qti.hardware.trustedui@1.1.so vendor/lib/vendor.qti.hardware.trustedui@1.2.so -vendor/lib/vendor.qti.hardware.tui_comm@1.0.so;MODULE_SUFFIX=-vendor +vendor/lib/vendor.qti.hardware.tui_comm@1.0.so;MODULE_SUFFIX=_vendor vendor/lib/vendor.qti.hardware.wifidisplaysession@1.0.so vendor/lib/vendor.qti.hardware.wigig.netperftuner@1.0.so vendor/lib/vendor.qti.ims.callcapability@1.0.so @@ -1005,7 +1005,7 @@ vendor/lib/vendor.qti.ims.rcsconfig@1.1.so vendor/lib/vendor.qti.ims.rcsconfig@2.0.so vendor/lib/vendor.qti.ims.rcsconfig@2.1.so vendor/lib/vendor.qti.imsrtpservice@3.0-service-Impl.so -vendor/lib/vendor.qti.imsrtpservice@3.0.so;MODULE_SUFFIX=-vendor +vendor/lib/vendor.qti.imsrtpservice@3.0.so;MODULE_SUFFIX=_vendor vendor/lib/vendor.qti.latency@2.0.so vendor/lib/vendor.qti.latency@2.1.so vendor/lib/vendor.qti.latency@2.2.so @@ -1588,7 +1588,7 @@ vendor/lib64/vendor.qti.hardware.soter@1.0.so vendor/lib64/vendor.qti.hardware.trustedui@1.0.so vendor/lib64/vendor.qti.hardware.trustedui@1.1.so vendor/lib64/vendor.qti.hardware.trustedui@1.2.so -vendor/lib64/vendor.qti.hardware.tui_comm@1.0.so;MODULE_SUFFIX=-vendor +vendor/lib64/vendor.qti.hardware.tui_comm@1.0.so;MODULE_SUFFIX=_vendor vendor/lib64/vendor.qti.hardware.vpp@1.1.so vendor/lib64/vendor.qti.hardware.vpp@1.2.so vendor/lib64/vendor.qti.hardware.wifidisplaysession@1.0.so @@ -1602,7 +1602,7 @@ vendor/lib64/vendor.qti.ims.rcsconfig@1.1.so vendor/lib64/vendor.qti.ims.rcsconfig@2.0.so vendor/lib64/vendor.qti.ims.rcsconfig@2.1.so vendor/lib64/vendor.qti.imsrtpservice@3.0-service-Impl.so -vendor/lib64/vendor.qti.imsrtpservice@3.0.so;MODULE_SUFFIX=-vendor +vendor/lib64/vendor.qti.imsrtpservice@3.0.so;MODULE_SUFFIX=_vendor vendor/lib64/vendor.qti.latency@2.0.so vendor/lib64/vendor.qti.latency@2.1.so vendor/lib64/vendor.qti.latency@2.2.so diff --git a/proprietary-files.txt b/barbet/proprietary-files.txt index 69a6f20..69a6f20 100644 --- a/proprietary-files.txt +++ b/barbet/proprietary-files.txt diff --git a/proprietary-firmware.txt b/barbet/proprietary-firmware.txt index edcc4e7..edcc4e7 100644 --- a/proprietary-firmware.txt +++ b/barbet/proprietary-firmware.txt diff --git a/barbet/setup-makefiles.py b/barbet/setup-makefiles.py new file mode 100755 index 0000000..32947cf --- /dev/null +++ b/barbet/setup-makefiles.py @@ -0,0 +1 @@ +#!./extract-files.py --regenerate_makefiles diff --git a/skip-files-vendor.txt b/barbet/skip-files-vendor.txt index 079f51b..ceffd58 100644 --- a/skip-files-vendor.txt +++ b/barbet/skip-files-vendor.txt @@ -1579,6 +1579,20 @@ lib64/libpng.so lib64/libpower.so lib64/libsqlite.so +# Odex +app/CACertService/oat/arm64/CACertService.odex +app/CACertService/oat/arm64/CACertService.vdex +app/CneApp/oat/arm64/CneApp.odex +app/CneApp/oat/arm64/CneApp.vdex +app/IWlanService/oat/arm64/IWlanService.odex +app/IWlanService/oat/arm64/IWlanService.vdex +app/TimeService/oat/arm64/TimeService.odex +app/TimeService/oat/arm64/TimeService.vdex +framework/oat/arm/com.google.android.camera.experimental2020.odex +framework/oat/arm/com.google.android.camera.experimental2020.vdex +framework/oat/arm64/com.google.android.camera.experimental2020.odex +framework/oat/arm64/com.google.android.camera.experimental2020.vdex + # Completely skip files that are not required # Cryptfshw diff --git a/extract-files.py b/extract-files.py new file mode 100755 index 0000000..5bb981f --- /dev/null +++ b/extract-files.py @@ -0,0 +1,13 @@ +#!/bin/bash +# +# SPDX-FileCopyrightText: 2024 The LineageOS Project +# SPDX-License-Identifier: Apache-2.0 +# + +set -e + +MY_DIR="$(cd "$(dirname "${0}")"; pwd -P)" + +pushd "${MY_DIR}/barbet" +./extract-files.py $@ +popd diff --git a/extract-files.sh b/extract-files.sh deleted file mode 100755 index c22016c..0000000 --- a/extract-files.sh +++ /dev/null @@ -1,157 +0,0 @@ -#!/bin/bash -# -# SPDX-FileCopyrightText: 2016 The CyanogenMod Project -# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project -# SPDX-License-Identifier: Apache-2.0 -# - -set -e - -DEVICE=barbet -VENDOR=google - -# Load extract_utils and do some sanity checks -MY_DIR="${BASH_SOURCE%/*}" -if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi - -ANDROID_ROOT="${MY_DIR}/../../.." - -export TARGET_ENABLE_CHECKELF=true - -# If XML files don't have comments before the XML header, use this flag -# Can still be used with broken XML files by using blob_fixup -export TARGET_DISABLE_XML_FIXING=true - -HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh" -if [ ! -f "${HELPER}" ]; then - echo "Unable to find helper script at ${HELPER}" - exit 1 -fi -source "${HELPER}" - -# Default to sanitizing the vendor folder before extraction -CLEAN_VENDOR=true - -ONLY_FIRMWARE= -KANG= -SECTION= -CARRIER_SKIP_FILES=() -VENDOR_SKIP_FILES=() - -while [ "${#}" -gt 0 ]; do - case "${1}" in - --only-firmware) - ONLY_FIRMWARE=true - ;; - -n | --no-cleanup) - CLEAN_VENDOR=false - ;; - -k | --kang) - KANG="--kang" - ;; - -s | --section) - SECTION="${2}" - shift - CLEAN_VENDOR=false - ;; - *) - SRC="${1}" - ;; - esac - shift -done - -if [ -z "${SRC}" ]; then - SRC="adb" -fi - -function blob_fixup() { - case "${1}" in - product/etc/felica/common.cfg) - [ "$2" = "" ] && return 0 - sed -i -e '$a00000018,1' -e '/^00000014/d' -e '/^00000015/d' "${2}" - ;; - # Fix typo in qcrilmsgtunnel whitelist - product/etc/sysconfig/nexus.xml) - [ "$2" = "" ] && return 0 - sed -i 's/qulacomm/qualcomm/' "${2}" - ;; - system_ext/priv-app/HbmSVManager/HbmSVManager.apk) - [ "$2" = "" ] && return 0 - apktool_patch "${2}" "${MY_DIR}/blob-patches/HbmSVManager.patch" -r - ;; - vendor/bin/hw/android.hardware.rebootescrow-service.citadel | \ - vendor/lib64/android.hardware.keymaster@4.1-impl.nos.so) - [ "$2" = "" ] && return 0 - "${PATCHELF}" --add-needed "libcrypto_shim.so" "${2}" - ;; - vendor/lib64/libgooglecamerahal.so) - [ "$2" = "" ] && return 0 - "${PATCHELF}" --add-needed "libmeminfo_shim.so" "${2}" - ;; - *) - return 1 - ;; - esac - - return 0 -} - -function blob_fixup_dry() { - blob_fixup "$1" "" -} - -function prepare_firmware() { - if [ "${SRC}" != "adb" ]; then - bash "${ANDROID_ROOT}"/lineage/scripts/pixel/prepare-firmware.sh "${DEVICE}" "${SRC}" - fi -} - -# Initialize the helper -setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}" - -if [ -z "${ONLY_FIRMWARE}" ]; then - extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" - - generate_prop_list_from_image "product.img" "${MY_DIR}/proprietary-files-carriersettings.txt" CARRIER_SKIP_FILES carriersettings - extract "${MY_DIR}/proprietary-files-carriersettings.txt" "${SRC}" "${KANG}" --section "${SECTION}" - - readarray -t VENDOR_SKIP_FILES < <(cat "${MY_DIR}/skip-files-vendor.txt" | sed -E "/^[[:blank:]]*(#|$)/d") - VENDOR_TXT="${MY_DIR}/proprietary-files-vendor.txt" - generate_prop_list_from_image "vendor.img" "${VENDOR_TXT}" VENDOR_SKIP_FILES - - set_presigned "vendor/app/adreno_graphics_driver/adreno_graphics_driver.apk" "${VENDOR_TXT}" - - set_required "vendor/app/CneApp/CneApp.apk" "CneApp.libvndfwk_detect_jni.qti_symlink" "${VENDOR_TXT}" - - set_symlink "vendor/lib/egl/libEGL_adreno.so" "vendor/lib/libEGL_adreno.so" "${VENDOR_TXT}" - set_symlink "vendor/lib/egl/libGLESv2_adreno.so" "vendor/lib/libGLESv2_adreno.so" "${VENDOR_TXT}" - set_symlink "vendor/lib/egl/libq3dtools_adreno.so" "vendor/lib/libq3dtools_adreno.so" "${VENDOR_TXT}" - set_symlink "vendor/lib64/egl/libEGL_adreno.so" "vendor/lib64/libEGL_adreno.so" "${VENDOR_TXT}" - set_symlink "vendor/lib64/egl/libGLESv2_adreno.so" "vendor/lib64/libGLESv2_adreno.so" "${VENDOR_TXT}" - set_symlink "vendor/lib64/egl/libq3dtools_adreno.so" "vendor/lib64/libq3dtools_adreno.so" "${VENDOR_TXT}" - - # 32bit libmmcamera_faceproc is unable to resolved the following symbols: - # __aeabi_memcpy@LIBC_PRIVATE, __aeabi_memset@LIBC_PRIVATE, __gnu_Unwind_Find_exidx@LIBC_PRIVATE - # lowi-server, libcne, libwqe depend on libwpa_client, which is a gnu makefile target - set_disable_checkelf "vendor/bin/lowi-server" "${VENDOR_TXT}" - set_disable_checkelf "vendor/lib/libcne.so" "${VENDOR_TXT}" - set_disable_checkelf "vendor/lib/libmmcamera_faceproc.so" "${VENDOR_TXT}" - set_disable_checkelf "vendor/lib/libwqe.so" "${VENDOR_TXT}" - set_disable_checkelf "vendor/lib64/libcne.so" "${VENDOR_TXT}" - set_disable_checkelf "vendor/lib64/libmmcamera_faceproc.so" "${VENDOR_TXT}" - set_disable_checkelf "vendor/lib64/libwqe.so" "${VENDOR_TXT}" - - set_module_suffix "vendor/lib/vendor.qti.hardware.tui_comm@1.0.so" "-vendor" "${VENDOR_TXT}" - set_module_suffix "vendor/lib/vendor.qti.imsrtpservice@3.0.so" "-vendor" "${VENDOR_TXT}" - set_module_suffix "vendor/lib64/vendor.qti.hardware.tui_comm@1.0.so" "-vendor" "${VENDOR_TXT}" - set_module_suffix "vendor/lib64/vendor.qti.imsrtpservice@3.0.so" "-vendor" "${VENDOR_TXT}" - - extract "${MY_DIR}/proprietary-files-vendor.txt" "${SRC}" "${KANG}" --section "${SECTION}" -fi - -if [ -z "${SECTION}" ]; then - extract_firmware "${MY_DIR}/proprietary-firmware.txt" "${SRC}" -fi - -"${MY_DIR}/setup-makefiles.sh" diff --git a/setup-makefiles.py b/setup-makefiles.py new file mode 100755 index 0000000..a7fc6ee --- /dev/null +++ b/setup-makefiles.py @@ -0,0 +1,13 @@ +#!/bin/bash +# +# SPDX-FileCopyrightText: 2024 The LineageOS Project +# SPDX-License-Identifier: Apache-2.0 +# + +set -e + +MY_DIR="$(cd "$(dirname "${0}")"; pwd -P)" + +pushd "${MY_DIR}/barbet" +./setup-makefiles.py +popd diff --git a/setup-makefiles.sh b/setup-makefiles.sh deleted file mode 100755 index fca3337..0000000 --- a/setup-makefiles.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash -# -# SPDX-FileCopyrightText: 2016 The CyanogenMod Project -# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project -# SPDX-License-Identifier: Apache-2.0 -# - -set -e - -DEVICE=barbet -VENDOR=google - -# Load extract_utils and do some sanity checks -MY_DIR="${BASH_SOURCE%/*}" -if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi - -ANDROID_ROOT="${MY_DIR}/../../.." - -export TARGET_ENABLE_CHECKELF=true - -HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh" -if [ ! -f "${HELPER}" ]; then - echo "Unable to find helper script at ${HELPER}" - exit 1 -fi -source "${HELPER}" - -function vendor_imports() { - cat <<EOF >>"$1" - "device/google/barbet", - "hardware/google/interfaces", - "hardware/google/pixel", - "hardware/qcom/sm7250/display", - "hardware/qcom/sm7250/gps", - "hardware/qcom/wlan/legacy", - "vendor/qcom/opensource/display" -EOF -} - -function lib_to_package_fixup_vendor_variants() { - if [ "$2" != "vendor" ]; then - return 1 - fi - - case "$1" in - vendor.qti.hardware.tui_comm@1.0 | \ - vendor.qti.imsrtpservice@3.0) - echo "$1-vendor" - ;; - libprotobuf-cpp-full-21.12) - echo "libprotobuf-cpp-full" - ;; - libprotobuf-cpp-lite-21.12) - echo "libprotobuf-cpp-lite" - ;; - libwpa_client) ;; - *) - return 1 - ;; - esac -} - -function lib_to_package_fixup() { - lib_to_package_fixup_clang_rt_ubsan_standalone "$1" || - lib_to_package_fixup_proto_3_9_1 "$1" || - lib_to_package_fixup_vendor_variants "$@" -} - -# Initialize the helper -setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" - -# Warning headers and guards -write_headers - -write_makefiles "${MY_DIR}/proprietary-files.txt" -write_makefiles "${MY_DIR}/proprietary-files-carriersettings.txt" -write_makefiles "${MY_DIR}/proprietary-files-vendor.txt" - -append_firmware_calls_to_makefiles "${MY_DIR}/proprietary-firmware.txt" - -# Finish -write_footers |
