Skip to content

Using the ReVanced CLI and installing ReVanced

Robert edited this page Jul 20, 2022 · 20 revisions

Using the CLI

  1. Make sure your phone is connected
adb shell exit
  1. If you plan to use the root variant, check if you have root access
adb shell su -c exit
  1. Copy the ADB device name
adb devices
  1. Run the CLI
Arguments Description Example
-a <stockapk> / --apk <stockapk> The stock app you want to patch -a youtube.apk
-o <patchedapk> / --out <patchedapk> Where to save the patched apk -o revanced.apk
-b <patchbundles> / --bundles <patchbundles> Include one or more patch bundles -b patches.jar -b additional-patches.jar
-m <mergefile> / --merge <mergefile> Merge one or more files which are required by some patches -m integrations.apk
-d <device-id> / --deploy-on <device-id> Install the patched apk to the specified ADB device -d <device-id>
--mount Mount the patched apk on top of the stock apk instead of installing it. Requires root and the same version to be installed on the device --mount
-l / --list List all available patches -l
-e <patchname> / --exclude <patchname> Exclude one or more patches. To install the root version you need to exclude the microg-support patch -e microg-support -e custom-branding
-i <patchname> / --include <patchname> Include one or more patches -i force-vp9-codec -i autorepeat-by-default
--uninstall Uninstall the mount variant --uninstall
--experimental Skip patch compatibility check --experimental
-c / --clean Remove cache directory & patched apk after patching -c
-h / --help List all arguments, not all arguments are listed here -h

Example commands

Non-root

Patch stock.apk and install it to <device-id>

java -jar revanced-cli.jar -a stock.apk -o revanced.apk -b revanced-patches.jar -m integrations.apk -d <device-id> -c

Root

Root variant requires you to exclude the microg-support patch.
Patch stock.apk, exclude the microg-support patch and mount the apk on <device-id>

java -jar revanced-cli.jar -a stock.apk -o revanced.apk -b revanced-patches.jar -e microg-support -m integrations.apk -d <device-id> --mount -c

If you specified an ADB device the application should now open on your device and the CLI will show logs until the app is closed.

If you encounter any issues please look at the common issues before asking questions.

Clone this wiki locally