blob: f9a2b6daed1cc4f86778ac518585c96e65cb0b5c [file] [log] [blame]
#!/bin/bash
#
# Wait for the device to be connected.
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $SCRIPT_DIR/android_setup.sh
source $SCRIPT_DIR/utils/setup_adb.sh
set -e
# Wait for the device to be connected and fully booted.
while [ "$($ADB $DEVICE_SERIAL shell getprop sys.boot_completed | tr -d '\r')" != "1" ]; do
echo "Waiting for the device to be connected and ready."
sleep 5
done
echo "Connected!"
$SCRIPT_DIR/adb_wait_for_charge