{
  "added_at": "2026-11-02",
  "additional_evidence_urls": [
    "https://github.com/neocanable/garlic/blob/700a7f4ea650f5ba5162604987f5a414a2e27026/MCP-SERVER.md",
    "https://github.com/neocanable/garlic/blob/700a7f4ea650f5ba5162604987f5a414a2e27026/src/garlic.c#L133-L144",
    "https://github.com/neocanable/garlic/blob/700a7f4ea650f5ba5162604987f5a414a2e27026/src/garlic.c#L320-L343",
    "https://github.com/neocanable/garlic/blob/700a7f4ea650f5ba5162604987f5a414a2e27026/CMakeLists.txt#L135-L196",
    "https://github.com/neocanable/garlic/tree/700a7f4ea650f5ba5162604987f5a414a2e27026/libs",
    "https://github.com/neocanable/garlic/blob/700a7f4ea650f5ba5162604987f5a414a2e27026/docs/garlic-on-windows.md",
    "https://github.com/neocanable/garlic/blob/700a7f4ea650f5ba5162604987f5a414a2e27026/LICENSE",
    "https://github.com/neocanable/garlic/releases/tag/v1.8-release",
    "https://github.com/neocanable/garlic/releases/tag/v1.8-release-thyme"
  ],
  "category": "android",
  "description_en": "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.",
  "description_zh": "用 C 语言编写的 Java 与 Android 反编译器，可多线程地从 class、JAR、WAR、DEX 和 APK 文件还原 Java 源码；还能输出类似 javap 或 dexdump 的类信息，将 APK 和 DEX 转换为 smali，用正则表达式搜索其中的字符串，并为 DEX 和 APK 生成调用图。运行 garlic -m 会启动基于 stdio 的 MCP 服务器，提供七个工具，可反编译文件、输出类信息、构建调用图、将调用图导入 DuckDB 以便用 SQL 查询，以及读取提取出的 AndroidManifest.xml。README 称反编译一个超过 200 MB、约 19 万个类的 APK 只需 12 秒。",
  "entry_url": "https://awesomerea.org/resources/garlic-decompiler/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/garlic-decompiler/",
  "evidence_url": "https://github.com/neocanable/garlic/blob/700a7f4ea650f5ba5162604987f5a414a2e27026/README.md",
  "group": "tools",
  "id": "garlic-decompiler",
  "json_url": "https://awesomerea.org/resources/garlic-decompiler/record.json",
  "kind": "tool",
  "markdown_url": "https://awesomerea.org/resources/garlic-decompiler/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/garlic-decompiler/index.md",
  "name": "Garlic",
  "name_zh": "Garlic APK/Java 反编译器",
  "record_type": "resource",
  "relationship": "foundation",
  "requirements": [
    "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."
  ],
  "requirements_zh": [
    "审阅时 garlic 的最新版本为 v1.8-release，发布于 2026-08-17，提供适用于 Linux（x64、i686、aarch64）、macOS（x64、aarch64）和 Windows（win32、win64）的独立二进制；所审阅的 main 提交比该版本多 34 个提交。之后的 v1.8-release-thyme 标签提供的则是 Thyme 的安装包，这是仓库主页介绍的另一款付费逆向工程 IDE。",
    "从源码构建时，Linux 和 macOS 使用 CMake 3.26+，主机构建和交叉编译可使用 Zig 0.16.0+，Windows 使用 MinGW-w64，arm64-v8a 版本使用 Android NDK（r21 及以上，已在 r28 上验证）。MCP 服务器的 analyze、cg_import 和 cg_query 工具需要 PATH 中有 DuckDB 命令行工具。输入为使用者自己的 class、JAR、WAR、DEX 或 APK 文件。",
    "-n 原生库分析功能（README 列出的内容为 AArch64 ELF 文件的控制流、IR、导入、导出、字符串和调用图）来自 librosemarylib：这是一个闭源库，以预编译的 librosemarylib.so、.dylib 和 .dll 文件形式按各桌面平台提交在 libs/ 下，并在构建时嵌入 garlic 二进制。缺少该库时以及在 Android 上，-n 功能被禁用。garlic 的 -l 选项用于为该库安装购买的许可证密钥。",
    "仓库的 LICENSE 为 Apache-2.0；librosemarylib 没有单独公布条款或源码。README 未报告对反编译结果正确性的评估，发布说明列出了针对特定应用的反编译错误和崩溃修复。"
  ],
  "targets": [
    "app"
  ],
  "url": "https://github.com/neocanable/garlic",
  "verification": "source-reviewed",
  "verified_at": "2026-10-20"
}
