Adapter packages are completely static.

This means that they can be packaged in tests which
don't require adapter libraries to be installed on the
system image and which don't depend on system ABIs.

Bug: 66914275
Test: android.hardware.nfc@1.0-adapter
  (on a clean device w/o other pushes)
Change-Id: I049429a671f64b2923b76de29af4b7b727c9a9bd
diff --git a/build/hidl_interface.go b/build/hidl_interface.go
index 40b3d17..fb0eea7 100644
--- a/build/hidl_interface.go
+++ b/build/hidl_interface.go
@@ -313,18 +313,26 @@
 		Defaults:          []string{"hidl-module-defaults"},
 		Generated_sources: []string{name.adapterHelperSourcesName()},
 		Generated_headers: []string{name.adapterHelperHeadersName()},
-		Shared_libs: concat([]string{
+		Shared_libs: []string {
+			"libcutils",
 			"libhidlbase",
 			"libhidltransport",
+			"libhwbinder",
+			"liblog",
 			"libutils",
+		},
+		Static_libs: concat([]string{
 			"libhidladapter",
 		}, wrap("", dependencies, "-adapter-helper"), cppDependencies, libraryIfExists),
-		Export_shared_lib_headers: concat([]string{
+		Export_shared_lib_headers: []string{
 			"libhidlbase",
 			"libhidltransport",
+		},
+		Export_static_lib_headers: concat([]string{
 			"libhidladapter",
 		}, wrap("", dependencies, "-adapter-helper"), cppDependencies, libraryIfExists),
 		Export_generated_headers: []string{name.adapterHelperHeadersName()},
+		Group_static_libs: proptools.BoolPtr(true),
 	})
 	mctx.CreateModule(android.ModuleFactoryAdaptor(genrule.GenRuleFactory), &genruleProperties{
 		Name:  proptools.StringPtr(name.adapterSourcesName()),
@@ -336,13 +344,19 @@
 	mctx.CreateModule(android.ModuleFactoryAdaptor(cc.TestFactory), &ccProperties{
 		Name:              proptools.StringPtr(name.adapterName()),
 		Generated_sources: []string{name.adapterSourcesName()},
-		Shared_libs: concat([]string{
-			"libhidladapter",
+		Shared_libs: []string {
+			"libcutils",
 			"libhidlbase",
 			"libhidltransport",
+			"libhwbinder",
+			"liblog",
 			"libutils",
+		},
+		Static_libs: concat([]string{
+			"libhidladapter",
 			name.adapterHelperName(),
-		}, libraryIfExists),
+		}, wrap("", dependencies, "-adapter-helper"), cppDependencies, libraryIfExists),
+		Group_static_libs: proptools.BoolPtr(true),
 	})
 }