Lucaskyy
82b1e66d54
fix: MethodSignature#resolved throwing an exception
2022-04-14 19:11:38 +02:00
Lucaskyy
fd630cd429
test: Add tests for unknown opcodes
2022-04-14 18:37:43 +02:00
Lucaskyy
f4a47d4dc8
feat: Allow unknown opcodes using null
...
This is the same as `??` in IDA signatures.
2022-04-14 18:29:37 +02:00
Lucaskyy
3bfc24fc16
chore: remove todo
2022-04-14 18:23:26 +02:00
Lucaskyy
25bba2c1d8
refactor: remove all @Suppression's
2022-04-14 16:45:16 +02:00
Lucaskyy
4dea27e831
refactor: format code
2022-04-14 16:44:02 +02:00
Lucaskyy
a0d6d46217
fix: Suppress unused for addFiles
2022-04-14 16:42:51 +02:00
Lucaskyy
643a14e664
feat: Add warnings for Fuzzy resolver
2022-04-14 16:42:16 +02:00
Lucaskyy
355e6d82cc
docs: fix wrong wording
2022-04-14 12:33:31 +02:00
Lucaskyy
df7503b47b
feat: add extensions for cloning methods
2022-04-14 12:31:38 +02:00
Lucaskyy
a01dded092
test: fix outdated test
2022-04-14 12:02:40 +02:00
Lucaskyy
9ae95174e6
refactor: replace asInstructions with toInstruction to follow proper naming scheme
2022-04-14 12:00:50 +02:00
Lucaskyy
e161f7fea4
revert: AccessFlag extensions not working with IDE
2022-04-14 11:59:23 +02:00
Lucaskyy
200e3c9fdb
refactor: replace Array with Iterable
2022-04-14 11:53:08 +02:00
oSumAtrIX
f0f34031dd
fix: replaceWith not replacing classes with used class proxies
...
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de >
2022-04-14 11:00:25 +02:00
oSumAtrIX
560c485ab0
fix: null check causing an exception
...
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de >
2022-04-14 10:44:15 +02:00
oSumAtrIX
cc5a414692
add: throw on getting result of MethodSignature if null
...
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de >
2022-04-14 09:44:32 +02:00
oSumAtrIX
c2a334eb3f
refact: include each signature in its corresponding patch
...
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de >
2022-04-14 08:48:05 +02:00
Lucaskyy
1b2fbbca26
refactor: rename method to resolverMethod
2022-04-13 21:04:26 +02:00
Lucaskyy
4458141d6d
fix: remove leftover debug code
2022-04-13 20:26:43 +02:00
Lucaskyy
8544fc4cbc
feat: Add patch metadata
...
Fixes ReVancedTeam/revanced-patches#1
2022-04-13 20:25:51 +02:00
Lucaskyy
a492808021
feat: add fuzzy resolver
...
fixed docs for MethodSignature & added tests for fuzzy resolver
2022-04-13 20:17:31 +02:00
Lucaskyy
0204eee79e
refactor: migrate signature schema changes to Patcher
...
also updated Extensions, for good measure.
2022-04-13 19:42:50 +02:00
oSumAtrIX
4022b8b847
feat: add missing test for fields
...
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de >
2022-04-13 02:59:06 +02:00
oSumAtrIX
8daf877fac
style: reformat code
...
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de >
2022-04-13 02:47:53 +02:00
oSumAtrIX
7d38bb0baa
feat: remaining mutable EncodedValue classes
2022-04-13 00:19:09 +02:00
Lucaskyy
5f71a342ac
feat: allow classes to be overwritten in addFiles and resolve signatures when applyPatches is called
2022-04-12 19:11:07 +02:00
Lucaskyy
866b03af21
fix: always return PatchResultSuccess on patch success
2022-04-11 17:34:43 +02:00
Lucaskyy
4c1a42b216
add: optional callback for CLI
2022-04-11 17:27:12 +02:00
Lucaskyy
264989f488
refactor: Change all references from Array to Iterable
...
BREAKING CHANGE: arrayOf has to be changed to listOf.
2022-04-11 16:29:53 +02:00
oSumAtrIX
4281546f69
fix: adding existing classes to the patchers cache
2022-04-11 03:52:04 +02:00
Lucaskyy
147195647c
fix: Classes not being written properly because of array shifting
...
We now use a MutableList to replace it at the proper index, and use a ListBackedSet, so we don't copy List's to Set's for no reason.
This was a very bad issue. The array was shifted every time we removed the original class, the fact we even got a "working" dex file surprises me. Thankfully, this issue is now solved, and we lived happily after.
2022-04-09 23:41:54 +02:00
Lucaskyy
433914feda
revert: previous commits check for dupes in dexFile, not cache
...
This reverts commit aed4fd9a3c .
This reverts commit 622138736d .
2022-04-09 22:46:24 +02:00
Lucaskyy
622138736d
perf: use Set instead of List since there are no dupes
2022-04-09 22:31:32 +02:00
Lucaskyy
aed4fd9a3c
perf: use String List and compare instead of any lambda
2022-04-09 22:04:00 +02:00
Lucaskyy
32e645850d
refactor: bump multidexlib2 to 2.5.2.r2
...
BREAKING CHANGE: Method signature of Patcher#save() was changed to comply with the changes of multidexlib2.
2022-04-09 20:33:22 +02:00
Lucaskyy
e0d29cf450
refactor: bump multidexlib2, dexlib2 and smali
2022-04-09 18:20:12 +02:00
oSumAtrIX
2b888e381c
add: addFiles method to merge additional dex containers
2022-04-09 04:51:31 +02:00
oSumAtrIX
f72dd68ec5
fix: throwing in case the opcode patterns do not match
2022-04-09 04:50:38 +02:00
Lucaskyy
3b68d5c65e
fix: returning failure on success
...
oh wow, that's an oopsie
2022-04-09 00:03:21 +02:00
Lucaskyy
eed1cfda7b
feat: add immutableMethod
...
added docs
2022-04-08 23:51:31 +02:00
Lucaskyy
8b70bb4290
fix: applyPatches not returning successful patches
2022-04-08 23:50:26 +02:00
Lucaskyy
dbda641d0c
chore: format code
2022-04-08 23:28:32 +02:00
oSumAtrIX
5ae5e98f1f
fix: compareSignatureToMethod not matching correctly in case opcodes are null
2022-04-08 23:25:44 +02:00
Lucaskyy
1ba40ab1cb
refactor: make method a property
2022-04-08 23:15:40 +02:00
Lucaskyy
e9c119ebb1
refactor: cleanup SignatureResolver.kt
2022-04-08 22:59:20 +02:00
Lucaskyy
1bd6d1d5b8
test: fix test with previous changes
2022-04-08 22:59:03 +02:00
Lucaskyy
4e7378bd79
refactor: rename resolveAndGetMethod to method
2022-04-08 22:58:39 +02:00
Lucaskyy
28ed4793e3
refactor: cleanup Patcher.kt
2022-04-08 22:56:24 +02:00
Lucaskyy
312235b194
fix: use Array instead of Iterable for methodParameters
2022-04-08 22:55:40 +02:00