commit | 0ebbc27063bfd20f58546fa2b5472e3b20060646 | [log] [tgz] |
---|---|---|
author | borenet <borenet@google.com> | Thu Jun 04 10:10:46 2015 -0700 |
committer | Commit bot <commit-bot@chromium.org> | Thu Jun 04 10:10:46 2015 -0700 |
tree | 2b40988cf70884eeea769d67031b95f11286005f | |
parent | 969098603fc16538a5f5acd3f9c1cf0269faa039 [diff] |
Add adb_wait_for_device script Cherry-pick of https://skia.googlesource.com/skia/+/5aa5ea3831b955097e01be83020252c2134d59e4 BUG=skia:3718 Review URL: https://codereview.chromium.org/1149163003 NOTREECHECKS=true NOPRESUBMIT=true NOTRY=true Review URL: https://codereview.chromium.org/1166983002
diff --git a/platform_tools/android/bin/adb_wait_for_device b/platform_tools/android/bin/adb_wait_for_device new file mode 100755 index 0000000..52e1699 --- /dev/null +++ b/platform_tools/android/bin/adb_wait_for_device
@@ -0,0 +1,16 @@ +#!/bin/bash +# +# Wait for the device to be both attached and booted. + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source $SCRIPT_DIR/android_setup.sh +source $SCRIPT_DIR/utils/setup_adb.sh + +set -e +set -x + +$ADB $DEVICE_SERIAL wait-for-device + +while [ "$($ADB $DEVICE_SERIAL shell getprop sys.boot_completed | tr -d '\r')" != "1" ]; do + sleep 5 +done