# elcapitanoe/build-prop-beta architecture

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

- Interactive diagram: https://gitdiagram.com/elcapitanoe/build-prop-beta
- Repository: https://github.com/elcapitanoe/build-prop-beta

## Overview

Build Prop BETA Builder fetches Pixel OTA builds, extracts partition and boot images, synthesizes Android properties and sysconfig files, and packages them as flashable Magisk/KernelSU/APatch modules. Its main local workflow runs from target selection and OTA download through extraction, generation, and packaging. A separate tracker probes Google release pages and persists release changes. The README documents the shell build stages and module runtime; those links are represented at the documented level because their source was not sampled.

Main entry points: [`extract_images.sh`](https://github.com/elcapitanoe/build-prop-beta/blob/main/extract_images.sh) (Image Extraction), [`src/main.py`](https://github.com/elcapitanoe/build-prop-beta/blob/main/src/main.py) (Tracker Orchestrator), [`build_module.sh`](https://github.com/elcapitanoe/build-prop-beta/blob/main/build_module.sh) (Module Packaging), [`module_files/customize.sh`](https://github.com/elcapitanoe/build-prop-beta/blob/main/module_files/customize.sh) (Module Installer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_build["OTA Build"]
  node_download["OTA Download"]
  node_extract["Image Extraction<br/>[extract_images.sh]"]
  node_extract_utils["Extraction Utilities<br/>[util_functions.sh]"]
  node_props["Property Synthesis<br/>[build_props.sh]"]
  node_sysconfig["Sysconfig Extraction<br/>[build_sysconfig.sh]"]
  node_package["Module Packaging<br/>[build_module.sh]"]
end

subgraph group_tracker["Release Tracker"]
  node_device_discovery["Device Discovery<br/>[devices.py]"]
  node_tracker_cli["Tracker Orchestrator<br/>[main.py]"]
  node_ota_client["OTA HTTP Client<br/>[client.py]"]
  node_page_parser["OTA Page Parser<br/>[parser.py]"]
end

subgraph group_module["Flashable Module"]
  node_templates["Module Templates"]
  node_install["Module Installer<br/>[customize.sh]"]
  node_early_boot["Early Boot Overrides<br/>[post-fs-data.sh]"]
  node_boot_service["Boot Property Service<br/>[service.sh]"]
end

subgraph group_state["Persistent State"]
  node_state_model["State Persistence<br/>[state.py]"]
  node_state_file[("Tracker State<br/>[state.json]")]
end

node_user(("User"))
node_google_ota["Google OTA Pages"]
node_payload_dumper["Payload Dumper"]
node_scheduler(("Scheduled Trigger"))

node_user -->|"selects target"| node_download
node_download -->|"fetches build"| node_google_ota
node_user -->|"starts build"| node_extract
node_extract -->|"uses helpers"| node_extract_utils
node_extract -->|"extracts payload"| node_payload_dumper
node_extract -->|"invokes generation"| node_props
node_extract -->|"invokes extraction"| node_sysconfig
node_props -->|"provides properties"| node_package
node_sysconfig -->|"provides XMLs"| node_package
node_package -->|"assembles scripts"| node_templates
node_package -->|"includes"| node_install
node_install -->|"installs module"| node_early_boot
node_install -->|"installs module"| node_boot_service
node_scheduler -.->|"triggers probe"| node_tracker_cli
node_tracker_cli -->|"loads and saves"| node_state_model
node_state_model -->|"reads and writes"| node_state_file
node_tracker_cli -->|"fetches pages"| node_ota_client
node_ota_client -->|"requests pages"| node_google_ota
node_tracker_cli -->|"validates and parses"| node_page_parser
node_device_discovery -->|"reads target"| node_state_file
node_device_discovery -->|"scrapes devices"| node_google_ota

click node_download "https://github.com/elcapitanoe/build-prop-beta/blob/main/download_latest_ota_build.sh"
click node_extract "https://github.com/elcapitanoe/build-prop-beta/blob/main/extract_images.sh"
click node_extract_utils "https://github.com/elcapitanoe/build-prop-beta/blob/main/util_functions.sh"
click node_props "https://github.com/elcapitanoe/build-prop-beta/blob/main/build_props.sh"
click node_sysconfig "https://github.com/elcapitanoe/build-prop-beta/blob/main/build_sysconfig.sh"
click node_package "https://github.com/elcapitanoe/build-prop-beta/blob/main/build_module.sh"
click node_templates "https://github.com/elcapitanoe/build-prop-beta/tree/main/module_files"
click node_install "https://github.com/elcapitanoe/build-prop-beta/blob/main/module_files/customize.sh"
click node_early_boot "https://github.com/elcapitanoe/build-prop-beta/blob/main/module_files/post-fs-data.sh"
click node_boot_service "https://github.com/elcapitanoe/build-prop-beta/blob/main/module_files/service.sh"
click node_device_discovery "https://github.com/elcapitanoe/build-prop-beta/blob/main/src/devices.py"
click node_tracker_cli "https://github.com/elcapitanoe/build-prop-beta/blob/main/src/main.py"
click node_ota_client "https://github.com/elcapitanoe/build-prop-beta/blob/main/src/client.py"
click node_page_parser "https://github.com/elcapitanoe/build-prop-beta/blob/main/src/parser.py"
click node_state_model "https://github.com/elcapitanoe/build-prop-beta/blob/main/src/state.py"
click node_state_file "https://github.com/elcapitanoe/build-prop-beta/blob/main/data/state.json"

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_download,node_extract,node_extract_utils,node_props,node_sysconfig,node_package,node_user toneBlue
class node_device_discovery,node_tracker_cli,node_ota_client,node_page_parser toneAmber
class node_templates,node_install,node_early_boot,node_boot_service toneMint
class node_state_model,node_state_file toneRose
class node_google_ota,node_payload_dumper,node_scheduler toneIndigo
```

## Components

### OTA Build

- [OTA Download](https://github.com/elcapitanoe/build-prop-beta/blob/main/download_latest_ota_build.sh): `download_latest_ota_build.sh`
- [Image Extraction](https://github.com/elcapitanoe/build-prop-beta/blob/main/extract_images.sh): `extract_images.sh`
- [Extraction Utilities](https://github.com/elcapitanoe/build-prop-beta/blob/main/util_functions.sh): `util_functions.sh`
- [Property Synthesis](https://github.com/elcapitanoe/build-prop-beta/blob/main/build_props.sh): `build_props.sh`
- [Sysconfig Extraction](https://github.com/elcapitanoe/build-prop-beta/blob/main/build_sysconfig.sh): `build_sysconfig.sh`
- [Module Packaging](https://github.com/elcapitanoe/build-prop-beta/blob/main/build_module.sh): `build_module.sh`

### Release Tracker

- [Device Discovery](https://github.com/elcapitanoe/build-prop-beta/blob/main/src/devices.py): `src/devices.py`
- [Tracker Orchestrator](https://github.com/elcapitanoe/build-prop-beta/blob/main/src/main.py): `src/main.py`
- [OTA HTTP Client](https://github.com/elcapitanoe/build-prop-beta/blob/main/src/client.py): `src/client.py`
- [OTA Page Parser](https://github.com/elcapitanoe/build-prop-beta/blob/main/src/parser.py): `src/parser.py`

### Flashable Module

- [Module Templates](https://github.com/elcapitanoe/build-prop-beta/tree/main/module_files): `module_files`
- [Module Installer](https://github.com/elcapitanoe/build-prop-beta/blob/main/module_files/customize.sh): `module_files/customize.sh`
- [Early Boot Overrides](https://github.com/elcapitanoe/build-prop-beta/blob/main/module_files/post-fs-data.sh): `module_files/post-fs-data.sh`
- [Boot Property Service](https://github.com/elcapitanoe/build-prop-beta/blob/main/module_files/service.sh): `module_files/service.sh`

### Persistent State

- [State Persistence](https://github.com/elcapitanoe/build-prop-beta/blob/main/src/state.py): `src/state.py`
- [Tracker State](https://github.com/elcapitanoe/build-prop-beta/blob/main/data/state.json): `data/state.json`

### Other components

- **User**
- **Google OTA Pages**
- **Payload Dumper**
- **Scheduled Trigger**

## Connections

- User → OTA Download: selects target
- OTA Download → Google OTA Pages: fetches build
- User → Image Extraction: starts build
- Image Extraction → Extraction Utilities: uses helpers
- Image Extraction → Payload Dumper: extracts payload
- Image Extraction → Property Synthesis: invokes generation
- Image Extraction → Sysconfig Extraction: invokes extraction
- Property Synthesis → Module Packaging: provides properties
- Sysconfig Extraction → Module Packaging: provides XMLs
- Module Packaging → Module Templates: assembles scripts
- Module Packaging → Module Installer: includes
- Module Installer → Early Boot Overrides: installs module
- Module Installer → Boot Property Service: installs module
- Scheduled Trigger → Tracker Orchestrator: triggers probe
- Tracker Orchestrator → State Persistence: loads and saves
- State Persistence → Tracker State: reads and writes
- Tracker Orchestrator → OTA HTTP Client: fetches pages
- OTA HTTP Client → Google OTA Pages: requests pages
- Tracker Orchestrator → OTA Page Parser: validates and parses
- Device Discovery → Tracker State: reads target
- Device Discovery → Google OTA Pages: scrapes devices
