diff --git a/.travis.yml b/.travis.yml index 96644ee..d442aa6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,4 +27,4 @@ before_install: script: - docker build --build-arg EMULATOR_API_LEVEL --build-arg EMULATOR_VARIANT --build-arg EMULATOR_ARCH -t android-emulator-$EMULATOR_API_LEVEL android-emulator/ - - docker run -it --rm --env EMULATOR_API_LEVEL --volume=$(pwd)/android-emulator:/opt/workspace --entrypoint /opt/workspace/start-emulator.sh android-emulator-$EMULATOR_API_LEVEL + - docker run -it --rm --env EMULATOR_API_LEVEL --volume=$(pwd)/android-emulator:/opt/workspace --entrypoint /opt/workspace/check-image.sh android-emulator-$EMULATOR_API_LEVEL diff --git a/android-emulator/check-image.sh b/android-emulator/check-image.sh new file mode 100755 index 0000000..b17ac0b --- /dev/null +++ b/android-emulator/check-image.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +java -Xmx32m -version +sdkmanager --list +avdmanager list avd +emulator-check accel hyper-v cpu-info window-mgr desktop-env +./start-emulator.sh & +./wait-for-boot-completed +adb devices -l +adb shell pm dump com.google.android.gms | grep version +sleep 2 +adb emu kill diff --git a/android-emulator/start-emulator.sh b/android-emulator/start-emulator.sh index 2ccebd5..0217f7a 100755 --- a/android-emulator/start-emulator.sh +++ b/android-emulator/start-emulator.sh @@ -1,9 +1,5 @@ #!/bin/bash -java -Xmx32m -version -sdkmanager --list -avdmanager list avd -emulator-check accel hyper-v cpu-info window-mgr desktop-env # https://developer.android.com/studio/run/emulator-commandline#startup-options emulator -verbose -show-kernel -avd android-emulator-${EMULATOR_API_LEVEL} \ -no-accel \ @@ -15,9 +11,4 @@ emulator -verbose -show-kernel -avd android-emulator-${EMULATOR_API_LEVEL} \ -camera-front none \ -gpu swiftshader_indirect \ -memory 2048 \ - -skin 480x800 & -./wait-for-boot-completed -adb devices -l -adb shell pm dump com.google.android.gms | grep version -sleep 2 -adb emu kill + -skin 480x800