# Docker-Android

> A disposable Android phone in a container, viewable in the browser

- Category: Agents & Automation / Computer & Browser Use
- Language: Python
- Licence: Custom Apache 2.0 License (Apache 2.0 with amendments on forks and data processing)
- Repository: https://github.com/budtmo/docker-android
- Website: https://hub.docker.com/r/budtmo/docker-android
- Canonical page: https://ai-tldr.dev/tools/docker-android/

## In short

Docker-Android packages an Android emulator into a Docker image, so a phone becomes something you start, use and throw away like any other container. It sits in the Computer & Browser Use category of the Agents & Automation tools and is open-source, written in Python and licensed Custom Apache 2.0 License (Apache 2.0 with amendments on forks and data processing).

## Overview

Docker-Android packages an Android emulator into a Docker image, so a phone becomes something you start, use and throw away like any other container. Images are published per Android version — API 28 through API 34 (Android 9.0 to 14.0) — plus a Genymotion Cloud image and a dedicated mcp image, each available as a latest tag or pinned to a specific release version.

The emulator comes with device profiles and skins rather than a generic screen: Samsung Galaxy S10, S9, S8, S7 Edge, S7 and S6, Nexus 4, Nexus 5, Nexus One and Nexus S for phones, and Nexus 7 and Pixel C for tablets. You pick one with the EMULATOR_DEVICE environment variable at run time.

Because it exposes a VNC session over noVNC, you can watch and drive the device from a browser at http://localhost:6080 with nothing installed locally. Logs are shared through the same web UI, video recording is built in, and adb connect works from outside the container, so existing tooling — Appium, Espresso, your own scripts — attaches the way it would to a physical device. An MCP server is included in beta, which is what makes this interesting for AI agents: a sandboxed mobile device an agent can be handed without giving it your phone.

The one hard constraint is virtualisation. The image runs under Ubuntu only, so macOS and Windows users need a virtualisation-capable VM running Ubuntu (WSL2 works on Windows 11 with nested virtualisation enabled and /dev/kvm assigned to the kvm group). Check your host with kvm-ok before starting. By default the emulated device is destroyed on container restart; mount a volume at /home/androidusr to persist it. The project is licensed under a Custom Apache 2.0 License — Apache 2.0 plus the author's amendments on forks and data processing, explicitly not a dual licence you may choose from.

## What it does

- Android emulator images for API 28–34 (Android 9.0–14.0), plus Genymotion Cloud and MCP-server variants
- Device profiles and skins for a dozen real phones and tablets, selected with EMULATOR_DEVICE
- noVNC web view at port 6080 — watch and control the device from a browser
- Built-in video recording and a web UI that surfaces all container logs
- adb connect from outside the container, so Appium, Espresso and custom tooling attach normally
- Beta MCP server image, giving an agent a sandboxed phone to operate
- Optional persistence by mounting a volume at /home/androidusr

## Getting started

The image runs under Ubuntu only. On macOS or Windows use a virtualisation-capable Ubuntu VM (or WSL2 on Windows 11 with nested virtualisation). Confirm KVM is available before you start.

1. Check virtualisation

   kvm-ok reports whether hardware virtualisation is usable on the host.

```bash
sudo apt install cpu-checker
kvm-ok
```

2. Run a device

   Pick the Android version via the image tag and the hardware profile via EMULATOR_DEVICE. /dev/kvm must be passed through.

```bash
docker run -d -p 6080:6080 \
  -e EMULATOR_DEVICE="Samsung Galaxy S10" \
  -e WEB_VNC=true \
  --device /dev/kvm \
  --name android-container \
  budtmo/docker-android:emulator_11.0
```

3. Open the screen and check status

   Browse to http://localhost:6080 to see inside the container; device_status reports how the emulator is doing.

```bash
docker exec -it android-container cat device_status
```

4. Persist the device

   Without a volume the emulated device is destroyed when the container restarts.

```bash
docker run -v data:/home/androidusr budtmo/docker-android:emulator_11.0
```

## When to use it

- Giving an agent a sandboxed Android device to operate via the beta MCP image
- Running Appium or Espresso suites on CI without a device farm
- Reproducing a mobile bug on a specific Android version and device profile, then throwing the device away
- Recording video of a mobile flow for a demo or a bug report
