diff options
author | Chase Qi <chase.qi@linaro.org> | 2017-08-22 20:22:10 +0800 |
---|---|---|
committer | Chase Qi <chase.qi@linaro.org> | 2017-08-22 20:22:10 +0800 |
commit | 6ca52f0a2f61b193a21e7e196cd64d7a3be69c22 (patch) | |
tree | d5251a219469db80d9d506df031b1f8e8b49512d | |
parent | b03a949124ef8632846693eae6a3a94d95b7ae0a (diff) |
android: run 'adb root' in the foreground
Run 'adb root' in the background with a sleep time is a work around for
a specific adb version. It is not required in current LAVA code. Run
'adb root' directly works cross adb versions and distributions. It has
been tested on Ubuntu xenial, Debian jessie and stretch with inhouse and
latest adb.
jessie:
https://lkft.validation.linaro.org/scheduler/job/20107
https://lkft.validation.linaro.org/scheduler/job/20108
xenial:
https://lkft.validation.linaro.org/scheduler/job/20156
https://lkft.validation.linaro.org/scheduler/job/20155
Stretch:
https://lkft.validation.linaro.org/scheduler/job/20069
https://lkft.validation.linaro.org/scheduler/job/20140
Change-Id: Ibb3fa72b97729666656dbd749bc15b5446f37d5c
Signed-off-by: Chase Qi <chase.qi@linaro.org>
-rwxr-xr-x | automated/lib/android-test-lib | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/automated/lib/android-test-lib b/automated/lib/android-test-lib index c253b1a..65b6420 100755 --- a/automated/lib/android-test-lib +++ b/automated/lib/android-test-lib @@ -41,12 +41,7 @@ adb_root() { if [ "$(adb shell whoami)" = "root" ]; then echo "DUT already has adbd running as root" else - # 'adb root' and then 'sleep 10' is a work around for some versions of adb. In - # LAVA LXC, with that version adb, 'adb root' doesn't return, but it actually - # restarted as root. Without 'sleep 10', 'adb wait-for-device' and 'adb devices' - # may still look good, but the following adb commands will show 'no device found'. - adb root & - sleep 10 + adb root adb wait-for-device adb devices fi |