Saturday, February 16, 2013

Words of Wisdom


Words of Wisdom
The world suffers a lot. Not because of the violence of the bad people, but because of the silence of good people!                                                    
                                                                                                 --Napoleon

Laughing faces do not mean that there is absence of sorrow. It means that they have the ability to deal with it.                                                 
                                                                                                 --Shakespeare

Opportunities are like sunrises, if you wait too long, you may miss them.
                                                                                                 --William Arthur

It is very easy to defeat someone, but it is very hard to win someone. 
                                                                                                 -- John Keats

You always pass failure on your way to success.                      
                                                                                                 --Mickey Rooney
Let me not defer doing kindness, for I shall not pass this way again.
                                                                                                 -- E.de Grellet

If I can stop one heart from breaking, l shall not live in vain.  
                                                                                                 --Emily Dickinson

Honour is the reward of virtue.                                                --Cicero

It is virtue and not birth that makes us noble.                          --J.F.Fletcher

No one can reach me by reading scriptures.                             
                                                                                 --God Sermonizer of Gita

Reading scriptures will empower one no more than reading about medicines will cure a patient of the illness.

It is through our righteous actions that his world is transformed. God gives us the wisdom to do so.

Friday, February 8, 2013

How to get source files from .apk file

How to get source files from .apk file

Android application package file (APK) is the file format used to distribute and install application software and middleware onto Google's Android operating system
We can now get java code from apk files with ease.
Following are steps to get java code from apk file.

Step 1:Renaming .apk file
Rename the .apk file with the extension .zip (suppose the file be "android.apk" then after renaming it becomes "android.apk.zip")
Step 2:Get the java files from apk
2.1 Now extract the renamed zip file(android.apk.zip) in specific folder, supposed that folder     
       name is "androidFolder".
2.2 Now Download dex2jar and extract that zip file in folder "androidFolder".
2.3 Now open command prompt and go to the folder path created in previous step and type 
       the command(for example folder path is c:\\androidFolder\dex2jar) 
      "dex2jar ../classes.dex" and press enter.This will generate "classes.dex.dex2jar" file in  
       the same folder.
2.4 Now  Download java decompiler and extract it and start(double click) jd-gui.exe
2.5 Now open jd-gui window browse the generated "classes.dex.dex2jar" file in 
       androidFolder, this will give you all the class files by src name.
2.6 Now from the File menu select "save all sources" this will generate a zip file named 
     "classes_dex2jar.src.zip" consisting of all packages and java files.
2.7 Now extract that zip file (classes_dex2jar.src.zip) and you will get all java files of the 
      application.
Above steps will generate java files.
To get xml files perform following steps.
Step 3:Getting xml files from apk
3.1 Download apktool and install it and extract both files and place it in the same folder (for 
      example "androidXmlFolder").
3.2 Place the .apk file in same folder (i.e androidXmlFolder)
3.3 Now open command prompt and goto the directory where apktool is stored (here 
      "androidXmlFolder") and type the following command "apktool if framework-res.apk" 
      Above command result should be "Framework installed ..."
3.4 Now in command prompt type the command "apktool d filename.apk" (where filename is name of apk file).
3.5 This will generate a folder of name filename in current directory (here androidXmlFolder) where all xml files will be stored in res\layout folder.
Dex to java files