# busung-dev/root-my-galaxy-payloads architecture

> Architecture diagram of the GitHub repository busung-dev/root-my-galaxy-payloads, 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/busung-dev/root-my-galaxy-payloads
- Repository: https://github.com/busung-dev/root-my-galaxy-payloads

## Overview

This repository supplies Root My Galaxy’s device-specific native payloads, not the Android application. The intended workflow is app-driven exploitation, device-specific kernel access, root installation, then KernelSU late-load; README documents end-to-end payload and late-load capability, while sampled source shows the exploit’s staging components. Target profiles provide firmware-specific offsets and layouts. The graph preserves the app-bootstrap and support-feed capabilities as documented, but their implementation files are not present in the supplied tree. Several links are dashed because orchestration details were not excerpted.

Main entry points: [`src/main.c`](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/main.c) (Exploit entry), [`src/targets/a53x-A536EXXSNGZG3/chain.c`](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/targets/a53x-A536EXXSNGZG3/chain.c) (A53 exploit chain), [`src/kernelsnitch/kernelsnitch.h`](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/kernelsnitch/kernelsnitch.h) (KernelSnitch), [`src/root.c`](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/root.c) (Android root)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_exploit["Exploit runtime"]
  node_entry["Exploit entry<br/>[main.c]"]
  node_targetchain["A53 exploit chain<br/>[chain.c]"]
  node_targetpage["A53 page logic<br/>[page.c]"]
  node_targetpayload["A53 payload<br/>[payload.c]"]
  node_targetghost["A53 ghostlock<br/>[ghostlock.c]"]
end

subgraph group_kernel["Kernel access"]
  node_snitch["KernelSnitch<br/>[kernelsnitch.h]"]
  node_hash["Futex hashing<br/>[futex_hash.h]"]
  node_offsets["Address utilities<br/>[util.c]"]
  node_slide["Slide discovery<br/>[slide_app.c]"]
  node_fops["Fops route<br/>[fops.c]"]
  node_pipe["Pipe primitives<br/>[pipe.c]"]
end

subgraph group_rooting["Root installation"]
  node_root["Android root<br/>[root.c]"]
  node_daemon["SU daemon<br/>[su_daemon.c]"]
  node_ksu["KernelSU late-load"]
end

subgraph group_profiles["Device profiles"]
  node_profile["Firmware profiles"]
  node_layout["Kernel layouts<br/>[common.h]"]
end

subgraph group_integration["Payload integration"]
  node_bootstrap["App bootstrap<br/>[preload.c]"]
  node_feed["Support feed"]
end

node_app(("Android app"))

node_app -.->|"launches payload"| node_entry
node_entry -.->|"locates kernel"| node_snitch
node_snitch -->|"uses hashing"| node_hash
node_entry -.->|"discovers slide"| node_slide
node_entry -.->|"routes exploit"| node_fops
node_entry -.->|"prepares pipe"| node_pipe
node_entry -.->|"installs root"| node_root
node_targetchain -->|"uses target profile"| node_profile
node_targetchain -.->|"delegates page work"| node_targetpage
node_targetchain -.->|"uses payload"| node_targetpayload
node_targetchain -.->|"uses ghostlock"| node_targetghost
node_entry -.->|"uses bootstrap"| node_bootstrap
node_app -->|"fetches compatibility data"| node_feed
node_root -.->|"precedes late-load"| node_ksu
node_profile -.->|"supplies target settings"| node_layout

click node_entry "https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/main.c"
click node_bootstrap "https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/preload.c"
click node_profile "https://github.com/busung-dev/root-my-galaxy-payloads/tree/main/src/targets"
click node_layout "https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/common.h"
click node_snitch "https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/kernelsnitch/kernelsnitch.h"
click node_hash "https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/kernelsnitch/futex_hash.h"
click node_offsets "https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/util.c"
click node_slide "https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/slide_app.c"
click node_fops "https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/fops.c"
click node_pipe "https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/pipe.c"
click node_root "https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/root.c"
click node_daemon "https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/su_daemon.c"
click node_targetchain "https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/targets/a53x-A536EXXSNGZG3/chain.c"
click node_targetpage "https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/targets/a53x-A536EXXSNGZG3/page.c"
click node_targetpayload "https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/targets/a53x-A536EXXSNGZG3/payload.c"
click node_targetghost "https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/targets/a53x-A536EXXSNGZG3/ghostlock.c"

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_entry,node_targetchain,node_targetpage,node_targetpayload,node_targetghost toneBlue
class node_snitch,node_hash,node_offsets,node_slide,node_fops,node_pipe toneAmber
class node_root,node_daemon,node_ksu toneMint
class node_profile,node_layout toneRose
class node_bootstrap,node_feed,node_app toneIndigo
```

## Components

### Exploit runtime

- [Exploit entry](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/main.c): `src/main.c`
- [A53 exploit chain](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/targets/a53x-A536EXXSNGZG3/chain.c): `src/targets/a53x-A536EXXSNGZG3/chain.c`
- [A53 page logic](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/targets/a53x-A536EXXSNGZG3/page.c): `src/targets/a53x-A536EXXSNGZG3/page.c`
- [A53 payload](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/targets/a53x-A536EXXSNGZG3/payload.c): `src/targets/a53x-A536EXXSNGZG3/payload.c`
- [A53 ghostlock](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/targets/a53x-A536EXXSNGZG3/ghostlock.c): `src/targets/a53x-A536EXXSNGZG3/ghostlock.c`

### Kernel access

- [KernelSnitch](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/kernelsnitch/kernelsnitch.h): `src/kernelsnitch/kernelsnitch.h`
- [Futex hashing](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/kernelsnitch/futex_hash.h): `src/kernelsnitch/futex_hash.h`
- [Address utilities](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/util.c): `src/util.c`
- [Slide discovery](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/slide_app.c): `src/slide_app.c`
- [Fops route](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/fops.c): `src/fops.c`
- [Pipe primitives](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/pipe.c): `src/pipe.c`

### Root installation

- [Android root](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/root.c): `src/root.c`
- [SU daemon](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/su_daemon.c): `src/su_daemon.c`
- **KernelSU late-load**

### Device profiles

- [Firmware profiles](https://github.com/busung-dev/root-my-galaxy-payloads/tree/main/src/targets): `src/targets`
- [Kernel layouts](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/common.h): `src/common.h`

### Payload integration

- [App bootstrap](https://github.com/busung-dev/root-my-galaxy-payloads/blob/main/src/preload.c): `src/preload.c`
- **Support feed**

### Other components

- **Android app**

## Connections

- Android app → Exploit entry: launches payload (evidence: `README.md`)
- Exploit entry → KernelSnitch: locates kernel
- KernelSnitch → Futex hashing: uses hashing (evidence: `src/kernelsnitch/kernelsnitch.h`)
- Exploit entry → Slide discovery: discovers slide
- Exploit entry → Fops route: routes exploit
- Exploit entry → Pipe primitives: prepares pipe
- Exploit entry → Android root: installs root
- A53 exploit chain → Firmware profiles: uses target profile (evidence: `src/targets/a53x-A536EXXSNGZG3/chain.c`)
- A53 exploit chain → A53 page logic: delegates page work
- A53 exploit chain → A53 payload: uses payload
- A53 exploit chain → A53 ghostlock: uses ghostlock
- Exploit entry → App bootstrap: uses bootstrap
- Android app → Support feed: fetches compatibility data (evidence: `README.md`)
- Android root → KernelSU late-load: precedes late-load (evidence: `README.md`)
- Firmware profiles → Kernel layouts: supplies target settings
