android5.0的zip包不再是以前的文件結(jié)構(gòu),包含:
boot.img
file_contexts
META-INF
system.new.dat
system.patch.dat
system.transfer.list
system的內(nèi)容包含在了system.new.dat,所以我們需要對這個文件進行解包操作:
需要利用sdat2img 進行解包:
1、Linux命令(僅支持64位操作系統(tǒng)):sdat2img <transfer_list> <system_new_file> <system_img>
命令實現(xiàn)如:sdat2img system.transfer.list system.new.dat new_system.img
然后在掛載new_system.img即可:
sudo mkdir -p /mnt/rom
sudo mount -t ext4 -o loop,ro,noexec,noload new_system.img /mnt/rom
在/mnt/rom目錄下即可看到system目錄的內(nèi)容,
2、windows命令(支持32位/64位系統(tǒng)):sdat2img.exe <transfer_list> <system_new_file> <system_img>
命令實現(xiàn)如:sdat2img.exe system.transfer.list system.new.dat new_system.img
然后再用ext4_unpacker.exe打開new_system.img即可。
3、附上xda-developers開發(fā)者python源碼:
https://github.com/xpirt/sdat2img/blob/master/sdat2img.py
工具下載地址:鏈接: http://pan.baidu.com/s/1eQgrL9w 密碼: gfse