所需工具清单
baksmali-2.2.0.jar
smali-2.2.0.jar
dex2jar-2.0
jd-gui
apktool.jar
反编译odex步骤
- 反编译.odex到out文件夹
java -jar baksmali-2.2.0.jar deodex demo.odex -o out
- 打包out文件夹生成class.dex
java -jar smali-2.2.0.jar assemble out -o class.dex
- 反编译.dex生成class-dex2jar.jar
./d2j-dex2jar.sh class.dex
- 使用jd-gui.exe打开生成的class-dex2jar.jar
反编译apk步骤
- 反编译apk
java -jar apktool.jar d demo.apk
-
使用解压工具如7zip提取apk中的class.dex文件
-
反编译.dex生成class-dex2jar.jar
./d2j-dex2jar.sh class.dex
- 使用jd-gui.exe或jd-gui(ubuntu)打开生成的class-dex2jar.jar
apk重新打包步骤
1.打包生成未签名apk
java -jar apktool.jar b demo -o demo_unsigned.apk
2.签名
jarsigner -verbose -keystore demo.keystore -signedjar demo_signed.apk demo_unsigned.apk keyname
网友评论