summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautomated/lib/android-test-lib21
1 files changed, 21 insertions, 0 deletions
diff --git a/automated/lib/android-test-lib b/automated/lib/android-test-lib
index c179a27..8677fea 100755
--- a/automated/lib/android-test-lib
+++ b/automated/lib/android-test-lib
@@ -1,7 +1,20 @@
#!/bin/sh
+install_latest_adb() {
+ install_deps "wget zip"
+ wget -S --progress=dot:giga https://dl.google.com/android/repository/platform-tools-latest-linux.zip
+ unzip -q platform-tools-latest-linux.zip
+ export PATH=$PWD/platform-tools:$PATH
+ which adb
+ adb version
+}
+
initialize_adb() {
+ which lava-lxc-device-add && lava-lxc-device-add
+ adb start-server
+ adb wait-for-device
adb devices
+
if [ -z "${SN}" ]; then
number="$(adb devices | grep -wc 'device')"
if [ "${number}" -gt 1 ]; then
@@ -22,6 +35,14 @@ initialize_adb() {
fi
}
+adb_root() {
+ adb root &
+ sleep 10
+ which lava-lxc-device-add && lava-lxc-device-add
+ adb wait-for-device
+ adb devices
+}
+
wait_boot_completed() {
[ "$#" -ne 1 ] && error_msg "Usage: wait_for_boot_completed timeout_in_seconds"
timeout="$1"