Android application package (APK) is the package file format. APK file is a compressed form of Java classes, XML and several other files. If you saw an amazing app and as a developer want to see the source behind it, then you can decompile APK files to get the actual source code. You can use the reverse engineering process to get the actual source code. It is used to distribute and install application software onto Google’s Android Operating System, Jadx decompiles, .class and .jar files. It also produces java source code from Android Dex and APK files.
There are several tools like Dex2jar, ApkTool, Java Decompiler (JD-GUI), etc. which are used to convert APK file to the source code. Here we will provide you with the list of tools which will help you to decompile Android APK file to the source code.
Note – This article is only for educational purpose, we strictly don’t recommend decompiling apps of other developers.
- 1 Tools to Decompile APK Files
- 2 Frequently Asked Questions
Tools to Decompile APK Files
1. Java Decompilers
This is a great online APK decompiler tool. This tool uses an open source like APK and DEX decompiler known as Jadx. It will help you to obtain the source code from APK file in just one click.
How to decompile APK online to the source code
- Go to this link.
- Now select the APK file by Choose File option and then click on the Upload and Decompile
- Depending upon the size of the file, it will take time to decompile.
- Once the decompilation process is completed, click on the Save button to download the source code.
2. Show Java – A Java Decompiler
Show Java is a java decompiler which can easily extract the source code of an APK (Android app). This is a decompiler that extracts the source code of an Android application including XML files and image assets. It works directly from your Android device. You can also opt for CFR 0.110 or Jadx 0.6.1 to use as the decompiler.
3. Java N-IDE
Java N-IDE is a Java console for Android. It is an Apk builder. You can build and run a java file with JDK 1.7. It supports java compiler 1.7, java editor, java autocomplete code, java debugger. It runs java file, class file, Decompile class, jar. It supports layout builder for Android and also supports VCS. Along with this, the tools which the project includes are ( Javac – Java compiler, Aapt – Android asset package tool, Dx – Dex for dalvik vm, Zip Signer, Apk Builder ). This is a great app for people who want to learn Java and also to decompile Android Apk.
4. JaDX – Decompiler
JaDX is a decompiler for “apk”, “dex”, “jar”, “class” files. It is an Android adapted version JaDX. This program does not decompile XML files and other resources. This program only decompiles classes. It also extracts the assets folder which includes binary files.
ApkTool is a tool for reverse engineering closed & binary Android apps. This tool can decode resources to the nearly original form and rebuild them after making some modifications. ApkTool makes working with an app easier because of the project like file structure and automation of some repetitive tasks like building apk, etc. It could be used for localizing, adding some features or support for custom platforms, analyzing applications and much more, but it is not intended for piracy and other non-legal uses.
- It dissembles resources to the new original form (including resources.arsc, classes.dex and XMLs)
- It helps with repetitive tasks.
- Rebuilds decoded resources back to binary APK/JAR.
- Smali debugging.
6. JD-GUI (Java Decompiler – Graphical Utility Interface)
Java Decompiler is a tool to decompile apk and analyze Java 5 “byte code” and the later versions.
- JD-Core – It is a library that reconstructs Java source code from one or more “.class” files. It is used to recover lost source code and it explores the source of Java runtime libraries. JD-Core supports annotations, generics or type “enum”. JD-GUI and JD-Eclipse include JD-Core library.
- JD-GUI – It is a standalone graphical utility that displays Java source codes of “.class” files. For instant access to methods and fields, you can browse the reconstructed source code with the JD-GUI.
- JD-Eclipse – It is a plug-in for the Eclipse platform. It allows you to display all the Java sources during your debugging process, even if you do not have them all.
- JD-Intellij – It is a plug-in for IntelliJ IDEA.
Dexplorer is an APK decompiler app in which you can explore the DEX/APK files of all your installed apps and downloaded APK’s.
- Browse through java packages and files
- It allows you to browse through assets, lib and res folders, and files
- You can view the AndroidManifest.xml
- Previews of commonly used file types:
- XML files (syntax highlighting)
- Image files (adjustable background colors)
- Audio files with playback
- Font files with a text editor
8. Java Manager; Emulate Java
You can Emulate and Manage Java projects. This app helps you to decompile APK and your own Java programs. You can use Java in your Android. With this application, you can run java files, class files, and jar files. You can also compile and decompile your own Java programs with the help of this application.
This app runs only in command line mode.
DexDump is another app to reverse-engineering Android apps. It is very easy to use. It is designed for mobile devices to decompile android applications instantly. It has easy to navigate user interface. It supports decompilation of APK, dex, odex and oat files to smali code. You can also apply a package filter to filter out uninteresting packages and search through class/field/method names within this app.
All of the above mentioned some of the tools and apps will help you to decompile APK file to the source code.
Frequently Asked Questions
What is Android Reverse Engineering?
Android reverse engineering is used by developers to understand the working of apps and find out how things work. It is also used for reading another’s code while experimenting with developing new apps.
Is It Possible To Decompile Apk?
Yes, it is possible to decompile Apk using Java Decompilers.
How Can I Get Source Code From Apk?
Rename Apk from app.apk to app.zip and extract the zip file into a folder. Use JADX tool to read the source code, present in classes.dex file.
How Do I Decompile An App?
In order to decompile an App, you need to install an APK extractor on your Android phone. Plus, you would also need Android SDK, dex3jar, and JD_GUI for this purpose.