Tool
Enjarify
Pure-Python 3 translator from Dalvik bytecode to equivalent Java bytecode, so Java analysis tools and decompilers can be applied to Android apps: given an APK, with every DEX file of a multidex APK combined into one jar, or a single DEX file, it writes a jar of class files. Its README contrasts it with dex2jar and lists edge cases it handles, such as Unicode class names, constants used as several types, implicit casts, exception handlers that jump into normal control flow, very long methods and classes that reference too many constants. By default it also applies readability optimizations such as copy propagation and unused-value removal.
- Targets
- App
- Category
- Android tools
- Relationship
- Foundation tool
- Sources reviewed
Requirements & limits
- Archived. Latest release at review: 1.0.3, published 2016-12-20 with no assets; the last commit is from 2017-01-30. The README says this repository may be out of date and that future development moved to Storyyeller/enjarify, whose master branch is 15 commits ahead, with its last commit on 2020-03-07.
- Runs from a clone with Python 3 and no other dependencies. enjarify.sh prefers PyPy3, which the README calls much faster than CPython, and enjarify.bat always calls python3. Input is the analyst's own APK or DEX file; the output defaults to [inputname]-enjarify.jar, -o sets the name, -f allows overwriting and --fast skips the optimizations.
- Optional metadata such as source-file attributes, line numbers and annotations is not translated, and the README notes contrived cases that cannot be translated because of Android or Java limits. The output is bytecode, so reading it as source needs a separate Java decompiler. runtests.py translates the bundled fixtures, small classes.dex files with their smali sources and expected outputs in tests/test1 to tests/test7, adds the small Android API stub classes from tests/stubs and runs the result with java.
- Apache-2.0; the README states that it is not an official Google product. Nothing was installed or run in this review; the reviewed sources establish no REA connection.
About this entry
The description was reviewed against primary sources. This does not establish runtime testing, security auditing or verified compatibility.
Primary sources
- README.md GitHub · google/enjarify · Revision f2db056
- enjarify/main.py GitHub · google/enjarify · Revision f2db056
- enjarify.sh GitHub · google/enjarify · Revision f2db056
- enjarify.bat GitHub · google/enjarify · Revision f2db056
- enjarify/runtests.py GitHub · google/enjarify · Revision f2db056
- tests GitHub · google/enjarify · Revision f2db056
- LICENSE.txt GitHub · google/enjarify · Revision f2db056
- https://github.com/google/enjarify/releases/tag/1.0.3
- https://github.com/Storyyeller/enjarify/tree/6364dfb30f7862873b84ec5fad1d1286c526ba0b
More in Apps
- MagiskFrida · Tool
- Aegis: trace a login-code calculation · Case study
- Notion: trace the clipboard bridge · Case study
- PicoPrint: LX-D02 printer investigation · Case study
- ReaCut: video-editor reconstruction · Case study
- CF632BLE: a local client from scale-protocol research · Case study