diff options
author | Steve Kondik <steve@cyngn.com> | 2016-09-11 03:36:59 -0700 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2019-12-11 23:51:45 +0200 |
commit | 833628c620705393cfe0a5a1d87560e7bd6551bd (patch) | |
tree | e3fd88517533ee53f4d34486178cbca9cf1d7c09 /adb/client/commandline.cpp | |
parent | 35847566e92e1c08446257cb361a1c8a9d1bdaeb (diff) | |
download | system_core-833628c620705393cfe0a5a1d87560e7bd6551bd.tar.gz system_core-833628c620705393cfe0a5a1d87560e7bd6551bd.tar.bz2 system_core-833628c620705393cfe0a5a1d87560e7bd6551bd.zip |
adb: Add wait-for-online command
* Add the pseudo-state "online" which means either "device" or
"recovery". This is used by our tooling.
Change-Id: I92034c477d28f847e24ec72bbb87b252fba875e1
Diffstat (limited to 'adb/client/commandline.cpp')
-rw-r--r-- | adb/client/commandline.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/adb/client/commandline.cpp b/adb/client/commandline.cpp index 8dd85d7b0..a5b7b5c49 100644 --- a/adb/client/commandline.cpp +++ b/adb/client/commandline.cpp @@ -190,7 +190,7 @@ static void help() { "scripting:\n" " wait-for[-TRANSPORT]-STATE\n" " wait for device to be in the given state\n" - " STATE: device, recovery, rescue, sideload, bootloader, or disconnect\n" + " STATE: device, recovery, rescue, sideload, bootloader, online, or disconnect\n" " TRANSPORT: usb, local, or any [default=any]\n" " get-state print offline | bootloader | device\n" " get-serialno print <serial-number>\n" @@ -1072,11 +1072,11 @@ static bool wait_for_device(const char* service, if (components[3] != "any" && components[3] != "bootloader" && components[3] != "device" && components[3] != "recovery" && components[3] != "rescue" && components[3] != "sideload" && - components[3] != "disconnect") { + components[3] != "online" && components[3] != "disconnect") { fprintf(stderr, "adb: unknown state %s; " - "expected 'any', 'bootloader', 'device', 'recovery', 'rescue', 'sideload', or " - "'disconnect'\n", + "expected 'any', 'bootloader', 'device', 'recovery', 'rescue', 'sideload', " + "'online', or 'disconnect'\n", components[3].c_str()); return false; } |