Merge "Build and use minadbd as a shared library." am: ea38c4160a am: 479dd68d9e am: 4bdb7b3c33
am: 42e2801937

Change-Id: Idb062fed25928397ec4bddd1018e6bb95d4311ad
diff --git a/Android.mk b/Android.mk
index b25c1f0..aa959c9 100644
--- a/Android.mk
+++ b/Android.mk
@@ -127,7 +127,6 @@
 librecovery_static_libraries := \
     libbootloader_message \
     libfusesideload \
-    libminadbd \
     libminui \
     libverifier \
     libotautil \
@@ -170,6 +169,9 @@
 
 LOCAL_MODULE := librecovery
 
+LOCAL_SHARED_LIBRARIES := \
+    libminadbd_services \
+
 LOCAL_STATIC_LIBRARIES := \
     $(librecovery_static_libraries)
 
@@ -199,6 +201,7 @@
     $(librecovery_static_libraries)
 
 LOCAL_SHARED_LIBRARIES := \
+    libminadbd_services \
     librecovery_ui \
 
 LOCAL_HAL_STATIC_LIBRARIES := libhealthd
@@ -236,7 +239,9 @@
 # module is built with Soong (with `recovery: true` flag).
 LOCAL_REQUIRED_MODULES += \
     libbase.recovery \
+    libcrypto.recovery \
     liblog.recovery \
+    libminadbd_services.recovery \
     libpng.recovery \
     libz.recovery \
 
diff --git a/fuse_sideload/Android.bp b/fuse_sideload/Android.bp
index 76bc16d..29404ce 100644
--- a/fuse_sideload/Android.bp
+++ b/fuse_sideload/Android.bp
@@ -14,6 +14,7 @@
 
 cc_library_static {
     name: "libfusesideload",
+    recovery_available: true,
 
     cflags: [
         "-D_XOPEN_SOURCE",
@@ -30,7 +31,7 @@
         "include",
     ],
 
-    static_libs: [
+    shared_libs: [
         "libbase",
         "libcrypto",
     ],
diff --git a/minadbd/Android.bp b/minadbd/Android.bp
index 432b2f0..8ccce4f 100644
--- a/minadbd/Android.bp
+++ b/minadbd/Android.bp
@@ -26,8 +26,9 @@
     ],
 }
 
-cc_library_static {
-    name: "libminadbd",
+cc_library {
+    name: "libminadbd_services",
+    recovery_available: true,
 
     defaults: [
         "minadbd_defaults",
@@ -39,14 +40,14 @@
         "minadbd_services.cpp",
     ],
 
-    static_libs: [
-        "libfusesideload",
+    shared_libs: [
+        "libadbd",
         "libbase",
         "libcrypto",
     ],
 
-    whole_static_libs: [
-        "libadbd",
+    static_libs: [
+        "libfusesideload",
     ],
 }
 
@@ -62,8 +63,9 @@
     ],
 
     static_libs: [
+        "libminadbd_services",
+        "libadbd",
         "libBionicGtestMain",
-        "libminadbd",
     ],
 
     shared_libs: [
diff --git a/tests/Android.mk b/tests/Android.mk
index 3d3e63e..5ef1777 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -170,7 +170,7 @@
     librecovery \
     libbootloader_message \
     libfusesideload \
-    libminadbd \
+    libminadbd_services \
     librecovery_ui_default \
     librecovery_ui \
     libminui \