- Helps in quick & easier setup of automation environment for Appium + Android
- Multiple Appium Server along with dedicated Emulator can be deployed quickly
- Individual container's Appium endpoint can be mapped to automation test suite
- ARM build emulator can be deployed to cloud VM without additional dependency
This image contains Appium Server with configured AVD (Android Virtual Device x86/arm).
- appium-emulator/appium - Docker Image contains standalone Appium Server 1.22.0.
- appium-emulator/emulator - Contains Appium along with Android Emulator x86 build (android-28/google_apis_playstore/x86)
- appium-emulator/arm25 - Contains Appium along with Android Emulator arm build (android-25/google_apis/armeabi-v7a)
$ cd emulator/x86
$ docker build -t appium-emulator .
- Basic usage
# x86 build: runs 10x faster with CPU virtualization in Linux platform
docker run -it --rm --name my_avd --device /dev/kvm dasxran/appium-emulator
# ARM build: runs slower but supported in any platform (Windows/Linux/OSX)
docker run -it --rm --name my_avd dasxran/appium-emulator:arm25
# Use ADB to interact with virtual device
docker exec -it my_avd adb shell
- Remote ADB connection
docker run -it --rm --device /dev/kvm -p 5554:5554 -p 5555:5555 dasxran/appium-emulator
# Connect local ADB process to AVD (not required if both are on localhost)
adb connect IP_OF_AVD_CONTAINER_OR_HOST
# Use ADB to interact with virtual device
adb shell
- To connect the emulator using
adb
on the docker host machine, start the container with--network host
or with -p 5555:5555. You could usescrcpy
to do a screencast of the emulator.
# Connect local ADB process to AVD (not required if both are on localhost)
adb connect IP_OF_AVD_CONTAINER_OR_HOST:5555
scrcpy --tcpip=IP_OF_AVD_CONTAINER_OR_HOST # default port is 5555
Installed Packages - x86
# sdkmanager --list
Path | Version | Description | Location
------- | ------- | ------- | -------
build-tools;31.0.0 | 31.0.0 | Android SDK Build-Tools 31.0.0 | build-tools/31.0.0/
cmdline-tools;latest | 2.1 | Android SDK Command-line Tools (latest) | cmdline-tools/latest/
emulator | 30.1.5 | Android Emulator | emulator/
patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4/
platform-tools | 30.0.4 | Android SDK Platform-Tools | platform-tools/
platforms;android-28 | 2 | Android SDK Platform 28 | platforms/android-28/
system-images;android-28;google_apis;x86_64 | 26 | Google APIs Intel x86 Atom_64 System Image | system-images/android-28/google_apis/x86_64/
Installed Packages - arm
# sdkmanager --list
Path | Version | Description | Location
------- | ------- | ------- | -------
build-tools;31.0.0 | 31.0.0 | Android SDK Build-Tools 30.0.2 | build-tools/31.0.0/
cmdline-tools;latest | 2.1 | Android SDK Command-line Tools (latest) | cmdline-tools/latest/
emulator | 30.1.5 | Android Emulator | emulator/
patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4/
platform-tools | 30.0.4 | Android SDK Platform-Tools | platform-tools/
platforms;android-25 | 2 | Android SDK Platform 25 | platforms/android-25/
system-images;android-25;google_apis;armv7a | 26 | Google APIs Intel x86 Atom_64 System Image | system-images/android-25/google_apis/armv7a/
Note: --device /dev/kvm
flag is required to enable CPU hardware acceleration.
You may also need to activate kvm
kernel module on your host machine: modprobe kvm
, or even install it first.
For more details, please refer to Test section.
- https://github.com/google/android-emulator-container-scripts/blob/master/REGISTRY.MD
- https://github.com/budtmo/docker-android
- https://github.com/thyrlian/AndroidSDK
See License