Skip to content

Instantly share code, notes, and snippets.

@akshay-abraham
Last active August 21, 2026 14:23
Show Gist options
  • Select an option

  • Save akshay-abraham/3c9c0118b232811d367d24444d219b06 to your computer and use it in GitHub Desktop.

Select an option

Save akshay-abraham/3c9c0118b232811d367d24444d219b06 to your computer and use it in GitHub Desktop.

ReVanced CLI Guide

Important

Looking for the Morphe version?

If you're starting from scratch or considering switching, I've also written a beginner-friendly Morphe CLI guide.

Morphe has a simpler CLI workflow, supports newer app versions and patches, and is updated frequently.

Guide: https://gist.github.com/akshay-abraham/01d63dc1911a8879943d781efd04ddfe

The official ReVanced Manager app tends to fail on lower-end phones. If that's happened to you, this guide walks you through patching APKs on your PC instead, using only official sources.

Warning

Please don't install pre-patched APKs from random websites. Some sources might be fine today, but you genuinely can't tell who built that APK, what's in it, or what a future update might quietly add to it. The risk isn't worth it — patching it yourself takes maybe 10 extra minutes, and you'll know exactly what you're installing.


Prerequisites

You'll need a few things set up on your PC (or any device that supports JRE) before starting:

  • Java Runtime Environment (JRE) — the CLI tool runs on Java, so this is required

Tip

Check if Java is already installed before doing anything else. Open PowerShell (Windows) or your terminal (Linux/macOS) and run:

java -version

If you see an OpenJDK version printed out, you're good to skip Step 0 — most Linux distros come with Java pre-installed.

Step 0: Install Java
Windows

Download and install Eclipse Temurin. During installation, check the box for "Add to PATH" so your terminal can find it.

Linux:

Ubuntu / Debian / Mint / Pop!_OS / Elementary / Zorin:

sudo apt install openjdk-21-jre

Fedora:

sudo dnf install java-21-openjdk

Arch / CachyOS / EndeavourOS / Manjaro:

sudo pacman -S jre-openjdk

Step 1: Download the ReVanced CLI

Head over to the ReVanced CLI releases page and grab the $\large\textcolor{orange}{\textsf{latest}}$ .jar file.

Create a new folder somewhere easy to find (revanced on your Desktop works fine), drop the file in there, and rename it to: revanced-cli.jar

Now open a terminal inside that folder:

  • Linux / macOS: Right-click the folder and choose Open Terminal Here, or just cd into it
  • Windows: Open the folder in File Explorer, right-click on an empty spot, and select Open in PowerShell

To confirm you're in the right place, run the command for your OS:

Linux / macOS

pwd && ls

Windows PowerShell

pwd; dir

You should see revanced-cli.jar in the output. If you do, you're in the right place and ready to continue.


Step 2: Download the Patch Bundle

The patch bundle is a .rvp file that tells the CLI what patches are available and which apps they support.

Note

This file is downloaded directly from the official ReVanced API — the exact same endpoint the ReVanced Manager app on Android uses to fetch patches. The ReVanced GitHub repo is currently unavailable and the GitLab mirror only has source code releases, so this API is the officially recommended source for the latest patch bundle.

Open this URL in your browser and it'll download automatically. Move the downloaded file into the same folder as revanced-cli.jar and make sure it's named patches.rvp:

https://api.revanced.app/v5/patches.rvp

Step 3: Find the Right APK Version

You can't patch just any version of an app — patches are built for specific versions, so you need to find out which one to download. Run the relevant command below and note down the latest version supported.

Note

Windows PowerShell users: Use .\revanced-cli.jar instead of revanced-cli.jar in all commands. PowerShell requires the explicit .\ prefix to find files in the current folder.

YouTube

Linux / macOS:

java -jar revanced-cli.jar list-versions -p patches.rvp -b | grep -A20 "com.google.android.youtube"

Windows PowerShell:

java -jar .\revanced-cli.jar list-versions -p .\patches.rvp -b

YouTube Music

Linux / macOS:

java -jar revanced-cli.jar list-versions -p patches.rvp -b | grep -A20 "com.google.android.apps.youtube.music"

