How to decompile an APK or DEX file on Android platform?

AndroidDisassemblyDecompilingMalware Detection

Android Problem Overview


Is it possible to decompile an APK package or DEX file on Android platform? Are there any tools that can decompile an APK file?

Android Solutions


Solution 1 - Android

You need Three Tools to decompile an APK file.

>1. Dex2jar - Tools to work with android .dex and java .class files

>2. ApkTool - A tool for reverse engineering Android apk files

>3. JD-GUI - Java Decompiler is a tools to decompile and analyze Java 5 “byte code” and the later versions.

for more how-to-use-dextojar. Hope this will help You and all! :) http://code.google.com/p/android-apktool/>

Solution 2 - Android

Online APK Decompiler
http://www.decompileandroid.com/<br/> https://www.decompiler.com/<br/> APK Decompiler App for Windows
http://forum.xda-developers.com/showthread.php?t=2493107

Update 2015/12/04
ClassyShark you can open APK/Zip/Class/Jar files and analyze their contents. https://github.com/google/android-classyshark

Update 2021/1/28
https://ibotpeaches.github.io/Apktool/
https://github.com/skylot/jadx

Solution 3 - Android

I have created a tool that combines dex2jar, jd-core and apktool: https://github.com/dirkvranckaert/AndroidDecompiler Just checkout the project locally and run the script as documented and you'll get all the resources and sources decompiled.

Solution 4 - Android

An APK is just in zip format. You can unzip it like any other .zip file.

You can decompile .dex files using the dexdump tool, which is provided in the Android SDK.

See https://stackoverflow.com/a/7750547/116938 for more dex info.

Solution 5 - Android

http://www.decompileandroid.com/

This website will decompile the code embedded in APK files and extract all the other assets in the file.

Solution 6 - Android

You can decompile an apk on Android device using this : https://play.google.com/store/apps/details?id=com.njlabs.showjava

For more info look here: http://forum.xda-developers.com/showthread.php?t=2601315

EDIT: 28-02-2015

For decompiling an apk you can use this tool: https://apkstudio.codeplex.com/license

If that doesnt help check this link

Solution 7 - Android

You can also use the apktool: http://ibotpeaches.github.io/Apktool/ which will also give you the xml res files. Along with that you can also use the dex2jar system which will output the dex file in the apk to a jar file that can be opened with JD-GUI and exported to standard java files.

Solution 8 - Android

Also you can use Android Multitool. You can make minor changes in the app like hiding GUI elements or modifying small part of Logic and rebuild the apk. Its easy to use and decompile/recompile apk and jar files. Here is the Link you can checkout.

Cheers

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser3151261View Question on Stackoverflow
Solution 1 - AndroidRupesh YadavView Answer on Stackoverflow
Solution 2 - AndroidB MView Answer on Stackoverflow
Solution 3 - AndroiddirkvranckaertView Answer on Stackoverflow
Solution 4 - AndroidAustyn MahoneyView Answer on Stackoverflow
Solution 5 - AndroidRanjithkumarView Answer on Stackoverflow
Solution 6 - AndroidUltimo_mView Answer on Stackoverflow
Solution 7 - Androidw9jdsView Answer on Stackoverflow
Solution 8 - AndroidtrueblueView Answer on Stackoverflow