# joshidhruv009/phonebackuptool architecture

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

- Interactive diagram: https://gitdiagram.com/joshidhruv009/phonebackuptool
- Repository: https://github.com/joshidhruv009/phonebackuptool

## Overview

This is a PySide6 phone-backup desktop tool. A user selects a connected Android device, inspects its storage items, chooses items and a destination, then monitors a cancellable backup with verification and progress. The implementation places the UI and coordination in main.py, ADB discovery and storage inspection in core/adb_manager.py, and backup execution in core/backup_engine.py. The excerpts establish ADB interactions and worker behavior; they do not show the UI’s full wiring, so those links are marked unverified.

Main entry points: [`main.py`](https://github.com/joshidhruv009/phonebackuptool/blob/master/main.py) (Storage selection), [`core/backup_engine.py`](https://github.com/joshidhruv009/phonebackuptool/blob/master/core/backup_engine.py) (Backup worker), [`core/adb_manager.py`](https://github.com/joshidhruv009/phonebackuptool/blob/master/core/adb_manager.py) (ADB manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_app["Phone backup app<br/>[main.py]"]
  node_selection["Storage selection<br/>[main.py]"]
  node_progress["Backup progress UI<br/>[main.py]"]
end

subgraph group_device["Device access"]
  node_adb["ADB manager<br/>[adb_manager.py]"]
end

subgraph group_backup["Backup execution"]
  node_worker["Backup worker<br/>[backup_engine.py]"]
  node_destination[("Local backup files")]
end

node_user(("User"))
node_phone["Android phone"]

node_user -->|"uses"| node_app
node_app -.->|"opens"| node_selection
node_selection -.->|"scans with"| node_adb
node_adb -->|"queries"| node_phone
node_selection -.->|"starts backup"| node_progress
node_progress -.->|"runs"| node_worker
node_worker -->|"pulls from"| node_phone
node_worker -->|"writes and verifies"| node_destination
node_progress -.->|"reports progress"| node_user

click node_app "https://github.com/joshidhruv009/phonebackuptool/blob/master/main.py"
click node_selection "https://github.com/joshidhruv009/phonebackuptool/blob/master/main.py"
click node_progress "https://github.com/joshidhruv009/phonebackuptool/blob/master/main.py"
click node_adb "https://github.com/joshidhruv009/phonebackuptool/blob/master/core/adb_manager.py"
click node_worker "https://github.com/joshidhruv009/phonebackuptool/blob/master/core/backup_engine.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_app,node_selection,node_progress,node_user toneBlue
class node_adb toneAmber
class node_worker,node_destination toneMint
class node_phone toneIndigo
```

## Components

### Desktop interface

- [Phone backup app](https://github.com/joshidhruv009/phonebackuptool/blob/master/main.py): `main.py`
- [Storage selection](https://github.com/joshidhruv009/phonebackuptool/blob/master/main.py): `main.py`
- [Backup progress UI](https://github.com/joshidhruv009/phonebackuptool/blob/master/main.py): `main.py`

### Device access

- [ADB manager](https://github.com/joshidhruv009/phonebackuptool/blob/master/core/adb_manager.py): `core/adb_manager.py`

### Backup execution

- [Backup worker](https://github.com/joshidhruv009/phonebackuptool/blob/master/core/backup_engine.py): `core/backup_engine.py`
- **Local backup files**

### Other components

- **User**
- **Android phone**

## Connections

- User → Phone backup app: uses (evidence: `main.py`)
- Phone backup app → Storage selection: opens (evidence: `main.py`)
- Storage selection → ADB manager: scans with (evidence: `main.py`)
- ADB manager → Android phone: queries (evidence: `core/adb_manager.py`)
- Storage selection → Backup progress UI: starts backup (evidence: `main.py`)
- Backup progress UI → Backup worker: runs (evidence: `main.py`)
- Backup worker → Android phone: pulls from (evidence: `core/backup_engine.py`)
- Backup worker → Local backup files: writes and verifies (evidence: `core/backup_engine.py`)
- Backup progress UI → User: reports progress
