Post Reply

How to extract source code from apk

13th August 2013, 09:19 AM   |  #1  
amit@12's Avatar
OP Senior Member
Flag jalandhar
Thanks Meter: 114
 
390 posts
Join Date:Joined: Jul 2013
More
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

NOW WHAT IS SOURCE CODE:
A text listing of commands to be compiled or assembled into an executable program

How to extract source code:

Requirements
1. Android-apktool

2. Dex2jar

3. JD-Gui

Procedure
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
http://db.tt/oqdrcBpk

Now to import this project into eclipse
Go here
Enjoy modifying

Sent by typing by my fingers
Last edited by amit@12; 17th August 2013 at 02:36 PM.
The Following 8 Users Say Thank You to amit@12 For This Useful Post: [ View ]
4th January 2014, 06:12 AM   |  #2  
red de0392's Avatar
Senior Member
Flag Mumbai
Thanks Meter: 119
 
649 posts
Join Date:Joined: Mar 2013
More
Drop Box Link Not Working...please update it
4th January 2014, 06:16 AM   |  #3  
Member
Thanks Meter: 7
 
54 posts
Join Date:Joined: Dec 2013
Donate to Me
More
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, 07:25 AM   |  #4  
red de0392's Avatar
Senior Member
Flag Mumbai
Thanks Meter: 119
 
649 posts
Join Date:Joined: Mar 2013
More
M not Able to Find dex2jar classes.dex
31st January 2014, 05:48 PM   |  #5  
Junior Member
Thanks Meter: 1
 
1 posts
Join Date:Joined: Jan 2014
Quote:
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 ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools
Display Modes


Top Threads in General by ThreadRank