ChatGPT解决这个技术问题 Extra ChatGPT

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

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 7 years ago. Improve this question

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

do you mean by programmatically ?
This link has every answer that you need. stackoverflow.com/questions/12732882/…
there are many in Play store someone can search it..

C
Community

You need Three Tools to decompile an APK file.

Dex2jar - Tools to work with android .dex and java .class files ApkTool - A tool for reverse engineering Android apk files 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! :)


I think all these tools run in windows platform. can I import these jar files into my android project and then run in android platform
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?
@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.
ok if obfuscation is enable in app.how can i get original code which are written in app?
@Shailendrsingh its possible only if you are having reverse mapping file, otherwise can`t get 100% out of an APK file.
B
B M

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


DecompileAndroid unfortunately doesn't decompile strings.xml correctly
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
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
d
dirkvranckaert

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.


C
Community

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.


"An APK is just in zip format", true but many files including the AndroidManifest.xml don't unzip properly and are not readable...
V
Vladimir Panteleev

http://www.decompileandroid.com/

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


very nice web-site! I used it for a year. There is also alternative: javadecompilers.com/apk, which uses different approach (Jadx instead of Dex2jar + Jad)
@JqueryNinja check this for alternate - stackoverflow.com/a/27981520/3879847
@RanjithKumar 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?
@JqueryNinja use showjava apk. This is better than others. but advertisment is more.. play.google.com/store/apps/details?id=com.njlabs.showjava
@RanjithKumar showjava uses javadecompilers.com/apk or jadx which does not decompile all java classes
U
Ultimo_m

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


The app never worked for me. It infinitely tries to perform "Decompiling to java" and them usually crashes..
then you should follow this answer stackoverflow.com/a/23924665/2736039 these solutions work very well
that solution has another problem - see my comment there ;)
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 :)
check my edited answer I have found a new tool
m
mostar

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.


t
trueblue

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