60 Commits

Author SHA1 Message Date
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
oSumAtrIX
024fa867e1
fix: qualifying Element with wrong package
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-06-05 08:03:31 +02:00
oSumAtrIX
fc05fe79de
fix: failing tests temporarily
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-06-05 08:03:29 +02:00
oSumAtrIX
99319e63da
add: resource patcher
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-06-05 08:03:28 +02:00
oSumAtrIX
612515acf8
feat: string signature (#22)
* feat: string signature

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>

* fix: signature in test

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>

* fix: make string signature optional

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>

* fix: use of `compareOpcodes` when comparing string signatures

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>

* add: `PackageMetadata` for signatures

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-06-05 08:03:27 +02:00
oSumAtrIX
6cb1fdf617
feat: properly manage ClassProxy & add ProxyBackedClassList
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-06-05 08:03:25 +02:00
Lucaskyy
8f1a629191
fix: make warnings nullable instead of lateinit 2022-06-05 08:03:22 +02:00
Lucaskyy
e6086511e5
refactor: remove all parameter names 2022-06-05 08:03:21 +02:00
Lucaskyy
bca948658e
test: Add tests for unknown opcodes 2022-06-05 08:03:20 +02:00
Lucaskyy
715a2ad025
feat: Add warnings for Fuzzy resolver 2022-06-05 08:03:18 +02:00
Lucaskyy
6c9797583d
test: fix outdated test 2022-06-05 08:03:17 +02:00
Lucaskyy
3cf07f5ce2
refactor: replace asInstructions with toInstruction to follow proper naming scheme 2022-06-05 08:03:17 +02:00
oSumAtrIX
1f08da8b2a
refact: include each signature in its corresponding patch
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-06-05 08:03:14 +02:00
Lucaskyy
b2dab3fabf
refactor: rename method to resolverMethod 2022-06-05 08:03:14 +02:00
Lucaskyy
642e9031eb
feat: Add patch metadata
Fixes ReVancedTeam/revanced-patches#1
2022-06-05 08:03:13 +02:00
Lucaskyy
7a56dca004
feat: add fuzzy resolver
fixed docs for MethodSignature & added tests for fuzzy resolver
2022-06-05 08:03:13 +02:00
Lucaskyy
18853f70a4
refactor: migrate signature schema changes to Patcher
also updated Extensions, for good measure.
2022-06-05 08:03:13 +02:00
oSumAtrIX
6b8b0573d4
feat: add missing test for fields
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-06-05 08:03:12 +02:00
Lucaskyy
72f3cad3f9
refactor: Change all references from Array to Iterable
BREAKING CHANGE: arrayOf has to be changed to listOf.
2022-06-05 08:03:10 +02:00
Lucaskyy
94dbb573cf
refactor: bump multidexlib2, dexlib2 and smali 2022-06-05 08:03:07 +02:00
Lucaskyy
c267b12a7d
refactor: make method a property 2022-06-05 08:03:04 +02:00