source code from APK

后端 未结 6 943
青春惊慌失措
青春惊慌失措 2021-02-10 20:52

I have searching in search Engine regarding convert dex file to jar file but I got failure to find dex2jar file in code.Google.com

I have getting basic idea from here.

6条回答
  •  名媛妹妹
    2021-02-10 21:26

    I too had the same issue, Thus I downloaded my file from here.

    While the file is downloading, go to your .apk file. Rename the .apk to .zip and extract zip file (which was apk once) inside a new folder.

    Now as the file is been downloaded "dex2jar-0.0.9.15.zip". Extract this file inside new folder you just create and you will have a folder "/dex2jar-0.0.9.15".

    Copy your "classes.dex" file from new folder to "/dex2jar-0.0.9.15" and now open Terminal and switch inside the /dex2jar-0.0.9.15 folder. And run command

    tamta@tamta:~/new_folder/dex2jar-0.0.9.15$ ./d2j-dex2jar.sh classes.dex
    

    This will create a file classes-dex2jar.jar for you inside the same folder.

    Until now you had .dex file known as Dalvik Executable. If you use apktool you only get .smali , which is also not in a understandable form, So now we use "JAVA Decompiler" but we can understand JAVA and to convert do the following.

    Goto Download Link

    And download JD-GUI.

    As you open JD-GUI:

    goto folder
    /new_folder/dex2jar-0.0.9.15
    
    and open: "classes-dex2jar.jar"
    

    Now again goto >file>Save All Sources

    and save the file with the name src.

    Now extract src, and enjoy reading android source code.

提交回复
热议问题