Sync extract scripts with templates
Change-Id: I98a36854c5a0c0390592911bb2558b34eff77efc
This commit is contained in:
parent
3801334591
commit
cd26b25ddf
@ -1,8 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2016 The CyanogenMod Project
|
||||
# Copyright (C) 2017-2020 The LineageOS Project
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
|
||||
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
@ -17,6 +16,10 @@ if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
|
||||
|
||||
ANDROID_ROOT="${MY_DIR}/../../.."
|
||||
|
||||
# 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}"
|
||||
@ -39,7 +42,8 @@ while [ "${#}" -gt 0 ]; do
|
||||
KANG="--kang"
|
||||
;;
|
||||
-s | --section)
|
||||
SECTION="${2}"; shift
|
||||
SECTION="${2}"
|
||||
shift
|
||||
CLEAN_VENDOR=false
|
||||
;;
|
||||
*)
|
||||
@ -56,12 +60,23 @@ fi
|
||||
function blob_fixup() {
|
||||
case "${1}" in
|
||||
system/lib64/libcamera_algoup_jni.xiaomi.so|system/lib64/libcamera_mianode_jni.xiaomi.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
grep -q "libgui_shim_miuicamera.so" "${2}" || "${PATCHELF}" --add-needed "libgui_shim_miuicamera.so" "${2}"
|
||||
;;
|
||||
system/lib64/libmicampostproc_client.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
"${PATCHELF}" --remove-needed "libhidltransport.so" "${2}"
|
||||
;;
|
||||
*)
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
function blob_fixup_dry() {
|
||||
blob_fixup "$1" ""
|
||||
}
|
||||
|
||||
# Initialize the helper
|
||||
|
@ -1,8 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2016 The CyanogenMod Project
|
||||
# Copyright (C) 2017-2020 The LineageOS Project
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
|
||||
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user