docs: add section for patch options

This commit is contained in:
oSumAtrIX 2023-06-30 19:40:52 +02:00
parent 26112a4fd2
commit 542580ecff
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
2 changed files with 36 additions and 34 deletions

View File

@ -4,12 +4,12 @@ To use ReVanced CLI, you will need to fulfill certain requirements.
## 🤝 Requirements
- Java SDK 11 (Azul JDK or OpenJDK)
- [Android Debug Bridge (adb)](https://developer.android.com/studio/command-line/adb) if you want to deploy the patched APK file on your device
- An ABI other than ARMv7 such as x86 or x86-64 (or a custom AAPT binary that supports ARMv7)
- Java SDK 17 or higher (Azul JDK or OpenJDK)
## ⏭️ Whats next
The next section will show, how to use [ReVanced CLI](https://github.com/revanced/revanced-cli).
Continue: [🛠️ Using ReVanced CLI](1_usage.md)
Continue: [🛠️ Using ReVanced CLI](1_usage.md)

View File

@ -2,73 +2,75 @@
Learn how to ReVanced CLI.
## ⚡ Setup (optional)
## ⚡ Setup ADB
1. Make sure your device is connected
1. Ensure that ADB is working
```bash
adb shell exit
```
If you plan to use the root variant, check if you have root access
If you want to deploy 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.
```bash
adb shell su -c exit
```
2. Copy the ADB device name
2. Get the name of your device
```bash
adb devices
```
## 🔨 ReVanced CLI Usage
## 🔨 Using ReVanced CLI
- ### Show all available options for ReVanced CLI
- ### ⚙️ Show all available options for ReVanced CLI
```bash
java -jar revanced-cli.jar -h
```
- ### List all available patches from supplied patch bundles
- ### 📃 List all available patches from supplied patch bundles
```bash
java -jar revanced-cli.jar \
-b revanced-patches.jar \
-l
java -jar revanced-cli.jar
-b revanced-patches.jar \
-l
```
- ### Use ReVanced CLI without root permissions
- ### 💉 Use ReVanced CLI to patch an APK file but deploy without root permissions
This will deploy the patched APK file on your device by installing it.
```bash
java -jar revanced-cli.jar \
-a input.apk \
-o patched-output.apk \
-b revanced-patches.jar
-b revanced-patches.jar \
-d device-name
```
- ### Mount the patched application with root permissions over the installed application
- ### 👾 Use ReVanced CLI to patch an APK file but deploy with root permissions
This will deploy the patched APK file on your device by mounting it on top of the original APK file.
```bash
adb install input.apk # make sure the same version is installed
adb install input.apk
java -jar revanced-cli.jar \
-a input.apk \
-d device-name \
-o patched-output.apk \
-b revanced-patches.jar \
-e vanced-microg-support \
--mount
-a input.apk \
-o patched-output.apk \
-b revanced-patches.jar \
-e vanced-microg-support \
-d device-name \
--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.
>
> - 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.
>
> - If you supplied a device with the option `-d`, the patched application will be automatically installed on the
device.
> **Note**: Some patches from [ReVanced Patches](https://github.com/revanced/revanced-patches) also require [ReVanced Integrations](https://github.com/revanced/revanced-integrations). Supply them with the option `-m`. ReVanced Patcher will merge ReVanced Integrations automatically, depending on if the supplied patches require them.
- ### ⚙️ 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.