# bkerler/loaders architecture

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

- Interactive diagram: https://gitdiagram.com/bkerler/loaders
- Repository: https://github.com/bkerler/loaders

## Overview

This repository is a collection of Qualcomm EDL firehose loaders intended to help people unbrick and repair devices, plus a small tool for patching and validating certain Qualcomm NPRG/ENPRG programmers. The main user path is finding a loader associated with a device/vendor and using it in an EDL repair workflow; the README does not document that device-side workflow in detail. The archive is organized by vendor and Qualcomm loader category. The patch utility modifies an input programmer and invokes validation when checking signed references. Connections beyond the documented purpose and excerpted calls are omitted.

Main entry points: [`qualcomm/patched/mdm9x07/patch_nprg.py`](https://github.com/bkerler/loaders/blob/main/qualcomm/patched/mdm9x07/patch_nprg.py) (Patch programmer), [`qualcomm/patched/mdm9x07/validate_nprg.py`](https://github.com/bkerler/loaders/blob/main/qualcomm/patched/mdm9x07/validate_nprg.py) (Validate programmer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Loader catalog"]
  node_vendor_loaders["Vendor loaders"]
  node_lg["LG loaders"]
  node_tcl["TCL loaders"]
  node_asus["ASUS loaders"]
  node_huawei["Huawei loaders"]
  node_motorola["Lenovo Motorola"]
  node_oneplus["OnePlus loaders"]
end

subgraph group_qualcomm["Qualcomm loaders"]
  node_qualcomm_factory["Factory loaders"]
  node_qualcomm_generic["Generic loaders"]
  node_qualcomm_patched["Patched loaders"]
end

subgraph group_patching["NPRG patch tools"]
  node_patch_programmer["Patch programmer<br/>[patch_nprg.py]"]
  node_validate_programmer["Validate programmer<br/>[validate_nprg.py]"]
end

node_repairer(("Device repairer"))

node_repairer -->|"finds loaders"| node_vendor_loaders
node_patch_programmer -->|"validates reference"| node_validate_programmer

click node_lg "https://github.com/bkerler/loaders/tree/main/LG"
click node_tcl "https://github.com/bkerler/loaders/tree/main/TCL"
click node_asus "https://github.com/bkerler/loaders/tree/main/asus_wingtech"
click node_huawei "https://github.com/bkerler/loaders/tree/main/huawei"
click node_motorola "https://github.com/bkerler/loaders/tree/main/lenovo_motorola"
click node_oneplus "https://github.com/bkerler/loaders/tree/main/oneplus"
click node_qualcomm_factory "https://github.com/bkerler/loaders/tree/main/qualcomm/factory"
click node_qualcomm_generic "https://github.com/bkerler/loaders/tree/main/qualcomm/model_generic"
click node_qualcomm_patched "https://github.com/bkerler/loaders/tree/main/qualcomm/patched"
click node_patch_programmer "https://github.com/bkerler/loaders/blob/main/qualcomm/patched/mdm9x07/patch_nprg.py"
click node_validate_programmer "https://github.com/bkerler/loaders/blob/main/qualcomm/patched/mdm9x07/validate_nprg.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_vendor_loaders,node_lg,node_tcl,node_asus,node_huawei,node_motorola,node_oneplus toneBlue
class node_qualcomm_factory,node_qualcomm_generic,node_qualcomm_patched toneAmber
class node_patch_programmer,node_validate_programmer toneMint
class node_repairer toneIndigo
```

## Components

### Loader catalog

- **Vendor loaders**
- [LG loaders](https://github.com/bkerler/loaders/tree/main/LG): `LG`
- [TCL loaders](https://github.com/bkerler/loaders/tree/main/TCL): `TCL`
- [ASUS loaders](https://github.com/bkerler/loaders/tree/main/asus_wingtech): `asus_wingtech`
- [Huawei loaders](https://github.com/bkerler/loaders/tree/main/huawei): `huawei`
- [Lenovo Motorola](https://github.com/bkerler/loaders/tree/main/lenovo_motorola): `lenovo_motorola`
- [OnePlus loaders](https://github.com/bkerler/loaders/tree/main/oneplus): `oneplus`

### Qualcomm loaders

- [Factory loaders](https://github.com/bkerler/loaders/tree/main/qualcomm/factory): `qualcomm/factory`
- [Generic loaders](https://github.com/bkerler/loaders/tree/main/qualcomm/model_generic): `qualcomm/model_generic`
- [Patched loaders](https://github.com/bkerler/loaders/tree/main/qualcomm/patched): `qualcomm/patched`

### NPRG patch tools

- [Patch programmer](https://github.com/bkerler/loaders/blob/main/qualcomm/patched/mdm9x07/patch_nprg.py): `qualcomm/patched/mdm9x07/patch_nprg.py`
- [Validate programmer](https://github.com/bkerler/loaders/blob/main/qualcomm/patched/mdm9x07/validate_nprg.py): `qualcomm/patched/mdm9x07/validate_nprg.py`

### Other components

- **Device repairer**

## Connections

- Device repairer → Vendor loaders: finds loaders (evidence: `README.md`)
- Patch programmer → Validate programmer: validates reference (evidence: `qualcomm/patched/mdm9x07/patch_nprg.py`)
