revanced-cli/docs/1_usage.md

89 lines
2.4 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-06-30 19:40:52 +02:00
## ⚡ Setup ADB
2023-01-08 14:37:10 +01:00
2023-06-30 19:40:52 +02:00
1. Ensure that ADB is working
2023-01-08 14:37:10 +01:00
```bash
adb shell exit
```
2023-06-30 19:40:52 +02:00
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.
2023-01-08 14:37:10 +01:00
```bash
adb shell su -c exit
```
2023-06-30 19:40:52 +02:00
2. Get the name of your device
2023-01-08 14:37:10 +01:00
```bash
adb devices
```
2023-06-30 19:40:52 +02:00
## 🔨 Using ReVanced CLI
2023-01-08 14:37:10 +01:00
2023-06-30 19:40:52 +02:00
- ### ⚙️ Show all available options for ReVanced CLI
2023-01-08 14:37:10 +01:00
```bash
java -jar revanced-cli.jar -h
```
- ### 📃 List patches from supplied patch bundles
2023-01-08 14:37:10 +01:00
```bash
java -jar revanced-cli.jar \
list-patches \
--with-packages \
--with-versions \
--with-options \
revanced-patches.jar
2023-01-08 14:37:10 +01:00
```
- ### ⚙️ 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.
2023-06-30 19:40:52 +02:00
- ### 💉 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.
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-06-30 19:40:52 +02:00
-b revanced-patches.jar \
-d device-serial
2023-01-08 14:37:10 +01:00
```
2023-06-30 19:40:52 +02:00
- ### 👾 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.
2023-01-08 14:37:10 +01:00
```bash
2023-06-30 19:40:52 +02:00
adb install input.apk
2023-01-08 14:37:10 +01:00
java -jar revanced-cli.jar \
2023-06-30 19:40:52 +02:00
-a input.apk \
-o patched-output.apk \
-b revanced-patches.jar \
-e vanced-microg-support \
-d device-serial \
2023-06-30 19:40:52 +02:00
--mount
2023-01-08 14:37:10 +01:00
```
2023-06-30 19:40:52 +02:00
> **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.
package
2023-06-30 19:40:52 +02:00
- ### 🗑️ Uninstall a patched
```bash
java -jar revanced-cli.jar \
uninstall \
-p package-name \
device-serial
```