summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-11-21 00:18:37 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-11-21 00:18:37 +0000
commitc213008b1193fda2acde306341aff57df33f8df1 (patch)
tree0dc67a1e5477ceb6b94ddae84fa28051441918df
parentae609bb9af49ffb539e3292699888690f481603c (diff)
parent266c10dae8521a0c1e9d73b013cd34ab95074643 (diff)
downloadsecure_element-android14-qpr2-release.tar.gz
Change-Id: I895a8b36dc518d8348dde181fb88fa875d1e5a47
-rw-r--r--1.0/Android.bp4
-rw-r--r--1.0/SecureElement.cpp4
-rw-r--r--1.0/StEseService.cpp4
-rw-r--r--1.2/Android.bp4
-rw-r--r--1.2/SecureElement.cpp4
5 files changed, 20 insertions, 0 deletions
diff --git a/1.0/Android.bp b/1.0/Android.bp
index 297b277..720e735 100644
--- a/1.0/Android.bp
+++ b/1.0/Android.bp
@@ -28,4 +28,8 @@ cc_binary {
"liblog",
"libutils",
],
+
+ arch: {
+ arm: { cflags: ["-DST_LIB_32"] },
+ }
}
diff --git a/1.0/SecureElement.cpp b/1.0/SecureElement.cpp
index 7a71738..1501b9d 100644
--- a/1.0/SecureElement.cpp
+++ b/1.0/SecureElement.cpp
@@ -66,7 +66,11 @@ Return<void> SecureElement::init(
}
// Ignore this dlopen if you don't have libstpreprocess.so
+#if defined(ST_LIB_32)
+ void* stdll = dlopen("/vendor/lib/libstpreprocess.so", RTLD_NOW);
+#else
void* stdll = dlopen("/vendor/lib64/libstpreprocess.so", RTLD_NOW);
+#endif
if (stdll) {
STAram_init fn_init = (STAram_init)dlsym(stdll, "STAram_init");
if (fn_init) {
diff --git a/1.0/StEseService.cpp b/1.0/StEseService.cpp
index d6628e1..799d3eb 100644
--- a/1.0/StEseService.cpp
+++ b/1.0/StEseService.cpp
@@ -38,7 +38,11 @@ int main() {
ALOGD("Secure Element HAL Service 1.0 is starting.");
// Ignore this dlopen it doesn't needed.
+#if defined(ST_LIB_32)
+ void* stdll = dlopen("/vendor/lib/libstpreprocess.so", RTLD_NOW);
+#else
void* stdll = dlopen("/vendor/lib64/libstpreprocess.so", RTLD_NOW);
+#endif
if (stdll) {
STEsePreProcess fn = (STEsePreProcess)dlsym(stdll, "pre_process");
if (fn) {
diff --git a/1.2/Android.bp b/1.2/Android.bp
index 8a9b7f8..154b2a3 100644
--- a/1.2/Android.bp
+++ b/1.2/Android.bp
@@ -44,4 +44,8 @@ cc_binary {
"liblog",
"libutils",
],
+
+ arch: {
+ arm: { cflags: ["-DST_LIB_32"] },
+ }
}
diff --git a/1.2/SecureElement.cpp b/1.2/SecureElement.cpp
index 222f41e..d817f43 100644
--- a/1.2/SecureElement.cpp
+++ b/1.2/SecureElement.cpp
@@ -24,7 +24,11 @@
#include <stdlib.h>
#include <string.h>
+#if defined(ST_LIB_32)
+#define VENDOR_LIB_PATH "/vendor/lib/"
+#else
#define VENDOR_LIB_PATH "/vendor/lib64/"
+#endif
#define VENDOR_LIB_EXT ".so"
typedef int (*STEseReset)(void);