This repository contains the Dockerfile of the dpal/docker-android-sdk-tools image. Dockerfile is an extension of bitriseio/docker-android-alpha:latest with the following tools:
- python 2.7 environment for
systrace
avd
system images and predefined emulator (namedtestdevice
)
From Docker Hub:
docker pull dpal/docker-android-sdk-tools:latest
Or build from GitHub:
docker build -t dpal/docker-android-sdk-tools github.com/paldom/docker-android-sdk-tools
Run docker image with docker-composer:
docker-compose run --rm app bash
This command will also bind your current working directory into /var/android
.
This is a short guide how to use android tools.
Here's an example how to run emulator inside container:
echo "no" | emulator64-arm -avd testdevice -noaudio -no-window -gpu off -verbose -qemu -usbdevice tablet
If you build with this image, don't forget to set sdk location in local.properties
sdk.dir=/opt/android-sdk-linux
Example how to build APK, build test APK and intall them on emulator:
./gradlew :app:assembleDebug :app:assembleDebugAndroidTest :app:installDebug :app:installDebugAndroidTest
Run systrace with the following command:
python $ANDROID_HOME/platform-tools/systrace/systrace.py --time=10 -o ./trace.html gfx view res
More about android automated performance tests: https://codelabs.developers.google.com/codelabs/android-perf-testing/index.html?index=..%2F..%2Findex#0