diff --git a/extract-files.sh b/extract-files.sh index f658d82..76b9436 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -1,7 +1,7 @@ #!/bin/bash # -# Copyright (C) 2016 The CyanogenMod Project -# Copyright (C) 2017-2023 The LineageOS Project +# SPDX-FileCopyrightText: 2016 The CyanogenMod Project +# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project # # SPDX-License-Identifier: Apache-2.0 # @@ -48,7 +48,8 @@ while [ "${#}" -gt 0 ]; do KANG="--kang" ;; -s | --section ) - SECTION="${2}"; shift + SECTION="${2}" + shift CLEAN_VENDOR=false ;; * ) @@ -65,22 +66,32 @@ fi function blob_fixup() { case "${1}" in system_ext/lib64/libwfdnative.so) - ${PATCHELF} --remove-needed "android.hidl.base@1.0.so" "${2}" + [ "$2" = "" ] && return 0 + "${PATCHELF}" --remove-needed "android.hidl.base@1.0.so" "${2}" ;; system_ext/etc/permissions/moto-telephony.xml) + [ "$2" = "" ] && return 0 sed -i "s#/system/#/system_ext/#" "${2}" ;; system_ext/priv-app/ims/ims.apk) apktool_patch "${2}" "$MY_DIR/ims-patches" ;; vendor/etc/vintf/manifest/vendor.dolby.media.c2@1.0-service.xml) + [ "$2" = "" ] && return 0 sed -ni '/default.*fqname/!p' "${2}" ;; + *) + return 1 + ;; vendor/etc/qcril_database/qcrilNr.db|\ vendor/etc/qcril_database/upgrade/config/*) sed -i '/persist.vendor.radio.poweron_opt/ s/1/0/g' "${2}" ;; esac + return 0 +} +function blob_fixup_dry() { + blob_fixup "$1" "" } function prepare_firmware() { diff --git a/setup-makefiles.sh b/setup-makefiles.sh index 76dfd53..9035b52 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -1,7 +1,7 @@ #!/bin/bash # -# Copyright (C) 2016 The CyanogenMod Project -# Copyright (C) 2017-2023 The LineageOS Project +# SPDX-FileCopyrightText: 2016 The CyanogenMod Project +# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project # # SPDX-License-Identifier: Apache-2.0 #