mirror of
https://github.com/ReVanced/revanced-cli.git
synced 2026-01-18 00:43:58 +00:00
Compare commits
17 Commits
v4.4.1-dev
...
v4.4.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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:
|
branches:
|
||||||
- main
|
- main
|
||||||
- dev
|
- dev
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- dev
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ jobs:
|
|||||||
name: Dispatch event to documentation repository
|
name: Dispatch event to documentation repository
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
steps:
|
steps:
|
||||||
- uses: peter-evans/repository-dispatch@v2
|
- uses: peter-evans/repository-dispatch@v3
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.DOCUMENTATION_REPO_ACCESS_TOKEN }}
|
token: ${{ secrets.DOCUMENTATION_REPO_ACCESS_TOKEN }}
|
||||||
repository: revanced/revanced-documentation
|
repository: revanced/revanced-documentation
|
||||||
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,3 +1,17 @@
|
|||||||
|
## [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.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)
|
# [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
|
## 📖 Resources to help you get started
|
||||||
|
|
||||||
* The [documentation](/docs) explains how to use ReVanced CLI
|
- 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
|
- [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
|
- [Issues](https://github.com/ReVanced/revanced-cli/issues) are where we keep track of bugs and feature requests
|
||||||
|
|
||||||
## 🙏 Submitting a feature request
|
## 🙏 Submitting a feature request
|
||||||
|
|
||||||
Features can be requested by opening an issue using the
|
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**
|
> **Note**
|
||||||
> Requests can be accepted or rejected at the discretion of maintainers of ReVanced CLI.
|
> 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
|
## 🐞 Submitting a bug report
|
||||||
|
|
||||||
If you encounter a bug while using ReVanced CLI, open an issue using the
|
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
|
## 📝 How to contribute
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ 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
|
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
|
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`
|
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
|
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
|
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,
|
5. Our team will review your pull request and provide feedback. Once your pull request is approved,
|
||||||
|
|||||||
28
README.md
28
README.md
@@ -67,13 +67,23 @@ Command line application to use ReVanced.
|
|||||||
|
|
||||||
## ❓ About
|
## ❓ About
|
||||||
|
|
||||||
ReVanced CLI is a command line application to patch apps using ReVanced.
|
ReVanced CLI is a command line application that uses [ReVanced Patcher](https://github.com/revanced/revanced-patcher) to patch Android apps.
|
||||||
ReVanced CLI also comes with commands to uninstall or install patched apps and list patches from supplied patch bundles.
|
|
||||||
|
|
||||||
## 🚀 Download
|
## 💪 Features
|
||||||
|
|
||||||
|
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
|
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).
|
[here](https://github.com/ReVanced/revanced-cli/releases/latest).
|
||||||
|
Learn how to use ReVanced CLI by following the [documentation](/docs).
|
||||||
|
|
||||||
## 📚 Everything else
|
## 📚 Everything else
|
||||||
|
|
||||||
@@ -84,10 +94,14 @@ You can find the contribution guidelines [here](CONTRIBUTING.md).
|
|||||||
|
|
||||||
### 🛠️ Building
|
### 🛠️ 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
|
## 📜 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.
|
[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 {
|
plugins {
|
||||||
alias(libs.plugins.kotlin)
|
alias(libs.plugins.kotlin)
|
||||||
alias(libs.plugins.shadow)
|
alias(libs.plugins.shadow)
|
||||||
@@ -35,7 +37,15 @@ dependencies {
|
|||||||
testImplementation(libs.kotlin.test)
|
testImplementation(libs.kotlin.test)
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin { jvmToolchain(11) }
|
kotlin {
|
||||||
|
compilerOptions {
|
||||||
|
jvmTarget.set(JvmTarget.JVM_11)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
targetCompatibility = JavaVersion.VERSION_11
|
||||||
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
test {
|
test {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ ReVanced CLI is divided into the following fundamental commands:
|
|||||||
|
|
||||||
> **ℹ️ Note**
|
> **ℹ️ Note**
|
||||||
> A default `options.json` file will be automatically created if it does not exist
|
> 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.
|
||||||
|
|
||||||
- ### 💉 Patch an app
|
- ### 💉 Patch an app
|
||||||
|
|
||||||
@@ -55,7 +55,6 @@ ReVanced CLI is divided into the following fundamental commands:
|
|||||||
> ```bash
|
> ```bash
|
||||||
> adb shell su -c exit
|
> adb shell su -c exit
|
||||||
> ```
|
> ```
|
||||||
>
|
|
||||||
|
|
||||||
> **⚠️ Warning**
|
> **⚠️ Warning**
|
||||||
> Some patches may require integrations
|
> Some patches may require integrations
|
||||||
@@ -115,7 +114,7 @@ ReVanced CLI is divided into the following fundamental commands:
|
|||||||
|
|
||||||
> **💡 Tip**
|
> **💡 Tip**
|
||||||
> You can unmount an APK file
|
> You can unmount an APK file
|
||||||
by adding the option `--unmount`.
|
> by adding the option `--unmount`.
|
||||||
|
|
||||||
- ### ️ 📦 Install an app
|
- ### ️ 📦 Install an app
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,6 @@ To build ReVanced CLI, follow these steps:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
./gradlew build
|
./gradlew build
|
||||||
```
|
```
|
||||||
|
|
||||||
After the build succeeds, the built JAR file will be located at `build/libs/revanced-cli-<version>-all.jar`.
|
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.parallel = true
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 4.4.1-dev.1
|
version = 4.4.1
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ kotlin = "1.9.22"
|
|||||||
kotlinx-coroutines-core = "1.7.3"
|
kotlinx-coroutines-core = "1.7.3"
|
||||||
picocli = "4.7.5"
|
picocli = "4.7.5"
|
||||||
revanced-patcher = "19.3.1"
|
revanced-patcher = "19.3.1"
|
||||||
revanced-library = "2.0.0"
|
revanced-library = "2.1.0"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
|
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
|
||||||
|
|||||||
@@ -273,8 +273,7 @@ internal object PatchCommand : Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
val (packageName, patcherResult) = Patcher(
|
||||||
Patcher(
|
|
||||||
PatcherConfig(
|
PatcherConfig(
|
||||||
apk,
|
apk,
|
||||||
temporaryFilesPath,
|
temporaryFilesPath,
|
||||||
@@ -296,57 +295,55 @@ internal object PatchCommand : Runnable {
|
|||||||
|
|
||||||
// region Patch
|
// region Patch
|
||||||
|
|
||||||
val patcherResult =
|
patcher.context.packageMetadata.packageName to patcher.apply {
|
||||||
patcher.apply {
|
acceptIntegrations(integrations)
|
||||||
acceptIntegrations(integrations)
|
acceptPatches(filteredPatches)
|
||||||
acceptPatches(filteredPatches)
|
|
||||||
|
|
||||||
// Execute patches.
|
// Execute patches.
|
||||||
runBlocking {
|
runBlocking {
|
||||||
apply(false).collect { patchResult ->
|
apply(false).collect { patchResult ->
|
||||||
patchResult.exception?.let {
|
patchResult.exception?.let {
|
||||||
StringWriter().use { writer ->
|
StringWriter().use { writer ->
|
||||||
it.printStackTrace(PrintWriter(writer))
|
it.printStackTrace(PrintWriter(writer))
|
||||||
logger.severe("${patchResult.patch.name} failed:\n$writer")
|
logger.severe("${patchResult.patch.name} failed:\n$writer")
|
||||||
}
|
}
|
||||||
} ?: logger.info("${patchResult.patch.name} succeeded")
|
} ?: logger.info("${patchResult.patch.name} succeeded")
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}.get()
|
}
|
||||||
|
}.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))
|
|
||||||
|
|
||||||
// endregion
|
// 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) {
|
if (purge) {
|
||||||
logger.info("Purging temporary files")
|
logger.info("Purging temporary files")
|
||||||
purge(temporaryFilesPath)
|
purge(temporaryFilesPath)
|
||||||
|
|||||||
Reference in New Issue
Block a user