explaingit

revanced/revanced-patches-template

4,625KotlinAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

An official starting-point template for building and publishing your own collection of ReVanced patches, code that modifies Android apps like YouTube at the bytecode level to remove ads or add new features.

Mindmap

mindmap
  root((revanced-patches-template))
    What it is
      Patch collection template
      Android app modifier
      Official ReVanced scaffold
    Setup steps
      Create GitHub repo
      Fill build config
      Generate GPG key
      Update README
    How patches work
      Bytecode level changes
      No source code needed
      Sign releases with GPG
    Workflow
      dev branch testing
      main branch release
      Auto changelog
    Publishing
      Versioned releases
      Reusable patch library
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Create a new GitHub repository of ReVanced patches that removes ads from an Android app and publishes versioned releases automatically

USE CASE 2

Set up a CI/CD workflow that generates a changelog and signs releases with GPG on every merge to main

USE CASE 3

Build a patch library that other developers can add as a dependency and reuse in their own patch collections

Tech stack

KotlinGradleGitHub ActionsGPG

Getting it running

Difficulty · moderate Time to first run · 1h+

Requires generating a GPG key and adding it as a GitHub Actions secret before automated signed releases work.

Must share your source code under the same GPLv3 license if you distribute your patches.

In plain English

ReVanced is a project that creates modified versions of Android apps, most famously YouTube, to remove ads or add features that the original app does not include. This repository is a template (a starting-point project structure) for anyone who wants to create and publish their own set of ReVanced patches. A patch in this context is a piece of code that modifies an Android app without needing access to the app's original source code. Instead, it works at the bytecode level, finding and changing specific behaviors inside the compiled app file. This template provides the scaffolding so developers can write their own patches and release them as a standalone collection. Getting started involves a five-step setup: create a new GitHub repository from this template, fill in project details in the build configuration files, update dependency versions, generate a GPG signing key (used to cryptographically sign releases so users can verify they are genuine), and update the README and contribution guidelines. After that, the automated release workflow handles the rest: every push to the dev or main branch automatically creates a versioned release and generates a changelog. The template enforces a structured development process. New features are built in separate branches, then merged into a dev branch for testing, then into the main branch when ready to ship. The project uses semantic versioning (version numbers that follow a predictable pattern) and semantic commit messages (structured commit titles that indicate what kind of change was made). This allows the changelog generation to work automatically. The template also supports publishing patches as a library, so other patch collections can depend on and reuse your patches. It is written in Kotlin, licensed under GPLv3, and is the official starting point recommended by the ReVanced team.

Copy-paste prompts

Prompt 1
I forked the revanced-patches-template. Walk me through writing my first Kotlin patch that removes the fullscreen ad overlay from an Android app using bytecode modification.
Prompt 2
After setting up the revanced-patches-template, how do I generate a GPG signing key and configure the GitHub Actions workflow to sign my releases automatically?
Prompt 3
I want my ReVanced patch collection to be importable as a library by other patch projects. Show me what changes to make in the Gradle build files to publish it to a package registry.
Prompt 4
Explain the branch strategy used in the revanced-patches-template: when do I commit to feature branches vs dev vs main, and how does semantic versioning get applied automatically?
Open on GitHub → Explain another repo

← revanced on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.