minadbd: statically link libadbd.

Reduce the amount of wasted space on the recovery image by statically
linking all of the adb libraries into minadbd.

Bug: http://b/150317254
Test: booted aosp_walleye-eng into recovery
Change-Id: I5233b1a23c14f9d478bb77c25ebdbb0ce45bcc5a
Merged-In: I5233b1a23c14f9d478bb77c25ebdbb0ce45bcc5a
(cherry picked from commit 5ee3eba34f0ddf478f53ac4d0774c1ee423a5182)
diff --git a/minadbd/Android.bp b/minadbd/Android.bp
index c39c734..793680f 100644
--- a/minadbd/Android.bp
+++ b/minadbd/Android.bp
@@ -34,7 +34,7 @@
 
 // `libminadbd_services` is analogous to the `libadbd_services` for regular `adbd`, but providing
 // the sideload service only.
-cc_library {
+cc_library_static {
     name: "libminadbd_services",
     recovery_available: true,
 
@@ -79,6 +79,8 @@
 
     defaults: [
         "minadbd_defaults",
+        "libadbd_binary_dependencies",
+        "librecovery_utils_defaults",
     ],
 
     srcs: [
@@ -86,10 +88,14 @@
     ],
 
     shared_libs: [
-        "libadbd",
         "libbase",
         "libcrypto",
+    ],
+
+    static_libs: [
         "libminadbd_services",
+        "libfusesideload",
+        "librecovery_utils",
     ],
 
     required: [
@@ -104,6 +110,7 @@
     defaults: [
         "minadbd_defaults",
         "librecovery_utils_defaults",
+        "libadbd_binary_dependencies",
     ],
 
     srcs: [
@@ -116,7 +123,6 @@
         "libfusesideload",
         "librecovery_utils",
         "libotautil",
-        "libadbd",
     ],
 
     shared_libs: [
diff --git a/minadbd/minadbd_services.cpp b/minadbd/minadbd_services.cpp
index eb91fb3..ff91ba9 100644
--- a/minadbd/minadbd_services.cpp
+++ b/minadbd/minadbd_services.cpp
@@ -266,6 +266,10 @@
   }
 }
 
+asocket* daemon_service_to_socket(std::string_view) {
+  return nullptr;
+}
+
 unique_fd daemon_service_to_fd(std::string_view name, atransport* /* transport */) {
   // Common services that are supported both in sideload and rescue modes.
   if (android::base::ConsumePrefix(&name, "reboot:")) {