This article will guide you how to Convert .apk file into .java files.So that you can edit them and can modify the Application.
The extension Google uses for Android Applications (APK) may seem a bit complicated at first, but it really isn’t. In fact, an .apk is nothing else than a .zip file disguised as an .apk. That’s dumbing it down, but you get it. Essentially, if one wanted to see what’s inside an app, they would just change the extension of application-name.apk to application-name.zip, unzip it. And there you have it: The contents of the .apk! We aren’t done yet, read more after the break.
Here is where it gets tricky. Inside the folder where you unzipped the contents of the application, you’ll find a file named classes.dex. That’s the most important file of the whole application, containing all the java files, but it’s encrypted! No worries, that can easily be solved. You’ll need two things:
- Dex2Jar from http://code.google.com/p/dex2jar/
- A regular Java decompiler, such as JD from http://java.decompiler.free.fr
Copy classes.dex to the folder where you unzipped Dex2Jar, and run from the command line: “dex2jar.bat classes.dex”
This will produce a file, strangely named something like: “classes.dex.dex2jar.jar” If you have WinRAR installed, you can just unpack the files. If you don’t, install it.
Now go ahead and adjust it to your liking!









But how to run it in eclipse then?
You can simply read the code from java files and can see the logic from there and if you really want to run the application then you must copy paste all the java files in your src folder and design the GUI by opening the application in Android Emulator and design according to it.
If u still have ny problems then comment here..
its cool. but its opening only a .class file. how to convert it to .java file
its perfect! its working!!!
you can convert .jar (generated from DEX2JAR) to .java files using this application
download it frm here..
http://java.decompiler.free.fr/?q=jdgui
and can see the logic nd change according to your needs…
you can convert .jar (generated from DEX2JAR) to .java files using this application
download it from here..
http://java.decompiler.free.fr/?q=jdgui
and can see the logic and change according to your needs…
where can i find this file..its not on the folder.. “dex2jar.bat classes.dex” …thanks
Copy classes.dex to the folder where you unzipped Dex2Jar, and run from the command line: “dex2jar.bat classes.dex” or you can run that .bat file from your Dex2Jar folder where you have copied.After executing you can see that “classes.dex.dex2jar.jar” file in the same folder…still if you face any problem then you can leave your response..I’ll help you out
Can i run the .jar file on a mobile phone(mobile phone that supports java) ??
Hello, I was reading your topic, but I am new to modify applications and do not quite understand, could you explain in detail? Especially by launching command line …. Please, I’m grateful now!
hi friend i copied tat classes.sex but cant see the tat command line in that Dex2.Jar folder………..please help me.
Wallace: Same Problem T_T
D Sorry for my noobness.. please help me
)
Please help us in detail… I really do not understand the command line stuffs… I tried running the command by Start>Run>type command… then I saw a window and typed “dex2jar.bat classes.dex” then I click “Enter”. then it says “DEX2JAR.bat is not recognized as an internal or external command”…. I don’t understand any of these
me too .. i have the same problem with classes.dex to dex2jar? please give me detail. thanks
How do we read the xml files in the extracted files, which i suppose is encrypted, of .apk file.
its amazing ……………..working for me
the command line is not recognized by the command prompt.
WILL IT WORK ON MY SAMSUNG B7722?
i have the same problem… please help me
“DEX2JAR.bat is not recognized as an internal or external command”
when i use dex2jar.. the command pops out but it close fast.. so i dont’t how to use the dex2jar…pls help me//
try ./dex2jar.sh classes.dex !! note the dot and slash before dex2jar..
I’m sorry I’m still a little lost on what to do after I unzip both the all(now a zip) and the dex2jar
awesome Guru