From 48f57ad4f470ebcb71ac10df4e5e0953a6cfacd8 Mon Sep 17 00:00:00 2001 From: Hung-ying Tyan Date: Thu, 12 Nov 2015 11:19:45 +0800 Subject: [PATCH] Add /odm/lib/hw to HAL search path ODM HALs should be compiled into /odm/lib/hw on the ODM partition. BUG: 25653199 Change-Id: I23324d8e4dc82301cebd71bc40cdd2b73a678360 --- hardware.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hardware.c b/hardware.c index 79d0a2fc..5394787e 100644 --- a/hardware.c +++ b/hardware.c @@ -31,9 +31,11 @@ #if defined(__LP64__) #define HAL_LIBRARY_PATH1 "/system/lib64/hw" #define HAL_LIBRARY_PATH2 "/vendor/lib64/hw" +#define HAL_LIBRARY_PATH3 "/odm/lib64/hw" #else #define HAL_LIBRARY_PATH1 "/system/lib/hw" #define HAL_LIBRARY_PATH2 "/vendor/lib/hw" +#define HAL_LIBRARY_PATH3 "/odm/lib/hw" #endif /** @@ -129,6 +131,11 @@ static int load(const char *id, static int hw_module_exists(char *path, size_t path_len, const char *name, const char *subname) { + snprintf(path, path_len, "%s/%s.%s.so", + HAL_LIBRARY_PATH3, name, subname); + if (access(path, R_OK) == 0) + return 0; + snprintf(path, path_len, "%s/%s.%s.so", HAL_LIBRARY_PATH2, name, subname); if (access(path, R_OK) == 0)