├── LICENSE ├── README.md ├── android-16 ├── Dockerfile └── README.md ├── android-17 ├── Dockerfile └── README.md ├── android-18 ├── Dockerfile └── README.md ├── android-19 ├── Dockerfile └── README.md ├── android-21 ├── Dockerfile └── README.md ├── android-22 ├── Dockerfile └── README.md ├── android-23 ├── Dockerfile └── README.md └── android-base ├── Dockerfile ├── README.md └── start.sh /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 SOFT SAM 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # docker-android-emulator 2 | Run Android emulator 3 | 4 | ## Built with 5 | - latest debian 6 | - openjdk 7 7 | - Android SDK 24.3.4 8 | - Android APIs 9 | 10 | ## Running the emulator 11 | This repository provides emulator images for different SDK. Both ARM and X86 architectures are available. By default, the ARM architecture is run. 12 | 13 | Running the emulator for Android 16 (ARM): 14 | 15 | docker run -d --name android softsam/android-16 16 | 17 | To run the X86 architecture, you will need to have kvm installed on the host machine, and you will have to run the image with the __--privileged__ option. 18 | Running the emulator for Android 16 (X86): 19 | 20 | docker run -d --privileged -v /dev/kvm:/dev/kvm -e ANDROID_ARCH="x86" --name android softsam/android-16 21 | 22 | All the emulator expose the port 5555 of ADB, and can be used by any other container (or the host). 23 | The emulator also exposes the port 5900, and you can connect to it with a VNC client. 24 | -------------------------------------------------------------------------------- /android-16/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM softsam/android:latest 2 | 3 | MAINTAINER softsam 4 | 5 | # Install dependencies for emulator 6 | RUN echo y | android update sdk --no-ui --all -t `android list sdk --all|grep "SDK Platform Android 4.1.2, API 16"|awk -F'[^0-9]*' '{print $2}'` && \ 7 | echo y | android update sdk --no-ui --all --filter sys-img-armeabi-v7a-android-16 --force && \ 8 | echo y | android update sdk --no-ui --all --filter sys-img-x86-android-16 --force 9 | 10 | RUN echo n | android create avd --force -n "x86" -t android-16 --abi default/x86 11 | RUN echo n | android create avd --force -n "arm" -t android-16 --abi default/armeabi-v7a 12 | -------------------------------------------------------------------------------- /android-16/README.md: -------------------------------------------------------------------------------- 1 | # Android emulator API 16 2 | Run Android emulator with API 16 3 | 4 | ## Built with 5 | - based on sofsam/android 6 | - Android API 16 7 | 8 | ## Running the emulator 9 | Running the emulator for Android 16: 10 | 11 | docker run -d --name android softsam/android-16 12 | 13 | The emulator exposes the port 5555 of ADB, and can be used by any other container (or the host). 14 | The emulator also exposes the port 5900, and you can connect to it with a VNC client on localhost if you run the following command: 15 | 16 | docker run -d -p 5900:5900 --name android softsam/android-16 17 | -------------------------------------------------------------------------------- /android-17/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM softsam/android:latest 2 | 3 | MAINTAINER softsam 4 | 5 | # Install dependencies for emulator 6 | RUN echo y | android update sdk --no-ui --all -t `android list sdk --all|grep "SDK Platform Android 4.2.2, API 17"|awk -F'[^0-9]*' '{print $2}'` && \ 7 | echo y | android update sdk --no-ui --all --filter sys-img-armeabi-v7a-android-17 --force && \ 8 | echo y | android update sdk --no-ui --all --filter sys-img-x86-android-17 --force 9 | 10 | RUN echo n | android create avd --force -n "x86" -t android-17 --abi default/x86 11 | RUN echo n | android create avd --force -n "arm" -t android-17 --abi default/armeabi-v7a 12 | -------------------------------------------------------------------------------- /android-17/README.md: -------------------------------------------------------------------------------- 1 | # Android emulator API 17 2 | Run Android emulator with API 17 3 | 4 | ## Built with 5 | - based on sofsam/android 6 | - Android API 17 7 | 8 | ## Running the emulator 9 | Running the emulator for Android 17: 10 | 11 | docker run -d --name android softsam/android-17 12 | 13 | The emulator exposes the port 5555 of ADB, and can be used by any other container (or the host). 14 | The emulator also exposes the port 5900, and you can connect to it with a VNC client on localhost if you run the following command: 15 | 16 | docker run -d -p 5900:5900 --name android softsam/android-17 17 | -------------------------------------------------------------------------------- /android-18/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM softsam/android:latest 2 | 3 | MAINTAINER softsam 4 | 5 | # Install dependencies for emulator 6 | RUN echo y | android update sdk --no-ui --all -t `android list sdk --all|grep "SDK Platform Android 4.3.1, API 18"|awk -F'[^0-9]*' '{print $2}'` && \ 7 | echo y | android update sdk --no-ui --all --filter sys-img-armeabi-v7a-android-18 --force && \ 8 | echo y | android update sdk --no-ui --all --filter sys-img-x86-android-18 --force 9 | 10 | RUN echo n | android create avd --force -n "x86" -t android-18 --abi default/x86 11 | RUN echo n | android create avd --force -n "arm" -t android-18 --abi default/armeabi-v7a 12 | -------------------------------------------------------------------------------- /android-18/README.md: -------------------------------------------------------------------------------- 1 | # Android emulator API 18 2 | Run Android emulator with API 18 3 | 4 | ## Built with 5 | - based on sofsam/android 6 | - Android API 18 7 | 8 | ## Running the emulator 9 | Running the emulator for Android 18: 10 | 11 | docker run -d --name android softsam/android-18 12 | 13 | The emulator exposes the port 5555 of ADB, and can be used by any other container (or the host). 14 | The emulator also exposes the port 5900, and you can connect to it with a VNC client on localhost if you run the following command: 15 | 16 | docker run -d -p 5900:5900 --name android softsam/android-18 17 | -------------------------------------------------------------------------------- /android-19/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM softsam/android:latest 2 | 3 | MAINTAINER softsam 4 | 5 | # Install dependencies for emulator 6 | RUN echo y | android update sdk --no-ui --all -t `android list sdk --all|grep "SDK Platform Android 4.4.2, API 19"|awk -F'[^0-9]*' '{print $2}'` && \ 7 | echo y | android update sdk --no-ui --all --filter sys-img-armeabi-v7a-android-19 --force && \ 8 | echo y | android update sdk --no-ui --all --filter sys-img-x86-android-19 --force 9 | 10 | RUN echo n | android create avd --force -n "x86" -t android-19 --abi default/x86 11 | RUN echo n | android create avd --force -n "arm" -t android-19 --abi default/armeabi-v7a 12 | -------------------------------------------------------------------------------- /android-19/README.md: -------------------------------------------------------------------------------- 1 | # Android emulator API 19 2 | Run Android emulator with API 19 3 | 4 | ## Built with 5 | - based on sofsam/android 6 | - Android API 19 7 | 8 | ## Running the emulator 9 | Running the emulator for Android 19: 10 | 11 | docker run -d --name android softsam/android-19 12 | 13 | The emulator exposes the port 5555 of ADB, and can be used by any other container (or the host). 14 | The emulator also exposes the port 5900, and you can connect to it with a VNC client on localhost if you run the following command: 15 | 16 | docker run -d -p 5900:5900 --name android softsam/android-19 17 | -------------------------------------------------------------------------------- /android-21/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM softsam/android:latest 2 | 3 | MAINTAINER softsam 4 | 5 | # Install dependencies for emulator 6 | RUN echo y | android update sdk --no-ui --all -t `android list sdk --all|grep "SDK Platform Android 5.0.1, API 21"|awk -F'[^0-9]*' '{print $2}'` && \ 7 | echo y | android update sdk --no-ui --all --filter sys-img-armeabi-v7a-android-21 --force && \ 8 | echo y | android update sdk --no-ui --all --filter sys-img-x86-android-21 --force 9 | 10 | RUN echo n | android create avd --force -n "x86" -t android-21 --abi default/x86 11 | RUN echo n | android create avd --force -n "arm" -t android-21 --abi default/armeabi-v7a 12 | -------------------------------------------------------------------------------- /android-21/README.md: -------------------------------------------------------------------------------- 1 | # Android emulator API 21 2 | Run Android emulator with API 21 3 | 4 | ## Built with 5 | - based on sofsam/android 6 | - Android API 21 7 | 8 | ## Running the emulator 9 | Running the emulator for Android 21: 10 | 11 | docker run -d --name android softsam/android-21 12 | 13 | The emulator exposes the port 5555 of ADB, and can be used by any other container (or the host). 14 | The emulator also exposes the port 5900, and you can connect to it with a VNC client on localhost if you run the following command: 15 | 16 | docker run -d -p 5900:5900 --name android softsam/android-21 17 | -------------------------------------------------------------------------------- /android-22/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM softsam/android:latest 2 | 3 | MAINTAINER softsam 4 | 5 | # Install dependencies for emulator 6 | RUN echo y | android update sdk --no-ui --all -t `android list sdk --all|grep "SDK Platform Android 5.1.1, API 22"|awk -F'[^0-9]*' '{print $2}'` && \ 7 | echo y | android update sdk --no-ui --all --filter sys-img-armeabi-v7a-android-22 --force && \ 8 | echo y | android update sdk --no-ui --all --filter sys-img-x86-android-22 --force 9 | 10 | RUN echo n | android create avd --force -n "x86" -t android-22 --abi default/x86 11 | RUN echo n | android create avd --force -n "arm" -t android-22 --abi default/armeabi-v7a 12 | -------------------------------------------------------------------------------- /android-22/README.md: -------------------------------------------------------------------------------- 1 | # Android emulator API 22 2 | Run Android emulator with API 22 3 | 4 | ## Built with 5 | - based on sofsam/android 6 | - Android API 22 7 | 8 | ## Running the emulator 9 | Running the emulator for Android 22: 10 | 11 | docker run -d --name android softsam/android-22 12 | 13 | The emulator exposes the port 5555 of ADB, and can be used by any other container (or the host). 14 | The emulator also exposes the port 5900, and you can connect to it with a VNC client on localhost if you run the following command: 15 | 16 | docker run -d -p 5900:5900 --name android softsam/android-22 17 | -------------------------------------------------------------------------------- /android-23/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM softsam/android:latest 2 | 3 | MAINTAINER softsam 4 | 5 | # Install dependencies for emulator 6 | RUN echo y | android update sdk --no-ui --all -t `android list sdk --all|grep "SDK Platform Android 6.0, API 23"|awk -F'[^0-9]*' '{print $2}'` && \ 7 | echo y | android update sdk --no-ui --all --filter sys-img-armeabi-v7a-android-23 --force && \ 8 | echo y | android update sdk --no-ui --all --filter sys-img-x86-android-23 --force 9 | 10 | RUN echo n | android create avd --force -n "x86" -t android-23 --abi default/x86 11 | RUN echo n | android create avd --force -n "arm" -t android-23 --abi default/armeabi-v7a 12 | -------------------------------------------------------------------------------- /android-23/README.md: -------------------------------------------------------------------------------- 1 | # Android emulator API 23 2 | Run Android emulator with API 23 3 | 4 | ## Built with 5 | - based on sofsam/android 6 | - Android API 23 7 | 8 | ## Running the emulator 9 | Running the emulator for Android 23: 10 | 11 | docker run -d --name android softsam/android-23 12 | 13 | The emulator exposes the port 5555 of ADB, and can be used by any other container (or the host). 14 | The emulator also exposes the port 5900, and you can connect to it with a VNC client on localhost if you run the following command: 15 | 16 | docker run -d -p 5900:5900 --name android softsam/android-23 17 | -------------------------------------------------------------------------------- /android-base/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM softsam/adb:latest 2 | 3 | MAINTAINER softsam 4 | 5 | # Install all dependencies 6 | RUN apt-get update && \ 7 | apt-get install -y wget redir && \ 8 | apt-get clean && \ 9 | apt-get autoclean && \ 10 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 11 | 12 | # Expose android port 13 | EXPOSE 5555 14 | # VNC port 15 | EXPOSE 5900 16 | 17 | # Needed to be able to run VNC - bug of Android SDK 18 | RUN mkdir ${ANDROID_HOME}/tools/keymaps && touch ${ANDROID_HOME}/tools/keymaps/en-us 19 | 20 | # Add script 21 | ADD start.sh /start.sh 22 | RUN chmod +x /start.sh 23 | CMD /start.sh 24 | -------------------------------------------------------------------------------- /android-base/README.md: -------------------------------------------------------------------------------- 1 | # Android emulator base image 2 | Android base image for emulator, used to build images of emulators for the different SDKs. 3 | 4 | ## Built with 5 | - latest debian 6 | - openjdk 7 7 | - Android SDK 24.3.4 8 | -------------------------------------------------------------------------------- /android-base/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | android_arch=$ANDROID_ARCH 3 | if [ -z "$android_arch" ] 4 | then 5 | android_arch="arm" 6 | fi 7 | 8 | # Detect ip and forward ADB ports outside to outside interface 9 | ip=$(ip addr list eth0|grep "inet "|cut -d' ' -f6|cut -d/ -f1) 10 | redir --laddr=$ip --lport=5555 --caddr=127.0.0.1 --cport=5555 & 11 | 12 | # Set up and run emulator 13 | emulator64-${android_arch} -avd ${android_arch} -http-proxy "$http_proxy" -noaudio -no-window -gpu off -verbose -qemu -vnc :0 14 | --------------------------------------------------------------------------------