Remove All Ads from XDA

How to extract source code from apk

390 posts
Thanks Meter: 118
Post Reply Email Thread
Hey guys heres a way to extract source code of an apk

I know many of u may know it but still no thread in this section
If its wrong or right or a question only then reply

A text listing of commands to be compiled or assembled into an executable program

How to extract source code:

1. Android-apktool

2. Dex2jar

3. JD-Gui

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

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.
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.
Extract the saved .zip and copy the contents to a new folder somewhere. This will be where we keep your source code.
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

Now just copy the contents of the resulting folder to the same place you copied the contents of “classes.dex.dex2jar.jar” earlier and you have your source code.

Apk source code files

Now to import this project into eclipse
Go here
Enjoy modifying

Sent by typing by my fingers
The Following 8 Users Say Thank You to amit@12 For This Useful Post: [ View ] Gift amit@12 Ad-Free
4th January 2014, 07:12 AM |#2  
red de0392's Avatar
Senior Member
Flag Mumbai
Thanks Meter: 125
Drop Box Link Not Working...please update it
4th January 2014, 07:16 AM |#3  
Thanks Meter: 7
Donate to Me
Thanks for the small guide. I've been wondering if there was a way to do this.

Sent from ALCATEL One Touch Fierce
4th January 2014, 08:25 AM |#4  
red de0392's Avatar
Senior Member
Flag Mumbai
Thanks Meter: 125
M not Able to Find dex2jar classes.dex
31st January 2014, 06:48 PM |#5  
Junior Member
Thanks Meter: 1
Originally Posted by red de0392

M not Able to Find dex2jar classes.dex

You have to run it in CMD that "dex2jar classes.dex" is not a file. its a command.
The Following User Says Thank You to DGuru For This Useful Post: [ View ] Gift DGuru Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes