revanced-cli/docs/1_usage.md
2023-08-23 03:32:39 +02:00

2.4 KiB

🛠️ Using ReVanced CLI

Learn how to ReVanced CLI.

Setup ADB

  1. Ensure that ADB is working

    adb shell exit
    

    If you want to install the patched APK file on your device by mounting it on top of the original APK file, you will need root access. This is optional.

    adb shell su -c exit
    
  2. Get the name of your device

    adb devices
    

🔨 Using ReVanced CLI

  • ⚙️ Show all available options for ReVanced CLI

    java -jar revanced-cli.jar -h
    
  • 📃 List patches from supplied patch bundles

    java -jar revanced-cli.jar list-patches \
     --with-packages \
     --with-versions \
     --with-options \
     revanced-patches.jar
    
  • ⚙️ Supply options to patches using ReVanced CLI

    Some patches provide options. Currently, ReVanced CLI will generate and consume an options.json file at the location that is specified in -o. If the option is not specified, the options file will be generated in the current working directory.

    The options file contains all options from supplied patch bundles.

    Note

    : The options.json file will be generated at the first time you use ReVanced CLI to patch an APK file for now. This will be changed in the future.

  • 💉 Use ReVanced CLI to patch an APK file but install without root permissions

    This will install the patched APK file regularly on your device.

    java -jar revanced-cli.jar patch \
     -b revanced-patches.jar \
     -o patched-output.apk \
     -d device-serial \
     input-apk
    
  • 👾 Use ReVanced CLI to patch an APK file but install with root permissions

    This will install the patched APK file on your device by mounting it on top of the original APK file.

    adb install input.apk
    java -jar revanced-cli.jar patch \
     -o patched-output.apk \
     -b revanced-patches.jar \
     -e some-patch \
     -d device-serial \
     --mount \
     input-apk
    

    Note

    : Some patches from ReVanced Patches also require ReVanced Integrations. Supply them with the option -m. ReVanced Patcher will merge ReVanced Integrations automatically, depending on if the supplied patches require them. package

  • 🗑️ Uninstall a patched

    java -jar revanced-cli.jar uninstall \
     -p package-name \
     device-serial