80 Commits

Author SHA1 Message Date
oSumAtrIX
6b8977f178
refactor: improve structure and public API
This commit introduces a couple changes besides the refactor. Executing patches can be cancelled, multiple bundles loaded into the same class loader and `Patch.execute` does not have to return anymore.

BREAKING CHANGE: Various public APIs have been changed. The `Version` annotation has been removed. Patches do not return anything anymore and instead throw `PatchException`. Multiple patch bundles can now be loaded in a single ClassLoader to bypass class loader isolation.
2023-08-19 01:45:27 +02:00
oSumAtrIX
d5f89a903f
build(Needs bump)!: Bump dependencies
BREAKING CHANGE: This bump updates smali, a crucial dependency
2023-08-11 02:51:37 +02:00
Palm
69e4a49065
feat: remove Path option (#202)
BREAKING CHANGE: This removes the previously available `Path` option
2023-07-26 04:11:21 +02:00
oSumAtrIX
2a453d51a8
refactor: rename helper methods for tests 2023-06-10 01:55:05 +02:00
oSumAtrIX
43d6868d1f
fix: add imports to fix failing tests 2023-06-10 01:43:09 +02:00
oSumAtrIX
efdd01a988
refactor!: use proper extension function names
BREAKING CHANGE: This changes the names of extension functions
2023-06-07 03:43:13 +02:00
oSumAtrIX
aacf900764
fix!: implement extension functions consistently
BREAKING CHANGE: This changes the name of functions
2023-06-07 03:32:19 +02:00
oSumAtrIX
49c173dc14
feat: add overload to get instruction as type 2023-05-05 23:36:30 +02:00
oSumAtrIX
e4c3e9ffc5
refactor: remove unnecessary annotations
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-26 23:18:35 +01:00
oSumAtrIX
c2a5a55e67
refactor: remove unnecessary test 2022-12-11 03:01:41 +01:00
oSumAtrIX
ba9d998681
feat: apply changes from ReVanced Patcher
BREAKING-CHANGE: Some annotations have been removed regarding fingerprints and patches.
2022-11-23 00:29:12 +01:00
oSumAtrIX
4aa14bbb85
refactor: improve structuring of classes and their implementations
BREAKING CHANGE: various changes in which packages classes previously where and their implementation
2022-10-05 03:57:40 +02:00
oSumAtrIX
db21d5e953
refactor: remove unused import 2022-10-04 08:30:17 +02:00
oSumAtrIX
4d581811db
feat!: seal abstract class Patch as an interface 2022-10-04 08:30:17 +02:00
oSumAtrIX
8c502448be
feat!: remove unused annotation MatchingMethod 2022-10-04 08:30:16 +02:00
oSumAtrIX
fd5c878cee
fix!: revert reverting changes
BREAKING-CHANGE: Imports will have to be updated from `MethodFingerprintUtils` to `MethodFingerprint.Companion`.
2022-09-21 16:45:16 +02:00
bogadana
124332f0e9
revert: revert breaking changes (#106) 2022-09-21 15:22:55 +02:00
oSumAtrIX
76676fb567
fix(tests): access patternScanResult through scanResult 2022-09-21 03:42:29 +02:00
Sculas
172655bde0
feat: add PathOption back
Now backed by a String.
2022-09-09 16:23:21 +02:00
Sculas
e722e3f4f9
feat: improved Patch Options
Removed a lot of the type mess. There's still some duplicated code PatchOption.kt, but I'm afraid there's nothing I can do about that. It's not a big deal anyway.
2022-09-09 16:10:30 +02:00
Sculas
c348c1f0a0
refactor: remove PathOption and FileOption 2022-09-09 15:04:17 +02:00
Sculas
b873228ef0
fix: invalid type propagation in options
Fixes #98
2022-09-08 16:49:06 +02:00
Sculas
25f74dc5e9
feat: SincePatcher annotation 2022-09-08 14:41:42 +02:00
Sculas
aff4968e6f
fix: handle option types and nulls properly 2022-09-08 11:29:06 +02:00
Sculas
79f91e0e5a
fix: invalid types for example options 2022-09-07 23:22:34 +02:00
Sculas
6b909c1ee6
refactor: Improve Patch Options
It's so much better now. Really happy with the current system.

BREAKING CHANGE: Options has been moved from Patch to a new interface called OptionsContainer and are now handled entirely different. Make sure to check the examples to understand how it works.
2022-09-07 20:55:35 +02:00
Sculas
d6308e126c
fix: add tests for PathOption 2022-09-06 22:35:00 +02:00
Sculas
53e807dec1
refactor: add PatchOption.PathOption 2022-09-06 21:43:45 +02:00
oSumAtrIX
7b2d058144
fix: revert soft dependencies 2022-08-03 03:45:34 +02:00
Sculas
2572cd04b5
feat: add getValue & setValue for PatchOption 2022-08-02 23:30:38 +02:00
Sculas
14a73bfcaf
fix: check if patch option requirement is met 2022-08-02 22:41:34 +02:00
Sculas
371f0c4d0b
feat: PatchOptions#nullify to nullify an option 2022-08-02 22:32:55 +02:00
Sculas
1b42f65d95
refactor: migrate to custom exceptions for patch options 2022-08-02 22:16:37 +02:00
Sculas
67a5237541
test: refactor & add more tests 2022-08-02 22:00:32 +02:00
Sculas
2431785d0e
feat: registry for patch options
BREAKING CHANGE: Patch options now use the PatchOptions registry class instead of an Iterable. This change requires modifications to existing patches using this API.
2022-08-02 21:10:14 +02:00
Sculas
ec1d8a8fba
refactor: remove DependencyType.SOFT (#82)
BREAKING-CHANGE: DependencyType.SOFT has now been removed after it was deprecated. There is no direct replacement for this. Please look into Patch Options instead, which supersedes this.
2022-08-02 00:47:32 +02:00
Sculas
fbb09f38dc
feat: patch options (#81)
* feat: Patch Options

* refactor: remove delegate property

* feat: List patch options

* refactor: add setter example to PatchOptionsUsage.kt

* docs: add docs for PatchOptions

* docs: tidy docs
2022-08-02 00:31:00 +02:00
Sculas
8c12f8d488
feat: Soft Dependencies for Patches 2022-07-31 16:50:59 +02:00
Sculas
4813a8b48e
chore: remove import 2022-07-31 15:01:38 +02:00
Sculas
d5c66022c9
refactor: get rid of package names in example 2022-07-31 15:01:13 +02:00
oSumAtrIX
dd941233ca
refactor: improve the addInstructions extension method further more 2022-07-09 06:26:05 +02:00
Lucaskyy
6bfe5716c3
feat: Improve Smali Compiler
- Branching support has been added. See InlineSmaliCompilerTest.kt for an example.
- Some other improvements have been made too.
2022-06-27 21:11:59 +02:00
Lucaskyy
f565c4f6a7
refactor: improve ResourceData.kt
Old methods have been marked as deprecated, and will be removed in the future.

- ResourceData.kt was made an Iterable<File>, and the forEach method was removed in favor of Kotlin's forEach function. (no modifications required)
- The resolve method was deprecated in favor of a new operator getter function, which can be either called using get(path) or data[path]. This keeps backwards compatibility with the old get method.
- The getXmlEditor method was deprecated in favor of the new xmlEditor variable, which is a XmlFileHolder which has an operator getter which acts like an array. This is syntactically better.
2022-06-26 17:14:38 +02:00
Lucaskyy
35749454ab
refactor: remove deprecated methods in ResourceData.kt 2022-06-26 16:53:25 +02:00
Lucaskyy
081a5a6849
refactor: fmt ExampleBytecodePatch.kt 2022-06-26 16:21:55 +02:00
oSumAtrIX
efa8ea1445 refactor: migrate from Signature to Fingerprint
BREAKING CHANGE: Not backwards compatible, since a lot of classes where renamed.
2022-06-26 15:10:54 +02:00
oSumAtrIX
e47b67d7ec
feat: simplify adding instructions 2022-06-20 21:20:51 +02:00
oSumAtrIX
5535eb4f01
refactor: improve ExampleResourcePatch
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-06-05 08:03:33 +02:00
oSumAtrIX
ec9fd15f9b
feat: PatchLoader
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-06-05 08:03:32 +02:00
oSumAtrIX
d20f7fd6e1
feat: use annotations instead of metadata objects
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-06-05 08:03:31 +02:00