OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # | 2 # |
3 # Wait for the device to be both attached and booted. | 3 # Wait for the device to be both attached and booted. |
4 | 4 |
5 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | 5 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
6 source $SCRIPT_DIR/android_setup.sh | 6 source $SCRIPT_DIR/android_setup.sh |
7 source $SCRIPT_DIR/utils/setup_adb.sh | 7 source $SCRIPT_DIR/utils/setup_adb.sh |
8 | 8 |
9 set -e | 9 set -e |
10 set -x | 10 set -x |
11 | 11 |
12 $ADB $DEVICE_SERIAL wait-for-device | |
13 | |
14 while [ "$($ADB $DEVICE_SERIAL shell getprop sys.boot_completed | tr -d '\r')" !
= "1" ]; do | 12 while [ "$($ADB $DEVICE_SERIAL shell getprop sys.boot_completed | tr -d '\r')" !
= "1" ]; do |
15 sleep 5 | 13 sleep 5 |
16 done | 14 done |
OLD | NEW |