# exelecakl/android-mirror architecture

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

- Interactive diagram: https://gitdiagram.com/exelecakl/android-mirror
- Repository: https://github.com/exelecakl/android-mirror

## Overview

Android Mirror is a native Windows desktop app for discovering Android devices, pairing over wireless or using USB, and managing independent mirror sessions. The main workflow runs from the launcher through device and transport management into an engine process and a per-device mirror window. The graph also preserves the documented advanced controls, tray/background sharing, settings, and app/engine update capabilities. Some feature implementations were not sampled, so their connections are included only where the README or source index supports them.

Main entry points: [`src/Shell.cs`](https://github.com/exelecakl/android-mirror/blob/main/src/Shell.cs) (Launcher and settings), [`src/Devices.cs`](https://github.com/exelecakl/android-mirror/blob/main/src/Devices.cs) (Device controller), [`src/Connection.cs`](https://github.com/exelecakl/android-mirror/blob/main/src/Connection.cs) (Connection and sessions), [`src/WindowsIntegration.cs`](https://github.com/exelecakl/android-mirror/blob/main/src/WindowsIntegration.cs) (Windows shell and tray)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop app"]
  node_shell["Launcher and settings<br/>[Shell.cs]"]
  node_preferences[("Saved preferences<br/>[Devices.cs]")]
  node_advanced["Advanced options<br/>[EngineUi.cs]"]
  node_wirelessui["Wireless pairing UI<br/>[WirelessUi.cs]"]
end

subgraph group_devices["Devices and mirroring"]
  node_devicecontroller["Device controller<br/>[Devices.cs]"]
  node_discovery["USB device discovery<br/>[Connection.cs]"]
  node_wireless["Wireless pairing and discovery<br/>[Wireless.cs]"]
  node_session["Connection and sessions<br/>[Connection.cs]"]
  node_engine["Mirror engine"]
  node_mirrorwindow["Mirror window and sharing"]
  node_engineoptions["Engine option catalog<br/>[EngineOptions.cs]"]
end

subgraph group_updates["Updates"]
  node_appupdatesui["App update UI<br/>[AppUpdatesUi.cs]"]
  node_appupdates["App release checks<br/>[AppUpdates.cs]"]
  node_appupdater["App installer updates<br/>[AppUpdater.cs]"]
  node_engineupdatesui["Engine update UI<br/>[EngineUi.cs]"]
  node_engineupdates["Engine release updates<br/>[EngineUpdates.cs]"]
  node_engineupdater["Engine installer<br/>[EngineUpdater.cs]"]
end

subgraph group_platform["Windows integration"]
  node_windows["Windows shell and tray"]
  node_identity["App identity"]
end

node_user(("User"))
node_github["GitHub releases"]
node_android(("Android devices"))

node_user -->|"operates"| node_shell
node_shell -->|"manages devices"| node_devicecontroller
node_shell -->|"initializes"| node_wirelessui
node_shell -->|"initializes"| node_appupdatesui
node_shell -->|"initializes"| node_engineupdatesui
node_shell -->|"uses tray"| node_windows
node_shell -->|"loads and saves"| node_preferences
node_shell -->|"opens settings"| node_advanced
node_devicecontroller -->|"tracks devices"| node_discovery
node_devicecontroller -->|"creates sessions"| node_session
node_devicecontroller -->|"updates profiles"| node_preferences
node_devicecontroller -.->|"uses paired transports"| node_wireless
node_wirelessui -->|"runs pairing"| node_wireless
node_android -->|"connects by USB"| node_discovery
node_android -->|"pairs over Wi-Fi"| node_wireless
node_wireless -->|"runs ADB commands"| node_discovery
node_session -->|"starts ADB server"| node_discovery
node_session -->|"launches process"| node_engine
node_engine -->|"renders mirror"| node_mirrorwindow
node_advanced -->|"searches options"| node_engineoptions
node_session -->|"builds arguments"| node_engineoptions
node_appupdatesui -->|"checks releases"| node_appupdates
node_appupdates -->|"checks and downloads"| node_github
node_appupdatesui -->|"installs update"| node_appupdater
node_engineupdatesui -->|"checks releases"| node_engineupdates
node_engineupdates -->|"checks and downloads"| node_github
node_engineupdates -->|"installs verified files"| node_engineupdater
node_engineupdater -->|"updates binaries"| node_engine
node_windows -->|"uses app identity"| node_identity
node_windows -->|"restores launcher"| node_shell
node_mirrorwindow -->|"supports capture"| node_windows

click node_shell "https://github.com/exelecakl/android-mirror/blob/main/src/Shell.cs"
click node_preferences "https://github.com/exelecakl/android-mirror/blob/main/src/Devices.cs"
click node_advanced "https://github.com/exelecakl/android-mirror/blob/main/src/EngineUi.cs"
click node_wirelessui "https://github.com/exelecakl/android-mirror/blob/main/src/WirelessUi.cs"
click node_devicecontroller "https://github.com/exelecakl/android-mirror/blob/main/src/Devices.cs"
click node_discovery "https://github.com/exelecakl/android-mirror/blob/main/src/Connection.cs"
click node_wireless "https://github.com/exelecakl/android-mirror/blob/main/src/Wireless.cs"
click node_session "https://github.com/exelecakl/android-mirror/blob/main/src/Connection.cs"
click node_engine "https://github.com/exelecakl/android-mirror/blob/main/engine/Android%20Mirror%20Runtime.bin"
click node_mirrorwindow "https://github.com/exelecakl/android-mirror/blob/main/src/ScreenSharingWindow.cs"
click node_engineoptions "https://github.com/exelecakl/android-mirror/blob/main/src/EngineOptions.cs"
click node_appupdatesui "https://github.com/exelecakl/android-mirror/blob/main/src/AppUpdatesUi.cs"
click node_appupdates "https://github.com/exelecakl/android-mirror/blob/main/src/AppUpdates.cs"
click node_appupdater "https://github.com/exelecakl/android-mirror/blob/main/src/AppUpdater.cs"
click node_engineupdatesui "https://github.com/exelecakl/android-mirror/blob/main/src/EngineUi.cs"
click node_engineupdates "https://github.com/exelecakl/android-mirror/blob/main/src/EngineUpdates.cs"
click node_engineupdater "https://github.com/exelecakl/android-mirror/blob/main/src/EngineUpdater.cs"
click node_windows "https://github.com/exelecakl/android-mirror/blob/main/src/WindowsIntegration.cs"
click node_identity "https://github.com/exelecakl/android-mirror/blob/main/src/WindowsAppIdentity.cs"

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_shell,node_preferences,node_advanced,node_wirelessui,node_user toneBlue
class node_devicecontroller,node_discovery,node_wireless,node_session,node_engine,node_mirrorwindow,node_engineoptions toneAmber
class node_appupdatesui,node_appupdates,node_appupdater,node_engineupdatesui,node_engineupdates,node_engineupdater toneMint
class node_windows,node_identity toneRose
class node_github,node_android toneIndigo
```

## Components

### Desktop app

- [Launcher and settings](https://github.com/exelecakl/android-mirror/blob/main/src/Shell.cs): `src/Shell.cs`
- [Saved preferences](https://github.com/exelecakl/android-mirror/blob/main/src/Devices.cs): `src/Devices.cs`
- [Advanced options](https://github.com/exelecakl/android-mirror/blob/main/src/EngineUi.cs): `src/EngineUi.cs`
- [Wireless pairing UI](https://github.com/exelecakl/android-mirror/blob/main/src/WirelessUi.cs): `src/WirelessUi.cs`

### Devices and mirroring

- [Device controller](https://github.com/exelecakl/android-mirror/blob/main/src/Devices.cs): `src/Devices.cs`
- [USB device discovery](https://github.com/exelecakl/android-mirror/blob/main/src/Connection.cs): `src/Connection.cs`
- [Wireless pairing and discovery](https://github.com/exelecakl/android-mirror/blob/main/src/Wireless.cs): `src/Wireless.cs`
- [Connection and sessions](https://github.com/exelecakl/android-mirror/blob/main/src/Connection.cs): `src/Connection.cs`
- [Mirror engine](https://github.com/exelecakl/android-mirror/blob/main/engine/Android%20Mirror%20Runtime.bin): `engine/Android Mirror Runtime.bin`
- [Mirror window and sharing](https://github.com/exelecakl/android-mirror/blob/main/src/ScreenSharingWindow.cs): `src/ScreenSharingWindow.cs`
- [Engine option catalog](https://github.com/exelecakl/android-mirror/blob/main/src/EngineOptions.cs): `src/EngineOptions.cs`

### Updates

- [App update UI](https://github.com/exelecakl/android-mirror/blob/main/src/AppUpdatesUi.cs): `src/AppUpdatesUi.cs`
- [App release checks](https://github.com/exelecakl/android-mirror/blob/main/src/AppUpdates.cs): `src/AppUpdates.cs`
- [App installer updates](https://github.com/exelecakl/android-mirror/blob/main/src/AppUpdater.cs): `src/AppUpdater.cs`
- [Engine update UI](https://github.com/exelecakl/android-mirror/blob/main/src/EngineUi.cs): `src/EngineUi.cs`
- [Engine release updates](https://github.com/exelecakl/android-mirror/blob/main/src/EngineUpdates.cs): `src/EngineUpdates.cs`
- [Engine installer](https://github.com/exelecakl/android-mirror/blob/main/src/EngineUpdater.cs): `src/EngineUpdater.cs`

### Windows integration

- [Windows shell and tray](https://github.com/exelecakl/android-mirror/blob/main/src/WindowsIntegration.cs): `src/WindowsIntegration.cs`
- [App identity](https://github.com/exelecakl/android-mirror/blob/main/src/WindowsAppIdentity.cs): `src/WindowsAppIdentity.cs`

### Other components

- **User**
- **GitHub releases**
- **Android devices**

## Connections

- User → Launcher and settings: operates (evidence: `README.md`)
- Launcher and settings → Device controller: manages devices (evidence: `src/Shell.cs`)
- Launcher and settings → Wireless pairing UI: initializes (evidence: `src/Shell.cs`)
- Launcher and settings → App update UI: initializes (evidence: `src/Shell.cs`)
- Launcher and settings → Engine update UI: initializes (evidence: `src/Shell.cs`)
- Launcher and settings → Windows shell and tray: uses tray (evidence: `src/Shell.cs`)
- Launcher and settings → Saved preferences: loads and saves (evidence: `README.md`)
- Launcher and settings → Advanced options: opens settings (evidence: `src/EngineUi.cs`)
- Device controller → USB device discovery: tracks devices (evidence: `src/Devices.cs`)
- Device controller → Connection and sessions: creates sessions (evidence: `src/Devices.cs`)
- Device controller → Saved preferences: updates profiles (evidence: `src/Devices.cs`)
- Device controller → Wireless pairing and discovery: uses paired transports
- Wireless pairing UI → Wireless pairing and discovery: runs pairing (evidence: `src/WirelessUi.cs`)
- Android devices → USB device discovery: connects by USB (evidence: `README.md`)
- Android devices → Wireless pairing and discovery: pairs over Wi-Fi (evidence: `README.md`)
- Wireless pairing and discovery → USB device discovery: runs ADB commands (evidence: `src/Wireless.cs`)
- Connection and sessions → USB device discovery: starts ADB server (evidence: `src/Connection.cs`)
- Connection and sessions → Mirror engine: launches process (evidence: `src/Connection.cs`)
- Mirror engine → Mirror window and sharing: renders mirror
- Advanced options → Engine option catalog: searches options (evidence: `src/EngineUi.cs`)
- Connection and sessions → Engine option catalog: builds arguments (evidence: `src/EngineOptions.cs`)
- App update UI → App release checks: checks releases (evidence: `src/AppUpdatesUi.cs`)
- App release checks → GitHub releases: checks and downloads (evidence: `README.md`)
- App update UI → App installer updates: installs update (evidence: `src/AppUpdatesUi.cs`)
- Engine update UI → Engine release updates: checks releases (evidence: `src/EngineUi.cs`)
- Engine release updates → GitHub releases: checks and downloads (evidence: `README.md`)
- Engine release updates → Engine installer: installs verified files (evidence: `src/EngineUpdates.cs`)
- Engine installer → Mirror engine: updates binaries (evidence: `src/EngineUpdater.cs`)
- Windows shell and tray → App identity: uses app identity (evidence: `src/WindowsIntegration.cs`)
- Windows shell and tray → Launcher and settings: restores launcher (evidence: `README.md`)
- Mirror window and sharing → Windows shell and tray: supports capture (evidence: `README.md`)
