how to use DEXtoJar

前端 未结 13 2288
心在旅途
心在旅途 2020-12-22 17:25

I find the solution to decompile a file dex to jar from this link http://code.google.com/p/dex2jar/downloads/list but i don\'t understand how to use it.

相关标签:
13条回答
  • 2020-12-22 18:15

    Follow the below steps to do so_

    1. Rename your APK file(e.g., rename your APK file to .zip Ex- test.apk -> test.zip) & extract resultant zip file.
    2. Copy your .dex file in to dex2jar folder.
    3. Run setclasspath.bat. This should be run because this data is used in the next step.
    4. Go to Windows Command prompt, change the folder path to the path of your dex2jar folder and run the command as follows: d2j-dex2jar.bat classes.dex
    5. enjoy!! Your jar file will be ready in the same folder with name classes_dex2jar.jar.

    Hope this helps you and All reading this... :)

    0 讨论(0)
  • 2020-12-22 18:16

    If anyone is still looking for an easy way to decompile an APK (with resource decompiling), have a look at the tools I have created: https://github.com/dirkvranckaert/AndroidDecompiler

    Just checkout the project locally and run the script as documented and you'll get all the resources and sources decompiled.

    0 讨论(0)
  • 2020-12-22 18:17

    Simple way

    1. Rename your test.apk => test.zip
    2. Extract test.zip then open that folder
    3. Download dex2jax & Extract
    4. Copy classes.dex file from test folder
    5. Past to dex2jar Extracted folder
    6. if use windows press Alt & D keys then type cmd press Enter(open to cmd)
    7. run the command d2j-dex2jar.bat classes.dex
    8. Download JD-GUI
    9. Move classes-dex2jar.jar file to JD-GUI
    10. Everything Done..
    0 讨论(0)
  • 2020-12-22 18:17
    1. old link

      • the link http://code.google.com/p/dex2jar/downloads/list is old, it will redirect to https://github.com/pxb1988/dex2jar
    2. dex2jar syntax

      • in https://github.com/pxb1988/dex2jar, you can see your expected usage/syntax:
      • sh d2j-dex2jar.sh -f ~/path/to/apk_to_decompile.apk
      • can convert from apk to jar.
    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): 安卓应用的安全和破解

    0 讨论(0)
  • 2020-12-22 18:18

    You can decompile your .apk files and download online.

    http://www.javadecompilers.com/

    0 讨论(0)
  • 2020-12-22 18:18
    1. Download latest dex2jar from here -> dex2jar
    2. Run this command on linux -> sh d2j-dex2jar.sh classes.dex
    3. Download java decompiler from here - > JD-GUI
    4. Drag and drop the classes-dex2jar.jar file to JD-GUI
    0 讨论(0)
提交回复
热议问题