构建android:system.img缺失

时间:2013-04-28 01:19:20

标签: android android-build

在Mac OS X上,执行以下步骤后:

  1. $ lunch,然后选择full-grouper-userdebug
  2. make -j8
  3. adb reboot bootloader
  4. fastboot flashall -w
  5. 我收到了错误:

    error: could not load system.img: No such file or directory

    有什么想法吗?

1 个答案:

答案 0 :(得分:0)

我发现缺少system.img的原因是构建过程失败了。

在建设期间,我收到了这个错误:

/bin/bash: line 0: echo: write error: No space left on device
make: *** [out/target/common/obj/APPS/ContactsProvider_intermediates/classes-full-debug.jar] Error 1
make: *** Waiting for unfinished jobs....
prebuilts/gcc/darwin-x86/arm/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ar: out/target/product/grouper/obj/STATIC_LIBRARIES/libwebcore_intermediates/libwebcore.a: No space left on device
      Unable to add 'hdpi/res/drawable-hdpi/browser_widget_preview.png #generated': Zip add failed
ERROR: unable to process assets while packaging 'out/target/product/grouper/obj/APPS/Browser_intermediates/package.apk'
ERROR: packaging of 'out/target/product/grouper/obj/APPS/Browser_intermediates/package.apk' failed
make: *** [out/target/product/grouper/obj/APPS/Browser_intermediates/package.apk] Error 1
make: *** [out/target/product/grouper/obj/STATIC_LIBRARIES/libwebcore_intermediates/libwebcore.a] Error 1
make: *** Deleting file `out/target/product/grouper/obj/STATIC_LIBRARIES/libwebcore_intermediates/libwebcore.a'
Running:  e2fsck -f -n out/target/product/grouper/unsparse_userdata.img
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
out/target/product/grouper/unsparse_userdata.img: 11/401408 files (0.0% non-contiguous), 53385/1603328 blocks
out/target/product/grouper/userdata.img maxsize=6704729856 blocksize=4224 total=106792464 reserve=67727616

我为/Volumes/android分区分配了一个40GB 区分大小写的磁盘映像。虽然我也将.ccache放在这个分区下,并给它一个50GB的空间限制。即使我没有看到.ccache的大小增长到非常大(可能大约2GB),我怀疑它导致No space错误。所以我将.ccache移到了/Volumes/android以外的其他目录,并重建了系统。这一次,一切顺利,我得到system.img,如下所示。

out/target/product/grouper/obj/PACKAGING/systemimage_intermediates/unsparse_system.img: 1075/41664 files (0.0% non-contiguous), 54050/166400 blocks
Running:  mkuserimg.sh -s out/target/product/grouper/system out/target/product/grouper/obj/PACKAGING/systemimage_intermediates/system.img ext4 system 681574400 out/target/product/grouper/root/file_contexts
Running:  simg2img out/target/product/grouper/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/grouper/obj/PACKAGING/systemimage_intermediates/unsparse_system.img
Running:  e2fsck -f -n out/target/product/grouper/obj/PACKAGING/systemimage_intermediates/unsparse_system.img
Install system fs image: out/target/product/grouper/system.img
out/target/product/grouper/system.img+out/target/product/grouper/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=695844864 blocksize=4224 total=212435867 reserve=7028736