diff options
author | Davide Garberi <dade.garberi@gmail.com> | 2019-09-13 20:54:12 +0200 |
---|---|---|
committer | Isaac Chen <tingyi364@gmail.com> | 2019-11-05 13:24:11 +0100 |
commit | d292a85ea71f9feb85267c21f1f59057018ffd5a (patch) | |
tree | 07739edf8633ac354a4b4681452b1ee06c4128fc /extract-files.sh | |
parent | 05f6ed65f8491e2e43e5313ab0ed1d2cffba63db (diff) |
sdm660-common: extract-files: Implement blob_fixup
Change-Id: Iad42a93bd024caa70d5c21a2cc2747f89aba2450
Diffstat (limited to 'extract-files.sh')
-rwxr-xr-x | extract-files.sh | 22 |
1 files changed, 14 insertions, 8 deletions
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 |