# brunodev85/winlator architecture

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

- Interactive diagram: https://gitdiagram.com/brunodev85/winlator
- Repository: https://github.com/brunodev85/winlator

## Overview

#### Purpose and Entry Points
Winlator is an Android runtime for launching Windows x86_64 applications through Wine with Box86/Box64 emulation. The user-facing entry point is the Android application under `app`; release installation is via an APK. Runtime support is assembled from native compatibility layers and bundled installable archives.

Paths: `app`, `README.md`

#### Android Application / Runtime Orchestration
The `app` module is the architectural owner for Android-side installation, container/shortcut configuration, and starting Windows workloads. It must bridge Android lifecycle, storage, display/input, and native runtime processes; the repository does not expose its source tree here, so its internal entry classes cannot be identified.

Paths: `app`, `input_controls/index.txt`

#### Windows Execution Stack
Windows programs execute under Wine, with Box86/Box64 supplying x86/x86_64 binary translation on Android’s ARM environment. Wine add-ons are bundled separately for applications requiring browser or .NET functionality, rather than being application code.

Paths: `wine_addons/wine-mono-10.1.0-x86.msi`, `wine_addons/wine-gecko-2.47.4-x86_64.msi`, `installable_components/box64/index.txt`

#### Graphics Compatibility and Versioned Components
Graphics translation is installable and versioned independently from the app: DXVK targets Direct3D-over-Vulkan, VKD3D addresses newer Direct3D paths, WineD3D provides an alternative Wine graphics backend, and Turnip provides the Android Vulkan driver stack. The indexed `.tzst` archives form a component-distribution boundary, enabling runtime selection or updates without representing source modules.

Paths: `installable_components/dxvk/index.txt`, `installable_components/vkd3d/index.txt`, `installable_components/turnip/index.txt`

#### Audio Integration Boundary
A custom ALSA PCM plugin connects guest/runtime audio to an Android audio-server configuration. The native module is built through CMake and uses vendored ALSA headers/configuration, isolating Android-specific audio adaptation from the Android app and Wine stack.

Paths: `android_alsa/module_pcm_android_aserver.c`, `android_alsa/CMakeLists.txt`, `android_alsa/android_aserver.conf`

#### libc/System-V Shared-Memory Compatibility
GLIBC patches implement Android-specific System V shared-memory operations (`shmget`, `shmat`, `shmctl`, `shmdt`). This is a low-level runtime boundary likely needed by Linux-side compatibility software that expects SysV IPC unavailable or divergent on Android.

Paths: `glibc_patches/sysdeps/unix/sysv/linux/android_sysvshm.c`, `glibc_patches/sysdeps/unix/sysv/linux/shmget.c`, `glibc_patches/sysdeps/unix/sysv/linux/shmat.c`

#### Input Profile Data
Game-specific `.icp` files and a central index provide data-driven input-control mappings. The app/runtime can select profiles per title instead of embedding each game’s touch/controller bindings into code.

Paths: `input_controls/index.txt`, `input_controls/Skyrim.icp`, `input_controls/GTA 5.icp`

#### External Runtimes and Infrastructure
Material external dependencies are Wine, Box86/Box64, Mesa/Turnip, DXVK, VKD3D, and Android’s native audio/graphics environment. `gladio` and `vortek` are top-level repository boundaries with no visible contents in this tree; their roles cannot be established from the supplied files.

Paths: `gladio`, `vortek`, `.gitmodules`

