[decompiler] how to use DEXtoJar

  1. old link

  2. dex2jar syntax

  3. want dex to jar

    • if you have dex file (eg. using FDex2 dump from a running android apk/app), then you can:
    • sh d2j-dex2jar.sh -f ~/path/to/dex_to_decompile.dex
    • can got the converted jar from dex.
    • example:
    • /xxx/dex-tools-2.1-SNAPSHOT/d2j-dex2jar.sh -f com.huili.readingclub8825612.dex dex2jar com.huili.readingclub8825612.dex -> ./com.huili.readingclub8825612-dex2jar.jar
  4. want jar to java src

    • if you continue want convert from jar to java sourcecode, then you, have multiple choice:
      • using Jadx directly convert dex to java sourcecode
      • first convert dex to jar, second convertjartojava sourcecode`

Note

how to got d2j-dex2jar.sh?

download from dex2jar github release, got dex-tools-2.1-SNAPSHOT.zip, unzip then got

  • you expected Linux's d2j-dex2jar.sh
    • and Windows's d2j-dex2jar.bat
    • and related other tools
    • d2j-jar2dex.sh
    • d2j-dex2smali.sh
    • d2j-baksmali.sh
    • d2j-apk-sign.sh
    • etc.

what's the full process of convert dex to java sourcecode ?

you can refer my (crifan)'s full answer in another post: android - decompiling DEX into Java sourcecode - Stack Overflow

or refer my full tutorial (but written in Chinese): ??????????