Extract Source Code from an APK


Follow these simple steps and you can have the source code of any apk file.

Step -1 :-   
  • Make a new folder and put .apk file in it (the targeted app). 
  • Now rename the extension of this .apk file to .zip (eg.: rename from example.apk to example.zip) and save it. 
  •  Now you have classes.dex files, etc. You can see drawable but not xml and java files, so continue.

 Step 2 :-  
  • Now extract this zip apk file in the same folder (or NEW FOLDER). 
  • Download dex2jar/ and extract it to the same folder (or NEW FOLDER). 
  • Open command prompt and change directory to that folder (or NEW FOLDER). Write "dex2jar classes.dex" and press enter. You got classes .dex.dex2jar file in the same folder. 
  • Download java.decompiler and now double click on jd-gui and click on open file. Then open classes.dex dex2jar file from that folder. You have class files and save all these class files (click on file then click "save all sources" in jd-gui) by src name. 
  • Here you get java source but the xml files are still unreadable, lets move to next step. 

Step 3 :-  

  • Now open another new folder and put these files.
  • Put the targeted .apk file in this folder.
  • Open a command prompt window.
  • Navigate to the root directory of apktool & type command "apktool if framework-res.apk".
  • apktool d example.apk

    Everything ends up. To have the required source code just copy the contents of both folders to a new folder.
    Make a new folder and put .apk file in it (which you want to decode). Now rename the extension of this .apk file to .zip (eg.: rename from filename.apk to filename.zip) and save it. Now you get classes.dex files, etc. At this stage you are able to see drawable but not xml and java files, so continue.

    Copy the BEST Traders and Make Money : http://bit.ly/fxzulu
    Make a new folder and put .apk file in it (which you want to decode). Now rename the extension of this .apk file to .zip (eg.: rename from filename.apk to filename.zip) and save it. Now you get classes.dex files, etc. At this stage you are able to see drawable but not xml and java files, so continue.

    Copy the BEST Traders and Make Money : http://bit.ly/fxzulu
    Make a new folder and put .apk file in it (which you want to decode). Now rename the extension of this .apk file to .zip (eg.: rename from filename.apk to filename.zip) and save it. Now you get classes.dex files, etc. At this stage you are able to see drawable but not xml and java files, so continue.

    Copy the BEST Traders and Make Money : http://bit.ly/fxzulu

    No comments:

    Post a Comment