Main entry points: [`app`](https://github.com/brunodev85/winlator/tree/main/app) (Android app), [`installable_components/dxvk/index.txt`](https://github.com/brunodev85/winlator/blob/main/installable_components/dxvk/index.txt) (DXVK packages), [`installable_components/vkd3d/index.txt`](https://github.com/brunodev85/winlator/blob/main/installable_components/vkd3d/index.txt) (VKD3D packages), [`android_alsa/module_pcm_android_aserver.c`](https://github.com/brunodev85/winlator/blob/main/android_alsa/module_pcm_android_aserver.c) (Android ALSA PCM plugin)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_android["Android host"]
  node_apk["Release APK<br/>distribution<br/>[README.md]"]
  node_app["Android app<br/>runtime orchestrator"]
  node_input_index["Input profile index<br/>profile catalog<br/>[index.txt]"]
  node_input_profiles["Game input profiles<br/>profile data<br/>[Skyrim.icp]"]
end

subgraph group_execution["Windows execution"]
  node_wine["Wine<br/>Windows runtime"]
  node_box["Box86 / Box64<br/>CPU translation<br/>[index.txt]"]
  node_windows_apps["Windows applications<br/>guest workload"]
  node_wine_mono["Wine Mono<br/>Wine add-on"]
  node_wine_gecko["Wine Gecko<br/>Wine add-on"]
end

subgraph group_components["Installable components"]
  node_dxvk["DXVK packages<br/>graphics component<br/>[index.txt]"]
  node_vkd3d["VKD3D packages<br/>graphics component<br/>[index.txt]"]
  node_turnip["Turnip packages<br/>Vulkan driver component<br/>[index.txt]"]
  node_android_graphics["Android graphics environment<br/>external platform"]
end

subgraph group_native["Native compatibility"]
  node_alsa_plugin["Android ALSA PCM plugin<br/>native audio bridge"]
  node_alsa_build["ALSA plugin build<br/>CMake build<br/>[CMakeLists.txt]"]
  node_audio_config["Audio-server config<br/>ALSA configuration"]
  node_sysvshm["Android SysV shared memory<br/>glibc compatibility<br/>[android_sysvshm.c]"]
end

node_gladio["gladio boundary<br/>repository boundary"]
node_vortek["vortek boundary<br/>repository boundary"]

node_apk -->|"installs"| node_app
node_app -->|"selects"| node_input_index
node_input_index -->|"indexes"| node_input_profiles
node_app -->|"launches"| node_windows_apps
node_windows_apps -->|"runs under"| node_wine
node_wine -->|"uses translation"| node_box
node_wine -.->|"optionally installs"| node_wine_mono
node_wine -.->|"optionally installs"| node_wine_gecko
node_app -->|"installs/selects"| node_dxvk
node_app -->|"installs/selects"| node_vkd3d
node_app -->|"installs/selects"| node_turnip
node_wine -.->|"uses graphics backend"| node_dxvk
node_wine -.->|"uses graphics backend"| node_vkd3d
node_dxvk -->|"targets Vulkan"| node_android_graphics
node_vkd3d -->|"targets Vulkan"| node_android_graphics
node_turnip -->|"provides driver"| node_android_graphics
node_alsa_build -->|"builds"| node_alsa_plugin
node_audio_config -->|"configures"| node_alsa_plugin
node_wine -->|"outputs guest audio"| node_alsa_plugin
node_wine -.->|"may require IPC compatibility"| node_sysvshm
node_app -->|"bridges display and input"| node_android_graphics

click node_apk "https://github.com/brunodev85/winlator/blob/main/README.md"
click node_app "https://github.com/brunodev85/winlator/tree/main/app"
click node_input_index "https://github.com/brunodev85/winlator/blob/main/input_controls/index.txt"
click node_input_profiles "https://github.com/brunodev85/winlator/blob/main/input_controls/Skyrim.icp"
click node_box "https://github.com/brunodev85/winlator/blob/main/installable_components/box64/index.txt"
click node_wine_mono "https://github.com/brunodev85/winlator/blob/main/wine_addons/wine-mono-10.1.0-x86.msi"
click node_wine_gecko "https://github.com/brunodev85/winlator/blob/main/wine_addons/wine-gecko-2.47.4-x86_64.msi"
click node_dxvk "https://github.com/brunodev85/winlator/blob/main/installable_components/dxvk/index.txt"
click node_vkd3d "https://github.com/brunodev85/winlator/blob/main/installable_components/vkd3d/index.txt"
click node_turnip "https://github.com/brunodev85/winlator/blob/main/installable_components/turnip/index.txt"
click node_alsa_plugin "https://github.com/brunodev85/winlator/blob/main/android_alsa/module_pcm_android_aserver.c"
click node_alsa_build "https://github.com/brunodev85/winlator/blob/main/android_alsa/CMakeLists.txt"
click node_audio_config "https://github.com/brunodev85/winlator/blob/main/android_alsa/android_aserver.conf"
click node_sysvshm "https://github.com/brunodev85/winlator/blob/main/glibc_patches/sysdeps/unix/sysv/linux/android_sysvshm.c"
click node_gladio "https://github.com/brunodev85/winlator/tree/main/gladio"
click node_vortek "https://github.com/brunodev85/winlator/tree/main/vortek"

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_apk,node_app,node_input_index,node_input_profiles toneBlue
class node_wine,node_box,node_windows_apps,node_wine_mono,node_wine_gecko toneAmber
class node_dxvk,node_vkd3d,node_turnip,node_android_graphics toneMint
class node_alsa_plugin,node_alsa_build,node_audio_config,node_sysvshm toneRose
class node_gladio,node_vortek toneNeutral
```

## Components

### Android host

- [Release APK](https://github.com/brunodev85/winlator/blob/main/README.md): distribution · Android installation artifact. · `README.md`
- [Android app](https://github.com/brunodev85/winlator/tree/main/app): runtime orchestrator · Installs and configures containers, shortcuts, and Windows workloads. · `app`
- [Input profile index](https://github.com/brunodev85/winlator/blob/main/input_controls/index.txt): profile catalog · `input_controls/index.txt`
- [Game input profiles](https://github.com/brunodev85/winlator/blob/main/input_controls/Skyrim.icp): profile data · Per-title touch and controller mappings. · `input_controls/Skyrim.icp`

### Windows execution

- **Wine**: Windows runtime · Runs Windows applications.
- [Box86 / Box64](https://github.com/brunodev85/winlator/blob/main/installable_components/box64/index.txt): CPU translation · Translates x86 and x86_64 workloads for ARM. · `installable_components/box64/index.txt`
- **Windows applications**: guest workload
- [Wine Mono](https://github.com/brunodev85/winlator/blob/main/wine_addons/wine-mono-10.1.0-x86.msi): Wine add-on · Optional .NET support. · `wine_addons/wine-mono-10.1.0-x86.msi`
- [Wine Gecko](https://github.com/brunodev85/winlator/blob/main/wine_addons/wine-gecko-2.47.4-x86_64.msi): Wine add-on · Optional browser support. · `wine_addons/wine-gecko-2.47.4-x86_64.msi`

### Installable components

- [DXVK packages](https://github.com/brunodev85/winlator/blob/main/installable_components/dxvk/index.txt): graphics component · Direct3D-over-Vulkan translation archives. · `installable_components/dxvk/index.txt`
- [VKD3D packages](https://github.com/brunodev85/winlator/blob/main/installable_components/vkd3d/index.txt): graphics component · Newer Direct3D translation archives. · `installable_components/vkd3d/index.txt`
- [Turnip packages](https://github.com/brunodev85/winlator/blob/main/installable_components/turnip/index.txt): Vulkan driver component · Versioned Android Vulkan driver archives. · `installable_components/turnip/index.txt`
- **Android graphics environment**: external platform · Native Vulkan and display environment.

### Native compatibility

- [Android ALSA PCM plugin](https://github.com/brunodev85/winlator/blob/main/android_alsa/module_pcm_android_aserver.c): native audio bridge · Connects guest ALSA PCM to Android audio-server configuration. · `android_alsa/module_pcm_android_aserver.c`
- [ALSA plugin build](https://github.com/brunodev85/winlator/blob/main/android_alsa/CMakeLists.txt): CMake build · Builds the native audio module with vendored ALSA support. · `android_alsa/CMakeLists.txt`
- [Audio-server config](https://github.com/brunodev85/winlator/blob/main/android_alsa/android_aserver.conf): ALSA configuration · `android_alsa/android_aserver.conf`
- [Android SysV shared memory](https://github.com/brunodev85/winlator/blob/main/glibc_patches/sysdeps/unix/sysv/linux/android_sysvshm.c): glibc compatibility · Android-specific shmget, shmat, shmctl, and shmdt support. · `glibc_patches/sysdeps/unix/sysv/linux/android_sysvshm.c`

### Other components

- [gladio boundary](https://github.com/brunodev85/winlator/tree/main/gladio): repository boundary · Role is not established by the supplied files. · `gladio`
- [vortek boundary](https://github.com/brunodev85/winlator/tree/main/vortek): repository boundary · Role is not established by the supplied files. · `vortek`

## Connections

- Release APK → Android app: installs
- Android app → Input profile index: selects
- Input profile index → Game input profiles: indexes
- Android app → Windows applications: launches
- Windows applications → Wine: runs under
- Wine → Box86 / Box64: uses translation
- Wine → Wine Mono: optionally installs
- Wine → Wine Gecko: optionally installs
- Android app → DXVK packages: installs/selects
- Android app → VKD3D packages: installs/selects
- Android app → Turnip packages: installs/selects
- Wine → DXVK packages: uses graphics backend
- Wine → VKD3D packages: uses graphics backend
- DXVK packages → Android graphics environment: targets Vulkan
- VKD3D packages → Android graphics environment: targets Vulkan
- Turnip packages → Android graphics environment: provides driver
- ALSA plugin build → Android ALSA PCM plugin: builds
- Audio-server config → Android ALSA PCM plugin: configures
- Wine → Android ALSA PCM plugin: outputs guest audio
- Wine → Android SysV shared memory: may require IPC compatibility
- Android app → Android graphics environment: bridges display and input
