decompiling DEX into Java sourcecode

后端 未结 17 1459
情歌与酒
情歌与酒 2020-11-22 12:41

How can one decompile Android DEX (VM bytecode) files into corresponding Java sourcecode?

17条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 13:10

    Recent Debian have Python package androguard:

    Description-en: full Python tool to play with Android files
     Androguard is a full Python tool to play with Android files.
      * DEX, ODEX
      * APK
      * Android's binary xml
      * Android resources
      * Disassemble DEX/ODEX bytecodes
      * Decompiler for DEX/ODEX files
    

    Install corresponding packages:

    sudo apt-get install androguard python-networkx
    

    Decompile DEX file:

    $ androdd -i classes.dex -o ./dir-for-output
    

    Extract classes.dex from Apk + Decompile:

    $ androdd -i app.apk -o ./dir-for-output
    

    Apk file is nothing more that Java archive (JAR), you may extract files from archive via:

    $ unzip app.apk -d ./dir-for-output
    

提交回复
热议问题