# guritaaa/docker-android architecture

> Architecture diagram of the GitHub repository guritaaa/docker-android, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/guritaaa/docker-android
- Repository: https://github.com/guritaaa/docker-android

## Overview

docker-android packages a configurable, headless Android emulator as a Docker service. The main workflow is to run the image with KVM and exposed ports, then connect an external ADB client (and optionally scrcpy) to control the emulator; an optional mounted /data volume preserves AVD data across restarts. The README documents SDK/image customization, ADB networking, and QEMU/libvirt support. No source excerpts were provided, so relationships below rely on README statements; script responsibilities and internal call paths are not inferred.

Main entry points: [`Dockerfile`](https://github.com/guritaaa/docker-android/blob/main/Dockerfile) (Emulator container)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_image["Image configuration"]
  node_docker_image["Docker image"]
  node_build_options["Build options"]
  node_android_sdk["Android SDK"]
end

subgraph group_runtime["Emulator runtime"]
  node_container["Emulator container"]
  node_emulator["Android emulator"]
  node_qemu_kvm["QEMU / KVM"]
end

subgraph group_connectivity["Remote access"]
  node_adb_server["ADB server"]
  node_adb_network["ADB port"]
  node_adb_client(("ADB client"))
  node_scrcpy(("scrcpy client"))
end

subgraph group_state["Persistent state"]
  node_avd_data[("AVD data")]
  node_data_mount[("Mounted /data")]
end

node_operator(("Docker operator"))

node_operator -->|"runs"| node_docker_image
node_operator -->|"customizes"| node_build_options
node_docker_image -->|"provides"| node_container
node_container -->|"runs"| node_emulator
node_container -->|"runs"| node_adb_server
node_emulator -->|"uses"| node_qemu_kvm
node_build_options -->|"selects"| node_android_sdk
node_operator -->|"mounts KVM"| node_container
node_operator -->|"publishes"| node_adb_network
node_adb_server -->|"listens on"| node_adb_network
node_adb_client -->|"connects to"| node_adb_network
node_scrcpy -->|"uses ADB"| node_adb_network
node_container -->|"stores"| node_avd_data
node_operator -->|"mounts"| node_data_mount
node_data_mount -->|"preserves"| node_avd_data

click node_docker_image "https://github.com/guritaaa/docker-android/blob/main/Dockerfile"
click node_build_options "https://github.com/guritaaa/docker-android/blob/main/Dockerfile"
click node_android_sdk "https://github.com/guritaaa/docker-android/blob/main/Dockerfile"
click node_container "https://github.com/guritaaa/docker-android/blob/main/Dockerfile"
click node_emulator "https://github.com/guritaaa/docker-android/blob/main/Dockerfile"
click node_qemu_kvm "https://github.com/guritaaa/docker-android/blob/main/Dockerfile"
click node_adb_server "https://github.com/guritaaa/docker-android/blob/main/Dockerfile"
click node_adb_network "https://github.com/guritaaa/docker-android/blob/main/Dockerfile"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_docker_image,node_build_options,node_android_sdk toneBlue
class node_container,node_emulator,node_qemu_kvm toneAmber
class node_adb_server,node_adb_network,node_adb_client,node_scrcpy toneMint
class node_avd_data,node_data_mount toneRose
class node_operator toneIndigo
```

## Components

### Image configuration

- [Docker image](https://github.com/guritaaa/docker-android/blob/main/Dockerfile): `Dockerfile`
- [Build options](https://github.com/guritaaa/docker-android/blob/main/Dockerfile): `Dockerfile`
- [Android SDK](https://github.com/guritaaa/docker-android/blob/main/Dockerfile): `Dockerfile`

### Emulator runtime

- [Emulator container](https://github.com/guritaaa/docker-android/blob/main/Dockerfile): `Dockerfile`
- [Android emulator](https://github.com/guritaaa/docker-android/blob/main/Dockerfile): `Dockerfile`
- [QEMU / KVM](https://github.com/guritaaa/docker-android/blob/main/Dockerfile): `Dockerfile`

### Remote access

- [ADB server](https://github.com/guritaaa/docker-android/blob/main/Dockerfile): `Dockerfile`
- [ADB port](https://github.com/guritaaa/docker-android/blob/main/Dockerfile): `Dockerfile`
- **ADB client**
- **scrcpy client**

### Persistent state

- **AVD data**
- **Mounted /data**

### Other components

- **Docker operator**

## Connections

- Docker operator → Docker image: runs (evidence: `README.md`)
- Docker operator → Build options: customizes (evidence: `README.md`)
- Docker image → Emulator container: provides (evidence: `README.md`)
- Emulator container → Android emulator: runs (evidence: `README.md`)
- Emulator container → ADB server: runs (evidence: `README.md`)
- Android emulator → QEMU / KVM: uses (evidence: `README.md`)
- Build options → Android SDK: selects (evidence: `README.md`)
- Docker operator → Emulator container: mounts KVM (evidence: `README.md`)
- Docker operator → ADB port: publishes (evidence: `README.md`)
- ADB server → ADB port: listens on (evidence: `README.md`)
- ADB client → ADB port: connects to (evidence: `README.md`)
- scrcpy client → ADB port: uses ADB (evidence: `README.md`)
- Emulator container → AVD data: stores (evidence: `README.md`)
- Docker operator → Mounted /data: mounts (evidence: `README.md`)
- Mounted /data → AVD data: preserves (evidence: `README.md`)
