Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Extract start-emulator as separate script
Browse files Browse the repository at this point in the history
  • Loading branch information
plastiv committed Mar 14, 2019
1 parent fbf800e commit 248f91a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 12 additions & 0 deletions android-emulator/check-image.sh
Original file line number Diff line number Diff line change
@@ -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
11 changes: 1 addition & 10 deletions android-emulator/start-emulator.sh
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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

0 comments on commit 248f91a

Please sign in to comment.