android oat如何提取dex文件字节码,Vdex Extractor:从Vdex文件反编译和提取Android Dex字节码的工具...

这个博客介绍了三个脚本,用于从Android设备中提取ART编译器输出资源,包括用户和系统应用的oat、ART、vdex文件,并支持APK的提取。此外,还提供了一个工具用于更新Vdex文件的位置校验和,以及批量反编译Vdex资源为Dex文件。这些工具对于Android应用的分析和调试非常有用。
摘要由CSDN通过智能技术生成

实用脚本

extract-apps-from-device.sh

从连接的Android设备中提取安装包(用户和系统)的ART编译器输出资源(oat、ART、vdex)。还支持提取APK档案的安装包。由于应用了DAC权限,一些系统应用程序数据在没有根访问的情况下可能无法提取。

$ scripts/extract-apps-from-device.sh -h

Usage: extract-apps-from-device.sh [options]

options:

-o|--output   : Output directory to save extracted data (default is '.')

-d|--device : Device serial to use instead of default interactive selection

--system-apps      : Extract system apps too (default is user apps only)

--apks             : Extract apks (default is optimized files only)

-h|--help          : This help message

$ scripts/extract-apps-from-device.sh --system-apps -o /tmp/art_data --apks

[INFO]: Enumerating connected Android devices

[INFO]: Trying to extract data from '163' packages

[INFO]: Extracted data stored under '/tmp/art_data'

###  update-vdex-location-checksums.sh使用从输入Apk存档文件中提取的CRCs更新Vdex文件位置校验和。有关如何使用该特性欺骗ART和绕过SafetyNet应用程序完整性检查的更多信息,请参阅此处。

$ scripts/update-vdex-location-checksums.sh -h

Usage: update-vdex-location-checksums.sh [options]

options:

-i|--input  : Input Vdex file to repair location checksum(s) within

-a|--app    : Input Apk file to extract location checksum(s) from

-o|--output  : Directory to save updated Vdex file (default is '.')

-h|--help         : This help message

###  tools/deodex/run.sh帮助工具,以批量方式将(deodex) Vdex资源反编译回标准Dex文件。该工具自动处理CompactDex文件(如Android Pie中介绍的),并使用compact_dex_converter工具(更多信息在这里)转换回StandardDex。由于转换器是作为AOSP源代码的一部分进行编译的,为了方便起见,开发人员维护了一组用于Linux和maacOS的二进制文件。

$ tools/deodex/run.sh -h

Usage: run.sh [options]

options:

-i|--input path> : Directory with Vdex files or single file

-o|--output dir> : Directory to save deodex'ed resources (default is '.')

-k|--keep         : Keep intermediate files (default 'false')

-h|--help         : This help message

$ tools/deodex/run.sh -i /tmp/vdex_samples -o /tmp/deodexed_samples

[INFO]: Processing 140 input Vdex files

[INFO]: 140 binaries have been successfully deodexed

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值