2021-03-23 20:44:27 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
#
|
|
|
|
|
# Copyright (C) 2016 The CyanogenMod Project
|
|
|
|
|
# Copyright (C) 2017-2020 The LineageOS Project
|
|
|
|
|
#
|
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
#
|
|
|
|
|
|
2019-09-21 12:34:37 +08:00
|
|
|
function blob_fixup() {
|
|
|
|
|
case "${1}" in
|
2021-09-16 07:15:05 +02:00
|
|
|
vendor/lib64/libexynoscamera3.so)
|
|
|
|
|
xxd -p "${2}" | sed "s/8b022036/1f2003d5/g" | xxd -r -p > "${2}".patched
|
|
|
|
|
mv "${2}".patched "${2}"
|
|
|
|
|
;;
|
2022-11-17 20:15:36 +01:00
|
|
|
vendor/lib*/sensors.*.so)
|
2022-09-16 15:36:09 +02:00
|
|
|
"${PATCHELF}" --replace-needed libutils.so libutils-v32.so "${2}"
|
2023-04-06 20:14:03 +02:00
|
|
|
sed -i 's/_ZN7android6Thread3runEPKcim/_ZN7utils326Thread3runEPKcim/g' "${2}"
|
2022-09-16 15:36:09 +02:00
|
|
|
;;
|
2022-09-15 21:04:49 +02:00
|
|
|
vendor/lib64/libiu456_datapath_processor.so)
|
|
|
|
|
"${PATCHELF}" --add-needed libshim_sfpex.so "${2}"
|
2019-09-21 12:34:37 +08:00
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-23 20:44:27 +01:00
|
|
|
# If we're being sourced by the common script that we called,
|
|
|
|
|
# stop right here. No need to go down the rabbit hole.
|
|
|
|
|
if [ "${BASH_SOURCE[0]}" != "${0}" ]; then
|
|
|
|
|
return
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
export DEVICE=beyondx
|
|
|
|
|
export DEVICE_COMMON=exynos9820-common
|
|
|
|
|
export VENDOR=samsung
|
|
|
|
|
|
|
|
|
|
"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@"
|