From 26c9c2eab6eede84897141fbd7273462a1d99d09 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Sat, 21 Oct 2023 15:32:08 +0200 Subject: [PATCH] sm7125-common: Shim Samsung keymaster HAL impl with libcrypto-v33.so Current asn1t.h structs aren't binary compatible with our keymaster. Change-Id: Id78b71c1f08216f861a033097cd015ba3c109925 --- common.mk | 3 ++- extract-files.sh | 3 +++ proprietary-files.txt | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/common.mk b/common.mk index 4e97d86..1c4d8de 100644 --- a/common.mk +++ b/common.mk @@ -418,7 +418,8 @@ PRODUCT_PACKAGES += \ # VNDK PRODUCT_COPY_FILES += \ - prebuilts/vndk/v30/arm64/arch-arm64-armv8-a/shared/vndk-sp/libutils.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libutils-v30.so + prebuilts/vndk/v30/arm64/arch-arm64-armv8-a/shared/vndk-sp/libutils.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libutils-v30.so \ + prebuilts/vndk/v33/arm64/arch-arm64-armv8-a/shared/vndk-core/libcrypto.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libcrypto-v33.so # WiFi PRODUCT_PACKAGES += \ diff --git a/extract-files.sh b/extract-files.sh index 1fe6a80..7c3d3aa 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -70,6 +70,9 @@ function blob_fixup() { # Replace libutils with vndk30 libutils "${PATCHELF}" --replace-needed libutils.so libutils-v30.so "${2}" ;; + vendor/lib64/libskeymaster4device.so) + "${PATCHELF}" --replace-needed "libcrypto.so" "libcrypto-v33.so" "${2}" + ;; esac } diff --git a/proprietary-files.txt b/proprietary-files.txt index 357759d..920bac8 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -753,7 +753,7 @@ vendor/firmware/ipa_fws.mdt # Keymaster vendor/lib64/libkeymaster_helper.so --vendor/lib64/libskeymaster4device.so +-vendor/lib64/libskeymaster4device.so|2c921afc48d4d10a6ff50d7013af86fa09827f1a # Machine learning vendor/lib64/libreffeature.so