create_snapshot: Generate "no-op" patches based only on partition size
This CL gives create_snapshot the abiliy to generate "no-op" patch files when there are no source or target partition images available and the only known information is the target partition size in bytes (which can be specified via a new --partition_size flag). Here, a "no-op" patch is essentially an empty patch with no operations, which effectively leaves the target partition intact. Motivation: Unlock the ability to update only a subset of the partitions in the super partition. This is useful during kernel development, where rebuilding and flashing only the kernel-related partitions is often much faster than rebuilding and flashing the whole OS. Context: I'm making changes to deflash.py to support the aforementioned use case. See http://ag/33534126 and the attached bug for more context. Additional context: Applying patch files for only a subset of the partitions within super (e.g. via "snapshotcl apply-updates") and then rebooting causes snapuserd to fail to mount those partitions within super for which no patch files were provided. This causes the system to reboot, initiating a boot loop. As a workaround, no-op patches seem to appease snapuserd while achieving the desired result. Test: Flash a device with deflash.py and http://ag/33534126 Bug: 408522717 Change-Id: I8eef9edd2b5767aee0f027f675ae623215d70e06
Loading
Please register or sign in to comment