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

- 5,438
- 2
- 27
- 32

- 1,947
- 2
- 13
- 12
-
do you mean by programmatically ? – Lucifer Jan 09 '14 at 02:07
-
This link has every answer that you need. http://stackoverflow.com/questions/12732882/reverse-engineering-from-an-apk-file-to-a-project – Mandar Kakade Jan 09 '14 at 05:33
-
there are many in Play store someone can search it.. – MarmiK Sep 16 '15 at 12:30
8 Answers
You need Three Tools to decompile an APK
file.
for more how-to-use-dextojar. Hope this will help You and all! :)

- 1
- 1

- 12,096
- 4
- 53
- 70
-
1I think all these tools run in windows platform. can I import these jar files into my android project and then run in android platform – user3151261 Jan 10 '14 at 02:39
-
Rupesh Yadav@ In this process some code of line is miss match to original code. www.decompileandroid.com/ from this web i able to decompile my code but both code are different why? – Shailendr singh Jun 02 '14 at 04:51
-
1@Shailendrsingh the above is the standard process to decompile an APK and in case when obfuscation is enabled in app the decompiled classes code may differs. – Rupesh Yadav Jun 02 '14 at 06:33
-
ok if obfuscation is enable in app.how can i get original code which are written in app? – Shailendr singh Jun 02 '14 at 07:03
-
2@Shailendrsingh its possible only if you are having reverse mapping file, otherwise can`t get 100% out of an APK file. – Rupesh Yadav Jun 02 '14 at 12:50
-
[AppUse](https://appsec-labs.com/AppUse) collected all the above tools into one tool. – Elhanan Mishraky Sep 24 '14 at 08:56
Online APK Decompiler
http://www.decompileandroid.com/
https://www.decompiler.com/
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

- 1,863
- 1
- 25
- 40
-
3
-
ProGuard entirely remove R$string.class, but Android decompilers can reconstruct all information from resources.arsc. I think this DecompileAndroid hasn't implemented this kind of complicated function yet – LiangWang Feb 12 '16 at 00:01
-
thx for the update, jadx seems to work, although the export does not seem to work, so I cannot open the project in Android Studio – rubo77 Dec 22 '21 at 00:40
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.

- 1,364
- 1
- 17
- 30
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.

- 1
- 1

- 11,398
- 8
- 64
- 85
-
1*"An APK is just in zip format"*, true but many files including the `AndroidManifest.xml` don't unzip properly and are not readable... – Ben Winding Aug 20 '20 at 04:06
http://www.decompileandroid.com/
This website will decompile the code embedded in APK files and extract all the other assets in the file.

- 24,651
- 6
- 70
- 114

- 16,071
- 12
- 120
- 159
-
2very nice web-site! I used it for a year. There is also alternative: http://www.javadecompilers.com/apk/, which uses different approach (Jadx instead of Dex2jar + Jad) – Andrew Rukin Aug 21 '15 at 12:25
-
@JqueryNinja check this for alternate - http://stackoverflow.com/a/27981520/3879847 – Ranjithkumar Aug 11 '16 at 13:31
-
@RanjithKumar http://www.javadecompilers.com/apk/ after waiting for long hours in a queue, the website did decompile my apk. However, some java classes were missing. Isn't there any other alternative? – iOSAndroidWindowsMobileAppsDev Aug 12 '16 at 09:58
-
@JqueryNinja use showjava apk. This is better than others. but advertisment is more.. https://play.google.com/store/apps/details?id=com.njlabs.showjava – Ranjithkumar Aug 12 '16 at 10:32
-
@RanjithKumar showjava uses javadecompilers.com/apk or jadx which does not decompile all java classes – iOSAndroidWindowsMobileAppsDev Aug 15 '16 at 07:07
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

- 4,724
- 4
- 38
- 60
-
The app never worked for me. It infinitely tries to perform "Decompiling to java" and them usually crashes.. – goRGon Feb 05 '15 at 19:50
-
then you should follow this answer http://stackoverflow.com/a/23924665/2736039 these solutions work very well – Ultimo_m Feb 09 '15 at 22:40
-
-
I know that problem and to solve that I use Apk Tool. As much as I know you cant find a tool that does all the work. You have to use them all :) – Ultimo_m Feb 12 '15 at 20:48
-
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.