Tool
Garlic
Java and Android decompiler written in C that recovers Java source from class, JAR, WAR, DEX and APK files on multiple threads; it also prints javap- or dexdump-style class listings, converts APK and DEX files to smali, searches their strings with regular expressions and generates call graphs for DEX and APK files. Running garlic -m starts a stdio MCP server whose seven tools decompile files, dump class information, build call graphs, load them into DuckDB for SQL queries and read the extracted AndroidManifest.xml. The README reports decompiling an APK of more than 200 MB with about 190,000 classes in 12 seconds.
- Targets
- App
- Category
- Android tools
- Relationship
- Foundation tool
- Sources reviewed
Requirements & limits
- Latest garlic release at review: v1.8-release, published 2026-08-17, with standalone binaries for Linux x64, i686 and aarch64, macOS x64 and aarch64, and Windows win32 and win64; the reviewed main commit is 34 commits ahead of it. The later v1.8-release-thyme tag instead carries installers for Thyme, a separate paid reverse-engineering IDE presented on the repository's homepage.
- Source builds use CMake 3.26+ on Linux and macOS, Zig 0.16.0+ for host and cross-compiled builds, MinGW-w64 for Windows, or the Android NDK (r21 or later, verified on r28) for an arm64-v8a binary. The MCP server needs the DuckDB CLI on PATH for its analyze, cg_import and cg_query tools. Inputs are the user's own class, JAR, WAR, DEX or APK files.
- The -n native-library analysis, which the README lists as control flow, IR, imports, exports, strings and call graphs for AArch64 ELF files, comes from librosemarylib: a closed-source library committed in prebuilt form as librosemarylib.so, .dylib and .dll files under libs/ for each desktop platform and embedded into the garlic binary at build time. Without it, and on Android, -n is disabled. garlic's -l option installs a purchased license key for that library.
- The repository's LICENSE is Apache-2.0; no separate terms or source are published for librosemarylib. The README reports no correctness evaluation of decompiled output, and release notes list fixes for decompilation errors and crashes on specific apps.
About this entry
The description was reviewed against primary sources.
Primary sources
- README.md GitHub · neocanable/garlic · Revision 700a7f4
- MCP-SERVER.md GitHub · neocanable/garlic · Revision 700a7f4
- src/garlic.c#L133-L144 GitHub · neocanable/garlic · Revision 700a7f4
- src/garlic.c#L320-L343 GitHub · neocanable/garlic · Revision 700a7f4
- CMakeLists.txt#L135-L196 GitHub · neocanable/garlic · Revision 700a7f4
- libs GitHub · neocanable/garlic · Revision 700a7f4
- docs/garlic-on-windows.md GitHub · neocanable/garlic · Revision 700a7f4
- LICENSE GitHub · neocanable/garlic · Revision 700a7f4
- https://github.com/neocanable/garlic/releases/tag/v1.8-release
- https://github.com/neocanable/garlic/releases/tag/v1.8-release-thyme
More in Apps
- Android-Disassembler · Tool
- XAPKDetector · Tool
- Jsxer · Tool
- jni_helper · Tool
- ReArk · Tool
- ARSCLib · Tool