Thursday 28 November 2013

How to get the source code from apk file.

How to get the source code from apk file.

So all are eager to know how to extract the code from apk file.
So here are the simple steps to extract.
Just follow the below steps to get.
Here is the 
Windows software
Mac OS X
Linux
 u need to download to extract.

Step 1. Rename the .apk file you wish to retrieve and change the extension to .zip. Then extract the file that it creates.

Step 2. Copy the contents of the dex2jar folder to the extracted folder to make it easier for yourself, and run:

            dex2jar classes.dex

and copy the resulting “classes.dex.dex2jar.jar” into a new folder.

Step 3. Open up the Java Decompiler and drag “classes.dex.dex2jar.jar” into the window and then go to File > Save and save the source in a .zip file.


Step 4. Extract the saved .zip and copy the contents to a new folder somewhere. This will be where we keep your source code.


Step 5. Now, copy “framework-res.apk” and “yourapk.apk” to the APKTool folder. Then open a command prompt or Terminal window and type:

              apktool if framework-res.apk
              apktool d <yourapk.apk>

Step 6. Now just copy the contents of the resulting folder to the same place you copied the contents of “classes.dex.dex2jar.jar” earlier and voila, you have your source code. You may need to remove a couple of things, but your entire code should be there!

No comments:

Post a Comment