如何在Android平台上反编译APK或DEX文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21010367/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 03:49:00  来源:igfitidea点击:

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

androiddisassemblydecompilingmalware-detection

提问by user3151261

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平台上反编译APK包或DEX文件?有没有可以反编译APK文件的工具?

回答by Rupesh Yadav

You need Three Tools to decompile an APKfile.

你需要三个工具来decompile an APK归档。

  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.

  1. Dex2jar- 处理 android .dex 和 java .class 文件的工具

  2. ApkTool- 逆向工程 Android apk 文件的工具

  3. JD-GUI- Java Decompiler 是一个反编译和分析 Java 5 “字节码”及更高版本的工具。

for more how-to-use-dextojar. Hope this will help You and all! :)

有关更多使用方法 dextojar 的信息。希望这会帮助你和所有人!:)

回答by B M

Online APK Decompiler http://www.decompileandroid.com/
http://www.javadecompilers.com/
APK Decompiler App for Windows http://forum.xda-developers.com/showthread.php?t=2493107

在线 APK 反编译器 http://www.decompileandroid.com/
http://www.javadecompilers.com/
适用于 Windows 的 APK 反编译器应用程序 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

更新 2015/12/04
ClassyShark 你可以打开 APK/Zip/Class/Jar 文件并分析它们的内容。 https://github.com/google/android-classyshark

回答by dirkvranckaert

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

我已经创建了一个结合 dex2jar、jd-core 和 apktool 的工具:https: //github.com/dirkvranckaert/AndroidDecompiler只需在本地签出项目并按照文档运行脚本,您将获得所有资源和源的反编译。

回答by Ranjith Kumar

http://www.decompileandroid.com/

http://www.decompileandroid.com/

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

该网站将反编译嵌入在 APK 文件中的代码并提取文件中的所有其他资产。

回答by Austyn Mahoney

An APK is just in zipformat. You can unzip it like any other .zipfile.

APK 只是zip格式而已。您可以像解压缩任何其他.zip文件一样解压缩它。

You can decompile .dexfiles using the dexdumptool, which is provided in the Android SDK.

您可以.dex使用dexdumpAndroid SDK 中提供的工具反编译文件。

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

有关更多 dex 信息,请参阅https://stackoverflow.com/a/7750547/116938

回答by Ultimo_m

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

您可以使用以下方法在 Android 设备上反编译 apk: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

更多信息请看这里:http: //forum.xda-developers.com/showthread.php?t=2601315

EDIT: 28-02-2015

编辑:28-02-2015

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

要反编译 apk,您可以使用此工具:https: //apkstudio.codeplex.com/license

If that doesnt help check this link

如果这没有帮助,请检查此链接

回答by w9jds

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.

您还可以使用 apktool:http: //ibotpeaches.github.io/Apktool/,它也会为您提供 xml res 文件。除此之外,您还可以使用 dex2jar 系统,该系统会将 apk 中的 dex 文件输出为 jar 文件,该文件可以使用 JD-GUI 打开并导出为标准 java 文件。

回答by 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 Linkyou can checkout.

您也可以使用 Android Multitool。您可以在应用程序中进行细微更改,例如隐藏 GUI 元素或修改一小部分 Logic 并重建 apk。它易于使用和反编译/重新编译 apk 和 jar 文件。这是您可以结帐的链接

Cheers

干杯