Repository navigation
apkscope 0.9.2
apkscope v0.9.2
Editing a class as Smali now patches it in place, instead of rebuilding its whole DEX.
apkscope smali + build --smali (and the viewer's Edit smali) used to model and re-emit the
entire DEX that held the edited class. On a large app that was slow and memory-hungry — patching
one class in the 508 MB TikTok APK took 59 s and 2.0 GB (enough to run some machines out of
memory).
Now, when an edit only changes the instruction bytes of existing methods — the common case: change
a constant, flip a branch, swap an operand, no-op a call — apkscope reuses the DEX's own id pools
and overwrites just those bytes in place. Same edit, same APK: 7.9 s and 990 MB, the same cost
as resigning the APK.
Edits that change the code layout (add or remove instructions, pull in a new string/type/method,
or touch fields, annotations or signatures) automatically fall back to the full rebuild, so nothing
you could do before stops working.
No behaviour change otherwise; the output is byte-faithful and still zipaligned and signed (v2 + v3).
apkscope.exe below is the Windows build with the viewer.
Full Changelog: v0.9.1...v0.9.2