如何將Vdex 文件轉成 dex,有時我們需要逆向應用查看代碼,又苦於反編譯出來看不到真實的源碼,如下anestisb大神寫的工具可以解決我們的問題。
https://github.com/anestisb/vdexExtractor
一般在Ubantu上編譯,如果是windows電腦可以安裝VM虛擬機,在虛擬機上安全Ubantu,安裝好系統,下載代碼,git clone https://github.com/anestisb/vdexExtractor.git
執行下./make.sh gcc,使用方法:
Vdex轉成cdex
$ bin/vdexExtractor -i /tmp/BasicDreams.vdex -o /tmp --deps -f
cdex 格式轉成dex 格式解決方案:
Strategy to convert CompactDex back to StandardDex
https://github.com/anestisb/vdexExtractor/issues/23
Strategy to convert CompactDex back to StandardDex under windows(All versions):
You need adb, any android device or emulator and compact_dex_converter tool
Execute from cmd:
adb push compact_dex_converter /data/local/tmp/
adb shell chmod 777 /data/local/tmp/bin/compact_dex_converter
adb push your.cdex /data/local/tmp/classes.cdex
adb shell "/data/local/tmp/compact_dex_converter /data/local/tmp/classes.cdex"
adb pull /data/local/tmp/classes.cdex.new your.dex
Personally i recommend use android x86_64 emulator.