decompile.sh --engine fernflower fails on .aar files (dex2jar on a JAR)

Open Beginner friendly
#35 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
android, java, shell
Domain
cli, tooling

Research direction

The bug is in run_fernflower() in scripts/decompile.sh, around lines 227-228, where .aar is routed through the same dex2jar path as .apk. Start by reading that branch and confirm an AAR holds classes.jar rather than classes.dex. Done when a .aar either extracts classes.jar and decompiles it like the .jar path, or the script exits with a clear message that Fernflower does not accept .aar directly.

Written by the indexing model from the issue text.

Description

Summary: decompile.sh --engine fernflower fails on .aar files. The script sends .aar through dex2jar, but an AAR contains classes.jar, not classes.dex.

Repro: bash scripts/decompile.sh --engine fernflower test-lib.aar (jadx Apache-2.0 test fixture, one class) with FERNFLOWER_JAR_PATH set and dex2jar on PATH.

Actual: java.io.IOException: Can not find classes.dex in zip file then Error: dex2jar conversion failed with status 0, exit 1, no output. (The 'status 0' text is misleading; the failure is only caught because the output jar is missing.)

Expected: extract classes.jar and decompile it like the .jar path, or say plainly Fernflower does not support .aar directly. Root cause (code-read): run_fernflower() lines 227-228 treats .aar like .apk.

Workaround (verified): extract classes.jar from the AAR, run the script on the jar - exits 0.

Env: skill commit 0c7cf89, Ubuntu 24.04.5, Java 17.0.20.1, jadx 1.5.6, Vineflower 1.12.0, dex2jar 2.4.38. No commercial app used.

Dominant language
Shell
Stars
8k
Forks
902
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SimoneAvogadro/android-reverse-engineering-skill

All issues in SimoneAvogadro/android-reverse-engineering-skill

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.