mirror of
https://github.com/revanced/revanced-cli.git
synced 2024-12-04 17:32:53 +01:00
docs: Improve structural integrity
This commit is contained in:
parent
f48da18e37
commit
495735f44c
126
docs/1_usage.md
126
docs/1_usage.md
@ -2,28 +2,9 @@
|
|||||||
|
|
||||||
Learn how to ReVanced CLI.
|
Learn how to ReVanced CLI.
|
||||||
|
|
||||||
## ⚡ Setup ADB
|
## 🔨 Usage
|
||||||
|
|
||||||
1. Ensure that ADB is working
|
ReVanced CLI is divided into the following fundamental commands:
|
||||||
|
|
||||||
```bash
|
|
||||||
adb shell exit
|
|
||||||
```
|
|
||||||
|
|
||||||
Optionally, you can install the patched APK file on your device by mounting it on top of the original APK file.
|
|
||||||
You will need root permissions for this. Check if you have root permissions by running the following command:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
adb shell su -c exit
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Get your device's serial
|
|
||||||
|
|
||||||
```bash
|
|
||||||
adb devices
|
|
||||||
```
|
|
||||||
|
|
||||||
## 🔨 Using ReVanced CLI
|
|
||||||
|
|
||||||
- ### ⚙️ Show all available options for ReVanced CLI
|
- ### ⚙️ Show all available options for ReVanced CLI
|
||||||
|
|
||||||
@ -31,7 +12,7 @@ Learn how to ReVanced CLI.
|
|||||||
java -jar revanced-cli.jar -h
|
java -jar revanced-cli.jar -h
|
||||||
```
|
```
|
||||||
|
|
||||||
- ### 📃 List patches from supplied patch bundles
|
- ### 📃 List patches
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
java -jar revanced-cli.jar list-patches \
|
java -jar revanced-cli.jar list-patches \
|
||||||
@ -41,7 +22,7 @@ Learn how to ReVanced CLI.
|
|||||||
revanced-patches.jar [<patch-bundle> ...]
|
revanced-patches.jar [<patch-bundle> ...]
|
||||||
```
|
```
|
||||||
|
|
||||||
- ### ⚙️ Generate options from patches using ReVanced CLI
|
- ### ⚙️ Generate options
|
||||||
|
|
||||||
This will generate an `options.json` file for the patches from a list of supplied patch bundles.
|
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.
|
The file can be supplied to ReVanced CLI later on.
|
||||||
@ -53,53 +34,85 @@ Learn how to ReVanced CLI.
|
|||||||
revanced-patches.jar [<patch-bundle> ...]
|
revanced-patches.jar [<patch-bundle> ...]
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note**: A default `options.json` file will be automatically generated, if it does not exist
|
> [!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.
|
without any need for intervention when using the `patch` command.
|
||||||
|
|
||||||
- ### 💉 Use ReVanced CLI to patch an APK file but install without root permissions
|
- ### 💉 Patch apps
|
||||||
|
|
||||||
This will install the patched APK file regularly on your device.
|
You can patch apps by supplying patch bundles and the APK file to patch.
|
||||||
|
After patching, ReVanced CLI can install the patched app on your device using two methods:
|
||||||
|
|
||||||
```bash
|
> [!NOTE]
|
||||||
java -jar revanced-cli.jar patch \
|
> For ReVanced CLI to be able to install the patched app on your device, make sure ADB is working:
|
||||||
--patch-bundle revanced-patches.jar \
|
>
|
||||||
--out output.apk \
|
> ```bash
|
||||||
--device-serial <device-serial> \
|
> adb shell exit
|
||||||
input.apk
|
> ```
|
||||||
```
|
>
|
||||||
|
> To get your device's serial, run the following command:
|
||||||
|
>
|
||||||
|
> ```bash
|
||||||
|
> adb devices
|
||||||
|
> ```
|
||||||
|
>
|
||||||
|
> 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
|
||||||
|
> ```
|
||||||
|
>
|
||||||
|
|
||||||
- ### 👾 Use ReVanced CLI to patch an APK file but install with root permissions
|
- #### 👾 Patch an app and install it on your device regularly
|
||||||
|
|
||||||
This will install the patched APK file on your device by mounting it on top of the original APK file.
|
```bash
|
||||||
|
java -jar revanced-cli.jar patch \
|
||||||
|
--patch-bundle revanced-patches.jar \
|
||||||
|
--out patched-app.apk \
|
||||||
|
--device-serial <device-serial> \
|
||||||
|
input.apk
|
||||||
|
```
|
||||||
|
|
||||||
```bash
|
- #### 👾 Patch an app and mount it on top of the un-patched app with root permissions
|
||||||
adb install input.apk
|
|
||||||
java -jar revanced-cli.jar patch \
|
> [!IMPORTANT]
|
||||||
--patch-bundle revanced-patches.jar \
|
> Ensure sure the same app you are patching is installed on your device:
|
||||||
--include some-other-patch \
|
>
|
||||||
--exclude some-patch \
|
> ```bash
|
||||||
--out patched-output.apk \
|
> adb install app.apk
|
||||||
--device-serial <device-serial> \
|
> ```
|
||||||
--mount \
|
|
||||||
input.apk
|
|
||||||
```
|
|
||||||
|
|
||||||
> **Note**: Some patches may require integrations
|
Patch and install the app on your device by mounting it on top of the un-patched app with root permissions:
|
||||||
such as [ReVanced Integrations](https://github.com/revanced/revanced-integrations).
|
|
||||||
Supply them with the option `--merge`. If any patches accepted by ReVanced Patcher require ReVanced Integrations,
|
```bash
|
||||||
they will be merged into the APK file automatically.
|
java -jar revanced-cli.jar patch \
|
||||||
|
--patch-bundle revanced-patches.jar \
|
||||||
|
--include "Some patch" \
|
||||||
|
--exclude "Some other patch" \
|
||||||
|
--out patched-app.apk \
|
||||||
|
--device-serial <device-serial> \
|
||||||
|
--mount \
|
||||||
|
app.apk
|
||||||
|
```
|
||||||
|
|
||||||
|
> [!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.
|
||||||
|
|
||||||
|
- ### 🗑️ Uninstall an app
|
||||||
|
|
||||||
- ### 🗑️ Uninstall a patched APK file
|
|
||||||
```bash
|
```bash
|
||||||
java -jar revanced-cli.jar utility uninstall \
|
java -jar revanced-cli.jar utility uninstall \
|
||||||
--package-name <package-name> \
|
--package-name <package-name> \
|
||||||
<device-serial>
|
<device-serial>
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note**: You can unmount an APK file
|
> [!NOTE]
|
||||||
with the option `--unmount`.
|
> You can unmount an APK file
|
||||||
|
by adding the option `--unmount`.
|
||||||
|
|
||||||
- ### ️ ⚙️ Manually install an APK file
|
- ### ️ ⚙️ Install an app
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
java -jar revanced-cli.jar utility install \
|
java -jar revanced-cli.jar utility install \
|
||||||
@ -107,5 +120,6 @@ Learn how to ReVanced CLI.
|
|||||||
<device-serial>
|
<device-serial>
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note**: You can mount an APK file
|
> [!NOTE]
|
||||||
by supplying the package name of the app to mount the supplied APK file to over the option `--mount`.
|
> You can mount an APK file
|
||||||
|
> by supplying the package name of the app to mount the supplied APK file to over the option `--mount`.
|
||||||
|
Loading…
Reference in New Issue
Block a user