File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 4343 ANDROID_TARGET : ' default'
4444 # ANDROID_BUILD_TOOLS_VERSION: 36.0.0
4545 ANDROID_BUILD_TOOLS_VERSION : ' latest'
46+ ANDROID_EMULATOR_NAME : ' test'
4647 steps :
4748 - name : " Setup Environment"
4849 run : |
@@ -51,18 +52,20 @@ jobs:
5152 - name : " Launch emulator"
5253 timeout-minutes : 10
5354 run : |
55+ which adb
56+
5457 yes Y | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses
5558
5659 # Install AVD files
5760 yes Y | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "system-images;android-${ANDROID_API};${ANDROID_TARGET};${ANDROID_ARCH}"
5861 yes Y | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --channel=3 emulator
5962 # Create emulator
6063 echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -f -n test -d "Nexus 10" --abi "${ANDROID_TARGET}/${ANDROID_ARCH}" -k "system-images;android-${ANDROID_API};${ANDROID_TARGET};${ANDROID_ARCH}" --force
61- yes Y | $ANDROID_HOME/emulator/emulator -list-avds
64+ $ANDROID_HOME/emulator/emulator -list-avds
6265 echo "Starting emulator"
6366
6467 # Start emulator in background
65- nohup $ANDROID_HOME/emulator/emulator -avd test -no-snapshot -no-window -no-audio -no-boot-anim -no-accel -no-metrics -camera-back none -accel off -gpu ${ANDROID_GPU} &
68+ nohup $ANDROID_HOME/emulator/emulator -avd ${ANDROID_EMULATOR_NAME} -no-snapshot -no-window -no-audio -no-boot-anim -no-accel -no-metrics -camera-back none -accel off -gpu ${ANDROID_GPU} &
6669 # Fixed quoting around "\r"
6770 $ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d "\r") ]]; do sleep 1; done; input keyevent 82'
6871 $ANDROID_HOME/platform-tools/adb devices
You can’t perform that action at this time.
0 commit comments