sm7325-common: Sync extract scripts with templates

Change-Id: I98a36854c5a0c0390592911bb2558b34eff77efc
This commit is contained in:
Michael Bestas 2024-08-27 22:51:30 +03:00 committed by Nolen Johnson
parent 490bd1363a
commit b17aa83e37
2 changed files with 19 additions and 6 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# #
# Copyright (C) 2016 The CyanogenMod Project # SPDX-FileCopyrightText: 2016 The CyanogenMod Project
# Copyright (C) 2017-2023 The LineageOS Project # SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
@ -48,7 +48,8 @@ while [ "${#}" -gt 0 ]; do
KANG="--kang" KANG="--kang"
;; ;;
-s | --section ) -s | --section )
SECTION="${2}"; shift SECTION="${2}"
shift
CLEAN_VENDOR=false CLEAN_VENDOR=false
;; ;;
* ) * )
@ -65,15 +66,27 @@ fi
function blob_fixup() { function blob_fixup() {
case "${1}" in case "${1}" in
system_ext/lib64/libwfdnative.so) 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) system_ext/etc/permissions/moto-telephony.xml)
[ "$2" = "" ] && return 0
sed -i "s#/system/#/system_ext/#" "${2}" sed -i "s#/system/#/system_ext/#" "${2}"
;; ;;
vendor/etc/vintf/manifest/vendor.dolby.media.c2@1.0-service.xml) vendor/etc/vintf/manifest/vendor.dolby.media.c2@1.0-service.xml)
[ "$2" = "" ] && return 0
sed -ni '/default1/!p' "${2}" sed -ni '/default1/!p' "${2}"
;; ;;
*)
return 1
;;
esac esac
return 0
}
function blob_fixup_dry() {
blob_fixup "$1" ""
} }
function prepare_firmware() { function prepare_firmware() {

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# #
# Copyright (C) 2016 The CyanogenMod Project # SPDX-FileCopyrightText: 2016 The CyanogenMod Project
# Copyright (C) 2017-2023 The LineageOS Project # SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #