adb: implement shell protocol.
Adds functionality for handling stdin/stdout/stderr streams and exit
codes using the shell protocol.
This CL just contains implementation for adbd which will not yet be
enabled. Once we have the ability to query transport features from the
adb client, another CL will add the implementation for the client side
and update the feature list to turn this on.
Note: this CL must be submitted together with a minadbd CL to update
the service_to_fd() function signature.
Bug: http://b/23030641
Change-Id: Ibed55e9c1946d8a35190696163ff63e8fb880238
diff --git a/sockets.cpp b/sockets.cpp
index f8c22cc..104ad6b 100644
--- a/sockets.cpp
+++ b/sockets.cpp
@@ -422,7 +422,8 @@
return s;
}
-asocket *create_local_service_socket(const char *name)
+asocket *create_local_service_socket(const char *name,
+ const atransport* transport)
{
#if !ADB_HOST
if (!strcmp(name,"jdwp")) {
@@ -432,7 +433,7 @@
return create_jdwp_tracker_service_socket();
}
#endif
- int fd = service_to_fd(name);
+ int fd = service_to_fd(name, transport);
if(fd < 0) return 0;
asocket* s = create_local_socket(fd);