# compuhelp82/emudroid architecture

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

- Interactive diagram: https://gitdiagram.com/compuhelp82/emudroid
- Repository: https://github.com/compuhelp82/emudroid

## Overview

EmuDroid’s main workflow is a desktop user managing Android virtual devices and installing APKs through a configured Android SDK. The Kotlin excerpts show the UI-to-state orchestration and several device actions; the SDK implementation is present but not excerpted, so tool-level behavior is not mapped. The tree also contains a distinct WiX bootstrapper/custom-action header API; it is shown separately rather than treated as part of EmuDroid. Connections in that subsystem are limited to relationships visible in the supplied excerpts or index.

Main entry points: [`Exe/sdk/inc/BalBaseBootstrapperApplication.h`](https://github.com/compuhelp82/emudroid/blob/master/Exe/sdk/inc/BalBaseBootstrapperApplication.h) (Base bootstrapper app), [`src/main/kotlin/emudroid/Main.kt`](https://github.com/compuhelp82/emudroid/blob/master/src/main/kotlin/emudroid/Main.kt) (Desktop window), [`src/main/kotlin/emudroid/AppState.kt`](https://github.com/compuhelp82/emudroid/blob/master/src/main/kotlin/emudroid/AppState.kt) (Application state), [`src/main/kotlin/emudroid/Screens.kt`](https://github.com/compuhelp82/emudroid/blob/master/src/main/kotlin/emudroid/Screens.kt) (Screens and controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_window["Desktop window<br/>[Main.kt]"]
  node_screens["Screens and controls<br/>[Screens.kt]"]
end

subgraph group_management["Emulator management"]
  node_state["Application state<br/>[AppState.kt]"]
end

subgraph group_android["Android SDK"]
  node_sdk["SDK operations<br/>[Sdk.kt]"]
end

subgraph group_wixapp["WiX bootstrapper"]
  node_baseba["Base bootstrapper app"]
  node_baiface["Bootstrapper callbacks"]
  node_engine["Bootstrapper engine API"]
  node_retry["Package retry policy<br/>[balretry.h]"]
end

subgraph group_wixutil["WiX utilities"]
  node_balutil["Bootstrapper utilities<br/>[balutil.h]"]
  node_dutil["Debug and error utilities<br/>[dutil.h]"]
  node_wcautil["Custom action utilities<br/>[wcautil.h]"]
  node_wrapquery["Wrapped MSI queries<br/>[wcawrapquery.h]"]
end

node_user(("Desktop user"))
node_androidtools["Android SDK tools"]

node_user -->|"uses"| node_window
node_window -->|"creates and starts"| node_state
node_window -->|"submits dropped APKs"| node_state
node_window -->|"renders layout"| node_screens
node_screens -->|"invokes device actions"| node_state
node_state -->|"queries and manages devices"| node_sdk
node_sdk -.->|"uses tools"| node_androidtools
node_baseba -->|"implements callbacks"| node_baiface
node_baseba -->|"sends engine requests"| node_engine
node_engine -->|"dispatches callbacks"| node_baiface
node_baseba -->|"handles retry errors"| node_retry
node_baseba -->|"uses utilities"| node_balutil
node_balutil -->|"uses diagnostics"| node_dutil
node_wrapquery -->|"includes utilities"| node_wcautil

click node_window "https://github.com/compuhelp82/emudroid/blob/master/src/main/kotlin/emudroid/Main.kt"
click node_screens "https://github.com/compuhelp82/emudroid/blob/master/src/main/kotlin/emudroid/Screens.kt"
click node_state "https://github.com/compuhelp82/emudroid/blob/master/src/main/kotlin/emudroid/AppState.kt"
click node_sdk "https://github.com/compuhelp82/emudroid/blob/master/src/main/kotlin/emudroid/Sdk.kt"
click node_baseba "https://github.com/compuhelp82/emudroid/blob/master/Exe/sdk/inc/BalBaseBootstrapperApplication.h"
click node_baiface "https://github.com/compuhelp82/emudroid/blob/master/Exe/sdk/inc/IBootstrapperApplication.h"
click node_engine "https://github.com/compuhelp82/emudroid/blob/master/Exe/sdk/inc/IBootstrapperEngine.h"
click node_retry "https://github.com/compuhelp82/emudroid/blob/master/Exe/sdk/inc/balretry.h"
click node_balutil "https://github.com/compuhelp82/emudroid/blob/master/Exe/sdk/inc/balutil.h"
click node_dutil "https://github.com/compuhelp82/emudroid/blob/master/Exe/sdk/inc/dutil.h"
click node_wcautil "https://github.com/compuhelp82/emudroid/blob/master/Exe/sdk/inc/wcautil.h"
click node_wrapquery "https://github.com/compuhelp82/emudroid/blob/master/Exe/sdk/inc/wcawrapquery.h"

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_window,node_screens,node_user toneBlue
class node_state toneAmber
class node_sdk toneMint
class node_baseba,node_baiface,node_engine,node_retry toneRose
class node_balutil,node_dutil,node_wcautil,node_wrapquery,node_androidtools toneIndigo
```

## Components

### Desktop interface

- [Desktop window](https://github.com/compuhelp82/emudroid/blob/master/src/main/kotlin/emudroid/Main.kt): `src/main/kotlin/emudroid/Main.kt`
- [Screens and controls](https://github.com/compuhelp82/emudroid/blob/master/src/main/kotlin/emudroid/Screens.kt): `src/main/kotlin/emudroid/Screens.kt`

### Emulator management

- [Application state](https://github.com/compuhelp82/emudroid/blob/master/src/main/kotlin/emudroid/AppState.kt): `src/main/kotlin/emudroid/AppState.kt`

### Android SDK

- [SDK operations](https://github.com/compuhelp82/emudroid/blob/master/src/main/kotlin/emudroid/Sdk.kt): `src/main/kotlin/emudroid/Sdk.kt`

### WiX bootstrapper

- [Base bootstrapper app](https://github.com/compuhelp82/emudroid/blob/master/Exe/sdk/inc/BalBaseBootstrapperApplication.h): `Exe/sdk/inc/BalBaseBootstrapperApplication.h`
- [Bootstrapper callbacks](https://github.com/compuhelp82/emudroid/blob/master/Exe/sdk/inc/IBootstrapperApplication.h): `Exe/sdk/inc/IBootstrapperApplication.h`
- [Bootstrapper engine API](https://github.com/compuhelp82/emudroid/blob/master/Exe/sdk/inc/IBootstrapperEngine.h): `Exe/sdk/inc/IBootstrapperEngine.h`
- [Package retry policy](https://github.com/compuhelp82/emudroid/blob/master/Exe/sdk/inc/balretry.h): `Exe/sdk/inc/balretry.h`

### WiX utilities

- [Bootstrapper utilities](https://github.com/compuhelp82/emudroid/blob/master/Exe/sdk/inc/balutil.h): `Exe/sdk/inc/balutil.h`
- [Debug and error utilities](https://github.com/compuhelp82/emudroid/blob/master/Exe/sdk/inc/dutil.h): `Exe/sdk/inc/dutil.h`
- [Custom action utilities](https://github.com/compuhelp82/emudroid/blob/master/Exe/sdk/inc/wcautil.h): `Exe/sdk/inc/wcautil.h`
- [Wrapped MSI queries](https://github.com/compuhelp82/emudroid/blob/master/Exe/sdk/inc/wcawrapquery.h): `Exe/sdk/inc/wcawrapquery.h`

### Other components

- **Desktop user**
- **Android SDK tools**

## Connections

- Desktop user → Desktop window: uses (evidence: `src/main/kotlin/emudroid/Main.kt`)
- Desktop window → Application state: creates and starts (evidence: `src/main/kotlin/emudroid/Main.kt`)
- Desktop window → Application state: submits dropped APKs (evidence: `src/main/kotlin/emudroid/Main.kt`)
- Desktop window → Screens and controls: renders layout (evidence: `src/main/kotlin/emudroid/Main.kt`)
- Screens and controls → Application state: invokes device actions (evidence: `src/main/kotlin/emudroid/Screens.kt`)
- Application state → SDK operations: queries and manages devices (evidence: `src/main/kotlin/emudroid/AppState.kt`)
- SDK operations → Android SDK tools: uses tools
- Base bootstrapper app → Bootstrapper callbacks: implements callbacks (evidence: `Exe/sdk/inc/BalBaseBootstrapperApplication.h`)
- Base bootstrapper app → Bootstrapper engine API: sends engine requests (evidence: `Exe/sdk/inc/BalBaseBootstrapperApplication.h`)
- Bootstrapper engine API → Bootstrapper callbacks: dispatches callbacks (evidence: `Exe/sdk/inc/IBootstrapperApplication.h`)
- Base bootstrapper app → Package retry policy: handles retry errors (evidence: `Exe/sdk/inc/BalBaseBootstrapperApplication.h`)
- Base bootstrapper app → Bootstrapper utilities: uses utilities (evidence: `Exe/sdk/inc/BalBaseBootstrapperApplication.h`)
- Bootstrapper utilities → Debug and error utilities: uses diagnostics (evidence: `Exe/sdk/inc/balutil.h`)
- Wrapped MSI queries → Custom action utilities: includes utilities (evidence: `Exe/sdk/inc/wcawrapquery.h`)
