From ade67098e9764e7c0f1c6da5358d3aef15825cb4 Mon Sep 17 00:00:00 2001 From: Marc Bourgoin Date: Wed, 10 Feb 2021 22:38:58 -0700 Subject: [PATCH] exynos9610: Add a check before adding dependencies Without a check, when performing a vendor blob regen it'll add another dependency on top of any existing one Change-Id: I9c7f17082fd850235c794d44cec3cda0c4b883ef --- extract-files.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/extract-files.sh b/extract-files.sh index d353e85..acd84aa 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -61,11 +61,21 @@ extract "${MY_DIR}/proprietary-files-vendor.txt" "${SRC}" "${KANG}" --section "$ # Fix proprietary blobs BLOB_ROOT="$ANDROID_ROOT"/vendor/"$VENDOR"/"$DEVICE_COMMON"/proprietary + "${PATCHELF}" --replace-needed libmedia.so libmedia_ims.so $BLOB_ROOT/lib64/libmediaadaptor.so -"${PATCHELF}" --add-needed libaudioproxy_shim.so $BLOB_ROOT/vendor/lib/libaudioproxy.so -"${PATCHELF}" --add-needed libmemset.so $BLOB_ROOT/vendor/bin/charge_only_mode -"${PATCHELF}" --add-needed libdemangle.so $BLOB_ROOT/vendor/lib/libhifills.so -"${PATCHELF}" --add-needed libdemangle.so $BLOB_ROOT/vendor/lib64/libhifills.so + +for LIBAUDIOPROXY_SHIM in $(grep -L "libaudioproxy_shim.so" "$BLOB_ROOT/vendor/lib/libaudioproxy.so"); do + "${PATCHELF}" --add-needed libaudioproxy_shim.so $BLOB_ROOT/vendor/lib/libaudioproxy.so +done +for LIBMEMSET in $(grep -L "libmemset.so" "$BLOB_ROOT/vendor/bin/charge_only_mode"); do + "${PATCHELF}" --add-needed libmemset.so $BLOB_ROOT/vendor/bin/charge_only_mode +done +for LIBDEMANGLE in $(grep -L "libdemangle.so" "$BLOB_ROOT/vendor/lib/libhifills.so"); do + "${PATCHELF}" --add-needed libdemangle.so $BLOB_ROOT/vendor/lib/libhifills.so +done +for LIBDEMANGLE64 in $(grep -L "libdemangle.so" "$BLOB_ROOT/vendor/lib64/libhifills.so"); do + "${PATCHELF}" --add-needed libdemangle.so $BLOB_ROOT/vendor/lib64/libhifills.so +done # Remove libhidltransport dependency "${PATCHELF}" --remove-needed libhidltransport.so $BLOB_ROOT/vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service-rbs -- 2.20.1