# 使用 Homebrew, chocolatey, MacPorts, Nix 安装 dex2jar

查看 dex2jar 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:dex2jar
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install dex2jar
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install dex2jar
```

  证据: MacPorts ports tree: java/dex2jar/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#dex2jar
```

  证据: nixpkgs package indexes: pkgs/by-name/de/dex2jar/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

### Windows

- Chocolatey (92%):

```sh
choco install dex2jar
```

  证据: Chocolatey community package catalog: dex2jar from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='9.151999','cports'

## 软件包事实

- **软件包键:** brew:dex2jar
- **软件包管理器:** Homebrew
- **版本:** 2.4
- **来源摘要:** Tools to work with Android .dex and Java .class files
- **主页:** <https://github.com/pxb1988/dex2jar>
- **仓库:** <https://github.com/pxb1988/dex2jar>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- d2j-apk-sign (别名)
- d2j-asm-verify (别名)
- d2j-baksmali (别名)
- d2j-class-version-switch (别名)
- d2j-decrypt-string (别名)
- d2j-dex-recompute-checksum (别名)
- d2j-dex-weaver (别名)
- d2j-dex2jar (别名)
- d2j-dex2smali (别名)
- d2j-jar-access (别名)
- d2j-jar-weaver (别名)
- d2j-jar2dex (别名)
- d2j-jar2jasmin (别名)
- d2j-jasmin2jar (别名)
- d2j-smali (别名)
- d2j-std-apk (别名)
- d2j_invoke (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.4
## 项目历史与用法

dex2jar is a command-line toolkit for working with Android Dalvik Executable files and Java class or jar files. Package users usually encounter it through d2j-dex2jar and the companion d2j-* utilities.

### 项目历史

The official README describes dex2jar as tools for Android .dex and Java .class files and notes the project move to GitHub. It preserves links to older SourceForge, Bitbucket, and Google Code project homes, which reflects the common migration path of early Android reverse-engineering tools into GitHub-era maintenance.

The current repository organizes the project as multiple tools: dex-reader/writer, d2j-dex2jar, smali/baksmali-compatible assembly and disassembly, and additional utilities such as string decryption helpers.

### 采用历史

dex2jar became a familiar package in Android reverse-engineering and security-analysis workflows because it bridged Android .dex bytecode and Java tooling. Even when users later inspect output with decompilers or bytecode tools, the package often provides the first conversion step from an APK or dex file to a jar-shaped artifact.

### 使用方式

The README's example workflow builds the distribution, unpacks dex-tools, and runs d2j-dex2jar.sh against an APK path. The output is a jar file named after the input, such as apk_to_decompile-dex2jar.jar.

### 为什么软件包爱好者会关心

dex2jar is notable as a package because it installs a family of narrowly named command-line tools rather than a single binary. That makes it a classic reverse-engineering formula: many small entry points, stable scripts, and a README that doubles as the packaging-facing interface.

### 时间线

- Early project era: README records historical homes on Google Code, SourceForge, and Bitbucket.
- GitHub era: README marks the project move to GitHub.
- 2023-10-03: GitHub release v2.4 was published.

### Related projects

- smali/baksmali is directly related because dex2jar includes compatible assembly and disassembly tools.
- Java bytecode and Android APK analysis tools are downstream or adjacent consumers of dex2jar output.

### 来源

- <https://github.com/pxb1988/dex2jar>
- <https://github.com/pxb1988/dex2jar/releases/tag/v2.4>


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

## 其他软件包管理器记录

- Nix - dex2jar: normalized package name match | nixpkgs package indexes: pkgs/by-name/de/dex2jar/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - dex2jar: normalized package name match | MacPorts ports tree: java/dex2jar/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - dex2jar: normalized package name match | Chocolatey community package catalog: dex2jar from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='9.151999','cports'


## Combined YAML source

View the package source record on GitHub. [combined/dex2jar.yml](https://github.com/mxcl/pkgdb/blob/main/combined/dex2jar.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
