Reverse Engineering

Apktool – Reverse Engineering Android apk Files

ApkTool is a tool for reverse engineering 3rd party, closed, binary Android apps. It can decode resources to nearly original form and rebuild them after making some modifications; it makes possible to debug smali code step by step. Also it makes working with app easier because of project-like files structure and automation of some repetitive tasks like building apk, etc.

It is NOT intended for piracy and other non-legal uses. It could be used for localizing, adding some features or support for custom platforms and other GOOD purposes. Just try to be fair with authors of an app, that you use and probably like.

 

Features

  • Disassembling resources to nearly original form (including resources.arsc, classes.dex, 9.png. and XMLs)
  • Rebuilding decoded resources back to binary APK/JAR
  • Organizing and handling APKs that depend on framework resources
  • Smali Debugging (to be removed in 2.1.0 in favor of IdeaSmali)
  • Helping with repetitive tasks

 

Requirements

  • Java 7 (JRE 1.7)
  • Basic knowledge of Android SDK, AAPT and smali

 

How to Build Apktool from source

Apktool is a collection of 1 project, containing 4 sub-projects and a few dependencies.

  • brut.apktool.lib – (Main, all the Library code)
  • brut.apktool.cli – The cli interface of the program
  • brut.j.dir – Utility project
  • brut.j.util – Utility project
  • brut.j.common – Utility project

 

Requirements

  • JDK (1.7)
  • git

 

Build Steps

git clone git://github.com/iBotPeaches/Apktool.git
cd Apktool
  • ./gradlew for unix based systems or gradlew.bat for windows.
  • [./gradlew][gradlew.bat] build fatJar – Builds Apktool, including final binary.
  • Optional (You may build a Proguard jar) [./gradlew][gradlew.bat] build fatJar proguard

After 1-2 minutes you should have a jar file at

./brut.apktool/apktool-cli/build/libs/apktool-xxxxx.jar

 

Download Apktool