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)