From d292a85ea71f9feb85267c21f1f59057018ffd5a Mon Sep 17 00:00:00 2001 From: Davide Garberi Date: Fri, 13 Sep 2019 20:54:12 +0200 Subject: sdm660-common: extract-files: Implement blob_fixup Change-Id: Iad42a93bd024caa70d5c21a2cc2747f89aba2450 --- extract-files.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'extract-files.sh') diff --git a/extract-files.sh b/extract-files.sh index 7e175b9..1536608 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -59,6 +59,20 @@ if [ -z "$SRC" ]; then SRC=adb fi +function blob_fixup() { + case "${1}" in + + vendor/bin/mlipayd@1.1) + patchelf --remove-needed vendor.xiaomi.hardware.mtdservice@1.0.so "${2}" + ;; + + vendor/lib64/libmlipay.so | vendor/lib64/libmlipay@1.1.so) + patchelf --remove-needed vendor.xiaomi.hardware.mtdservice@1.0.so "${2}" + sed -i "s|/system/etc/firmware|/vendor/firmware\x0\x0\x0\x0|g" "${2}" + ;; + esac +} + # Initialize the common helper setup_vendor "$DEVICE_COMMON" "$VENDOR" "$LINEAGE_ROOT" true $CLEAN_VENDOR @@ -73,11 +87,3 @@ if [ -s "$MY_DIR"/../$DEVICE/proprietary-files.txt ]; then fi "$MY_DIR"/setup-makefiles.sh - -DEVICE_BLOB_ROOT="$LINEAGE_ROOT"/vendor/"$VENDOR"/"$DEVICE"/proprietary - -patchelf --remove-needed vendor.xiaomi.hardware.mtdservice@1.0.so "$DEVICE_BLOB_ROOT"/vendor/bin/mlipayd@1.1 -patchelf --remove-needed vendor.xiaomi.hardware.mtdservice@1.0.so "$DEVICE_BLOB_ROOT"/vendor/lib64/libmlipay.so -patchelf --remove-needed vendor.xiaomi.hardware.mtdservice@1.0.so "$DEVICE_BLOB_ROOT"/vendor/lib64/libmlipay@1.1.so -sed -i "s|/system/etc/firmware|/vendor/firmware\x0\x0\x0\x0|g" "$DEVICE_BLOB_ROOT"/vendor/lib64/libmlipay.so -sed -i "s|/system/etc/firmware|/vendor/firmware\x0\x0\x0\x0|g" "$DEVICE_BLOB_ROOT"/vendor/lib64/libmlipay@1.1.so -- cgit v1.2.3