Skip to main content

Build Apktool

Apktool is a collection of 1 project, containing subprojects 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 > 8
  • git

Build Steps

We use gradle to build. First clone the repository using either SSH or HTTPS.

  1. Navigate to the Apktool folder: cd Apktool
  2. For remaining steps use ./gradlew for unix based systems or gradlew.bat for windows.
  3. You can build the project in two ways:
    1. Without proguard [./gradlew][gradlew.bat] build shadowJar
      • This will build the project and create a jar file: brut.apktool/apktool-cli/build/libs/apktool-cli-all.jar
    2. With proguard: [./gradlew][gradlew.bat] build shadowJar proguard
      • This will build the project and create a jar file: brut.apktool/apktool-cli/build/libs/apktool-vXXX.jar

Windows Requirements

caution

Be aware of directory path length limitations on Windows.

Windows has some limitations regarding max filepath. At one location in Apktool, we have a 218 character directory path which means due to the limitation of max 255 characters on Windows we need to enforce some requirements.

This leaves 37 characters total to clone the project on Windows. For example, I can clone this project to the location

C:/Users/Connor/Desktop/Apktool

This is 31 characters, which allows Apktool to be cloned properly. Cloning the project into a directory longer than 37 characters will not work.