1. 查看system.img内容:
工具:simg2img_files
操作:
a. system.img改名为system.img.ext4
b. simg2img system.img.ext4 system.img
c.1 使用ext2explore.exe,打开镜像,右键点击保存。
操作:
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.
odex包https://osdn.jp/projects/sfnet_liqidandroiddev/releases/#
工具: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
操作:
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.htmlodex包https://osdn.jp/projects/sfnet_liqidandroiddev/releases/#
4. .dex文件转jar
工具: dex2jar
sh ./d2j-dex2jar.sh temp.dex5.查看jar包
工具: jd-gui
直接打开jar包即可