Windows PowerShell:

java -jar .\revanced-cli.jar list-versions -p .\patches.rvp -b

Tip

On Windows, the command above dumps everything — just scroll through and find your app manually using these package names:

App Package Name
YouTube com.google.android.youtube
YouTube Music com.google.android.apps.youtube.music

Step 4: Download the APK

Go to APKMirror and search for the app along with the version number you just noted — for example: YouTube 20.14.43.

Before downloading, pick the right file for your phone's CPU architecture:

Architecture Who it's for
armeabi-v7a (32-bit) Older and budget phones, usually with 4 GB RAM or less
arm64-v8a (64-bit) Most phones made in the last few years

Tip

Not sure which architecture your phone uses? Install the CPU-Z app from the Play Store.

Warning

You might see an option to download an "APK bundle" on APKMirror or similar platforms. Skip that — stick to the plain .apk file for your architecture.

Once downloaded, move the APK into the folder you've been working in and rename it:

App Rename to
YouTube youtube-latest.apk
YouTube Music yt-music-latest.apk
Any other app Anything short and easy to remember

Step 5: Patch the APK

YouTube

Linux / macOS:

java -jar revanced-cli.jar patch -p patches.rvp -b -o Patched-YouTube.apk youtube-latest.apk

Windows PowerShell:

java -jar .\revanced-cli.jar patch -p .\patches.rvp -b -o Patched-YouTube.apk .\youtube-latest.apk

YouTube Music

Linux / macOS:

java -jar revanced-cli.jar patch -p patches.rvp -b -o Patched-YTMusic.apk yt-music-latest.apk

Windows PowerShell:

java -jar .\revanced-cli.jar patch -p .\patches.rvp -b -o Patched-YTMusic.apk .\yt-music-latest.apk

Any other app (swap APK_NAME.apk for whatever you named your downloaded file):

Linux / macOS:

java -jar revanced-cli.jar patch -p patches.rvp -b -o Patched.apk APK_NAME.apk

Windows PowerShell:

java -jar .\revanced-cli.jar patch -p .\patches.rvp -b -o Patched.apk .\APK_NAME.apk

Step 6: Install GmsCore (MicroG)

GmsCore is a free, open-source replacement for Google Play Services. It's required for any Google-related app patches to work — including YouTube and YouTube Music. Without it, the patched apps simply won't function properly.

Tip

We're using the version maintained by the ReVanced team themselves, so you know it's legit.

  1. Download the latest release from the ReVanced GmsCore releases page
  2. Transfer it to your phone and install it (see Step 7 below if you hit an "Install blocked" error)
  3. Open GmsCore and sign in with your Google account

Step 7: Install the Patched APK

Transfer the patched APK (for example, Patched-YouTube.apk) to your phone however you like, then open it with a file manager and tap Install.

Important

Getting an "Install blocked" or "Unknown source" message? This just means your phone needs permission to install apps from outside the Play Store:

  1. In the error dialog, tap Settings or Allow from this source
  2. Turn on the "Install unknown apps" permission for whichever app you used to open the APK (your file manager, browser, etc.)
  3. Go back and tap Install again

Troubleshooting

See all supported app versions:

Linux / macOS:

java -jar revanced-cli.jar list-versions -p patches.rvp -b

Windows PowerShell:

java -jar .\revanced-cli.jar list-versions -p .\patches.rvp -b

See all available patches:

Linux / macOS:

java -jar revanced-cli.jar list-patches -p patches.rvp -b

Windows PowerShell:

java -jar .\revanced-cli.jar list-patches -p .\patches.rvp -b

Force patching an unsupported version:

If the exact version you need isn't available on APKMirror, you can try forcing the patch with the -f flag. It doesn't always work perfectly, but it's worth a shot.

Linux / macOS:

java -jar revanced-cli.jar patch -f -p patches.rvp -b -o Patched-YouTube.apk youtube-latest.apk

Windows PowerShell:

java -jar .\revanced-cli.jar patch -f -p .\patches.rvp -b -o Patched-YouTube.apk .\youtube-latest.apk

Written for beginners. If something's unclear or out of date, feel free to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment