Commit graph

772 commits

Author SHA1 Message Date
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
oSumAtrIX
9659a61c5c
fix: adding existing classes to the patchers cache 2022-06-05 08:03:10 +02:00
Lucaskyy
b892729332
chore: update kotlin, don't shade deps, publish to maven local, make deps api instead of implementation 2022-06-05 08:03:09 +02:00
Lucaskyy
6e4db110c8
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-06-05 08:03:09 +02:00
Lucaskyy
e810197e2a
revert: previous commits check for dupes in dexFile, not cache
This reverts commit aed4fd9a3c.
This reverts commit 622138736d.
2022-06-05 08:03:08 +02:00
Lucaskyy
e65ebd27c2
perf: use Set instead of List since there are no dupes 2022-06-05 08:03:08 +02:00
Lucaskyy
5bd416b409
perf: use String List and compare instead of any lambda 2022-06-05 08:03:08 +02:00
Lucaskyy
a6c6b4979a
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-06-05 08:03:07 +02:00
Lucaskyy
db10ab03be
ci: Fix Unauthorized error 2022-06-05 08:03:07 +02:00
Lucaskyy
94dbb573cf
refactor: bump multidexlib2, dexlib2 and smali 2022-06-05 08:03:07 +02:00
oSumAtrIX
08253ee010
add: addFiles method to merge additional dex containers 2022-06-05 08:03:06 +02:00
oSumAtrIX
3144ec872a
fix: throwing in case the opcode patterns do not match 2022-06-05 08:03:06 +02:00
Lucaskyy
48c4ea2f6d
fix: returning failure on success
oh wow, that's an oopsie
2022-06-05 08:03:06 +02:00
Lucaskyy
c63b20fa65
feat: add immutableMethod
added docs
2022-06-05 08:03:05 +02:00
Lucaskyy
f806cb38c5
fix: applyPatches not returning successful patches 2022-06-05 08:03:05 +02:00
Lucaskyy
6c3e2d79ea
chore: format code 2022-06-05 08:03:05 +02:00
oSumAtrIX
cca12aa34a
fix: compareSignatureToMethod not matching correctly in case opcodes are null 2022-06-05 08:03:04 +02:00
Lucaskyy
c267b12a7d
refactor: make method a property 2022-06-05 08:03:04 +02:00
Lucaskyy
eef448cc39
refactor: cleanup SignatureResolver.kt 2022-06-05 08:03:04 +02:00
Lucaskyy
45303f66ec
test: fix test with previous changes 2022-06-05 08:03:03 +02:00
Lucaskyy
783fbf43f2
refactor: rename resolveAndGetMethod to method 2022-06-05 08:03:03 +02:00
Lucaskyy
59189058ac
refactor: cleanup Patcher.kt 2022-06-05 08:03:03 +02:00
Lucaskyy
dfac8f03a3
fix: use Array instead of Iterable for methodParameters 2022-06-05 08:03:02 +02:00
Lucaskyy
b44bf4c267
chore: move replace extension method to Extensions.kt 2022-06-05 08:03:02 +02:00
Lucaskyy
066ad274ed
docs: fixup 2022-06-05 08:03:02 +02:00
Lucaskyy
a8653fe6a0
chore: publish jar with dependencies 2022-06-05 08:03:01 +02:00
oSumAtrIX
139a23b750
feat: Improve SignatureResolver 2022-06-05 08:03:01 +02:00
oSumAtrIX
0d8d19e708
feat: Finish first patcher test 2022-06-05 08:03:00 +02:00
oSumAtrIX
a1e909b163
fix: Search method map for existing class proxy 2022-06-05 08:03:00 +02:00
oSumAtrIX
e4157332d3
add: MutableMethodImplementation.addInstructions extension 2022-06-05 08:03:00 +02:00
oSumAtrIX
923efc4caf
add: TODO for mutable encoded value clones 2022-06-05 08:02:59 +02:00
oSumAtrIX
bea0cbc550
refactor: lazy initialize implementation field for mutable methods 2022-06-05 08:02:59 +02:00
oSumAtrIX
1ee2e4ba56
fix: match to correct signature method parameters 2022-06-05 08:02:59 +02:00
oSumAtrIX
fac44a50c3
fix: Patcher not writing resolved methods 2022-06-05 08:02:58 +02:00
oSumAtrIX
544bcf76bd
feat: Add first tests 2022-06-05 08:02:58 +02:00
oSumAtrIX
a16c8cabf2
refactor: Improve SignatureResolver 2022-06-05 08:02:58 +02:00
oSumAtrIX
2777117da2
refactor: Use String instead of CharSequence for method parameter signature 2022-06-05 08:02:57 +02:00
oSumAtrIX
66a9b76845
fix: return mutable set of classes 2022-06-05 08:02:57 +02:00
oSumAtrIX
f068fc87ff
fix: write all classes 2022-06-05 08:02:57 +02:00
oSumAtrIX
7cc8a7dec3
fix: fix classes having multiple instances of fields 2022-06-05 08:02:56 +02:00
oSumAtrIX
398239dc10
fix: fix classes having multiple method instances 2022-06-05 08:02:56 +02:00
Lucaskyy
d18a3b6a28
perf: lazy-ify all mutable clones 2022-06-05 08:02:56 +02:00
Lucaskyy
bfe4e3e298
feat: add inline smali compiler 2022-06-05 08:02:55 +02:00
Lucaskyy
a1b6b06bd3
test: use findClass with className & cleanup 2022-06-05 08:02:55 +02:00
Lucaskyy
4087f49863
feat: add findClass method with className 2022-06-05 08:02:54 +02:00
Lucaskyy
00c85b5d75
feat: add or extension for AccessFlags 2022-06-05 08:02:54 +02:00
Lucaskyy
cb78c5a86f
style: reformat code 2022-06-05 08:02:54 +02:00
Lucaskyy
9991f39c9a
perf: optimize indexOf call away 2022-06-05 08:02:53 +02:00
oSumAtrIX
650bf71124
docs: Document important parts of the code 2022-06-05 08:02:53 +02:00
oSumAtrIX
1dd3394ea3
refactor: Replacing original classes with mutated ones 2022-06-05 08:02:53 +02:00