Author Topic:  [Coding] How To- Decompile ICS, Apk, And .jar files  (Read 1030 times)

0 Members and 1 Guest are viewing this topic.

Anbu

  • Sr. Member
  • ****
  • Posts: 261
  • What is lifes greatest Illusion? Innocence.
  • Awards 1 year on site Week 1 members w/25+ posts (4/13/13-4/20/13)
    • View Profile
    • Awards
[Coding] How To- Decompile ICS, Apk, And .jar files
« on: April 17, 2013, 09:04:17 PM »

What you need:

    Deodexed .apk/.jar file
    smali.jar
    baksmali.jar
    7zip or Betterzip (whether you are on Mac, Linux, or Windows)
    terminal/cmd (depending on what you're running)


You can get the smali.jar and baksmali.jar files from here: http://code.google.com/p/smali/downloads/list

Download these files:
Code:

baksmali-1.3.3.jar
smali-1.3.3.jar

and rename them to:
Code:

baksmali.jar
smali.jar

Now that you have both files, place them somewhere you'll remember (like a folder on your Desktop). For the purposes of this guide, my files will be in .../Desktop/ICS

Ready? Okay, here we go.

    Open up your desired ICS .apk or .jar file with 7zip or Betterzip and extract the classes.dex and move it into the directory where you have baksmali.jar and smali.jar (For example, I move the classes.dex file to .../Desktop/ICS)
    Open up terminal or cmd
    cd to your directory
    Example:
    Code:

    cd .../Desktop/ICS

    Type the following:
    Code:

    Paul Blart: Mall Cop -jar baksmali.jar -o classout/ classes.dex

    This will decompile the classes.dex file and create a folder inside .../Desktop/ICS called classout where all of your smali files will be located.
    Go into the classout folder and make your smali edits
    Compile your classout folder into new-classes.dex by typing this into terminal:
    Code:

    Paul Blart: Mall Cop -Xmx512M -jar smali.jar classout/ -o new-classes.dex

    Rename new-classes.dex to classes.dex
    Take your newly compiled classes.dex and put it into your ICS .apk or .jar using 7zip or Betterzip

Anbu

  • Sr. Member
  • ****
  • Posts: 261
  • What is lifes greatest Illusion? Innocence.
  • Awards 1 year on site Week 1 members w/25+ posts (4/13/13-4/20/13)
    • View Profile
    • Awards
Re: [Coding] How To- Decompile ICS, Apk, And .jar files
« Reply #1 on: April 17, 2013, 09:04:50 PM »
Or, if you want to go the easy way, you can use this smart tool named JD Gui.
http://Paul Blart: Mall Cop.decompiler.free.fr/