现在的位置: 首页 > 综合 > 正文

如何解压编译好的img文件

2019年10月09日 ⁄ 综合 ⁄ 共 389字 ⁄ 字号 评论关闭

1. yaffs

执行命令:

unyaffs custpack.img

即可将 custpack.img 的内容解压到当前路径。

2. ext4

项目编译后会生成工具 simg2img 和 make_ext4fs(位于 out/host/linux-x86/bin/)

使用 simg2sim 生成新的 image 用于 mount:

simg2img system.img system.img.old

新建路径用于 mount:

mkdir test

mount image:

sudo mount -t ext4 -o loop system.img.old test/

这时,system.img.old 的内容会 mount 到 test 下,打开 test 查看。
可修改 test 内容后重新打包成新的 image:

make_ext4fs -s -l 512M -a custpack custpack.img.new test

最后不要忘了 unmount:

umount test

抱歉!评论已关闭.