summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDinesh K Garg <dineshg@codeaurora.org>2014-09-11 10:55:02 -0700
committerZhao Wei Liew <zhaoweiliew@gmail.com>2017-02-12 20:42:24 +0800
commit9cccca7472e8b2b7c13a06e69bc1350e6a1a9294 (patch)
treec8a6a2bcaa1b873bbe5bbd577d22f2941f6aa2d9
parentcba11e0f9fd333594c463111998a5d466bd39519 (diff)
downloadandroid_vendor_qcom_opensource_cryptfs_hw-9cccca7472e8b2b7c13a06e69bc1350e6a1a9294.tar.gz
android_vendor_qcom_opensource_cryptfs_hw-9cccca7472e8b2b7c13a06e69bc1350e6a1a9294.tar.bz2
android_vendor_qcom_opensource_cryptfs_hw-9cccca7472e8b2b7c13a06e69bc1350e6a1a9294.zip
Port cryptfs_hw library to 64bit platform
64 bit platform generates library at a different path compared to 32 bit platform.Added macros to take care of both kind of platforms. Change-Id: Ie32b8edaeb9f8f34095c7f18c4add83fe957d82a
-rw-r--r--Android.mk2
-rw-r--r--cryptfs_hw.c8
2 files changed, 7 insertions, 3 deletions
diff --git a/Android.mk b/Android.mk
index 69ace0d..996947b 100644
--- a/Android.mk
+++ b/Android.mk
@@ -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");