Method 1. Using ReVanced CLI (PC) - YT-Advanced/revanced-documentation GitHub Wiki

Downloading the packages

Using ReVanced CLI (PC)

For Root users

  1. Make sure your phone is connected
adb shell exit
  1. Check if you have root access
adb shell su -c exit
  1. Copy the ADB device name
adb devices
  1. Install youtube (or youtube music) on your device first.
adb install -r youtube.apk
adb install -r youtube-music.apk
  1. Run the CLI
# Root
# For YouTube, use the option '--rip-lib' to remove the architecture (e.g. --rip-lib=x86 --rip-lib=x86_64 ...)
# In the case of YouTube you want to exlude the patch 'microg-support' with the option '--exclude'.
# The option '--exclude' allows you to exclude patches (e.g. --exclude microg-support --exclude theme ...).
# The option '--include' allows you to include patches (e.g. --include materialyou ...)

java -jar revanced-cli.jar patch \
 --patch-bundle ReX-patches.jar \
 --exclude microg-support \
 --out output.apk \
 --device-serial <device-serial> \
 --mount \
 youtube.apk

For Non-Root users

  1. Make sure your phone is connected
adb shell exit
  1. Run the CLI
# Non-Root
# For YouTube, use the option '--rip-lib' to remove the architecture (e.g. --rip-lib=x86 --rip-lib=x86_64 ...)
java -jar revanced-cli.jar patch \
 --patch-bundle ReX-patches.jar \
 --out output.apk \
 --device-serial <device-serial> \
 input.apk

If you need the list of patches available, use this command.

java -jar revanced-cli.jar list-patches \
 --with-packages \
 --with-versions \
 --with-options \
 revanced-patches.jar