Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9ccb84a8 authored by Akilesh Kailash's avatar Akilesh Kailash
Browse files

snapshotctl: Create and write pre-created snapshots



Extend snapshotctl binary on the device
to create and apply pre-created snapshots.

snapshotctl map-snapshots <directory-where snapshot patches are present>

1: snapshotctl creates the block device based on the size of the
       snapshot patches.

2: snapshotctl will copy the data to the block device.

unmap and delete snapshots will cleanup.

No change in libsnapshot library except with minor refactoring.

This patch doesn't yet prepare the device to reboot from these
snapshots.

On Pixel 6 Pro, applying pre-created snapshots for all partitions
takes ~3 seconds wherein the delta between two builds are 24 hours apart.

Bug: 299011882

Test: snapshotctl map-snapshots /data/test-snapshots/
snapshotctl unmap-snapshots
snapshotctl delete-snapshots

Change-Id: I98a0fbd9cf7234c2188bad85cdd092ded8997710
Signed-off-by: default avatarAkilesh Kailash <akailash@google.com>
parent 3c412306
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment