New issue
Advanced search Search tips
Starred by 1 user

Issue metadata

Status: Archived
Closed: Mar 2017
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Sign in to add a comment

android image signing failing due to lzo compression

Project Member Reported by, Mar 25 2017 Back to list

Issue description

signing the android system.img is failing on the signers:
250317 07:43 DEBUG: RunCommand: /cros/vboot_reference/scripts/image_signing/ recovery /tmp/signer.LxLoqd/recovery_image.bin /cros/keys/SnappyPreMPKeys /tmp/signer.LxLoqd/chromeos_9334.21.0_snappy_recover
y_beta-channel_premp.bin /cros/keys/SnappyPreMPKeys/key.versions
INFO   : Start updating sepolicy
/tmp/tmp.qWBCpc129q/mnt/system/etc/security/mac_permissions.xml /tmp/tmp.Qa0MXb2dWm differ: byte 118, line 1
INFO   : Replacing OTA cert
INFO   : Reapplying file security context
/sbin/setfiles reset /tmp/tmp.qWBCpc129q/mnt/system/etc/security/mac_permissions.xml context ->u:object_r:system_file:s0
INFO   : Repacking squashfs image
Parallel mksquashfs: Using 2 processors
Creating 4.0 filesystem on /tmp/tmp.k1QLcpX0A1/opt/google/containers/android/system.raw.img, block size 131072.
Write failed because No space left on device
FATAL ERROR:Failed to write to output filesystem

testing this input:

i ran the mksquashfs command by hand (it's the one that lives in the cros-signing repo), and indeed, it produces a larger file.

this is the one from the recovery image:
-rw-r--r-- 1 root root 484360192 Mar 25 06:55 /tmp/tmp.JwI0GU51sv/opt/google/containers/android/system.raw.img

and here's the one i ran by hand:
# /cros/signer/signingtools-bin/mksquashfs /tmp/tmp.d7wRZxU4jO/mnt /tmp/system.raw.img -no-progress -comp lzo -noappend
-rw-r--r-- 1 root root 525737984 Mar 25 22:51 /tmp/system.raw.img

it's because we use lzo but the original is using gzip.  and we no longer have the space for an lzo image.
It looks like we conditionally choose lzo for N in  Yusuke, what is our plan to reduce image size?
I don't have code access right now but which part of the script are you referring to? For N images, we should always use gzip.

In project-cheets-private, there is get_squashfs_compression_method_for_android in that always return lzo when we USE nyc container.

Comment 4 by, Mar 27 2017

reading the commit message, it seems like the code is inverted from the intention ?
Status: Started
So the problem is our is not synced with :(  I'll make the change to add some comments, since they run in different phases.
Project Member

Comment 6 by, Mar 29 2017

The following revision refers to this bug:

commit cfbc083efed99bf4edb53013bc5ab7583278691b
Author: Victor Hsieh <>
Date: Wed Mar 29 00:16:52 2017

Preserve compress method when re-sign Android image rootfs /path/to/tests/devkeys/android
     # unsquash -s still shows gzip (previous script always use lzo)
BUG= chromium:705247 

Change-Id: If95686d293123a069ce36bc53cbea3a08aa3e7ab
Commit-Ready: Victor Hsieh <>
Tested-by: Victor Hsieh <>
Reviewed-by: Mike Frysinger <>


 Issue 706540  has been merged into this issue.
Project Member

Comment 8 by, Mar 29 2017

The following revision refers to this bug:

commit e0a3f2dd8feef826d45f3fdabfafabe1df35b628
Author: Victor Hsieh <>
Date: Wed Mar 29 21:43:02 2017

Status: Fixed
Status: Assigned
Victor, don't we need this for the m58 branch?

Status: Started
Thanks.  I missed it and now cherry-picking.
Status: Fixed
Actually, I checked caroline 9334.28.0 mp image, and system.raw.img is indeed compressed by gzip.  So the change should not limited to ToT but also applies to all branches.
the signers run only on ToT, and they sign all branches.  so should be fine here.

Comment 14 by, May 30 2017

Labels: VerifyIn-60
Labels: VerifyIn-61
Status: Archived

Sign in to add a comment