adb: split daemon services out of service_to_fd.
Let minadbd override daemon services by pulling out the daemon services
into a separate translation unit, that isn't compiled into libadbd.
Bug: http://b/111831478
Test: mma
Change-Id: Iecfebea371e03864108eca9a4d2e9cfd5db34749
diff --git a/adb/adb.h b/adb/adb.h
index 26b5fa1..13ca4d7 100644
--- a/adb/adb.h
+++ b/adb/adb.h
@@ -143,6 +143,10 @@
#endif
int service_to_fd(const char* name, atransport* transport);
+#if !ADB_HOST
+unique_fd daemon_service_to_fd(const char* name, atransport* transport);
+#endif
+
#if ADB_HOST
asocket* host_service_to_socket(const char* name, const char* serial, TransportId transport_id);
#endif
@@ -151,7 +155,7 @@
int init_jdwp(void);
asocket* create_jdwp_service_socket();
asocket* create_jdwp_tracker_service_socket();
-int create_jdwp_connection_fd(int jdwp_pid);
+unique_fd create_jdwp_connection_fd(int jdwp_pid);
#endif
int handle_forward_request(const char* service, atransport* transport, int reply_fd);