Add /system/lib/vndk-sp/hw to search paths for HAL impls
android.hidl.memory@1.0-impl.so is vndk-sp and thus is located under
/system/lib/vndk-sp/hw instead of /system/lib/hw.
Bug: 62930720
Test: 2017 pixel builds and boots with BOARD_VNDK_VERSION on
Merged-Id: Idc4bd81eed76190097a9a60b5fd08a05800e183d
Change-Id: Idc4bd81eed76190097a9a60b5fd08a05800e183d
diff --git a/base/HidlInternal.cpp b/base/HidlInternal.cpp
index 0ff52ad..51f42f6 100644
--- a/base/HidlInternal.cpp
+++ b/base/HidlInternal.cpp
@@ -92,6 +92,7 @@
instrumentationLibPaths.push_back(instrumentationLibPath);
} else {
instrumentationLibPaths.push_back(HAL_LIBRARY_PATH_SYSTEM);
+ instrumentationLibPaths.push_back(HAL_LIBRARY_PATH_VNDK_SP);
instrumentationLibPaths.push_back(HAL_LIBRARY_PATH_VENDOR);
instrumentationLibPaths.push_back(HAL_LIBRARY_PATH_ODM);
}
diff --git a/base/include/hidl/HidlInternal.h b/base/include/hidl/HidlInternal.h
index 2a86c9e..e9c628b 100644
--- a/base/include/hidl/HidlInternal.h
+++ b/base/include/hidl/HidlInternal.h
@@ -107,18 +107,22 @@
};
#define HAL_LIBRARY_PATH_SYSTEM_64BIT "/system/lib64/hw/"
+#define HAL_LIBRARY_PATH_VNDK_SP_64BIT "/system/lib64/vndk-sp/hw/"
#define HAL_LIBRARY_PATH_VENDOR_64BIT "/vendor/lib64/hw/"
#define HAL_LIBRARY_PATH_ODM_64BIT "/odm/lib64/hw/"
#define HAL_LIBRARY_PATH_SYSTEM_32BIT "/system/lib/hw/"
+#define HAL_LIBRARY_PATH_VNDK_SP_32BIT "/system/lib/vndk-sp/hw/"
#define HAL_LIBRARY_PATH_VENDOR_32BIT "/vendor/lib/hw/"
#define HAL_LIBRARY_PATH_ODM_32BIT "/odm/lib/hw/"
#if defined(__LP64__)
#define HAL_LIBRARY_PATH_SYSTEM HAL_LIBRARY_PATH_SYSTEM_64BIT
+#define HAL_LIBRARY_PATH_VNDK_SP HAL_LIBRARY_PATH_VNDK_SP_64BIT
#define HAL_LIBRARY_PATH_VENDOR HAL_LIBRARY_PATH_VENDOR_64BIT
#define HAL_LIBRARY_PATH_ODM HAL_LIBRARY_PATH_ODM_64BIT
#else
#define HAL_LIBRARY_PATH_SYSTEM HAL_LIBRARY_PATH_SYSTEM_32BIT
+#define HAL_LIBRARY_PATH_VNDK_SP HAL_LIBRARY_PATH_VNDK_SP_32BIT
#define HAL_LIBRARY_PATH_VENDOR HAL_LIBRARY_PATH_VENDOR_32BIT
#define HAL_LIBRARY_PATH_ODM HAL_LIBRARY_PATH_ODM_32BIT
#endif
@@ -171,9 +175,10 @@
// libraries and registers the instrumentation callback functions.
//
// The instrumentation libraries should be stored under any of the following
- // directories: HAL_LIBRARY_PATH_SYSTEM, HAL_LIBRARY_PATH_VENDOR and
- // HAL_LIBRARY_PATH_ODM. The name of instrumentation libraries should
- // follow pattern: ^profilerPrefix(.*).profiler.so$
+ // directories: HAL_LIBRARY_PATH_SYSTEM, HAL_LIBRARY_PATH_VNDK_SP,
+ // HAL_LIBRARY_PATH_VENDOR and HAL_LIBRARY_PATH_ODM.
+ // The name of instrumentation libraries should follow pattern:
+ // ^profilerPrefix(.*).profiler.so$
//
// Each instrumentation library is expected to implement the instrumentation
// function called HIDL_INSTRUMENTATION_FUNCTION.