You've already forked revanced-cli
mirror of
https://github.com/revanced/revanced-cli
synced 2025-11-19 15:33:27 +01:00
Compare commits
23 Commits
v4.4.1-dev
...
v4.4.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c45ed69adf | ||
|
|
8641d301b1 | ||
|
|
44b72ca99d | ||
|
|
240f2cfb6b | ||
|
|
304275ddbb | ||
|
|
483590726a | ||
|
|
cf20efd467 | ||
|
|
164d09dec1 | ||
|
|
1e92239616 | ||
|
|
a5a5085f0f | ||
|
|
1c10a7760d | ||
|
|
4ff697ef0b | ||
|
|
628b452b7e | ||
|
|
e622616628 | ||
|
|
109b33f1ed | ||
|
|
9fe4795923 | ||
|
|
f21c56d8c0 | ||
|
|
de63cfa426 | ||
|
|
9c0ad4604a | ||
|
|
2fcb74e79d | ||
|
|
f2368ccf27 | ||
|
|
a4e8d2df0d | ||
|
|
724593a7b1 |
25
.github/workflows/build_pull_request.yml
vendored
Normal file
25
.github/workflows/build_pull_request.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Build pull request
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache Gradle
|
||||
uses: burrunan/gradle-cache-action@v1
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: ./gradlew build --no-daemon
|
||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -6,10 +6,6 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
release:
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
name: Dispatch event to documentation repository
|
||||
if: github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- uses: peter-evans/repository-dispatch@v2
|
||||
- uses: peter-evans/repository-dispatch@v3
|
||||
with:
|
||||
token: ${{ secrets.DOCUMENTATION_REPO_ACCESS_TOKEN }}
|
||||
repository: revanced/revanced-documentation
|
||||
20
CHANGELOG.md
20
CHANGELOG.md
@@ -1,3 +1,23 @@
|
||||
## [4.4.2](https://github.com/ReVanced/revanced-cli/compare/v4.4.1...v4.4.2) (2024-03-10)
|
||||
|
||||
## [4.4.2-dev.2](https://github.com/ReVanced/revanced-cli/compare/v4.4.2-dev.1...v4.4.2-dev.2) (2024-03-10)
|
||||
|
||||
## [4.4.2-dev.1](https://github.com/ReVanced/revanced-cli/compare/v4.4.1...v4.4.2-dev.1) (2024-03-09)
|
||||
|
||||
## [4.4.1](https://github.com/ReVanced/revanced-cli/compare/v4.4.0...v4.4.1) (2024-03-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Bump dependencies to support BCS keystore ([1c10a77](https://github.com/ReVanced/revanced-cli/commit/1c10a7760d76ea850260ca49b448be7ad121de44))
|
||||
|
||||
## [4.4.1-dev.2](https://github.com/ReVanced/revanced-cli/compare/v4.4.1-dev.1...v4.4.1-dev.2) (2024-03-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Bump dependencies to support BCS keystore ([1c10a77](https://github.com/ReVanced/revanced-cli/commit/1c10a7760d76ea850260ca49b448be7ad121de44))
|
||||
|
||||
## [4.4.1-dev.1](https://github.com/ReVanced/revanced-cli/compare/v4.4.0...v4.4.1-dev.1) (2024-02-21)
|
||||
|
||||
# [4.4.0](https://github.com/ReVanced/revanced-cli/compare/v4.3.0...v4.4.0) (2023-12-28)
|
||||
|
||||
@@ -64,14 +64,14 @@ This document describes how to contribute to ReVanced CLI.
|
||||
|
||||
## 📖 Resources to help you get started
|
||||
|
||||
* The [documentation](/docs) explains how to use ReVanced CLI
|
||||
* [Our backlog](https://github.com/orgs/ReVanced/projects/12) is where we keep track of what we're working on
|
||||
* [Issues](https://github.com/ReVanced/revanced-cli/issues) are where we keep track of bugs and feature requests
|
||||
- The [documentation](/docs) explains how to use ReVanced CLI
|
||||
- [Our backlog](https://github.com/orgs/ReVanced/projects/12) is where we keep track of what we're working on
|
||||
- [Issues](https://github.com/ReVanced/revanced-cli/issues) are where we keep track of bugs and feature requests
|
||||
|
||||
## 🙏 Submitting a feature request
|
||||
|
||||
Features can be requested by opening an issue using the
|
||||
[Feature request issue template](https://github.com/ReVanced/revanced-cli/issues/new?assignees=&labels=Feature+request&projects=&template=feature-request.yml&title=feat%3A+).
|
||||
[Feature request issue template](https://github.com/ReVanced/revanced-cli/issues/new?assignees=&labels=Feature+request&projects=&template=feature_request.yml&title=feat%3A+).
|
||||
|
||||
> **Note**
|
||||
> Requests can be accepted or rejected at the discretion of maintainers of ReVanced CLI.
|
||||
@@ -80,7 +80,7 @@ Features can be requested by opening an issue using the
|
||||
## 🐞 Submitting a bug report
|
||||
|
||||
If you encounter a bug while using ReVanced CLI, open an issue using the
|
||||
[Bug report issue template](https://github.com/ReVanced/revanced-cli/issues/new?assignees=&labels=Bug+report&projects=&template=bug-report.yml&title=bug%3A+).
|
||||
[Bug report issue template](https://github.com/ReVanced/revanced-cli/issues/new?assignees=&labels=Bug+report&projects=&template=bug_report.yml&title=bug%3A+).
|
||||
|
||||
## 📝 How to contribute
|
||||
|
||||
@@ -88,11 +88,11 @@ If you encounter a bug while using ReVanced CLI, open an issue using the
|
||||
with the maintainers of ReVanced CLI. This will help you determine whether your change is acceptable
|
||||
and whether it is worth your time to implement it
|
||||
2. Development happens on the `dev` branch. Fork the repository and create your branch from `dev`
|
||||
3. Commit your changes.
|
||||
3. Commit your changes
|
||||
4. Submit a pull request to the `dev` branch of the repository and reference issues
|
||||
that your pull request closes in the description of your pull request
|
||||
5. Our team will review your pull request and provide feedback. Once your pull request is approved,
|
||||
it will be merged into the `dev` branch and will be included in the next release of ReVanced CLI
|
||||
|
||||
❤️ Thank you for considering contributing to ReVanced CLI,
|
||||
❤️ Thank you for considering contributing to ReVanced CLI,
|
||||
ReVanced
|
||||
|
||||
30
README.md
30
README.md
@@ -67,13 +67,23 @@ Command line application to use ReVanced.
|
||||
|
||||
## ❓ About
|
||||
|
||||
ReVanced CLI is a command line application to patch apps using ReVanced.
|
||||
ReVanced CLI also comes with commands to uninstall or install patched apps and list patches from supplied patch bundles.
|
||||
ReVanced CLI is a command line application that uses [ReVanced Patcher](https://github.com/revanced/revanced-patcher) to patch Android apps.
|
||||
|
||||
## 🚀 Download
|
||||
## 💪 Features
|
||||
|
||||
You can download the most recent version of ReVanced CLI from
|
||||
[here](https://github.com/ReVanced/revanced-cli/releases/latest). Learn how to use ReVanced CLI by following the [documentation](/docs).
|
||||
Some of the features ReVanced CLI provides are:
|
||||
|
||||
- 💉 **Patch apps**: Harness ReVanced Patcher to patch Android apps
|
||||
- 💾 **Install and uninstall apps**: Install and uninstall Apps via ADB,
|
||||
using the Android package manager, or by mounting using root permissions
|
||||
- 📃 **List patches from patch bundles**: List available patches, compatible packages, and versions
|
||||
- 💪 **Flexibility and functionality**: Apply any combination of patches to any version of Android apps
|
||||
|
||||
## 🔽 Download
|
||||
|
||||
You can download the most recent version of ReVanced CLI from
|
||||
[here](https://github.com/ReVanced/revanced-cli/releases/latest).
|
||||
Learn how to use ReVanced CLI by following the [documentation](/docs).
|
||||
|
||||
## 📚 Everything else
|
||||
|
||||
@@ -84,10 +94,14 @@ You can find the contribution guidelines [here](CONTRIBUTING.md).
|
||||
|
||||
### 🛠️ Building
|
||||
|
||||
In order to build ReVanced CLI, you can follow the [documentation](/docs).
|
||||
To build a ReVanced CLI, you can follow the [documentation](/docs).
|
||||
|
||||
### 📃 Documentation
|
||||
|
||||
You can find the documentation of ReVanced CLI [here](/docs).
|
||||
|
||||
## 📜 Licence
|
||||
|
||||
ReVanced CLI is licensed under the GPLv3 licence. Please see the [licence file](LICENSE) for more information.
|
||||
ReVanced CLI is licensed under the GPLv3 license. Please see the [license file](LICENSE) for more information.
|
||||
[tl;dr](https://www.tldrlegal.com/license/gnu-general-public-license-v3-gpl-3) you may copy, distribute and modify ReVanced CLI as long as you track changes/dates in source files.
|
||||
Any modifications to ReVanced CLI must also be made available under the GPL along with build & install instructions.
|
||||
Any modifications to ReVanced CLI must also be made available under the GPL, along with build & install instructions.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin)
|
||||
alias(libs.plugins.shadow)
|
||||
@@ -35,7 +37,15 @@ dependencies {
|
||||
testImplementation(libs.kotlin.test)
|
||||
}
|
||||
|
||||
kotlin { jvmToolchain(11) }
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_11)
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
tasks {
|
||||
test {
|
||||
|
||||
@@ -26,7 +26,7 @@ ReVanced CLI is divided into the following fundamental commands:
|
||||
|
||||
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.
|
||||
|
||||
|
||||
```bash
|
||||
java -jar revanced-cli.jar options \
|
||||
--path options.json \
|
||||
@@ -35,14 +35,14 @@ ReVanced CLI is divided into the following fundamental commands:
|
||||
```
|
||||
|
||||
> **ℹ️ 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.
|
||||
> A default `options.json` file will be automatically created if it does not exist
|
||||
> without any need for intervention when using the `patch` command.
|
||||
|
||||
- ### 💉 Patch an app
|
||||
|
||||
You can patch apps by supplying patch bundles and the app to patch.
|
||||
After patching, ReVanced CLI can install the patched app on your device using two methods:
|
||||
|
||||
|
||||
> **💡 Tip**
|
||||
> For ReVanced CLI to be able to install the patched app on your device, make sure ADB is working:
|
||||
>
|
||||
@@ -55,7 +55,6 @@ ReVanced CLI is divided into the following fundamental commands:
|
||||
> ```bash
|
||||
> adb shell su -c exit
|
||||
> ```
|
||||
>
|
||||
|
||||
> **⚠️ Warning**
|
||||
> Some patches may require integrations
|
||||
@@ -72,10 +71,10 @@ ReVanced CLI is divided into the following fundamental commands:
|
||||
```
|
||||
|
||||
- #### 👾 Patch an app and mount it on top of the un-patched app with root permissions
|
||||
|
||||
|
||||
> **❗ Caution**
|
||||
> Ensure that the same app you are patching and mounting over is installed on your device:
|
||||
>
|
||||
>
|
||||
> ```bash
|
||||
> adb install app.apk
|
||||
> ```
|
||||
@@ -90,18 +89,18 @@ ReVanced CLI is divided into the following fundamental commands:
|
||||
--mount \
|
||||
app.apk
|
||||
```
|
||||
|
||||
|
||||
> **💡 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.
|
||||
|
||||
@@ -115,7 +114,7 @@ ReVanced CLI is divided into the following fundamental commands:
|
||||
|
||||
> **💡 Tip**
|
||||
> You can unmount an APK file
|
||||
by adding the option `--unmount`.
|
||||
> by adding the option `--unmount`.
|
||||
|
||||
- ### ️ 📦 Install an app
|
||||
|
||||
@@ -126,5 +125,5 @@ ReVanced CLI is divided into the following fundamental commands:
|
||||
```
|
||||
|
||||
> **💡 Tip**
|
||||
> You can mount an APK file
|
||||
> You can mount an APK file
|
||||
> by supplying the app's package name to mount the supplied APK file over the option `-mount`.
|
||||
|
||||
@@ -21,6 +21,6 @@ To build ReVanced CLI, follow these steps:
|
||||
|
||||
```bash
|
||||
./gradlew build
|
||||
```
|
||||
```
|
||||
|
||||
After the build succeeds, the built JAR file will be located at `build/libs/revanced-cli-<version>-all.jar`.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
org.gradle.parallel = true
|
||||
org.gradle.caching = true
|
||||
kotlin.code.style = official
|
||||
version = 4.4.1-dev.1
|
||||
version = 4.4.2
|
||||
|
||||
@@ -4,7 +4,7 @@ kotlin = "1.9.22"
|
||||
kotlinx-coroutines-core = "1.7.3"
|
||||
picocli = "4.7.5"
|
||||
revanced-patcher = "19.3.1"
|
||||
revanced-library = "2.0.0"
|
||||
revanced-library = "2.2.1"
|
||||
|
||||
[libraries]
|
||||
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
|
||||
|
||||
@@ -273,8 +273,7 @@ internal object PatchCommand : Runnable {
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
Patcher(
|
||||
val (packageName, patcherResult) = Patcher(
|
||||
PatcherConfig(
|
||||
apk,
|
||||
temporaryFilesPath,
|
||||
@@ -296,57 +295,55 @@ internal object PatchCommand : Runnable {
|
||||
|
||||
// region Patch
|
||||
|
||||
val patcherResult =
|
||||
patcher.apply {
|
||||
acceptIntegrations(integrations)
|
||||
acceptPatches(filteredPatches)
|
||||
patcher.context.packageMetadata.packageName to patcher.apply {
|
||||
acceptIntegrations(integrations)
|
||||
acceptPatches(filteredPatches)
|
||||
|
||||
// Execute patches.
|
||||
runBlocking {
|
||||
apply(false).collect { patchResult ->
|
||||
patchResult.exception?.let {
|
||||
StringWriter().use { writer ->
|
||||
it.printStackTrace(PrintWriter(writer))
|
||||
logger.severe("${patchResult.patch.name} failed:\n$writer")
|
||||
}
|
||||
} ?: logger.info("${patchResult.patch.name} succeeded")
|
||||
}
|
||||
// Execute patches.
|
||||
runBlocking {
|
||||
apply(false).collect { patchResult ->
|
||||
patchResult.exception?.let {
|
||||
StringWriter().use { writer ->
|
||||
it.printStackTrace(PrintWriter(writer))
|
||||
logger.severe("${patchResult.patch.name} failed:\n$writer")
|
||||
}
|
||||
} ?: logger.info("${patchResult.patch.name} succeeded")
|
||||
}
|
||||
}.get()
|
||||
|
||||
// endregion
|
||||
|
||||
// region Save
|
||||
|
||||
apk.copyTo(outputFilePath, overwrite = true)
|
||||
|
||||
patcherResult.applyTo(outputFilePath)
|
||||
|
||||
if (!mount) {
|
||||
outputFilePath.sign(
|
||||
ApkUtils.SigningOptions(
|
||||
keystoreFilePath,
|
||||
keyStorePassword,
|
||||
alias,
|
||||
password,
|
||||
signer,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
logger.info("Saved to $outputFilePath")
|
||||
|
||||
// endregion
|
||||
|
||||
// region Install
|
||||
|
||||
deviceSerial?.let { serial ->
|
||||
AdbManager.getAdbManager(deviceSerial = serial.ifEmpty { null }, mount)
|
||||
}?.install(AdbManager.Apk(outputFilePath, patcher.context.packageMetadata.packageName))
|
||||
|
||||
}
|
||||
}.get()
|
||||
// endregion
|
||||
}
|
||||
|
||||
// region Save
|
||||
|
||||
apk.copyTo(outputFilePath, overwrite = true)
|
||||
|
||||
patcherResult.applyTo(outputFilePath)
|
||||
|
||||
if (!mount) {
|
||||
outputFilePath.sign(
|
||||
ApkUtils.SigningOptions(
|
||||
keystoreFilePath,
|
||||
keyStorePassword,
|
||||
alias,
|
||||
password,
|
||||
signer,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
logger.info("Saved to $outputFilePath")
|
||||
|
||||
// endregion
|
||||
|
||||
// region Install
|
||||
|
||||
deviceSerial?.let { serial ->
|
||||
AdbManager.getAdbManager(deviceSerial = serial.ifEmpty { null }, mount)
|
||||
}?.install(AdbManager.Apk(outputFilePath, packageName))
|
||||
|
||||
// endregion
|
||||
|
||||
if (purge) {
|
||||
logger.info("Purging temporary files")
|
||||
purge(temporaryFilesPath)
|
||||
|
||||
Reference in New Issue
Block a user