revanced-cli/docs/1_usage.md

75 lines
1.8 KiB
Markdown
Raw Normal View History

# 🛠️ Using ReVanced CLI
2023-01-08 14:37:10 +01:00
Learn how to ReVanced CLI.
2023-01-08 14:37:10 +01:00
2023-01-09 10:11:15 +01:00
## ⚡ Setup (optional)
2023-01-08 14:37:10 +01:00
1. Make sure your device is connected
```bash
adb shell exit
```
If you plan to use the root variant, check if you have root access
```bash
adb shell su -c exit
```
2. Copy the ADB device name
```bash
adb devices
```
## 🔨 ReVanced CLI Usage
- ### Show all available options for ReVanced CLI
2023-01-08 14:37:10 +01:00
```bash
java -jar revanced-cli.jar -h
```
2023-01-09 10:11:15 +01:00
- ### List all available patches from supplied patch bundles
2023-01-08 14:37:10 +01:00
```bash
java -jar revanced-cli.jar \
-b revanced-patches.jar \
-l
```
- ### Use ReVanced CLI without root permissions
2023-01-08 14:37:10 +01:00
```bash
java -jar revanced-cli.jar \
-a input.apk \
2023-03-05 02:05:40 +01:00
-o patched-output.apk \
2023-01-08 14:37:10 +01:00
-b revanced-patches.jar
```
- ### Mount the patched application with root permissions over the installed application
```bash
2023-01-13 00:13:45 +01:00
adb install input.apk # make sure the same version is installed
2023-01-08 14:37:10 +01:00
java -jar revanced-cli.jar \
-a input.apk \
-d device-name \
-o patched-output.apk \
-b revanced-patches.jar \
-e vanced-microg-support \
2023-01-08 14:37:10 +01:00
--mount
```
> **Note**:
>
> - If you want to exclude patches, you can use the option `-e`. In the case of YouTube, you can exclude
the `vanced-microg-support` patch from [ReVanced Patches](https://github.com/revanced/revanced-patches) with the
option `-e vanced-microg-support` when mounting for example.
2023-01-08 14:37:10 +01:00
>
2023-01-09 10:11:15 +01:00
> - Some patches from [ReVanced Patches](https://github.com/revanced/revanced-patches) also might require
[ReVanced Integrations](https://github.com/revanced/revanced-integrations). Supply them with the option `-m`.
> The integrations will be merged, if necessary automatically, if supplied.
2023-01-08 14:37:10 +01:00
>
> - If you supplied a device with the option `-d`, the patched application will be automatically installed on the
device.