diff --git a/device.mk b/device.mk index 502652067ae6cd1616830e77a3b696f18c876400..116ca8d9cc80265e9fad5251e16984ad1fc215a3 100644 --- a/device.mk +++ b/device.mk @@ -253,7 +253,8 @@ PRODUCT_BOOT_JARS += \ PRODUCT_PACKAGES += \ ImsServiceBase \ libshim_vtservice \ - libshim_mtkcam.vendor + libshim_mtkcam.vendor \ + libshim_beanpod.vendor PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/ims/privapp-permissions-mediatek.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/privapp-permissions-mediatek.xml diff --git a/extract-files.sh b/extract-files.sh index 4a9a5db48533b3f94b52aae910364b7fe7060470..a5b10dfd32bfdea5020ef24bc84848ca66130baf 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -42,6 +42,9 @@ function blob_fixup() { vendor/lib64/libmtkcam_stdutils.so) "${PATCHELF}" --add-needed "libshim_mtkcam.so" "${2}" ;; + vendor/bin/hw/android.hardware.keymaster@4.0-service.beanpod) + "${PATCHELF}" --add-needed "libshim_beanpod.so" "${2}" + ;; esac } diff --git a/ims/Android.bp b/ims/Android.bp index f523c53d04382aa1e733d8fcd7bedb37eccd0e2d..5d3d3f64cdbc4a1ed84f56e81837abb57911757c 100644 --- a/ims/Android.bp +++ b/ims/Android.bp @@ -45,6 +45,19 @@ cc_library_shared { ], } +cc_library_shared { + name: "libshim_beanpod", + srcs: ["libshim_beanpod.cpp"], + vendor_available: true, + shared_libs: [ + "libkeymaster_messages", + ], + header_libs: [ + "libhardware_headers", + ], + include_dirs: [ "system/keymaster/include" ], +} + java_library { name: "ImsServiceBase", installable: true, diff --git a/ims/libshim_beanpod.cpp b/ims/libshim_beanpod.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a4aec17a9457a948c89a6d75c6b1504c3e717c52 --- /dev/null +++ b/ims/libshim_beanpod.cpp @@ -0,0 +1,9 @@ +#include + +extern "C" { +void _ZN9keymaster19GenerateKeyResponseD1Ev() {} +void _ZN9keymaster17AttestKeyResponseD1Ev() {} +void _ZN9keymaster16ImportKeyRequest14SetKeyMaterialEPKvm(keymaster::ImportKeyRequest* thisptr, const uint8_t* key_material, size_t length) { + thisptr->key_data = keymaster::KeymasterKeyBlob(key_material, length); +} +}