fastboot 刷新 system.img 出现 data too large 错误

问题

fastboot 刷新 system.img 的时候出现如下错误

sending 'system' (131529 KB)... 
FAILED (remote: data too large)
finished. total time: 0.000s

分析

fastboot 定义了的IMG文件的最大size: 120MB

$ find bootable/ -name '*.h' | xargs grep 'CFG_MAX_DOWNLOAD_BUF_LEN' 
bootable/bootloader/legacy/include/boot/config.h:#define CFG_MAX_DOWNLOAD_BUF_LEN (120*1024*1024)/* FIXME: 120MB */

解决

  • 删掉 out/target/product/{x}/system/app 目录下的一些无用的 APK, 再用 mkyaffs2image 生成 system.img
  • 增大 CFG_MAX_DOWNLOAD_BUF_LEN 宏的大小,重新编译源代码生成 fastboot.img, 并刷新 fastboot
posted @ 2012-05-10 11:43  wanqi  阅读(1867)  评论(0编辑  收藏  举报