Document how to resize rootfs image when adding LAVA overlay
Testing on Android devices in LAVA involves adding the LAVA test overlay into the rootfs before it is deployed onto the test device using fastboot. This can cause difficulties: the size of the overlay is not known up-front when preparing a build, so the build is configured using an estimate for the size needed. This estimate doesn't always work; a better (desired) approach for the builds is to ship a minimally-sized rootfs that can later be resized to fit.
Add support to LAVA for automatically resizing the rootfs as needed.
Use the Android image tools to convert from a sparse image to a normal ext4 image, expand as needed and then convert back. See
for a user job doing something like what we need. Things to consider:
- Can we assume the rootfs is a sparse image? Do we need that to be specified in the job?
- Will it fit in the available space on the device afterwards? Some jobs will be set up with a ptable (GPT partition table) that we could parse to see if the new rootfs will fit, but we can't necessarily rely on having a ptable. Nicolas says that "fastboot flash" should check sizes and fail gracefully. Can we confirm that?
Migrated from https://projects.linaro.org/browse/LAVA-1141