# Install dex2jar with Homebrew, chocolatey, MacPorts, Nix

Tools to work with Android .dex and Java .class files. Version 2.4 via Homebrew; verified from local package data.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install dex2jar
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install dex2jar
```

  Evidence: 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
```

  Evidence: 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
```

  Evidence: Chocolatey community package catalog: dex2jar from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='9.1916','tektoncd-cli'

## Package facts

- **Package key:** brew:dex2jar
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/dex2jar>
- **Version:** 2.4
- **Source summary:** Tools to work with Android .dex and Java .class files
- **Homepage:** <https://github.com/pxb1988/dex2jar>
- **Repository:** <https://github.com/pxb1988/dex2jar>
- **Upstream docs:** <https://github.com/pxb1988/dex2jar#readme>
- **License:** Apache-2.0
- **Source archive:** <https://github.com/pxb1988/dex2jar/releases/download/v2.4/dex-tools-v2.4.zip>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

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

## Dependencies

- openjdk

## Install behavior

- Post-install hook: not defined
- Bottle: available on all

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2.4
- Local data: ok
- Upstream repository: https://github.com/pxb1988/dex2jar
- info: No package-manager update timestamp was available.
- info: No cached GitHub release or tag data was available.
## Project history and usage

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.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 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.

### Sources

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


## Security Notes

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

- **Geiger risk:** blue / medium
- broad file, network, media, or database tool signal

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** dex2jar
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- 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.1916','tektoncd-cli'


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [openjdk](https://www.automicvault.com/pkg/brew/openjdk/) - Runtime dependency declared by Homebrew.
- [fernflower](https://www.automicvault.com/pkg/brew/fernflower/) - Shares av.db curated category or tags: bytecode, cli, developer-tools, java, reverse-engineering.
- [bundletool](https://www.automicvault.com/pkg/brew/bundletool/) - Shares av.db curated category or tags: android, cli, developer-tools, java.
- [redex](https://www.automicvault.com/pkg/brew/redex/) - Shares av.db curated category or tags: android, bytecode, cli, developer-tools.
- [adb-enhanced](https://www.automicvault.com/pkg/brew/adb-enhanced/) - Shares av.db curated category or tags: android, cli, developer-tools.
- [capstone](https://www.automicvault.com/pkg/brew/capstone/) - Shares av.db curated category or tags: cli, developer-tools, reverse-engineering.
- [cfr-decompiler](https://www.automicvault.com/pkg/brew/cfr-decompiler/) - Shares av.db curated category or tags: bytecode, cli, developer-tools, java, reverse-engineering.
- [fdroidcl](https://www.automicvault.com/pkg/brew/fdroidcl/) - Shares av.db curated category or tags: android, cli, developer-tools.
- [fdroidserver](https://www.automicvault.com/pkg/brew/fdroidserver/) - Shares av.db curated category or tags: android, cli, developer-tools.
- [procyon-decompiler](https://www.automicvault.com/pkg/brew/procyon-decompiler/) - Both packages touch the same language runtime or ecosystem. Shared terms: bytecode, cli, developer, developer-tools, engineering.

## Combined YAML source

View the package source record on GitHub. [combined/dex2jar.yml](https://github.com/automic-vault/db/blob/main/combined/dex2jar.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
