diff options
-rw-r--r-- | Android.mk | 2 | ||||
-rw-r--r-- | cryptfs_hw.c | 8 |
2 files changed, 7 insertions, 3 deletions
@@ -2,8 +2,6 @@ ifeq ($(TARGET_HW_DISK_ENCRYPTION),true) LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) -LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_SHARED_LIBRARIES) - sourceFiles := \ cryptfs_hw.c diff --git a/cryptfs_hw.c b/cryptfs_hw.c index 4a38e1b..84e81b4 100644 --- a/cryptfs_hw.c +++ b/cryptfs_hw.c @@ -37,6 +37,12 @@ #include "cutils/log.h" #include "cutils/android_reboot.h" +#if defined(__LP64__) +#define QSEECOM_LIBRARY_PATH "/vendor/lib64/libQSEEComAPI.so" +#else +#define QSEECOM_LIBRARY_PATH "/vendor/lib/libQSEEComAPI.so" +#endif + // When device comes up or when user tries to change the password, user can // try wrong password upto a certain number of times. If user enters wrong @@ -94,7 +100,7 @@ static int load_qseecom_library() if (loaded_library) return loaded_library; - void * handle = dlopen("/vendor/lib/libQSEEComAPI.so", RTLD_NOW); + void * handle = dlopen(QSEECOM_LIBRARY_PATH, RTLD_NOW); if(handle) { dlerror(); /* Clear any existing error */ *(void **) (&qseecom_create_key) = dlsym(handle,"QSEECom_create_key"); |