miuicamera: Sync extract scripts with templates
Change-Id: I98a36854c5a0c0390592911bb2558b34eff77efc
This commit is contained in:
parent
18bcc482e7
commit
7d90015f98
@ -1,8 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright (C) 2016 The CyanogenMod Project
|
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
|
||||||
# Copyright (C) 2017-2020 The LineageOS Project
|
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -32,17 +31,18 @@ SECTION=
|
|||||||
|
|
||||||
while [ "${#}" -gt 0 ]; do
|
while [ "${#}" -gt 0 ]; do
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
-n | --no-cleanup )
|
-n | --no-cleanup)
|
||||||
CLEAN_VENDOR=false
|
CLEAN_VENDOR=false
|
||||||
;;
|
;;
|
||||||
-k | --kang )
|
-k | --kang)
|
||||||
KANG="--kang"
|
KANG="--kang"
|
||||||
;;
|
;;
|
||||||
-s | --section )
|
-s | --section)
|
||||||
SECTION="${2}"; shift
|
SECTION="${2}"
|
||||||
|
shift
|
||||||
CLEAN_VENDOR=false
|
CLEAN_VENDOR=false
|
||||||
;;
|
;;
|
||||||
* )
|
*)
|
||||||
SRC="${1}"
|
SRC="${1}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -56,21 +56,28 @@ fi
|
|||||||
function blob_fixup() {
|
function blob_fixup() {
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
system/priv-app/MiuiCamera/MiuiCamera.apk)
|
system/priv-app/MiuiCamera/MiuiCamera.apk)
|
||||||
|
[ "$2" = "" ] && return 0
|
||||||
apktool_patch "${2}" "$MY_DIR/blob-patches"
|
apktool_patch "${2}" "$MY_DIR/blob-patches"
|
||||||
;;
|
;;
|
||||||
system/lib64/libcamera_algoup_jni.xiaomi.so|system/lib64/libcamera_mianode_jni.xiaomi.so)
|
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}"
|
grep -q "libgui_shim_miuicamera.so" "${2}" || "${PATCHELF}" --add-needed "libgui_shim_miuicamera.so" "${2}"
|
||||||
;;
|
;;
|
||||||
system/lib64/libmicampostproc_client.so)
|
system/lib64/libmicampostproc_client.so)
|
||||||
|
[ "$2" = "" ] && return 0
|
||||||
"${PATCHELF}" --remove-needed "libhidltransport.so" "${2}"
|
"${PATCHELF}" --remove-needed "libhidltransport.so" "${2}"
|
||||||
;;
|
;;
|
||||||
|
*)
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "$SRC" ]; then
|
function blob_fixup_dry() {
|
||||||
echo "Path to system dump not specified! Specify one with --path"
|
blob_fixup "$1" ""
|
||||||
exit 1
|
}
|
||||||
fi
|
|
||||||
|
|
||||||
# Initialize the helper
|
# Initialize the helper
|
||||||
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
|
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright (C) 2016 The CyanogenMod Project
|
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
|
||||||
# Copyright (C) 2017-2020 The LineageOS Project
|
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user