Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: platform_tools/android/bin/adb_wait_for_device

Issue 1149163003: Add adb_wait_for_device script (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixes Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform_tools/android/bin/adb_wait_for_device
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 0000000000000000000000000000000000000000..52e16996ccec0605357c363eb72965fb4f604555
--- /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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698