binder: add openDeclaredPassthroughHal()
It handles dlopen()ing a declared native hal. This can replace
android_load_sphal_library to load declared native instance. The new API
also supports when instances are from APEX.
Bug: 316051788
Test: atest servicemanager_test
Test: atest vts_treble_vintf_vendor_test
Change-Id: I95b752253e0b550d38f0543ff56134d38d838855
diff --git a/libs/binder/Android.bp b/libs/binder/Android.bp
index ae0fb01..941e091 100644
--- a/libs/binder/Android.bp
+++ b/libs/binder/Android.bp
@@ -320,6 +320,24 @@
"ServiceManagerHost.cpp",
],
},
+ android: {
+ shared_libs: [
+ "libapexsupport",
+ "libvndksupport",
+ ],
+ },
+ recovery: {
+ exclude_shared_libs: [
+ "libapexsupport",
+ "libvndksupport",
+ ],
+ },
+ native_bridge: {
+ exclude_shared_libs: [
+ "libapexsupport",
+ "libvndksupport",
+ ],
+ },
},
cflags: [
"-DBINDER_WITH_KERNEL_IPC",