mirror of
https://github.com/ReVanced/revanced-cli.git
synced 2026-01-18 08:53:58 +00:00
Compare commits
27 Commits
v4.4.1-dev
...
v4.5.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9476f5a2e4 | ||
|
|
5ff105cf6b | ||
|
|
f0f3e5614b | ||
|
|
48a1a39b94 | ||
|
|
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:
|
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
|
||||||
33
CHANGELOG.md
33
CHANGELOG.md
@@ -1,3 +1,36 @@
|
|||||||
|
# [4.5.0-dev.1](https://github.com/ReVanced/revanced-cli/compare/v4.4.2...v4.5.0-dev.1) (2024-03-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Show path for missing files instead of just the name ([f0f3e56](https://github.com/ReVanced/revanced-cli/commit/f0f3e5614b99b34391e0492177706f9c09781cad))
|
||||||
|
* Sign APKs correctly ([5ff105c](https://github.com/ReVanced/revanced-cli/commit/5ff105cf6b3fac9cd12478efd10caf90d1ecf589))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Remove deprecated CLI options ([48a1a39](https://github.com/ReVanced/revanced-cli/commit/48a1a39b94dd9121c400d28e3e93dec3fc13e3be))
|
||||||
|
|
||||||
|
## [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.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
|
||||||
|
|
||||||
|
|||||||
@@ -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.5.0-dev.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.2.1"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
|
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
|
||||||
|
|||||||
@@ -142,17 +142,6 @@ internal object PatchCommand : Runnable {
|
|||||||
)
|
)
|
||||||
private var signer = "ReVanced"
|
private var signer = "ReVanced"
|
||||||
|
|
||||||
@CommandLine.Option(
|
|
||||||
names = ["-r", "--resource-cache"],
|
|
||||||
description = ["Path to temporary resource cache directory."],
|
|
||||||
)
|
|
||||||
private var resourceCachePath: File? = null
|
|
||||||
set(value) {
|
|
||||||
logger.warning("The --resource-cache option is deprecated. Use --temporary-files-patch instead.")
|
|
||||||
field = value
|
|
||||||
temporaryFilesPath = value
|
|
||||||
}
|
|
||||||
|
|
||||||
@CommandLine.Option(
|
@CommandLine.Option(
|
||||||
names = ["-t", "--temporary-files-path"],
|
names = ["-t", "--temporary-files-path"],
|
||||||
description = ["Path to temporary files directory."],
|
description = ["Path to temporary files directory."],
|
||||||
@@ -184,7 +173,7 @@ internal object PatchCommand : Runnable {
|
|||||||
if (!apk.exists()) {
|
if (!apk.exists()) {
|
||||||
throw CommandLine.ParameterException(
|
throw CommandLine.ParameterException(
|
||||||
spec.commandLine(),
|
spec.commandLine(),
|
||||||
"APK file ${apk.name} does not exist",
|
"APK file ${apk.path} does not exist",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
this.apk = apk
|
this.apk = apk
|
||||||
@@ -197,7 +186,7 @@ internal object PatchCommand : Runnable {
|
|||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
private fun setIntegrations(integrations: Array<File>) {
|
private fun setIntegrations(integrations: Array<File>) {
|
||||||
integrations.firstOrNull { !it.exists() }?.let {
|
integrations.firstOrNull { !it.exists() }?.let {
|
||||||
throw CommandLine.ParameterException(spec.commandLine(), "Integrations file ${it.name} does not exist.")
|
throw CommandLine.ParameterException(spec.commandLine(), "Integrations file ${it.path} does not exist.")
|
||||||
}
|
}
|
||||||
this.integrations += integrations
|
this.integrations += integrations
|
||||||
}
|
}
|
||||||
@@ -273,13 +262,13 @@ internal object PatchCommand : Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
val patcherTemporaryFilesPath = temporaryFilesPath.resolve("patcher")
|
||||||
Patcher(
|
val (packageName, patcherResult) = Patcher(
|
||||||
PatcherConfig(
|
PatcherConfig(
|
||||||
apk,
|
apk,
|
||||||
temporaryFilesPath,
|
patcherTemporaryFilesPath,
|
||||||
aaptBinaryPath?.path,
|
aaptBinaryPath?.path,
|
||||||
temporaryFilesPath.absolutePath,
|
patcherTemporaryFilesPath.absolutePath,
|
||||||
true,
|
true,
|
||||||
),
|
),
|
||||||
).use { patcher ->
|
).use { patcher ->
|
||||||
@@ -296,8 +285,7 @@ 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)
|
||||||
|
|
||||||
@@ -313,17 +301,17 @@ internal object PatchCommand : Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.get()
|
}.get()
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
}
|
||||||
|
|
||||||
// region Save
|
// region Save
|
||||||
|
apk.copyTo(temporaryFilesPath.resolve(apk.name), overwrite = true).apply {
|
||||||
apk.copyTo(outputFilePath, overwrite = true)
|
patcherResult.applyTo(this)
|
||||||
|
}.let {
|
||||||
patcherResult.applyTo(outputFilePath)
|
|
||||||
|
|
||||||
if (!mount) {
|
if (!mount) {
|
||||||
outputFilePath.sign(
|
sign(
|
||||||
|
it,
|
||||||
|
outputFilePath,
|
||||||
ApkUtils.SigningOptions(
|
ApkUtils.SigningOptions(
|
||||||
keystoreFilePath,
|
keystoreFilePath,
|
||||||
keyStorePassword,
|
keyStorePassword,
|
||||||
@@ -333,6 +321,7 @@ internal object PatchCommand : Runnable {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
logger.info("Saved to $outputFilePath")
|
logger.info("Saved to $outputFilePath")
|
||||||
|
|
||||||
@@ -342,10 +331,9 @@ internal object PatchCommand : Runnable {
|
|||||||
|
|
||||||
deviceSerial?.let { serial ->
|
deviceSerial?.let { serial ->
|
||||||
AdbManager.getAdbManager(deviceSerial = serial.ifEmpty { null }, mount)
|
AdbManager.getAdbManager(deviceSerial = serial.ifEmpty { null }, mount)
|
||||||
}?.install(AdbManager.Apk(outputFilePath, patcher.context.packageMetadata.packageName))
|
}?.install(AdbManager.Apk(outputFilePath, packageName))
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
}
|
|
||||||
|
|
||||||
if (purge) {
|
if (purge) {
|
||||||
logger.info("Purging temporary files")
|
logger.info("Purging temporary files")
|
||||||
|
|||||||
Reference in New Issue
Block a user