This project provides a Dockerized environment for running Android experiments using android-runner.
First, build the Docker image using the provided docker-compose.yml file:
docker compose buildYou can configure which git repository is used to install android-runner by setting the ANDROID_RUNNER_GIT_REPO build argument.
Similarly, you can specify the Android command line tools archive with the ANDROID_COMMANDLINE_TOOLS_FILE_LINK build argument.
For example, in docker-compose.yml:
build:
context: .
dockerfile: Dockerfile
args:
- ANDROID_RUNNER_GIT_REPO=https://github.com/esiealab/android-runner.git
- ANDROID_COMMANDLINE_TOOLS_FILE_LINK=https://dl.google.com/android/repository/commandlinetools-linux-9123335_latest.zip This will create the android-runner-esiealab:latest image with all required dependencies.
Experiments are defined in the experiment folder. Each experiment has its own configuration file (e.g., config_web.json) and scripts in the Scripts/ subfolder.
-
Edit your experiment configuration
The fileexperiment/config_web.jsondefines the devices, browsers, paths, profilers, and scripts to use. -
Check your device mapping
The filedevices.jsonmaps logical device names to their serial numbers or network addresses. -
Review the Docker Compose file
The filedocker-compose-exp1.ymlmounts theexperimentfolder and sets the command to/exp/config_web.json. -
Run the experiment
Start the experiment with:docker-compose -f docker-compose-exp1.yml up
This will launch the container, mount the experiment files, and execute the experiment as defined in your configuration.
Experiment results will be saved in the output/ subfolder inside the experiment directory.
Note:
- You can create new experiments by copying the structure of the
experimentfolder and adapting the configuration and scripts as needed. - Make sure to update the
volumesandcommandfields in your Docker Compose file to point to your new experiment folder and config file.
For more details, see the android-runner documentation.