enjarify是由Google官方新出品的基于Python3开发,类似dex2jar的一个将Dalvik字节码转换成相对应的Java字节码开源工具,官方宣称有比dex2jar更优秀的兼容性,准确性及更高的效率。
Introduction
Enjarify is a tool for translating Dalvik bytecode to equivalent Java bytecode. This allows Java analysis tools to analyze Android applications.
Usage And Installation
Enjarify is a pure python 3 application, so you can just git clone and run it. To run it directly, assuming you are in the top directory of the repository, you can just do
For normal use, you’ll probably want to use the wrapper scripts and set it up on your path.
Linux
For convenience, a wrapper shell script is provided, enjarify.sh. This will try to use Pypy if available, since it is faster than CPython. If you want to be able to call Enjarify from anywhere, you can create a symlink from somewhere on your PATH, such as ~/bin. To do this, assuming you are inside the top level of the repository,
Windows
A wrapper batch script, enjarify.bat, is provided. To be able to call it from anywhere, just add the root directory of the repository to your PATH. The batch script will always invoke python3 as interperter. If you want to use pypy, just edit the script.
Usage
Assuming you set up the script on your path correctly, you can call it from anywhere by just typing enjarify, e.g.
The most basic form of usage is to just specify an apk file or dex file as input. If you specify a multidex apk, Enjarify will automatically translate all of the dex files and output the results in a single combined jar. If you specify a dex file, only that dex file will be translated. E.g. assuming you manually extracted the dex files you could do
The default output file is [inputname]-enjarify.jar in the current directory. To specify the filename for the output explicitly, pass the -o or –output option.
By default, Enjarify will refuse to overwrite the output file if it already exists. To overwrite the output, pass the -f or –force option.
Why Not Dex2jar?
Dex2jar is an older tool that also tries to translate Dalvik to Java bytecode. It works reasonable well most of the time, but a lot of obscure features or edge cases will cause it to fail or even silently produce incorrect results. By contrast, Enjarify is designed to work in as many cases as possible, even for code where Dex2jar would fail. Among other things, Enjarify correctly handles unicode class names, constants used as multiple types, implicit casts, exception handlers jumping into normal control flow, classes that reference too many constants, very long methods, exception handlers after a catchall handler, and static initial values of the wrong type.
Limitations
Enjarify does not currently translate optional metadata such as sourcefile attributes, line numbers, and annotations.
Enjarify tries hard to successfully translate as many classes as possible, but there are some potential cases where it is simply not possible due to limitations in Android, Java, or both. Luckily, this only happens in contrived circumstances, so it shouldn’t be a problem in practice.
Performance Tips
PyPy is much faster than CPython. To install PyPy, see http://pypy.org/. Make sure you get PyPy3 rather than regular PyPy. The Linux wrapper script will automatically use the command pypy3 if available. On Windows, you’ll need to edit the wrapper script yourself.
By default, Enjarify runs optimizations on the bytecode which make it more readable for humans (copy propagation, unused value removal, etc.). If you don’t need this, you can speed things up by disabling the optimizations with the –fast option. Note that in the very rare case where a class is too big to fit in a classfile without optimization, Enjarify will automatically retry it with all optimizations enabled, so this option does not affect the number of classes that are successfully translated.
Disclaimer
This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.
工具下载及源代码见:https://github.com/google/enjarify
相关推荐
Android APP渗透测试方法大全-137页
基于Android手机app开发与设计--毕业设计--开题报告.doc
Android APP 渗透测试方法-137页.pdf
**Android 反编译工具 jadx-gui:APP备案利器** 在Android应用开发和安全分析领域,反编译工具起着至关重要的作用。其中,jadx-gui是一款强大的Android反编译器,它允许开发者和安全研究人员对APK文件进行逆向工程...
这个是api 21~25(android 5.0.1-7.1.1)能用的app源码,使用eclipse+adt开发(不习惯用AS),android8.0(api26)因时间原因未能测试是否可用。不过android10.0因为api变化被证明肯定不能用。里面除了源码、还有...
安卓app开发项目-LumaQQ-Android qq 代码(源码).zip安卓app开发项目-LumaQQ-Android qq 代码(源码).zip安卓app开发项目-LumaQQ-Android qq 代码(源码).zip安卓app开发项目-LumaQQ-Android qq 代码(源码).zip安卓app...
总的来说,这个"android app反编译工具包"为Android应用的逆向工程提供了一套完整的解决方案,涵盖了从命令行工具到图形化界面的多种反编译方式,是开发者、安全专家以及研究者探索Android应用内部结构的有力工具。...
这里提到的三个文件——dex2jar-2.0.zip、apktool_2.4.1.jar和jd-gui-1.6.6.jar,正是Android应用反编译流程中的关键工具。 首先,让我们详细了解一下这些工具: 1. **dex2jar-2.0.zip**:这个工具主要用于将...
android-app-bootstrap A starting tutorial for Android application. native-in-practice Output npmcdn.com: android_app_bootstrap-debug.apk License The MIT License (MIT) Copyright (c) 2015 xdf
"Android APP 反编译步骤详解" Android APP 反编译是指从 APK 文件中提取源代码、资源文件、XML 配置文件、语言资源等信息的一系列步骤。下面将详细介绍 Android APP 反编译的步骤和相关知识点。 一、反编译 APK ...
dlib-android-app See http://dlib.net for the main project documentation. See dlib-android for JNI lib. Refer to dlib-android/jni/jnilib_ex Grap the source $ git clone ...
本文将深入探讨“Android App反编译工具”这一主题,包括其概念、常用工具以及详细步骤。 一、Android App反编译的概念 Android应用通常以APK(Android Package)的形式发布,其包含了Java字节码和资源文件。反编译...
Android APP反编译小工具,仅限于做简单的反编译和资源获取!!! 仅能学习使用,其他用途后果自负哦
Handy for small apps with in-app purchase (IAP) items that need both Google Play store and Amazon App Store support - i.e. regular Android devices and Amazon Kindle Fire. We developed this as a ...
本文将详细介绍一款全面的Android反编译工具集,包括如何使用其中的关键工具,以帮助开发者深入理解APK的工作原理。 一、Apktool Apktool是Android反编译工具中的重要组成部分,它能够解包APK文件,将其资源文件...
在这个名为"androidsdk-platforms-android-23.rar"的压缩包中,包含了针对Android 23(也称为Android M,Marshmallow)的SDK平台组件。这一版本的Android引入了许多重要的更新和改进,对开发者的工作流程产生了深远...
在Android Emulator上安装App Market-g是一个常见的任务,特别是对于开发者和测试人员而言,他们需要在模拟器上体验和测试各种应用。这篇文章将详细介绍如何在Android Emulator中安装Market-g,以便获取更多的应用...
《Android-App-开发在Android Studio中的初学者指南》 Android Studio是Google为开发者提供的一款强大的集成开发环境(IDE),专用于构建Android应用程序。对于初学者来说,掌握Android App开发在Android Studio中...
在这个场景下,Android反编译工具扮演了至关重要的角色。本篇将详细讲解其中提及的三个关键工具:`android-tool.jar`、`jd-gui.jar`和`dex2jar`,以及它们在Android反编译流程中的作用。 首先,`android-tool.jar`...
本篇文章将详细探讨在Mac环境下使用的三款主流Android App反编译工具:Apktool、dex2jar和JD-GUI。 首先,Apktool(文件名:apktool)是一款开源的Android APK反编译工具,由IzzySoft开发,主要功能是解包和重新...