Alpaka is a command-line tool designed for matching classes across different versions of the same APK. This is particularly useful for reverse engineering, allowing you to track class renames and changes across different builds, and preserving manual deobfuscation efforts.
-
Class Matching: Generates a JSON matching of classes from one APK version to another.
-
Deobfuscation Migration: Migrate existing Enigma deobfuscation mapping files to new APK versions, helping maintain your renaming efforts in tools like Jadx.
git clone https://github.com/DanielFi/alpaka
pip install ./alpaka
Output a JSON matching from A.apk
(older version) to B.apk
(newer version).
This will show how classes in A.apk
correspond to classes in B.apk
.
> alpaka match A.apk B.apk1
{
"LX/003;": "LX/003;",
"LX/004;": "LX/004;",
"LX/005;": "LX/005;",
"LX/006;": "LX/006;",
...
If you have an Enigma mapping file (e.g., A.mapping
) for A.apk
, you can use
Alpaka to generate a new mapping file (B.mapping
) that applies your existing
renames to B.apk
. This is incredibly useful for maintaining your manual
deobfuscation work when a new version of the APK is released.
The generated B.mapping
file can then be imported into tools like Jadx to preserve your manual renamings!
> alpaka match --deobfuscation A.mapping --only-obfuscated A.apk B.apk1 > B.mapping
The match
command supports several options to fine-tune its behavior:
--only-obfuscated
: Prevents Alpaka from creating unnecessary matches between unobfuscated classes.--no-propagation
: Only run the first analysis stage. Usually leads to more accurate results but fewer matches overall.
Alpaka is distributed under the terms of the MIT license.