# chillimeat/bydadb architecture

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

- Interactive diagram: https://gitdiagram.com/chillimeat/bydadb
- Repository: https://github.com/chillimeat/bydadb

## Overview

BYD ADB Assistant is a GUI and CLI utility for preparing required APKs on USB and installing selected APKs on a BYD car over ADB. The GUI also remembers recent car IP addresses. The graph shows the documented user workflows and source-visible calls; the packaged application binaries are excluded because their internals are unavailable.

Main entry points: [`bydadb_gui.py`](https://github.com/chillimeat/bydadb/blob/main/bydadb_gui.py) (GUI), [`bydadb.py`](https://github.com/chillimeat/bydadb/blob/main/bydadb.py) (CLI), [`APKs`](https://github.com/chillimeat/bydadb/tree/main/APKs) (Required APKs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User Interfaces"]
  node_gui["GUI<br/>[bydadb_gui.py]"]
  node_cli["CLI<br/>[bydadb.py]"]
  node_ip_history[("IP History<br/>[bydadb_gui.py]")]
  node_apk_picker["APK Selection<br/>[bydadb_gui.py]"]
end

subgraph group_usb["USB Preparation"]
  node_apk_bundle["Required APKs"]
  node_usb_copy["USB Copy<br/>[bydadb_gui.py]"]
end

subgraph group_adb["ADB Installation"]
  node_adb_install["ADB Installer<br/>[bydadb_gui.py]"]
  node_cli_adb_install["CLI Installer<br/>[bydadb.py]"]
end

node_user(("User"))
node_usb_drive[("USB Drive")]
node_adb_service["ADB Service"]
node_car["BYD Car"]

node_user -->|"chooses workflow"| node_gui
node_user -->|"chooses workflow"| node_cli
node_gui -->|"invokes copy"| node_usb_copy
node_apk_bundle -->|"supplies APKs"| node_usb_copy
node_usb_copy -->|"copies APKs"| node_usb_drive
node_cli -->|"copies APKs"| node_usb_copy
node_user -->|"plugs into car"| node_usb_drive
node_gui -->|"loads IPs"| node_ip_history
node_gui -->|"saves IP"| node_ip_history
node_gui -->|"opens picker"| node_apk_picker
node_gui -->|"starts installation"| node_adb_install
node_apk_picker -->|"provides paths"| node_adb_install
node_adb_install -->|"connects and installs"| node_adb_service
node_adb_service -->|"installs APKs"| node_car
node_cli -->|"starts installation"| node_cli_adb_install
node_cli_adb_install -->|"connects and installs"| node_adb_service
node_adb_service -->|"connects to"| node_car

click node_gui "https://github.com/chillimeat/bydadb/blob/main/bydadb_gui.py"
click node_cli "https://github.com/chillimeat/bydadb/blob/main/bydadb.py"
click node_apk_bundle "https://github.com/chillimeat/bydadb/tree/main/APKs"
click node_usb_copy "https://github.com/chillimeat/bydadb/blob/main/bydadb_gui.py"
click node_ip_history "https://github.com/chillimeat/bydadb/blob/main/bydadb_gui.py"
click node_adb_install "https://github.com/chillimeat/bydadb/blob/main/bydadb_gui.py"
click node_cli_adb_install "https://github.com/chillimeat/bydadb/blob/main/bydadb.py"
click node_apk_picker "https://github.com/chillimeat/bydadb/blob/main/bydadb_gui.py"

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_gui,node_cli,node_ip_history,node_apk_picker,node_user toneBlue
class node_apk_bundle,node_usb_copy,node_usb_drive toneAmber
class node_adb_install,node_cli_adb_install toneMint
class node_adb_service,node_car toneIndigo
```

## Components

### User Interfaces

- [GUI](https://github.com/chillimeat/bydadb/blob/main/bydadb_gui.py): `bydadb_gui.py`
- [CLI](https://github.com/chillimeat/bydadb/blob/main/bydadb.py): `bydadb.py`
- [IP History](https://github.com/chillimeat/bydadb/blob/main/bydadb_gui.py): `bydadb_gui.py`
- [APK Selection](https://github.com/chillimeat/bydadb/blob/main/bydadb_gui.py): `bydadb_gui.py`

### USB Preparation

- [Required APKs](https://github.com/chillimeat/bydadb/tree/main/APKs): `APKs`
- [USB Copy](https://github.com/chillimeat/bydadb/blob/main/bydadb_gui.py): `bydadb_gui.py`

### ADB Installation

- [ADB Installer](https://github.com/chillimeat/bydadb/blob/main/bydadb_gui.py): `bydadb_gui.py`
- [CLI Installer](https://github.com/chillimeat/bydadb/blob/main/bydadb.py): `bydadb.py`

### Other components

- **User**
- **USB Drive**
- **ADB Service**
- **BYD Car**

## Connections

- User → GUI: chooses workflow (evidence: `README.md`)
- User → CLI: chooses workflow (evidence: `README.md`)
- GUI → USB Copy: invokes copy (evidence: `bydadb_gui.py`)
- Required APKs → USB Copy: supplies APKs (evidence: `bydadb_gui.py`)
- USB Copy → USB Drive: copies APKs (evidence: `bydadb_gui.py`)
- CLI → USB Copy: copies APKs (evidence: `bydadb.py`)
- User → USB Drive: plugs into car (evidence: `README.md`)
- GUI → IP History: loads IPs (evidence: `bydadb_gui.py`)
- GUI → IP History: saves IP (evidence: `bydadb_gui.py`)
- GUI → APK Selection: opens picker (evidence: `bydadb_gui.py`)
- GUI → ADB Installer: starts installation (evidence: `bydadb_gui.py`)
- APK Selection → ADB Installer: provides paths (evidence: `bydadb_gui.py`)
- ADB Installer → ADB Service: connects and installs (evidence: `bydadb_gui.py`)
- ADB Service → BYD Car: installs APKs (evidence: `README.md`)
- CLI → CLI Installer: starts installation (evidence: `bydadb.py`)
- CLI Installer → ADB Service: connects and installs (evidence: `bydadb.py`)
- ADB Service → BYD Car: connects to
