mirror of
https://github.com/ReVanced/revanced-cli.git
synced 2026-01-11 13:56:18 +00:00
Compare commits
14 Commits
v5.0.0-dev
...
v5.0.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a9f2538827 | ||
|
|
5f952f35f5 | ||
|
|
280ded2281 | ||
|
|
bb6bc1ba9a | ||
|
|
04b178b701 | ||
|
|
32e6aae132 | ||
|
|
7ee4f15ab9 | ||
|
|
a7af611ef0 | ||
|
|
9440dc769e | ||
|
|
751fa1d889 | ||
|
|
3300e6b433 | ||
|
|
ba159a35a9 | ||
|
|
74ff94037e | ||
|
|
7e8fb5722a |
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -10,6 +10,8 @@ on:
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
permissions:
|
||||
contents: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -46,5 +48,5 @@ jobs:
|
||||
|
||||
- name: Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: npm exec semantic-release
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
"assets": [
|
||||
"CHANGELOG.md",
|
||||
"gradle.properties"
|
||||
]
|
||||
],
|
||||
"message": "chore: Release v${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
||||
}
|
||||
],
|
||||
[
|
||||
|
||||
22
CHANGELOG.md
22
CHANGELOG.md
@@ -1,3 +1,25 @@
|
||||
# [5.0.0-dev.6](https://github.com/ReVanced/revanced-cli/compare/v5.0.0-dev.5...v5.0.0-dev.6) (2024-10-10)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Use the first connected device when no ADB device is specified ([5f952f3](https://github.com/ReVanced/revanced-cli/commit/5f952f35f5cb388b6509b2b4d905b8143ebc7996))
|
||||
|
||||
# [5.0.0-dev.5](https://github.com/ReVanced/revanced-cli/compare/v5.0.0-dev.4...v5.0.0-dev.5) (2024-09-30)
|
||||
|
||||
# [5.0.0-dev.4](https://github.com/ReVanced/revanced-cli/compare/v5.0.0-dev.3...v5.0.0-dev.4) (2024-09-17)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 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))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Show error about no installation device found at the beginning ([3300e6b](https://github.com/ReVanced/revanced-cli/commit/3300e6b4333ed1c4e6785cb82eca9016fc6d4a20))
|
||||
|
||||
# [5.0.0-dev.3](https://github.com/ReVanced/revanced-cli/compare/v5.0.0-dev.2...v5.0.0-dev.3) (2024-08-14)
|
||||
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ To use ReVanced CLI, you will need to fulfill specific requirements.
|
||||
|
||||
## 🤝 Requirements
|
||||
|
||||
- Java Runtime Environment 11 ([Azul Zulu JRE](https://www.azul.com/downloads/?version=java-11-lts&package=jdk#zulu) or [OpenJDK](https://jdk.java.net/archive/))
|
||||
- Java Runtime Environment 11 ([Azul Zulu JRE](https://www.azul.com/downloads/?version=java-11-lts&package=jre#zulu) or [OpenJDK](https://jdk.java.net/archive/))
|
||||
- [Android Debug Bridge (ADB)](https://developer.android.com/studio/command-line/adb) if you want to install the patched APK file on your device
|
||||
- An ABI other than ARMv7 such as x86 or x86-64 (or a custom AAPT binary that supports ARMv7)
|
||||
- x86 or x86-64 (For [other architectures](https://github.com/ReVanced/revanced-manager/tree/main/android/app/src/main/jniLibs) use the `--custom-aapt2-binary` option)
|
||||
|
||||
## ⏭️ Whats next
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ java -jar revanced-cli.jar patch -p patches.rvp input.apk
|
||||
You can also use multiple RVP files:
|
||||
|
||||
```bash
|
||||
java -jar revanced-cli.jar patch -p patches.rvp -b another-patches.rvp input.apk
|
||||
java -jar revanced-cli.jar patch -p patches.rvp -p another-patches.rvp input.apk
|
||||
```
|
||||
|
||||
To change the default set of enabled or disabled patches, use the option `-e` or `-d` to enable or disable specific patches.
|
||||
@@ -51,7 +51,7 @@ java -jar revanced-cli.jar list-patches patches.rvp
|
||||
Then you can use the indices to enable or disable patches:
|
||||
|
||||
```bash
|
||||
java -jar revanced-cli.jar patch -b patches.rvp --ei 123 --di 456 input.apk
|
||||
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:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
org.gradle.parallel = true
|
||||
org.gradle.caching = true
|
||||
kotlin.code.style = official
|
||||
version = 5.0.0-dev.3
|
||||
version = 5.0.0-dev.6
|
||||
|
||||
2387
package-lock.json
generated
2387
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
||||
"@saithodev/semantic-release-backmerge": "^4.0.1",
|
||||
"@semantic-release/changelog": "^6.0.3",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"gradle-semantic-release-plugin": "^1.9.1",
|
||||
"semantic-release": "^23.0.8"
|
||||
"gradle-semantic-release-plugin": "^1.10.1",
|
||||
"semantic-release": "^24.1.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ internal object PatchCommand : Runnable {
|
||||
private lateinit var spec: CommandSpec
|
||||
|
||||
@ArgGroup(multiplicity = "0..*")
|
||||
private lateinit var selection: Set<Selection>
|
||||
private var selection = mutableSetOf<Selection>()
|
||||
|
||||
internal class Selection {
|
||||
@ArgGroup(exclusive = false, multiplicity = "1")
|
||||
@@ -245,6 +245,34 @@ internal object PatchCommand : Runnable {
|
||||
keyStoreFilePath ?: outputFilePath.parentFile
|
||||
.resolve("${outputFilePath.nameWithoutExtension}.keystore")
|
||||
|
||||
val installer = if (deviceSerial != null) {
|
||||
val deviceSerial = deviceSerial!!.ifEmpty { null }
|
||||
|
||||
try {
|
||||
if (mount) {
|
||||
AdbRootInstaller(deviceSerial)
|
||||
} else {
|
||||
AdbInstaller(deviceSerial)
|
||||
}
|
||||
} catch (e: DeviceNotFoundException) {
|
||||
if (deviceSerial!!.isNotEmpty()) {
|
||||
logger.severe(
|
||||
"Device with serial $deviceSerial not found to install to. " +
|
||||
"Ensure the device is connected and the serial is correct when using the --install option.",
|
||||
)
|
||||
} else {
|
||||
logger.severe(
|
||||
"No device has been found to install to. " +
|
||||
"Ensure a device is connected when using the --install option.",
|
||||
)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
} else {
|
||||
null
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
// region Load patches
|
||||
@@ -332,13 +360,7 @@ internal object PatchCommand : Runnable {
|
||||
val deviceSerial = it.ifEmpty { null }
|
||||
|
||||
runBlocking {
|
||||
val result = if (mount) {
|
||||
AdbRootInstaller(deviceSerial)
|
||||
} else {
|
||||
AdbInstaller(deviceSerial)
|
||||
}.install(Installer.Apk(outputFilePath, packageName))
|
||||
|
||||
when (result) {
|
||||
when (val result = installer!!.install(Installer.Apk(outputFilePath, packageName))) {
|
||||
RootInstallerResult.FAILURE -> logger.severe("Failed to mount the patched APK file")
|
||||
is AdbInstallerResult.Failure -> logger.severe(result.exception.toString())
|
||||
else -> logger.info("Installed the patched APK file")
|
||||
@@ -366,14 +388,14 @@ internal object PatchCommand : Runnable {
|
||||
packageVersion: String,
|
||||
): Set<Patch<*>> = buildSet {
|
||||
val enabledPatchesByName =
|
||||
selection.asSequence().mapNotNull { it.enabled?.selector?.name }.toSet()
|
||||
selection.mapNotNull { it.enabled?.selector?.name }.toSet()
|
||||
val enabledPatchesByIndex =
|
||||
selection.asSequence().mapNotNull { it.enabled?.selector?.index }.toSet()
|
||||
selection.mapNotNull { it.enabled?.selector?.index }.toSet()
|
||||
|
||||
val disabledPatches =
|
||||
selection.asSequence().mapNotNull { it.disable?.selector?.name }.toSet()
|
||||
selection.mapNotNull { it.disable?.selector?.name }.toSet()
|
||||
val disabledPatchesByIndex =
|
||||
selection.asSequence().mapNotNull { it.disable?.selector?.index }.toSet()
|
||||
selection.mapNotNull { it.disable?.selector?.index }.toSet()
|
||||
|
||||
this@filterPatchSelection.withIndex().forEach patchLoop@{ (i, patch) ->
|
||||
val patchName = patch.name!!
|
||||
|
||||
Reference in New Issue
Block a user