Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.dwatling:apk-decompiler:v1.1.0'
}
dependencies {
implementation("com.github.dwatling:apk-decompiler:v1.1.0")
}
<dependency>
<groupId>com.github.dwatling</groupId>
<artifactId>apk-decompiler</artifactId>
<version>v1.1.0</version>
</dependency>
libraryDependencies += "com.github.dwatling" % "apk-decompiler" % "v1.1.0"
:dependencies [[com.github.dwatling/apk-decompiler "v1.1.0"]]
This project makes it easy to convert an installed Android app that was built with the Android SDK into readable source files.
How to use:
That's it! The output will be a zip file of the passed in package or keyword that contains as much of the decompiled code as possible.
NOTE: There will be no .java files, but .class files will be generated. I'd recommend using something like JD-Gui (https://github.com/java-decompiler/jd-gui/releases) to convert it into Java code.
Some of the dependent projects are not able to parse all APKs, so it isn't guaranteed to be a complete decompilation. If you see any problems during the run of APK Decompiler, I would encourage you to file a bug report with the appropriate project author!
APK Decompiler wraps the following projects:
mvn clean package -U