Decoding .apk file

by Sasikumar 2013-03-08 10:23:57

Decoding .apk File:

Steps to get classes.dex files:
Step 1 : Make a newfolder and place your .apk file in it.

Step 2 : Now rename the file as .zip file.(eg:filename.apk to filename.apk.zip)

Step 3 : Extract the .zip in a NEWFOLDER. Now you can see drawable files
and classes.dex files

Steps to get JAVA Source code:
Step 4 : Now download dex2jar from link
Extract this in the NEWFOLDER created in step 3.

Step 5 : Now open command prompt and change directory to this NEWFOLDER.
Enter "dex2jar classes.dex" and press enter. Now you get "classes.dex.dex2jar"
file in the NEWFOLDER.

Step 6 : Now download java decompiler from link
Extract and run the "jd-gui.exe file".
In File-->Open File->choose "classes.dex.dex2jar"
(you will get all the source code files)
In File-->Save All Sources and save the file in src name.

Steps to get XML files in readable format:
Step 7 : Create TEMPNEWFOLDER and put copy of your .apk file.

Step 8 : Download "apktool v1.x" and "apktool install window" using Google and
Extract the contents in TEMPNEWFOLDER.

Step 9 : Download "framework-res.apk" using Google and place in TEMPNEWFOLDER
(Not all apk file need framework-res.apk file)

Step 10: Now open comman prompt and change directory to TEMPNEWFOLDER.
Enter "apktool if framework-res.apk" and press enter.
Enter "apktool d filename.apk" and press enter.
(filename.apk is the file which you want to decode)
Now you get the readable XML files in the TEMPNEWFOLDER.

Steps to Finalise:
Step 11: Copy contents of NEWFOLDER and TEMPNEWFOLDER to PROJECTNAMEFOLDER and
your source code is ready
614
like
0
dislike
0
mail
flag

You must LOGIN to add comments