deadpool: Patch keymint service to replace ndk_platform backend lineage-21
authorBruno Martins <bgcngm@gmail.com>
Sun, 6 Oct 2024 09:32:13 +0000 (10:32 +0100)
committerNolen Johnson <johnsonnolen@gmail.com>
Thu, 10 Oct 2024 19:41:52 +0000 (15:41 -0400)
At the same time bump the ndk version where applicable to fix:

error: module "android.hardware.security.keymint-service.amlogic" variant
"android_vendor_arm_armv8-a": depends on multiple versions of the same aidl_interface:
android.hardware.security.keymint-V1-ndk-source,
android.hardware.security.keymint-V3-ndk-source

Change-Id: I394545d7af4422cae2c446278a681cbbc353c9f3

extract-files.sh

index 281bc61b036cb74fff4ae53ce14b47e380289388..12f33f2af9c8a7cece5304b3d25df14ca3350f3d 100755 (executable)
@@ -8,6 +8,12 @@
 
 function blob_fixup() {
     case "${1}" in
+        vendor/bin/hw/android.hardware.security.keymint-service.amlogic)
+            [ "$2" = "" ] && return 0
+            "${PATCHELF}" --replace-needed "android.hardware.security.keymint-V1-ndk_platform.so" "android.hardware.security.keymint-V3-ndk.so" "${2}"
+            "${PATCHELF}" --replace-needed "android.hardware.security.secureclock-V1-ndk_platform.so" "android.hardware.security.secureclock-V1-ndk.so" "${2}"
+            "${PATCHELF}" --replace-needed "android.hardware.security.sharedsecret-V1-ndk_platform.so" "android.hardware.security.sharedsecret-V1-ndk.so" "${2}"
+            ;;
         vendor/etc/init/tee-supplicant.rc)
             [ "$2" = "" ] && return 0
             sed -i 's#/vendor/lib/#/vendor/lib/modules/#g' "${2}"