反编译android之 .odex .odex.xz .dex

本文提供了一步一步的操作指南,教你如何使用simg2img_files工具查看system.img内容,并将它重命名为system.img.ext4;接着,使用oat2dex工具反编译ODEX文件;最后,通过smail/baksmail工具进行ODEX文件反编译,以及使用dex2jar将.dex文件转换为.jar文件。整个过程涉及系统镜像管理、反编译ODEX文件和转换.dex文件到.jar文件的技术。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. 查看system.img内容:
工具:simg2img_files

操作:
   a.  system.img改名为system.img.ext4
   b.  simg2img system.img.ext4 system.img
   c.1 使用ext2explore.exe,打开镜像,右键点击保存。

   c.2 使用mount命令: sudo mount -t ext4 -o loop system.img ./img/


 

2. 反编译odex.xz

工具:oat2dex

参考URL:http://www.naldotech.com/how-to-deodex-applications-on-android-5-0-lollipop/

  
操作:  
a. Open the folder, hold shift, click the right mouse button and select Open Command Window here. This will open the command prompt window.
b. Move both files to the folder.
c. Type “7za x *.odex.xz ” and hit Enter. This will decompress the .xz file. The result will be a odex file.
d. Now type “oat2dex.bat *.odex and press Enter. With this you will confirm that the DEX file OAT file header are present. If you receive an error during this part, the app won’t get converted.
e. Type “oat2dex.bat *.odex temp.dex. and press Enter. This will create a .temp.dex. file which is a odex file with the old structure.
f. Enter “java -jar baksmali-2.0.3.jar -a 21 -x temp.dex -o deodex” and press Enter. This will decompile the file and will create a deodex folder output.
g. Now type “java -jar smali-2.0.3,jar -a 21 deodex -o classes.dex” to recompile the output.
h. Now, to put classes.dex into an APK file, use the command 7za u -tzip *.apk classes.dex.



3. odex反编译

工具: smail/baksmail

参考URL:http://www.cnblogs.com/ungshow/p/3511330.html
odex包https://osdn.jp/projects/sfnet_liqidandroiddev/releases/#



4. .dex文件转jar

工具: dex2jar

sh ./d2j-dex2jar.sh temp.dex



5.查看jar包

工具: jd-gui 

直接打开jar包即可

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值