system.img ext4 and yaffs2

来源:互联网 发布:淘宝卖家三钻 编辑:程序博客网 时间:2024/06/15 02:14
打包system.img
(for MTK):Target system image: out/target/product/72_cu_ics/system.imgcd  out/target/product/72_cu_ics/../../../../out/host/linux-x86/bin/make_ext4fs -s -l 512M -a system system.img system(for QUALCOMM-2KB page nand):out/host/linux-x86/bin/mkyaffs2image -f -c 2048 -s 64 out/target/product/msm7627a_vicuna/system out/target/product/msm7627a_vicuna/system.2knand.img

System.img details

System image is a sparsed ext4 loop mounted file system. To open (mount) system image use the commands below

      ./simg2img system.img system.img.raw      mkdir tmp       sudo mount -t ext4 -o loop system.img.raw tmp/

After this, all your system image files are part of tmp folder.

Make any changes you need in the tmp folder. To re-create the parsed system image (system.img.new) use the command below. This can be individually flashed using fastboot command

      sudo ./make_ext4fs -s -l 512M -a system system.img.new tmp/      sudo umount tmp      rm -rf tmp
 
# find . | cpio -o -H newc | gzip > ../ramdisk-new.img 这两个镜像都属于yaffs2文件格式,生成方式是一样的。我们就以system.img为例来说明。  System.img >> system目录树 所需工具unyaffs, 下载地址   # mkdir system   # cd system   # unyaffs ../system.img   system目录树 >> system.img   所需工具 mkyaffs2image,Android源码编译后会生成该工具,在 out/host/linux-x86/bin 目录下。   命令格式:   # mkyaffs2image system/ system_new.img 
原创粉丝点击