* commit '6a701bd94b067c2ab873964f63c3d954bc59610f': Add `adb features`.
This commit is contained in:
commit
f3f5bce204
2 changed files with 10 additions and 0 deletions
|
|
@ -956,6 +956,13 @@ int handle_host_request(const char* service, TransportType type,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!strcmp(service, "features")) {
|
||||||
|
SendOkay(reply_fd);
|
||||||
|
SendProtocolString(
|
||||||
|
reply_fd, android::base::Join(supported_features(), '\n'));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// remove TCP transport
|
// remove TCP transport
|
||||||
if (!strncmp(service, "disconnect:", 11)) {
|
if (!strncmp(service, "disconnect:", 11)) {
|
||||||
const std::string address(service + 11);
|
const std::string address(service + 11);
|
||||||
|
|
|
||||||
|
|
@ -1468,6 +1468,9 @@ int adb_commandline(int argc, const char **argv) {
|
||||||
fprintf(stdout, "%s", adb_version().c_str());
|
fprintf(stdout, "%s", adb_version().c_str());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
else if (!strcmp(argv[0], "features")) {
|
||||||
|
return adb_query_command("host:features");
|
||||||
|
}
|
||||||
|
|
||||||
usage();
|
usage();
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue