universal7885: Use blob_fixup function

* also Switch to patchelf from tools-lineage

Change-Id: I332a3d6e03b1d414ac4e7079c5e1991e0ba76277
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
This commit is contained in:
SamarV-121 2021-06-22 18:37:22 +05:30 committed by roynatech2544
commit 45a6b5b156

View file

@ -20,6 +20,22 @@ if [ ! -f "${HELPER}" ]; then
fi
source "${HELPER}"
function blob_fixup {
case "$1" in
vendor/lib/libstagefright_omx_utils.so)
"$PATCHELF" --add-needed "libshim_stagefright_foundation.so" "$2"
;;
vendor/lib*/libhifills.so)
"$PATCHELF" --add-needed "libunwindstack.so" "$2"
;;
vendor/lib*/libsec-ril.so)
;&
vendor/lib*/libsec-ril-dsds.so)
"$PATCHELF" --replace-needed "libcutils.so" "libcutils-v29.so" "$2"
;;
esac
}
# Default to sanitizing the vendor folder before extraction
CLEAN_VENDOR=true
@ -64,14 +80,4 @@ if [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then
"${KANG}" --section "${SECTION}"
fi
BLOB_ROOT="${LINEAGE_ROOT}/vendor/${VENDOR}/${DEVICE_COMMON}/proprietary"
patchelf --replace-needed "libcutils.so" "libcutils-v29.so" "${BLOB_ROOT}/vendor/lib64/libsec-ril-dsds.so"
patchelf --replace-needed "libcutils.so" "libcutils-v29.so" "${BLOB_ROOT}/vendor/lib/libsec-ril-dsds.so"
patchelf --replace-needed "libcutils.so" "libcutils-v29.so" "${BLOB_ROOT}/vendor/lib64/libsec-ril.so"
patchelf --replace-needed "libcutils.so" "libcutils-v29.so" "${BLOB_ROOT}/vendor/lib/libsec-ril.so"
patchelf --add-needed "libshim_stagefright_foundation.so" "${BLOB_ROOT}/vendor/lib/libstagefright_omx_utils.so"
patchelf --add-needed "libunwindstack.so" "${BLOB_ROOT}/vendor/lib64/libhifills.so"
patchelf --add-needed "libunwindstack.so" "${BLOB_ROOT}/vendor/lib/libhifills.so"
"${MY_DIR}/setup-makefiles.sh"