# corentin-c/spotifyautopatcher architecture

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

- Interactive diagram: https://gitdiagram.com/corentin-c/spotifyautopatcher
- Repository: https://github.com/corentin-c/spotifyautopatcher

## Overview

Spotify Auto Patcher is an Android app for patching installed Spotify or YouTube Music packages, rather than a general-purpose patching tool. The documented flow is: choose a supported app, extract its installed APK, retrieve current ReVanced patches, apply them and rebuild the APK, then optionally uninstall the store version, install the patched APK, or save it. The README establishes these product stages; source excerpts are limited, so implementation-level links are not asserted beyond those documented relationships.

Main entry points: [`app/src/main/java/com/corentinc/screens/patcher/ui/autoPatcher/PatcherViewModel.kt`](https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/screens/patcher/ui/autoPatcher/PatcherViewModel.kt) (Patcher workflow), [`app/src/main/java/com/abdurazaaqmohammed/AntiSplit/main/mainActivity/MainActivity.kt`](https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/abdurazaaqmohammed/AntiSplit/main/mainActivity/MainActivity.kt) (Split extraction), [`app/src/main/java/com/corentinc/screens/patcher/ui/choice/ApplicationChoice.kt`](https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/screens/patcher/ui/choice/ApplicationChoice.kt) (App choice), [`app/src/main/java/com/corentinc/screens/patcher/ui/autoPatcher/AutoPatcherScreen.kt`](https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/screens/patcher/ui/autoPatcher/AutoPatcherScreen.kt) (Patcher screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["App interaction"]
  node_app_choice["App choice"]
  node_patch_screen["Patcher screen"]
  node_patch_viewmodel["Patcher workflow"]
end

subgraph group_acquisition["APK acquisition"]
  node_installed_app["Installed app"]
  node_anti_split["Split extraction<br/>[MainActivity.kt]"]
  node_app_info["App metadata<br/>[AppInfo.java]"]
end

subgraph group_patching["Patch and rebuild"]
  node_patcher["ReVanced patcher<br/>[ReVancedPatcher.kt]"]
  node_patch_catalog["Patch information"]
  node_patch_download["Patch downloader<br/>[UrlDownloader.kt]"]
  node_apk_module["APK module"]
  node_apk_editor["APK rebuild<br/>[Builder.java]"]
end

subgraph group_delivery["Install and export"]
  node_output_apk["Patched APK"]
  node_installer["Package installer<br/>[AppInstaller.kt]"]
  node_updater["Existing app removal<br/>[AppUpdater.kt]"]
  node_downloads["Downloads folder"]
end

node_user(("User"))

node_user -->|"chooses app"| node_app_choice
node_app_choice -->|"starts patching"| node_patch_screen
node_patch_screen -.->|"runs workflow"| node_patch_viewmodel
node_patch_viewmodel -->|"extracts APK"| node_anti_split
node_installed_app -->|"provides installed APK"| node_anti_split
node_anti_split -.->|"uses app details"| node_app_info
node_patch_viewmodel -->|"retrieves patches"| node_patch_download
node_patch_download -.->|"downloads patch set"| node_patch_catalog
node_patch_viewmodel -->|"applies patches"| node_patcher
node_patcher -.->|"patches APK"| node_apk_module
node_patch_viewmodel -->|"rebuilds APK"| node_apk_editor
node_apk_editor -->|"produces APK"| node_output_apk
node_user -->|"requests install"| node_installer
node_installer -->|"installs APK"| node_output_apk
node_user -->|"requests uninstall"| node_updater
node_updater -->|"uninstalls store app"| node_installed_app
node_user -->|"saves APK"| node_downloads
node_output_apk -->|"exports APK"| node_downloads

click node_app_choice "https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/screens/patcher/ui/choice/ApplicationChoice.kt"
click node_patch_screen "https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/screens/patcher/ui/autoPatcher/AutoPatcherScreen.kt"
click node_patch_viewmodel "https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/screens/patcher/ui/autoPatcher/PatcherViewModel.kt"
click node_anti_split "https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/abdurazaaqmohammed/AntiSplit/main/mainActivity/MainActivity.kt"
click node_app_info "https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/abdurazaaqmohammed/AntiSplit/main/AppInfo.java"
click node_patcher "https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/patcher/ReVancedPatcher.kt"
click node_patch_catalog "https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/patcher/ReVancedPatchesInfo.kt"
click node_patch_download "https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/patcher/UrlDownloader.kt"
click node_apk_editor "https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/reandroid/apkeditor/compile/Builder.java"
click node_installer "https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/patcher/AppInstaller.kt"
click node_updater "https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/patcher/AppUpdater.kt"

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_app_choice,node_patch_screen,node_patch_viewmodel,node_user toneBlue
class node_installed_app,node_anti_split,node_app_info toneAmber
class node_patcher,node_patch_catalog,node_patch_download,node_apk_module,node_apk_editor toneMint
class node_output_apk,node_installer,node_updater,node_downloads toneRose
```

## Components

### App interaction

- [App choice](https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/screens/patcher/ui/choice/ApplicationChoice.kt): `app/src/main/java/com/corentinc/screens/patcher/ui/choice/ApplicationChoice.kt`
- [Patcher screen](https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/screens/patcher/ui/autoPatcher/AutoPatcherScreen.kt): `app/src/main/java/com/corentinc/screens/patcher/ui/autoPatcher/AutoPatcherScreen.kt`
- [Patcher workflow](https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/screens/patcher/ui/autoPatcher/PatcherViewModel.kt): `app/src/main/java/com/corentinc/screens/patcher/ui/autoPatcher/PatcherViewModel.kt`

### APK acquisition

- **Installed app**
- [Split extraction](https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/abdurazaaqmohammed/AntiSplit/main/mainActivity/MainActivity.kt): `app/src/main/java/com/abdurazaaqmohammed/AntiSplit/main/mainActivity/MainActivity.kt`
- [App metadata](https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/abdurazaaqmohammed/AntiSplit/main/AppInfo.java): `app/src/main/java/com/abdurazaaqmohammed/AntiSplit/main/AppInfo.java`

### Patch and rebuild

- [ReVanced patcher](https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/patcher/ReVancedPatcher.kt): `app/src/main/java/com/corentinc/patcher/ReVancedPatcher.kt`
- [Patch information](https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/patcher/ReVancedPatchesInfo.kt): `app/src/main/java/com/corentinc/patcher/ReVancedPatchesInfo.kt`
- [Patch downloader](https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/patcher/UrlDownloader.kt): `app/src/main/java/com/corentinc/patcher/UrlDownloader.kt`
- **APK module**
- [APK rebuild](https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/reandroid/apkeditor/compile/Builder.java): `app/src/main/java/com/reandroid/apkeditor/compile/Builder.java`

### Install and export

- **Patched APK**
- [Package installer](https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/patcher/AppInstaller.kt): `app/src/main/java/com/corentinc/patcher/AppInstaller.kt`
- [Existing app removal](https://github.com/corentin-c/spotifyautopatcher/blob/develop/app/src/main/java/com/corentinc/patcher/AppUpdater.kt): `app/src/main/java/com/corentinc/patcher/AppUpdater.kt`
- **Downloads folder**

### Other components

- **User**

## Connections

- User → App choice: chooses app (evidence: `README.md`)
- App choice → Patcher screen: starts patching (evidence: `README.md`)
- Patcher screen → Patcher workflow: runs workflow
- Patcher workflow → Split extraction: extracts APK (evidence: `README.md`)
- Installed app → Split extraction: provides installed APK (evidence: `README.md`)
- Split extraction → App metadata: uses app details
- Patcher workflow → Patch downloader: retrieves patches (evidence: `README.md`)
- Patch downloader → Patch information: downloads patch set
- Patcher workflow → ReVanced patcher: applies patches (evidence: `README.md`)
- ReVanced patcher → APK module: patches APK
- Patcher workflow → APK rebuild: rebuilds APK (evidence: `README.md`)
- APK rebuild → Patched APK: produces APK (evidence: `README.md`)
- User → Package installer: requests install (evidence: `README.md`)
- Package installer → Patched APK: installs APK (evidence: `README.md`)
- User → Existing app removal: requests uninstall (evidence: `README.md`)
- Existing app removal → Installed app: uninstalls store app (evidence: `README.md`)
- User → Downloads folder: saves APK (evidence: `README.md`)
- Patched APK → Downloads folder: exports APK (evidence: `README.md`)
