-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* revanced-cli `v5.0.0` * revanced-patches `v5.0.2` * implement all required changes introduced by revanced-cli v5
- Loading branch information
1 parent
2df771c
commit a67c819
Showing
10 changed files
with
49 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
*.apk | ||
*.zip | ||
*.jar | ||
*.rvp | ||
|
||
magiskmodule/README.md | ||
magiskmodule/module.prop | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule revanced-cli
updated
28 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
From 3f81a5fc02129d13a873fbcdb43ab665a234a821 Mon Sep 17 00:00:00 2001 | ||
From feedf61f73fa43fa162a2f72baee1204d3d9bb43 Mon Sep 17 00:00:00 2001 | ||
From: programminghoch10 <[email protected]> | ||
Date: Mon, 28 Aug 2023 13:02:03 +0200 | ||
Subject: [PATCH] Add list packages command | ||
|
||
--- | ||
.../cli/command/ListPackagesCommand.kt | 37 +++++++++++++++++++ | ||
.../cli/command/ListPackagesCommand.kt | 38 +++++++++++++++++++ | ||
.../app/revanced/cli/command/MainCommand.kt | 1 + | ||
2 files changed, 38 insertions(+) | ||
2 files changed, 39 insertions(+) | ||
create mode 100644 src/main/kotlin/app/revanced/cli/command/ListPackagesCommand.kt | ||
|
||
diff --git a/src/main/kotlin/app/revanced/cli/command/ListPackagesCommand.kt b/src/main/kotlin/app/revanced/cli/command/ListPackagesCommand.kt | ||
new file mode 100644 | ||
index 0000000..2b5477f | ||
index 0000000..d2dae8f | ||
--- /dev/null | ||
+++ b/src/main/kotlin/app/revanced/cli/command/ListPackagesCommand.kt | ||
@@ -0,0 +1,37 @@ | ||
@@ -0,0 +1,38 @@ | ||
+package app.revanced.cli.command | ||
+ | ||
+import app.revanced.patcher.PatchBundleLoader | ||
+import app.revanced.patcher.patch.loadPatchesFromJar | ||
+import picocli.CommandLine.Command | ||
+import picocli.CommandLine.Parameters | ||
+import java.io.File | ||
|
@@ -30,20 +30,21 @@ index 0000000..2b5477f | |
+ private val logger = Logger.getLogger(ListPackagesCommand::class.java.name) | ||
+ | ||
+ @Parameters( | ||
+ description = ["Paths to patch bundles"], arity = "1..*" | ||
+ description = ["Paths to RVP files."], | ||
+ arity = "1..*", | ||
+ ) | ||
+ private lateinit var patchBundles: Array<File> | ||
+ private lateinit var patchesFiles: Set<File> | ||
+ | ||
+ override fun run() { | ||
+ val supportedVersions: HashMap<String, HashSet<String>> = HashMap() | ||
+ val patchBundle = PatchBundleLoader.Jar(*patchBundles) | ||
+ val patchBundle = loadPatchesFromJar(patchesFiles) | ||
+ patchBundle | ||
+ .filter { it.compatiblePackages != null } | ||
+ .flatMap { it.compatiblePackages!!.toList() } | ||
+ .forEach { | ||
+ if (!supportedVersions.containsKey(it.name)) | ||
+ supportedVersions[it.name] = HashSet() | ||
+ it.versions?.let { versions -> supportedVersions[it.name]!!.addAll(versions) } | ||
+ if (!supportedVersions.containsKey(it.first)) | ||
+ supportedVersions[it.first] = HashSet() | ||
+ it.second?.let { versions -> supportedVersions[it.first]!!.addAll(versions) } | ||
+ } | ||
+ logger.info( | ||
+ supportedVersions.keys.joinToString("\n") { | ||
|
@@ -54,17 +55,17 @@ index 0000000..2b5477f | |
+} | ||
\ No newline at end of file | ||
diff --git a/src/main/kotlin/app/revanced/cli/command/MainCommand.kt b/src/main/kotlin/app/revanced/cli/command/MainCommand.kt | ||
index 4d33a4d..eb754a2 100644 | ||
index 5ceeef1..50ca16c 100644 | ||
--- a/src/main/kotlin/app/revanced/cli/command/MainCommand.kt | ||
+++ b/src/main/kotlin/app/revanced/cli/command/MainCommand.kt | ||
@@ -36,6 +36,7 @@ private object CLIVersionProvider : IVersionProvider { | ||
@@ -35,6 +35,7 @@ private object CLIVersionProvider : IVersionProvider { | ||
subcommands = [ | ||
PatchCommand::class, | ||
OptionsCommand::class, | ||
ListPatchesCommand::class, | ||
+ ListPackagesCommand::class, | ||
ListCompatibleVersions::class, | ||
UtilityCommand::class, | ||
], | ||
-- | ||
2.43.0 | ||
2.45.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,39 @@ | ||
From 61c466539d43ec65b241d319dd7089fa949c3a9b Mon Sep 17 00:00:00 2001 | ||
From 56ba7c0783104ea04c54992a5b4ec730e9c185bf Mon Sep 17 00:00:00 2001 | ||
From: programminghoch10 <[email protected]> | ||
Date: Mon, 28 Aug 2023 11:25:11 +0200 | ||
Subject: [PATCH] Load classes in dex mode | ||
|
||
Required for patching on android | ||
--- | ||
src/main/kotlin/app/revanced/cli/command/PatchCommand.kt | 7 ++++++- | ||
1 file changed, 6 insertions(+), 1 deletion(-) | ||
src/main/kotlin/app/revanced/cli/command/PatchCommand.kt | 8 +++++++- | ||
1 file changed, 7 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/src/main/kotlin/app/revanced/cli/command/PatchCommand.kt b/src/main/kotlin/app/revanced/cli/command/PatchCommand.kt | ||
index 410c94a..cf780a1 100644 | ||
index efbc755..8bb6f68 100644 | ||
--- a/src/main/kotlin/app/revanced/cli/command/PatchCommand.kt | ||
+++ b/src/main/kotlin/app/revanced/cli/command/PatchCommand.kt | ||
@@ -244,7 +244,12 @@ internal object PatchCommand : Runnable { | ||
@@ -7,6 +7,7 @@ import app.revanced.library.setOptions | ||
import app.revanced.patcher.Patcher | ||
import app.revanced.patcher.PatcherConfig | ||
import app.revanced.patcher.patch.Patch | ||
+import app.revanced.patcher.patch.loadPatchesFromDex | ||
import app.revanced.patcher.patch.loadPatchesFromJar | ||
import kotlinx.coroutines.runBlocking | ||
import picocli.CommandLine | ||
@@ -279,7 +280,12 @@ internal object PatchCommand : Runnable { | ||
|
||
logger.info("Loading patches") | ||
|
||
- val patches = PatchBundleLoader.Jar(*patchBundles.toTypedArray()) | ||
- val patches = loadPatchesFromJar(patchesFiles) | ||
+ val patches = try { | ||
+ val DexClassLoaderClass = Class.forName("dalvik.system.DexClassLoader") | ||
+ PatchBundleLoader.Dex(*patchBundles.toTypedArray()) | ||
+ loadPatchesFromDex(patchesFiles) | ||
+ } catch (_: ClassNotFoundException) { | ||
+ PatchBundleLoader.Jar(*patchBundles.toTypedArray()) | ||
+ loadPatchesFromJar(patchesFiles) | ||
+ } | ||
|
||
// Warn if a patch can not be found in the supplied patch bundles. | ||
if (warn) { | ||
// endregion | ||
|
||
-- | ||
2.43.0 | ||
2.45.2 | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#!/bin/bash | ||
|
||
REVANCED_INTEGRATIONS="v1.16.0" | ||
REVANCED_PATCHES="v4.17.0" | ||
REVANCED_CLI="v4.6.0" | ||
REVANCED_PATCHES="v5.0.2" | ||
REVANCED_CLI="v5.0.0" |