# Enjarify Dalvik 转 Java 字节码工具

> 用纯 Python 3 编写的转换工具，把 Dalvik 字节码转换为等价的 Java 字节码，使 Java 分析工具和反编译器可以用于 Android 应用：输入 APK（多 dex APK 中的所有 DEX 文件会合并到同一个 jar）或单个 DEX 文件，即可输出由 class 文件组成的 jar。README 将其与 dex2jar 对比，并列出它能处理的边缘情况，例如 Unicode 类名、被当作多种类型使用的常量、隐式类型转换、跳入正常控制流的异常处理器、超长方法，以及引用常量过多的类。默认还会进行复制传播、删除未使用值等提高可读性的优化。

- 类型：工具
- 目标：应用
- 类别：Android 工具
- 关联：基础工具
- 来源复核于：2026-10-27
- 收录于：2026-11-04
- 原始资源：<https://github.com/google/enjarify>
- 一手来源：<https://github.com/google/enjarify/blob/f2db0563aa83885ce6e6acd5b7dc9a8a1a1e1987/README.md>
- 目录页面：<https://awesomerea.org/zh/resources/enjarify/>
- 记录 JSON：<https://awesomerea.org/resources/enjarify/record.json>
- 英文版：[English](https://awesomerea.org/resources/enjarify/index.md)

## 使用条件与局限

- 仓库已归档。审阅时最新版本为 1.0.3，发布于 2016-12-20，没有附件；最后一次提交在 2017-01-30。README 指出本仓库可能已过时，后续开发转到 Storyyeller/enjarify；该仓库的 master 分支领先 15 个提交，最后一次提交在 2020-03-07。
- 从克隆的仓库直接用 Python 3 运行，无需其他依赖。enjarify.sh 优先使用 PyPy3（README 称其比 CPython 快得多），enjarify.bat 则始终调用 python3。输入是分析者自己的 APK 或 DEX 文件；输出默认为 [输入文件名]-enjarify.jar，-o 指定文件名，-f 允许覆盖，--fast 跳过优化。
- 不会转换源文件属性、行号和注解等可选元数据；README 还提到少数刻意构造的情况受 Android 或 Java 自身限制而无法转换。输出的是字节码，要阅读源码需另用 Java 反编译器。runtests.py 会转换随附的测试夹具（tests/test1 至 tests/test7 中的小型 classes.dex 及其 smali 源码和预期输出），加入 tests/stubs 中的小型 Android API 桩类，再用 java 运行结果。
- Apache-2.0 许可；README 声明它不是 Google 的官方产品。

## 一手来源

1. <https://github.com/google/enjarify/blob/f2db0563aa83885ce6e6acd5b7dc9a8a1a1e1987/README.md>
2. <https://github.com/google/enjarify/blob/f2db0563aa83885ce6e6acd5b7dc9a8a1a1e1987/enjarify/main.py>
3. <https://github.com/google/enjarify/blob/f2db0563aa83885ce6e6acd5b7dc9a8a1a1e1987/enjarify.sh>
4. <https://github.com/google/enjarify/blob/f2db0563aa83885ce6e6acd5b7dc9a8a1a1e1987/enjarify.bat>
5. <https://github.com/google/enjarify/blob/f2db0563aa83885ce6e6acd5b7dc9a8a1a1e1987/enjarify/runtests.py>
6. <https://github.com/google/enjarify/tree/f2db0563aa83885ce6e6acd5b7dc9a8a1a1e1987/tests>
7. <https://github.com/google/enjarify/blob/f2db0563aa83885ce6e6acd5b7dc9a8a1a1e1987/LICENSE.txt>
8. <https://github.com/google/enjarify/releases/tag/1.0.3>
9. <https://github.com/Storyyeller/enjarify/tree/6364dfb30f7862873b84ec5fad1d1286c526ba0b>

## 同分区更多条目：应用

- [MagiskFrida 开机自启 frida-server 的 root 模块](https://awesomerea.org/zh/resources/magisk-frida/index.md) · 工具
- [de4dot .NET 反混淆与脱壳工具](https://awesomerea.org/zh/resources/de4dot/index.md) · 工具
- [ClassyShark Android 二进制浏览工具](https://awesomerea.org/zh/resources/classyshark/index.md) · 工具
- [JEB Decompiler Android 与原生代码逆向平台](https://awesomerea.org/zh/resources/jeb-decompiler/index.md) · 工具
- [Luyten Java 反编译器图形界面](https://awesomerea.org/zh/resources/luyten/index.md) · 工具
- [jd-cli 命令行 Java 反编译器](https://awesomerea.org/zh/resources/jd-cli/index.md) · 工具

## 关于此条目

说明已依据一手来源复核。
原创说明采用 MIT 许可；外部项目、论文与素材保留各自的权利和许可。
