diff --git a/scripts/avd_test.sh b/scripts/avd_test.sh index 5d72f4c86..fc03e53dc 100755 --- a/scripts/avd_test.sh +++ b/scripts/avd_test.sh @@ -218,6 +218,9 @@ yes | "$sdk" --licenses > /dev/null curl -L $lsposed_url -o out/lsposed.zip "$sdk" --channel=3 platform-tools emulator +adb kill-server +adb start-server + if [ -n "$1" ]; then run_test $1 $2 else diff --git a/scripts/cuttlefish.sh b/scripts/cuttlefish.sh index 5f2f664ce..c94415335 100755 --- a/scripts/cuttlefish.sh +++ b/scripts/cuttlefish.sh @@ -27,7 +27,9 @@ setup_env() { sudo udevadm trigger sudo usermod -aG kvm,cvdnetwork,render $USER yes | "$sdk" --licenses > /dev/null - "$sdk" --channel=3 tools platform-tools + "$sdk" --channel=3 platform-tools + adb kill-server + adb start-server } download_cf() { diff --git a/scripts/test_common.sh b/scripts/test_common.sh index b98377dc3..c408ea78e 100644 --- a/scripts/test_common.sh +++ b/scripts/test_common.sh @@ -2,6 +2,10 @@ if [ -z $ANDROID_HOME ]; then export ANDROID_HOME=$ANDROID_SDK_ROOT fi +# Make sure paths are consistent +export ANDROID_USER_HOME="$HOME/.android" +export ANDROID_EMULATOR_HOME="$ANDROID_USER_HOME" +export ANDROID_AVD_HOME="$ANDROID_EMULATOR_HOME/avd" export PATH="$PATH:$ANDROID_HOME/platform-tools" emu="$ANDROID_HOME/emulator/emulator"