Apk decompile error: d2j-dex2jar command not found

ghita picture ghita · Apr 20, 2015 · Viewed 33.9k times · Source

I try to get source code from an .apk

I followed the steps from right here Is there a way to get the source code from an APK file? but on Step 2.4 when I wrote on my cmd dex2jar path> d2j-dex2jar classes.dex I get

"'d2j-dex2jar' is not recognized as an internal or external command, operable program or batch files."

any solutions ?

Answer

vikoo picture vikoo · Jan 3, 2017

for dex2jar 2.0 version please follow below steps to generate jar

  1. download dex2jar (https://sourceforge.net/projects/dex2jar/files/)
  2. extract folder
  3. goto folder in command prompt
  4. chmod u+x d2j_invoke.sh
  5. chmod u+x d2j-dex2jar.sh
  6. put desired apk to decompile in dex2jar folder
  7. sh d2j-dex2jar.sh -f -o output_jar.jar my_app.apk
  8. This will generate output_jar.jar in same folder