简体   繁体   中英

building android: system.img is missing

On Mac OS X, after the following steps:

  1. $ lunch , and pick full-grouper-userdebug
  2. make -j8
  3. adb reboot bootloader
  4. fastboot flashall -w

I got the error:

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

Any idea?

I found the reason that the system.img was missing is the building process failed.

During the building, I got this error:

/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

I assigned my /Volumes/android partition a 40GB case-sensitive disk image . While I also put the .ccache under this partition and gave it a space limit of 50GB. Even though I didn't see the size of .ccache grown to very large (maybe around 2GB), I suspect it caused the No space error. So I moved .ccache to another directory other than /Volumes/android , and rebuilt the system. This time, everything goes well, I got the system.img , as shown below.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM