$ file system.img system.img: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (extents) (large files)信息非常明确了。
$ file system.img system.img: data就是说是一个非常普通的dat文件。由于它将raw ext4进行稀疏描述,因此尺寸比较小(没有全零的无效填充区,一般在300到500M之间)。
system/core/libsparse/simg2img.c // 将sparse image转换为raw image; system/core/libsparse/img2simg.c // 将raw image转换为sparse image;
$ . build/envsetup.sh $ lunch aosp_hammerhead-userdebug $ make img2simg_host
$ simg2img <sparse_image_files> <raw_image_file> $ img2simg <raw_image_file> <sparse_image_file> [<block_size>]
Android中system.img的两种格式及其相互转换方法
原文地址:http://blog.csdn.net/howellzhu/article/details/43165507