Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CoW size estimate when replacing entire dynamic partitions #307

Merged
merged 2 commits into from
Jun 22, 2024

Commits on Jun 22, 2024

  1. Update CoW size estimate when replacing entire dynamic partitions

    Otherwise, if the partition size increases or the data becomes more
    incompressible, update_engine might fail to flash the partition due to
    the CoW block device running out of space.
    
    Since all known VABC-enabled OTAs in the wild currently use CoW v2 with
    lz4 compression, this is the only configuration we support. CoW v3 also
    exists in AOSP's libsnapshot_cow, but is much more complicated to
    implement and is not yet used, even in the Android 15 beta OTAs.
    
    Fixes: #306
    
    Signed-off-by: Andrew Gunnerson <[email protected]>
    chenxiaolong committed Jun 22, 2024
    Configuration menu
    Copy the full SHA
    29b7296 View commit details
    Browse the repository at this point in the history
  2. payload: Fudge CoW size estimate by 1%

    lz4_flex appears to compress system images better than the original lz4
    implementation used in libsnapshot_cow, so the estimates are too low.
    
    Fixes: #306
    
    Signed-off-by: Andrew Gunnerson <[email protected]>
    chenxiaolong committed Jun 22, 2024
    Configuration menu
    Copy the full SHA
    f36c1ca View commit details
    Browse the repository at this point in the history