diff --git a/extract-files.sh b/extract-files.sh index ee378a4c..5fcb51ec 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -17,6 +17,12 @@ set -e +function replace_dependency() { + for arg in ${@:3}; do + patchelf --replace-needed $1 $2 $arg + done +} + DEVICE_COMMON=sm8150-common VENDOR=oneplus @@ -74,4 +80,6 @@ sed -i "s/android.hidl.base@1.0.so/libhidlbase.so\x00\x00\x00\x00\x00\x00\x00\x0 sed -i "s/android.hidl.base@1.0.so/libhidlbase.so\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00/" "${COMMON_BLOB_ROOT}/lib64/liblocationservice_jni.so" sed -i "s/android.hidl.base@1.0.so/libhidlbase.so\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00/" "${COMMON_BLOB_ROOT}/lib64/libxt_native.so" +replace_dependency "libcutils.so" "libprocessgroup.so" "${COMMON_BLOB_ROOT}/vendor/lib/libgps.utils.so" "${COMMON_BLOB_ROOT}/vendor/lib64/libgps.utils.so" "${COMMON_BLOB_ROOT}/vendor/lib/hw/audio.primary.msmnile.so" "${COMMON_BLOB_ROOT}/vendor/lib64/hw/audio.primary.msmnile.so" + "${MY_DIR}/setup-makefiles.sh"