由 trace make image 的过程中 (m showcommands), 可以知道 system image 是怎么形成的.
out/host/linux-x86/bin/mkyaffs2image -f -c 2048 out/target/product/msm8660_surf/system out/target/product/msm8660_surf/obj/PACKAGING/systemimage_unopt_intermediates/system.img
于是试着执行以下命令:
In external/yaffs2/yaffs2/utils/mkyaffs2image.c:
if (fixstats) { int len = strlen(dir); if((len >= 4) && (!strcmp(dir + len - 4, "data"))) { source_path_len = len - 4; } else if((len >= 7) && (!strcmp(dir + len - 6, "system"))) { source_path_len = len - 6; } else if((len >= 8) && (!strcmp(dir + len - 7, "persist"))) { source_path_len = len - 7; } else { fprintf(stderr,"Fixstats (-f) option requested but filesystem is not data, persist or android!/n"); exit(1); } fix_stat(dir, &stats); }