Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add an example of creating a custom android emulator #2788

Open
dtrdic opened this issue Oct 17, 2024 · 0 comments
Open

add an example of creating a custom android emulator #2788

dtrdic opened this issue Oct 17, 2024 · 0 comments
Assignees

Comments

@dtrdic
Copy link
Contributor

dtrdic commented Oct 17, 2024

Some users are not aware that they can create a and launch a custom Android emulator for running e2e tests

https://github.com/orgs/codemagic-ci-cd/discussions/2773

- name: Setup and Launch Android 14 Emulator
  script: |
    # Set Android SDK paths
    export ANDROID_SDK_ROOT=/usr/local/share/android-sdk
    export PATH="$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:$ANDROID_SDK_ROOT/emulator:$ANDROID_SDK_ROOT/platform-tools:$PATH"

    # Install necessary SDK components and Android 14 system image 
    echo y | sdkmanager --install "cmdline-tools;latest" "emulator" "platform-tools" "system-images;android-34;google_apis;x86_64" 

   # Create the AVD (emulator) if not already created 
   echo no | avdmanager create avd -n Android14 -k "system-images;android-34;google_apis;x86_64" --force 

   # Launch the emulator 
   emulator -avd Android14 -no-window -no-snapshot -no-audio -gpu swiftshader_indirect & 

  adb wait-for-device 
@dtrdic dtrdic self-assigned this Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant