# mancrimson/youtube-revanced-extended architecture

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

- Interactive diagram: https://gitdiagram.com/mancrimson/youtube-revanced-extended
- Repository: https://github.com/mancrimson/youtube-revanced-extended

## Overview

This repository builds modified YouTube and YouTube Music packages across ReVanced Extended and Morphe patch sets, then distributes NonRoot APKs and Root modules. Its user-facing workflow ends with installation and update checking: the embedded Morphe updater checks patch versions and offers downloads, while root installs use the module path instead. The README also documents Obtainium profiles and automatic rebuilds. Source excerpts show updater behavior and DEX route rewriting; they do not expose the complete build orchestration, so those links are documented at a high level only.

Main entry points: [`build.sh`](https://github.com/mancrimson/youtube-revanced-extended/blob/main/build.sh) (Build orchestration), [`src/app/morphe/extension/jhc/JhcUpdateCheckPatch.java`](https://github.com/mancrimson/youtube-revanced-extended/blob/main/src/app/morphe/extension/jhc/JhcUpdateCheckPatch.java) (In-app updater), [`module/customize.sh`](https://github.com/mancrimson/youtube-revanced-extended/blob/main/module/customize.sh) (Module installation), [`module`](https://github.com/mancrimson/youtube-revanced-extended/tree/main/module) (Root modules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_build["Patch builds"]
  node_builder["Build orchestration<br/>[build.sh]"]
  node_patch_payload["Update patch payload<br/>[update-check.mpp]"]
  node_route_redirector["Route redirector"]
end

subgraph group_delivery["Package delivery"]
  node_apk["NonRoot APKs<br/>[build.sh]"]
  node_module_package["Root modules"]
end

subgraph group_updating["Update experience"]
  node_morphe_updater["In-app updater"]
end

subgraph group_root["Root installation"]
  node_module_installer["Module installation<br/>[customize.sh]"]
end

node_maintainers(("Maintainers"))
node_patchsets["Patch sets"]
node_android_user(("Android user"))
node_patch_releases["Patch releases"]
node_obtainium["Obtainium"]

node_maintainers -.->|"trigger builds"| node_builder
node_patchsets -.->|"patch apps"| node_builder
node_builder -.->|"produces APKs"| node_apk
node_builder -.->|"produces modules"| node_module_package
node_builder -.->|"embeds updater"| node_patch_payload
node_android_user -.->|"installs"| node_apk
node_android_user -.->|"installs module"| node_module_installer
node_module_installer -.->|"installs"| node_module_package
node_morphe_updater -->|"checks versions"| node_patch_releases
node_android_user -->|"checks updates"| node_morphe_updater
node_android_user -.->|"imports profile"| node_obtainium
node_obtainium -.->|"manages updates"| node_apk

click node_builder "https://github.com/mancrimson/youtube-revanced-extended/blob/main/build.sh"
click node_patch_payload "https://github.com/mancrimson/youtube-revanced-extended/blob/main/bin/update-check.mpp"
click node_route_redirector "https://github.com/mancrimson/youtube-revanced-extended/blob/main/src/app/morphe/tools/RouteRedirector.java"
click node_apk "https://github.com/mancrimson/youtube-revanced-extended/blob/main/build.sh"
click node_module_package "https://github.com/mancrimson/youtube-revanced-extended/tree/main/module"
click node_morphe_updater "https://github.com/mancrimson/youtube-revanced-extended/blob/main/src/app/morphe/extension/jhc/JhcUpdateCheckPatch.java"
click node_module_installer "https://github.com/mancrimson/youtube-revanced-extended/blob/main/module/customize.sh"

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_builder,node_patch_payload,node_route_redirector,node_android_user toneBlue
class node_apk,node_module_package toneAmber
class node_morphe_updater toneMint
class node_module_installer toneRose
class node_maintainers,node_patchsets,node_patch_releases,node_obtainium toneIndigo
```

## Components

### Patch builds

- [Build orchestration](https://github.com/mancrimson/youtube-revanced-extended/blob/main/build.sh): `build.sh`
- [Update patch payload](https://github.com/mancrimson/youtube-revanced-extended/blob/main/bin/update-check.mpp): `bin/update-check.mpp`
- [Route redirector](https://github.com/mancrimson/youtube-revanced-extended/blob/main/src/app/morphe/tools/RouteRedirector.java): `src/app/morphe/tools/RouteRedirector.java`

### Package delivery

- [NonRoot APKs](https://github.com/mancrimson/youtube-revanced-extended/blob/main/build.sh): `build.sh`
- [Root modules](https://github.com/mancrimson/youtube-revanced-extended/tree/main/module): `module`

### Update experience

- [In-app updater](https://github.com/mancrimson/youtube-revanced-extended/blob/main/src/app/morphe/extension/jhc/JhcUpdateCheckPatch.java): `src/app/morphe/extension/jhc/JhcUpdateCheckPatch.java`

### Root installation

- [Module installation](https://github.com/mancrimson/youtube-revanced-extended/blob/main/module/customize.sh): `module/customize.sh`

### Other components

- **Maintainers**
- **Patch sets**
- **Android user**
- **Patch releases**
- **Obtainium**

## Connections

- Maintainers → Build orchestration: trigger builds (evidence: `README.md`)
- Patch sets → Build orchestration: patch apps (evidence: `README.md`)
- Build orchestration → NonRoot APKs: produces APKs (evidence: `README.md`)
- Build orchestration → Root modules: produces modules (evidence: `README.md`)
- Build orchestration → Update patch payload: embeds updater (evidence: `README.md`)
- Android user → NonRoot APKs: installs (evidence: `README.md`)
- Android user → Module installation: installs module (evidence: `README.md`)
- Module installation → Root modules: installs (evidence: `README.md`)
- In-app updater → Patch releases: checks versions (evidence: `src/app/morphe/extension/jhc/JhcUpdateCheckPatch.java`)
- Android user → In-app updater: checks updates (evidence: `src/app/morphe/extension/jhc/JhcUpdateCheckPatch.java`)
- Android user → Obtainium: imports profile (evidence: `README.md`)
- Obtainium → NonRoot APKs: manages updates (evidence: `README.md`)
