Compare commits

..

19 Commits

Author SHA1 Message Date
semantic-release-bot
a0189aeaee chore: Release v5.0.1 [skip ci]
## [5.0.1](https://github.com/ReVanced/revanced-cli/compare/v5.0.0...v5.0.1) (2025-04-14)

### Bug Fixes

* Make mounting work again by bumping dependencies ([#359](https://github.com/ReVanced/revanced-cli/issues/359)) ([68a4872](68a48724eb))
2025-04-14 08:53:31 +00:00
oSumAtrIX
19e8422588
chore: Merge branch dev to main (#354)
Co-authored-by: kitadai31 <90122968+kitadai31@users.noreply.github.com>
Co-authored-by: Jamie McCullough <92225779+AoifeMcCull@users.noreply.github.com>
Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2025-04-14 10:51:31 +02:00
semantic-release-bot
d908595b22 chore: Release v5.0.1-dev.1 [skip ci]
## [5.0.1-dev.1](https://github.com/ReVanced/revanced-cli/compare/v5.0.0...v5.0.1-dev.1) (2025-02-26)

### Bug Fixes

* Make mounting work again by bumping dependencies ([#359](https://github.com/ReVanced/revanced-cli/issues/359)) ([68a4872](68a48724eb))
2025-02-26 21:52:52 +00:00
Jamie McCullough
68a48724eb
fix: Make mounting work again by bumping dependencies (#359) 2025-02-26 22:50:58 +01:00
kitadai31
bf31de4148
build: Remove AAPT1 binary & minimize ReVanced Library (#340) 2024-12-24 01:52:44 +01:00
semantic-release-bot
63b6350afc chore: Release v5.0.0 [skip ci]
# [5.0.0](https://github.com/ReVanced/revanced-cli/compare/v4.6.0...v5.0.0) (2024-11-10)

### Bug Fixes

* Check for null when no device serial was specified ([1da8ae9](1da8ae9e46))
* List if patch option is required ([#346](https://github.com/ReVanced/revanced-cli/issues/346)) ([98ff0c3](98ff0c34fa))
* Make CLI ArgGroup non-exclusive to be able to disable and enable patches at the same time ([1bb0d13](1bb0d13726))
* Make patches selectable by using a mutable collection for the selection option ([751fa1d](751fa1d889))
* Make the patch command work without specifying any selection ([ba159a3](ba159a35a9))
* Print in new line correctly ([c2dc9d7](c2dc9d76be))
* Use the first connected device when no ADB device is specified ([5f952f3](5f952f35f5))

### Features

* Set patch options via CLI ([#336](https://github.com/ReVanced/revanced-cli/issues/336)) ([2300243](23002434b2))
* Show error about no installation device found at the beginning ([3300e6b](3300e6b433))
* Simplify command and option names and descriptions ([#338](https://github.com/ReVanced/revanced-cli/issues/338)) ([6e7797a](6e7797a3f0))
* Simplify option descriptions ([45c998b](45c998b335))

### BREAKING CHANGES

* Options have been renamed.
* This commit changes various CLI options and removes the `options.json` file. Instead, patch options can now be passed via CLI options
2024-11-10 14:57:43 +00:00
oSumAtrIX
5d8beae7be
chore: Merge branch dev to main (#328) 2024-11-10 15:55:48 +01:00
semantic-release-bot
dbbc00706d chore: Release v5.0.0-dev.11 [skip ci]
# [5.0.0-dev.11](https://github.com/ReVanced/revanced-cli/compare/v5.0.0-dev.10...v5.0.0-dev.11) (2024-11-10)

### Bug Fixes

* List if patch option is required ([#346](https://github.com/ReVanced/revanced-cli/issues/346)) ([98ff0c3](98ff0c34fa))
2024-11-10 14:49:46 +00:00
decipher
98ff0c34fa
fix: List if patch option is required (#346) 2024-11-10 15:47:55 +01:00
semantic-release-bot
77be717de0 chore: Release v5.0.0-dev.10 [skip ci]
# [5.0.0-dev.10](https://github.com/ReVanced/revanced-cli/compare/v5.0.0-dev.9...v5.0.0-dev.10) (2024-11-05)

### Bug Fixes

* Make CLI ArgGroup non-exclusive to be able to disable and enable patches at the same time ([1bb0d13](1bb0d13726))
2024-11-05 19:01:23 +00:00
oSumAtrIX
1bb0d13726
fix: Make CLI ArgGroup non-exclusive to be able to disable and enable patches at the same time 2024-11-05 19:59:09 +01:00
oSumAtrIX
18e56e6ff4
build(Needs bump): Bump dependencies 2024-11-05 19:58:21 +01:00
semantic-release-bot
94b9e2bc6c chore: Release v5.0.0-dev.9 [skip ci]
# [5.0.0-dev.9](https://github.com/ReVanced/revanced-cli/compare/v5.0.0-dev.8...v5.0.0-dev.9) (2024-11-05)

### Bug Fixes

* Print in new line correctly ([c2dc9d7](c2dc9d76be))
2024-11-05 15:55:05 +00:00
oSumAtrIX
c2dc9d76be
fix: Print in new line correctly 2024-11-05 16:53:03 +01:00
oSumAtrIX
3d0c8c1526
chore: Remove unused variable 2024-10-27 05:13:31 +01:00
oSumAtrIX
b54308b0e2
docs: Fix spelling mistakes [skip ci] 2024-10-23 21:08:49 +02:00
semantic-release-bot
504c6c1ea5 chore: Release v5.0.0-dev.8 [skip ci]
# [5.0.0-dev.8](https://github.com/ReVanced/revanced-cli/compare/v5.0.0-dev.7...v5.0.0-dev.8) (2024-10-17)
2024-10-17 18:06:32 +00:00
oSumAtrIX
f58b101636
build(Needs bump): Bump ReVanced Patcher 2024-10-17 20:02:26 +02:00
cyberboh
292b93b609
docs: Use correct option name in command example (#342) 2024-10-16 15:27:58 +02:00
8 changed files with 79 additions and 17 deletions

View File

@ -1,3 +1,67 @@
## [5.0.1](https://github.com/ReVanced/revanced-cli/compare/v5.0.0...v5.0.1) (2025-04-14)
### Bug Fixes
* Make mounting work again by bumping dependencies ([#359](https://github.com/ReVanced/revanced-cli/issues/359)) ([68a4872](https://github.com/ReVanced/revanced-cli/commit/68a48724ebf01a0c8f8adc0fec63037bff672dc9))
## [5.0.1-dev.1](https://github.com/ReVanced/revanced-cli/compare/v5.0.0...v5.0.1-dev.1) (2025-02-26)
### Bug Fixes
* Make mounting work again by bumping dependencies ([#359](https://github.com/ReVanced/revanced-cli/issues/359)) ([68a4872](https://github.com/ReVanced/revanced-cli/commit/68a48724ebf01a0c8f8adc0fec63037bff672dc9))
# [5.0.0](https://github.com/ReVanced/revanced-cli/compare/v4.6.0...v5.0.0) (2024-11-10)
### Bug Fixes
* Check for null when no device serial was specified ([1da8ae9](https://github.com/ReVanced/revanced-cli/commit/1da8ae9e46000dd3c4eecd793c559e75012cf535))
* List if patch option is required ([#346](https://github.com/ReVanced/revanced-cli/issues/346)) ([98ff0c3](https://github.com/ReVanced/revanced-cli/commit/98ff0c34fa71c3b3ecd96157d45a30ee2b8979c6))
* Make CLI ArgGroup non-exclusive to be able to disable and enable patches at the same time ([1bb0d13](https://github.com/ReVanced/revanced-cli/commit/1bb0d13726fd5790c59cb6d28df3618c7606710d))
* Make patches selectable by using a mutable collection for the selection option ([751fa1d](https://github.com/ReVanced/revanced-cli/commit/751fa1d889f40c51b291116029fd84f2b051f2f0))
* Make the patch command work without specifying any selection ([ba159a3](https://github.com/ReVanced/revanced-cli/commit/ba159a35a9a99d18a4c1e04128b08ae336a49b3e))
* Print in new line correctly ([c2dc9d7](https://github.com/ReVanced/revanced-cli/commit/c2dc9d76be33c98284741e23c406500483c47753))
* Use the first connected device when no ADB device is specified ([5f952f3](https://github.com/ReVanced/revanced-cli/commit/5f952f35f5cb388b6509b2b4d905b8143ebc7996))
### Features
* Set patch options via CLI ([#336](https://github.com/ReVanced/revanced-cli/issues/336)) ([2300243](https://github.com/ReVanced/revanced-cli/commit/23002434b2d51c2a3b30b33dd0526261432d90ce))
* Show error about no installation device found at the beginning ([3300e6b](https://github.com/ReVanced/revanced-cli/commit/3300e6b4333ed1c4e6785cb82eca9016fc6d4a20))
* Simplify command and option names and descriptions ([#338](https://github.com/ReVanced/revanced-cli/issues/338)) ([6e7797a](https://github.com/ReVanced/revanced-cli/commit/6e7797a3f0525a8f48af7182157da0d045600ac2))
* Simplify option descriptions ([45c998b](https://github.com/ReVanced/revanced-cli/commit/45c998b335b65ac233fece8b804dc7410142691c))
### BREAKING CHANGES
* Options have been renamed.
* This commit changes various CLI options and removes the `options.json` file. Instead, patch options can now be passed via CLI options
# [5.0.0-dev.11](https://github.com/ReVanced/revanced-cli/compare/v5.0.0-dev.10...v5.0.0-dev.11) (2024-11-10)
### Bug Fixes
* List if patch option is required ([#346](https://github.com/ReVanced/revanced-cli/issues/346)) ([98ff0c3](https://github.com/ReVanced/revanced-cli/commit/98ff0c34fa71c3b3ecd96157d45a30ee2b8979c6))
# [5.0.0-dev.10](https://github.com/ReVanced/revanced-cli/compare/v5.0.0-dev.9...v5.0.0-dev.10) (2024-11-05)
### Bug Fixes
* Make CLI ArgGroup non-exclusive to be able to disable and enable patches at the same time ([1bb0d13](https://github.com/ReVanced/revanced-cli/commit/1bb0d13726fd5790c59cb6d28df3618c7606710d))
# [5.0.0-dev.9](https://github.com/ReVanced/revanced-cli/compare/v5.0.0-dev.8...v5.0.0-dev.9) (2024-11-05)
### Bug Fixes
* Print in new line correctly ([c2dc9d7](https://github.com/ReVanced/revanced-cli/commit/c2dc9d76be33c98284741e23c406500483c47753))
# [5.0.0-dev.8](https://github.com/ReVanced/revanced-cli/compare/v5.0.0-dev.7...v5.0.0-dev.8) (2024-10-17)
# [5.0.0-dev.7](https://github.com/ReVanced/revanced-cli/compare/v5.0.0-dev.6...v5.0.0-dev.7) (2024-10-16) # [5.0.0-dev.7](https://github.com/ReVanced/revanced-cli/compare/v5.0.0-dev.6...v5.0.0-dev.7) (2024-10-16)

View File

@ -63,11 +63,11 @@
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/ReVanced/revanced-cli/release.yml) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/ReVanced/revanced-cli/release.yml)
![GPLv3 License](https://img.shields.io/badge/License-GPL%20v3-yellow.svg) ![GPLv3 License](https://img.shields.io/badge/License-GPL%20v3-yellow.svg)
Command line application to use ReVanced. Command-line application to use ReVanced.
## ❓ About ## ❓ About
ReVanced CLI is a command line application that uses [ReVanced Patcher](https://github.com/revanced/revanced-patcher) to patch Android apps. ReVanced CLI is a command-line application that uses [ReVanced Patcher](https://github.com/revanced/revanced-patcher) to patch Android apps.
## 💪 Features ## 💪 Features
@ -75,7 +75,7 @@ Some of the features ReVanced CLI provides are:
- 💉 **Patch apps**: Harness ReVanced Patcher to patch Android apps - 💉 **Patch apps**: Harness ReVanced Patcher to patch Android apps
- 💾 **Install and uninstall apps**: Install and uninstall Apps via ADB, - 💾 **Install and uninstall apps**: Install and uninstall Apps via ADB,
using the Android package manager, or by mounting using root permissions using the Android package manager or by mounting using root permissions
- 📃 **List patches from patch bundles**: List available patches, compatible packages, and versions - 📃 **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 - 💪 **Flexibility and functionality**: Apply any combination of patches to any version of Android apps

View File

@ -59,10 +59,10 @@ tasks {
} }
shadowJar { shadowJar {
exclude("/prebuilt/linux/aapt", "/prebuilt/windows/aapt.exe", "/prebuilt/*/aapt_*")
minimize { minimize {
exclude(dependency("org.jetbrains.kotlin:.*"))
exclude(dependency("org.bouncycastle:.*")) exclude(dependency("org.bouncycastle:.*"))
exclude(dependency("app.revanced:.*")) exclude(dependency("app.revanced:revanced-patcher"))
} }
} }

View File

@ -57,7 +57,7 @@ java -jar revanced-cli.jar patch -p patches.rvp --ei 123 --di 456 input.apk
You can combine the option `-e`, `-d`, `--ei`, `--di` and `--exclusive`. Here is an example: You can combine the option `-e`, `-d`, `--ei`, `--di` and `--exclusive`. Here is an example:
```bash ```bash
java -jar revanced-cli.jar patch -p patches.rvp --exclusive -i "Patch name" --ei 123 input.apk java -jar revanced-cli.jar patch -p patches.rvp --exclusive -e "Patch name" --ei 123 input.apk
``` ```

View File

@ -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 = 5.0.0-dev.7 version = 5.0.1

View File

@ -1,10 +1,10 @@
[versions] [versions]
shadow = "8.1.1" shadow = "8.1.1"
kotlin = "2.0.0" kotlin = "2.0.20"
kotlinx = "1.8.1" kotlinx = "1.8.1"
picocli = "4.7.6" picocli = "4.7.6"
revanced-patcher = "20.0.0" revanced-patcher = "21.0.0"
revanced-library = "3.0.0" revanced-library = "3.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" }

View File

@ -89,6 +89,7 @@ internal object ListPatchesCommand : Runnable {
buildString { buildString {
appendLine("Title: $title") appendLine("Title: $title")
description?.let { appendLine("Description: $it") } description?.let { appendLine("Description: $it") }
appendLine("Required: $required")
default?.let { default?.let {
appendLine("Key: $key") appendLine("Key: $key")
append("Default: $it") append("Default: $it")
@ -111,7 +112,7 @@ internal object ListPatchesCommand : Runnable {
if (withDescriptions) append("\nDescription: ${patch.description}") if (withDescriptions) append("\nDescription: ${patch.description}")
append("Enabled: ${patch.use}") append("\nEnabled: ${patch.use}")
if (withOptions && patch.options.isNotEmpty()) { if (withOptions && patch.options.isNotEmpty()) {
appendLine("\nOptions:") appendLine("\nOptions:")

View File

@ -29,11 +29,11 @@ internal object PatchCommand : Runnable {
@Spec @Spec
private lateinit var spec: CommandSpec private lateinit var spec: CommandSpec
@ArgGroup(multiplicity = "0..*") @ArgGroup(exclusive = false, multiplicity = "0..*")
private var selection = mutableSetOf<Selection>() private var selection = mutableSetOf<Selection>()
internal class Selection { internal class Selection {
@ArgGroup(exclusive = false, multiplicity = "1") @ArgGroup(exclusive = false)
internal var enabled: EnableSelection? = null internal var enabled: EnableSelection? = null
internal class EnableSelection { internal class EnableSelection {
@ -65,7 +65,7 @@ internal object PatchCommand : Runnable {
internal var options = mutableMapOf<String, Any?>() internal var options = mutableMapOf<String, Any?>()
} }
@ArgGroup(exclusive = false, multiplicity = "1") @ArgGroup(exclusive = false)
internal var disable: DisableSelection? = null internal var disable: DisableSelection? = null
internal class DisableSelection { internal class DisableSelection {
@ -291,7 +291,6 @@ internal object PatchCommand : Runnable {
patcherTemporaryFilesPath, patcherTemporaryFilesPath,
aaptBinaryPath?.path, aaptBinaryPath?.path,
patcherTemporaryFilesPath.absolutePath, patcherTemporaryFilesPath.absolutePath,
true,
), ),
).use { patcher -> ).use { patcher ->
val packageName = patcher.context.packageMetadata.packageName val packageName = patcher.context.packageMetadata.packageName
@ -357,8 +356,6 @@ internal object PatchCommand : Runnable {
// region Install. // region Install.
deviceSerial?.let { deviceSerial?.let {
val deviceSerial = it.ifEmpty { null }
runBlocking { runBlocking {
when (val result = installer!!.install(Installer.Apk(outputFilePath, packageName))) { when (val result = installer!!.install(Installer.Apk(outputFilePath, packageName))) {
RootInstallerResult.FAILURE -> logger.severe("Failed to mount the patched APK file") RootInstallerResult.FAILURE -> logger.severe("Failed to mount the patched APK file")