source code from APK
Asked Answered
G

6

4

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.

But when I download file from dex2jar-0.0.9.8.zip form here, I unable to found dex2jar.jar file so can you tell me else where I can find file?

Gibbosity answered 9/3, 2012 at 9:15 Comment(1)
do u want to extract the source file of android app?right?Coeternity
C
19

Extract the dex2jar-0.0.9.8.zip file and move to desktop folder like dex2jar-0.0.9.7...then take the android app classes.dex file and move to this directory ...open the terminal and change to your dex2jar directory..type this command

./d2j-dex2jar.sh classes.dex

you will get classesdex2.jar file and you can open this file using java decompiler...

Coeternity answered 9/3, 2012 at 10:20 Comment(0)
H
1

Navigate to extracted folder in command prompt and run command "dex2jar your.apk" and its output will be jar file. This jar file can be viewed in jd-gui window.

check the link below , it shows with snapshots

http://a4apphack.com/security/sec-code/extract-android-apk-from-market-and-decompile-it-to-java-source

Hix answered 9/3, 2012 at 9:49 Comment(0)
S
1

Extract dex2jar-0.0.9.8.zip and copy classes.dex, which is extarcted from apk file to that folder and use below command instead of dex2jar classes.dex because it is deprecated

./d2j-dex2jar.sh classes.dex
Staphylococcus answered 28/7, 2014 at 8:54 Comment(0)
D
0

dex2jar is not an actual jar. if you look closely, you will see that there is d2j-dex2jar.bat instead :) hope this helps

Dodecanese answered 9/3, 2012 at 9:24 Comment(0)
H
0

extract the dex2jar-0.0.9.8.zip and in your terminal go to the dex2jar-0.0.9.8 folder and run the delow command

  $d2j-dex2jar.sh -f -o test_apk-debug.jar ./Desktop/YourApk.apk 

//now you can see the jar file. if you open the jar you can fine the class files under you package name.

Holierthanthou answered 9/3, 2012 at 9:38 Comment(0)
B
0

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.

Byrom answered 15/6, 2016 at 13:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.