Add a launcher -data_policy=resize_up_to mode.

This allows increasing the size of userdata.img from the launcher
without data loss. The implementation delegates to /sbin/e2fsck
and /sbin/resize2fs.

The blank_data_image_mb flag is reused to describe the desired size,
though the name doesn't fit perfectly. If the target size is smaller
than the current size, the resize will cause the launcher to fail. If
the target size is equal to the current size, the resize will not run.

Bug: 120573603
Test: Ran with -data_policy=resize_up_to with incrementally larger sizes
Change-Id: I432b4687215ec27806f985889f48beb78f9c5612
3 files changed
tree: fcb71fe190949e70ad06a84bbe36e8f21f7e546d
  1. common/
  2. guest/
  3. host/
  4. tests/
  5. tools/
  6. Android.bp
  7. Android.mk
  8. OWNERS