Add `adb features`.

Shows the features supported by the active adb server.

Change-Id: I4a58a2ca082823c43f7a49e2c62ff80df6426756
This commit is contained in:
Dan Albert 2015-05-20 18:58:41 -07:00 committed by David Pursell
parent 1792c23cb8
commit 90d4b739ab
2 changed files with 10 additions and 0 deletions

View File

@ -956,6 +956,13 @@ int handle_host_request(const char* service, TransportType type,
return 1;
}
if (!strcmp(service, "features")) {
SendOkay(reply_fd);
SendProtocolString(
reply_fd, android::base::Join(supported_features(), '\n'));
return 0;
}
// remove TCP transport
if (!strncmp(service, "disconnect:", 11)) {
const std::string address(service + 11);

View File

@ -1460,6 +1460,9 @@ int adb_commandline(int argc, const char **argv) {
fprintf(stdout, "%s", adb_version().c_str());
return 0;
}
else if (!strcmp(argv[0], "features")) {
return adb_query_command("host:features");
}
usage();
return 1;