March 29, 2015

How To Modify .apk Files

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 applicationname.apk to, 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
  2. A regular Java decompiler, such as JD from

Copy classes.dex to the folder where you unzipped Dex2Jar, and run from the commandline: “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!

[Thanks Web Age for the Dex2Jar hint]

Related Posts


  1. wootroot

    “but it really isn’t. In fact, an .apk is nothing else than a .zip file disguised as an .apk. ”


  2. Wilbur J Farnsworth

    Awesome! Now I can steal code, and defeat the Market’s verification server. Thanks AndroidGuys!

    • appelflap

      Yeah, but I don’t think algorithms in an average app are that difficult. A more easy way than trying to read cryptic decompiled Java code is to investigate the well documented SDK (sssssssst don’t tell anyone :D

  3. Dave

    Err… don’t you think you should mention apktool and baksmali first? And how about the need to understand machine code? Poor article.

  4. Michael

    You don’t need to change the extension from .apk to .zip; 7zip will open up APK files natively!

  5. iPaulPro

    Hey, AndroidGuys, how about an article that explains how to download movies via torrents? Or maybe one that shows how to rig your house’s electricity meter?

  6. Lakshmikanth

    I am getting error if i type “dex2jar.bat classes.dex”, can anyone help with what are the pre-requisties to run this perfectly.

  7. azmat ali

    1. open .apk file in winrar
    2. drag “classes.dex” in that folder where you have “dex2jar.bat”.
    3. DRAG you classes.dex onto dex2jar.bat lets see after few second you will get “classesdex2jar.jar” there in same dir.
    4. then open program. jd-gui.exe>File>open file>select “classesdex2jar.jar”
    5. then click again (File>save all source) in the menu of “jd-gui.exe”then all source pack in a zip folder you can extract and use those in eclipse projects

    • arpa


      i have win 8

      when i dragclasses.dex to dex2jar.bat a black win comes one second but nothing happens after it
      no file created
      now what?


Latest & Featured