首页 > 其他分享 >Google官方出品的Android App反编绎工具-Enjarify

Google官方出品的Android App反编绎工具-Enjarify

时间:2023-08-03 12:34:54浏览次数:28  
标签:enjarify Google just script App Enjarify will output

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


python3 - O - m enjarify . main yourapp . apk
 
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,


ln - s "$PWD/enjarify.sh" ~ / bin / enjarify

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.



enjarify yourapp . apk

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



enjarify classes2 . dex

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.



enjarify yourapp . apk - o yourapp . jar

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


标签:enjarify,Google,just,script,App,Enjarify,will,output
From: https://blog.51cto.com/u_15955464/6947989

相关文章

  • 前端vue uni-app自定义精美海报生成组件
    在当前技术飞速发展的时代,软件开发的复杂度也在不断提高。传统的开发方式往往将一个系统做成整块应用,一个小的改动或者一个小功能的增加都可能引起整体逻辑的修改,从而造成牵一发而动全身的情况。为了解决这个问题,组件化开发逐渐成为了一种趋势。通过组件化开发,我们可以实现单独开......
  • SQLFlow——除了 Google 的 BigQueryML,微软基于 SQL Server 的 AI 扩展,以及 Teradata
    蚂蚁金服开源机器学习工具SQLFlow,技术架构独家解读2019-05-15· SQLFlow · #SQLFlow5月6日,在 QCon全球软件开发大会(北京站)2019 上,蚂蚁金服副CTO胡喜正式宣布开源机器学习工具SQLFlow,他在演讲中表示:“未来三年,AI能力会成为每一位技术人员的基本能力。我们希望通过开......
  • 最新的iOS应用上架App Store详细流程解析
    最新的iOS应用上架AppStore详细流程解析2023已经过了2/3的时间,由于现在苹果签名市场的价格不断的上升,现在很多的开发商一直在想着如何进行上架一些自己的产品,下面小编来给大家梳理一下上架苹果市场的流程: 2020最新整理iOSapp上架app详细教程 上架iOS需要一个付费688的开......
  • 最新的iOS应用上架App Store详细流程解析
    最新的iOS应用上架AppStore详细流程解析2023已经过了2/3的时间,由于现在苹果签名市场的价格不断的上升,现在很多的开发商一直在想着如何进行上架一些自己的产品,下面小编来给大家梳理一下上架苹果市场的流程: 2020最新整理iOSapp上架app详细教程 上架iOS需要一个付费688的开......
  • 音视频SDK对比|在线K歌APP技术正版曲库技术选型
    摘要在线K歌软件的开发有许多技术难点,需考虑到音频录制和处理、实时音频传输和同步、音频压缩和解压缩、设备兼容性问题等技术难点外,此外,开发者还应关注音乐版权问题,确保开发的应用合规合法。前言前面写了几期关于直播SDK技术选型的文章,主要是从RTC实时音视频、超低延迟直播、CDN......
  • 音视频SDK对比|K歌App中的实时合唱功能如何进行技术选型
    摘要在线K歌软件的开发有许多技术难点,需考虑到音频录制和处理、实时音频传输和同步、音频压缩和解压缩、设备兼容性问题等技术难点外,此外,开发者还应关注音乐版权问题,确保开发的应用合规合法。前言前面写了几期关于直播SDK技术选型的文章,主要是从RTC实时音视频、超低延迟直播......
  • mule9.0 springappcation.xml
    <?xmlversion="1.0"encoding="UTF-8"?><mulexmlns:scripting="http://www.mulesoft.org/schema/mule/scripting"xmlns:vm="http://www.mulesoft.org/schema/mule/vm"xmlns:db="http://www.mulesoft......
  • The Report Viewer Web Control HTTP Handler has not been registered in the applic
     system.webServer内加<handlers><addname="ReportViewerWebControlHandler"preCondition="integratedMode"verb="*"path="Reserved.ReportViewerWebControl.axd"type="Microsoft.Reporting.WebForms.Htt......
  • tp动态匹配多级路径 app/admin/route/app.php
    //请求路径$baseUrl=request()->baseUrl();//访问地址二级目录路由匹配if(substr_count($baseUrl,'/')==3){$baseUrl=substr($baseUrl,1);//动态匹配为二级路由规则Route::rule($baseUrl,substr_replace($baseUrl,'.',strpos($baseUrl,'/',0......
  • 能否让APP永不崩溃—小光和我的对决
    前言关于拦截异常,想必大家都知道可以通过Thread.setDefaultUncaughtExceptionHandler来拦截App中发生的异常,然后再进行处理。于是,我有了一个不成熟的想法。。。让我的APP永不崩溃既然我们可以拦截崩溃,那我们直接把APP中所有的异常拦截了,不杀死程序。这样一个不会崩溃的APP用户体验......