How to Modify .Apk Files – for Android Developers

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:

  1. Dex2Jar from http://code.google.com/p/dex2jar/
  2. 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!

Google Nexus S Unleashed

Most Common Password

Reason Why your Android phone is running so Slow

Android Interesting Stories

Scorpion
10.12.25

But how to run it in eclipse then?

10.12.25

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..

Nagaraj shetty
10.12.25

its cool. but its opening only a .class file. how to convert it to .java file

Nagaraj shetty
10.12.25

its perfect! its working!!!

10.12.25

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…

10.12.25

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…

pao
10.12.25

where can i find this file..its not on the folder.. “dex2jar.bat classes.dex” …thanks

10.12.25

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

ET
10.12.25

Can i run the .jar file on a mobile phone(mobile phone that supports java) ??

10.12.25

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!

Mathi
10.12.25

hi friend i copied tat classes.sex but cant see the tat command line in that Dex2.Jar folder………..please help me.

Darkchamp
10.12.25

Wallace: Same Problem T_T
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 :D D Sorry for my noobness.. please help me :) )

10.12.25

me too .. i have the same problem with classes.dex to dex2jar? please give me detail. thanks

Osama Mohammed Shaikh
10.12.25

How do we read the xml files in the extracted files, which i suppose is encrypted, of .apk file.

aks
10.12.25

its amazing ……………..working for me :)

cheska
10.12.25

the command line is not recognized by the command prompt. :(

TATHAGAT
10.12.25

WILL IT WORK ON MY SAMSUNG B7722?

PALKIA
10.12.25

i have the same problem… please help me
“DEX2JAR.bat is not recognized as an internal or external command”

PALKIA
10.12.25

when i use dex2jar.. the command pops out but it close fast.. so i dont’t how to use the dex2jar…pls help me//

Dhiya Krish
10.12.25

try ./dex2jar.sh classes.dex !! note the dot and slash before dex2jar..

jesus
10.12.25

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

Sachi
10.12.25

awesome Guru :-)

comments powered by Disqus
Loading