2023-05-08 01:20:20 +02:00
|
|
|
|
# 🛠️ Using ReVanced CLI
|
2023-01-08 14:37:10 +01:00
|
|
|
|
|
2024-01-12 11:45:39 +01:00
|
|
|
|
Learn how to use ReVanced CLI.
|
2023-01-08 14:37:10 +01:00
|
|
|
|
|
2023-10-10 01:07:11 +02:00
|
|
|
|
## 🔨 Usage
|
2023-01-08 14:37:10 +01:00
|
|
|
|
|
2023-10-10 01:07:11 +02:00
|
|
|
|
ReVanced CLI is divided into the following fundamental commands:
|
2023-01-08 14:37:10 +01:00
|
|
|
|
|
2023-10-10 01:10:55 +02:00
|
|
|
|
- ### 🚀 Show all available options for ReVanced CLI
|
2023-01-08 14:37:10 +01:00
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
java -jar revanced-cli.jar -h
|
|
|
|
|
```
|
|
|
|
|
|
2023-10-10 01:07:11 +02:00
|
|
|
|
- ### 📃 List patches
|
2023-01-08 14:37:10 +01:00
|
|
|
|
|
|
|
|
|
```bash
|
2023-08-23 03:08:21 +02:00
|
|
|
|
java -jar revanced-cli.jar list-patches \
|
2023-08-22 22:59:32 +02:00
|
|
|
|
--with-packages \
|
|
|
|
|
--with-versions \
|
|
|
|
|
--with-options \
|
2023-08-23 03:53:24 +02:00
|
|
|
|
revanced-patches.jar [<patch-bundle> ...]
|
2023-01-08 14:37:10 +01:00
|
|
|
|
```
|
|
|
|
|
|
2023-10-10 01:07:11 +02:00
|
|
|
|
- ### ⚙️ Generate options
|
2023-08-23 03:35:38 +02:00
|
|
|
|
|
2023-08-23 03:53:24 +02:00
|
|
|
|
This will generate an `options.json` file for the patches from a list of supplied patch bundles.
|
|
|
|
|
The file can be supplied to ReVanced CLI later on.
|
2023-08-23 03:35:38 +02:00
|
|
|
|
|
2023-10-07 01:14:12 +02:00
|
|
|
|
```bash
|
2023-08-23 03:35:38 +02:00
|
|
|
|
java -jar revanced-cli.jar options \
|
2023-08-23 03:53:24 +02:00
|
|
|
|
--path options.json \
|
2023-08-23 03:35:38 +02:00
|
|
|
|
--overwrite \
|
2023-08-23 03:53:24 +02:00
|
|
|
|
revanced-patches.jar [<patch-bundle> ...]
|
2023-08-23 03:35:38 +02:00
|
|
|
|
```
|
2023-08-22 23:35:02 +02:00
|
|
|
|
|
2024-02-04 18:35:41 +01:00
|
|
|
|
> **ℹ️ Note**
|
|
|
|
|
> A default `options.json` file will be automatically created if it does not exist
|
|
|
|
|
without any need for intervention when using the `patch` command.
|
2023-08-22 23:35:02 +02:00
|
|
|
|
|
2023-10-10 01:09:08 +02:00
|
|
|
|
- ### 💉 Patch an app
|
2023-10-10 01:07:11 +02:00
|
|
|
|
|
2023-10-10 01:09:08 +02:00
|
|
|
|
You can patch apps by supplying patch bundles and the app to patch.
|
2023-10-10 01:07:11 +02:00
|
|
|
|
After patching, ReVanced CLI can install the patched app on your device using two methods:
|
2024-02-04 18:35:41 +01:00
|
|
|
|
|
|
|
|
|
> **💡 Tip**
|
|
|
|
|
> For ReVanced CLI to be able to install the patched app on your device, make sure ADB is working:
|
|
|
|
|
>
|
|
|
|
|
> ```bash
|
|
|
|
|
> adb shell exit
|
|
|
|
|
> ```
|
|
|
|
|
>
|
|
|
|
|
> If you want to mount the patched app on top of the un-patched app, make sure you have root permissions:
|
|
|
|
|
>
|
|
|
|
|
> ```bash
|
|
|
|
|
> adb shell su -c exit
|
|
|
|
|
> ```
|
|
|
|
|
>
|
2023-10-10 01:07:11 +02:00
|
|
|
|
|
2024-02-04 18:35:41 +01:00
|
|
|
|
> **⚠️ Warning**
|
|
|
|
|
> Some patches may require integrations
|
|
|
|
|
> such as [ReVanced Integrations](https://github.com/revanced/revanced-integrations).
|
|
|
|
|
> Supply them with the option `--merge`. ReVanced Patcher will automatically determine if they are necessary.
|
2023-10-10 01:08:17 +02:00
|
|
|
|
|
2023-10-10 01:07:11 +02:00
|
|
|
|
- #### 👾 Patch an app and install it on your device regularly
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
java -jar revanced-cli.jar patch \
|
|
|
|
|
--patch-bundle revanced-patches.jar \
|
2024-01-12 09:42:05 +01:00
|
|
|
|
-d \
|
2023-10-10 01:07:11 +02:00
|
|
|
|
input.apk
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
- #### 👾 Patch an app and mount it on top of the un-patched app with root permissions
|
|
|
|
|
|
2024-02-04 18:35:41 +01:00
|
|
|
|
> **❗ Caution**
|
|
|
|
|
> Ensure that the same app you are patching and mounting over is installed on your device:
|
|
|
|
|
>
|
|
|
|
|
> ```bash
|
|
|
|
|
> adb install app.apk
|
|
|
|
|
> ```
|
2023-11-03 02:00:00 +01:00
|
|
|
|
|
2023-10-10 01:07:11 +02:00
|
|
|
|
```bash
|
|
|
|
|
java -jar revanced-cli.jar patch \
|
|
|
|
|
--patch-bundle revanced-patches.jar \
|
|
|
|
|
--include "Some patch" \
|
2023-11-03 02:00:00 +01:00
|
|
|
|
--ii 123 \
|
2023-10-10 01:07:11 +02:00
|
|
|
|
--exclude "Some other patch" \
|
2024-01-12 09:42:05 +01:00
|
|
|
|
-d \
|
2023-10-10 01:07:11 +02:00
|
|
|
|
--mount \
|
|
|
|
|
app.apk
|
|
|
|
|
```
|
2024-02-04 18:35:41 +01:00
|
|
|
|
|
|
|
|
|
> **💡 Tip**
|
|
|
|
|
> You can use the option `--ii` to include or `--ie` to exclude
|
|
|
|
|
> patches by their index in relation to supplied patch bundles,
|
|
|
|
|
> similarly to the option `--include` and `--exclude`.
|
|
|
|
|
>
|
|
|
|
|
> This is useful in case two patches have the same name, and you must include or exclude one.
|
|
|
|
|
> The patch index is calculated by the position of the patch in the list of patches
|
|
|
|
|
> from patch bundles supplied using the option `--patch-bundle`.
|
|
|
|
|
>
|
|
|
|
|
> You can list all patches with their indices using the command `list-patches`.
|
|
|
|
|
>
|
|
|
|
|
> Keep in mind that the indices can change based on the order of the patch bundles supplied,
|
|
|
|
|
> as well if the patch bundles are updated because patches can be added or removed.
|
2023-10-10 01:07:11 +02:00
|
|
|
|
|
|
|
|
|
- ### 🗑️ Uninstall an app
|
2023-06-30 19:40:52 +02:00
|
|
|
|
|
2023-08-22 23:35:02 +02:00
|
|
|
|
```bash
|
2023-08-24 16:50:10 +02:00
|
|
|
|
java -jar revanced-cli.jar utility uninstall \
|
2023-08-23 03:53:24 +02:00
|
|
|
|
--package-name <package-name> \
|
2023-11-26 05:55:49 +01:00
|
|
|
|
[<device-serial>]
|
2023-08-22 23:35:02 +02:00
|
|
|
|
```
|
2023-08-24 16:50:10 +02:00
|
|
|
|
|
2024-02-04 18:35:41 +01:00
|
|
|
|
> **💡 Tip**
|
|
|
|
|
> You can unmount an APK file
|
|
|
|
|
by adding the option `--unmount`.
|
2023-08-24 16:50:10 +02:00
|
|
|
|
|
2023-10-10 01:10:55 +02:00
|
|
|
|
- ### ️ 📦 Install an app
|
2023-08-24 16:50:10 +02:00
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
java -jar revanced-cli.jar utility install \
|
|
|
|
|
-a input.apk \
|
2023-11-26 05:55:49 +01:00
|
|
|
|
[<device-serial>]
|
2023-08-24 16:50:10 +02:00
|
|
|
|
```
|
|
|
|
|
|
2024-02-04 18:35:41 +01:00
|
|
|
|
> **💡 Tip**
|
|
|
|
|
> You can mount an APK file
|
|
|
|
|
> by supplying the app's package name to mount the supplied APK file over the option `-mount`.
|