# tk757567/frida-patcher architecture

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

- Interactive diagram: https://gitdiagram.com/tk757567/frida-patcher
- Repository: https://github.com/tk757567/frida-patcher

## Overview

Frida-Patcher is a single-file Python CLI that hardens a stock Android frida-server against static anti-Frida fingerprinting. Its main workflow accepts a local or fetched binary, applies length-preserving renames and optional signature/port rewrites, verifies the result, then writes it and can push it with adb. The README also documents a detection catalog and optional patch tiers. The sampled source is partial, so internal call relationships are based on README workflow descriptions rather than a complete inspection of the implementation.

Main entry points: [`fridapatch.py`](https://github.com/tk757567/frida-patcher/blob/main/fridapatch.py) (CLI orchestration)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Operator"))
node_cli["CLI orchestration<br/>[fridapatch.py]"]
node_input["Binary acquisition<br/>[fridapatch.py]"]
node_github["GitHub releases"]
node_elf["ELF inspection<br/>[fridapatch.py]"]
node_strings["String rewrites<br/>[fridapatch.py]"]
node_port["Port rewriting<br/>[fridapatch.py]"]
node_verify["Patch verification<br/>[fridapatch.py]"]
node_output["Output binary"]
node_adb["ADB device"]
node_catalog["Detection catalog<br/>[fridapatch.py]"]

node_user -->|"invokes"| node_cli
node_cli -->|"acquires binary"| node_input
node_github -->|"provides release"| node_input
node_cli -->|"inspects ELF"| node_elf
node_cli -->|"rewrites fingerprints"| node_strings
node_cli -->|"optionally rewrites"| node_port
node_cli -->|"verifies patches"| node_verify
node_cli -->|"writes result"| node_output
node_cli -->|"optionally pushes"| node_adb
node_cli -->|"prints catalog"| node_catalog

click node_cli "https://github.com/tk757567/frida-patcher/blob/main/fridapatch.py"
click node_input "https://github.com/tk757567/frida-patcher/blob/main/fridapatch.py"
click node_elf "https://github.com/tk757567/frida-patcher/blob/main/fridapatch.py"
click node_strings "https://github.com/tk757567/frida-patcher/blob/main/fridapatch.py"
click node_port "https://github.com/tk757567/frida-patcher/blob/main/fridapatch.py"
click node_verify "https://github.com/tk757567/frida-patcher/blob/main/fridapatch.py"
click node_catalog "https://github.com/tk757567/frida-patcher/blob/main/fridapatch.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_user,node_github,node_output,node_adb toneIndigo
class node_cli,node_input,node_elf,node_strings,node_port,node_verify,node_catalog toneTeal
```

## Components

### Other components

- **Operator**
- [CLI orchestration](https://github.com/tk757567/frida-patcher/blob/main/fridapatch.py): `fridapatch.py`
- [Binary acquisition](https://github.com/tk757567/frida-patcher/blob/main/fridapatch.py): `fridapatch.py`
- **GitHub releases**
- [ELF inspection](https://github.com/tk757567/frida-patcher/blob/main/fridapatch.py): `fridapatch.py`
- [String rewrites](https://github.com/tk757567/frida-patcher/blob/main/fridapatch.py): `fridapatch.py`
- [Port rewriting](https://github.com/tk757567/frida-patcher/blob/main/fridapatch.py): `fridapatch.py`
- [Patch verification](https://github.com/tk757567/frida-patcher/blob/main/fridapatch.py): `fridapatch.py`
- **Output binary**
- **ADB device**
- [Detection catalog](https://github.com/tk757567/frida-patcher/blob/main/fridapatch.py): `fridapatch.py`

## Connections

- Operator → CLI orchestration: invokes (evidence: `README.md`)
- CLI orchestration → Binary acquisition: acquires binary (evidence: `README.md`)
- GitHub releases → Binary acquisition: provides release (evidence: `README.md`)
- CLI orchestration → ELF inspection: inspects ELF (evidence: `README.md`)
- CLI orchestration → String rewrites: rewrites fingerprints (evidence: `README.md`)
- CLI orchestration → Port rewriting: optionally rewrites (evidence: `README.md`)
- CLI orchestration → Patch verification: verifies patches (evidence: `README.md`)
- CLI orchestration → Output binary: writes result (evidence: `README.md`)
- CLI orchestration → ADB device: optionally pushes (evidence: `README.md`)
- CLI orchestration → Detection catalog: prints catalog (evidence: `README.md`)
