September 21, 2012

[HOW TO] - Extract an APK

If you ever tried to extract the contents of an .apk file you might noticed that some files are missing or you can't even read some files because they are decrypted.

This tutorial will show you step by step how to successfully extract the contents of an .apk.

First of all download the following:

  1. Place the android-apktool files you download on the root of your Windows installation drive (im my case C)
  2. Copy the apk there as well
  3. Open a terminal (cmd)
  4. Type:
    1. cd C:\
    2. apktool d C:\nameofapk.apk C:\NewFolder
    3. Hit enter and wait
    4. Once the process is done close the terminal (cmd)
  5. Thats it. Your apk is now extracted and you can find it inside the folder you created (NewFolder) in the step 4.2
STEP 2 - Deodexer
  1. Extract dex2jar inside NewFolder from the previous step
  2. Open a terminal (cmd)
  3. Reach that folder
  4. Type:
    1. dex2jar classes.dex
    2. Hit enter
    3. Now you get classes_dex2jar.jar inside the same folder
STEP 3 - Decompiling
  1. Go to the JD-GUI file you downloaded
  2. Run jd-gui.exe
  3. Click Open and choose the "classes_dex2jar.jar" file from the previous step
  4. Click Save All Sources
STEP 4 - Final step
  1. Create a new folder and  copy inside the extracted files from step 1 and step 3
  2. That's it! You can now see the entire source code

No comments:

Post a Comment