No description
bcae6b5e60
Two new API's have been added: 1: BootFromSnapshotsWithoutSlotSwitch: This will create a new marker which indicates first-stage init to mount the partitions off snapshots. We need this marker as during boot, there are couple of places during mounting snapshots wherein the marker is used. However, there is no change in the existing I/O path related to OTA. 2: PrepareDeviceToBootWithoutSnapshot: This will delete the marker so that subsequent reboot will not have the partitions mounted without the snapshots. VTS tests covers both these API's. Additionally, when these markers are present, new OTA's cannot be installed. All these are covered in VTS tests. =========================================================== snapshotctl: General flow to apply and revert pre-created snapshots 1: To install the pre-created snapshots: $snapshotctl map-snapshots <directory path containing snapshots patches> Now the device is ready to boot from snapshots. 2: After device reboots, partitions are mounted off the snapshots. There is no snapshot-merge. 3: In order to go back to previous build: $snapshotctl revert-snapshots Now the device is ready to boot from base build. 4: After device reboots back to previous build, all the snapshot states and COW images are removed. ============================================ Additional commands: To delete the pre-created snapshots: $snapshotctl delete-snapshots ====================================== Tested it on Pixel 6 Pro between two builds which are ~24 hours apart. 1: Creating snapshots on a linux-host - ~4-6 seconds 2: Applying pre-created snapshots - ~10-15 seconds (includes intermediate transfer of patches to the device). This depends on the size of snapshot patches. 3: Device reboot - ~12-14 seconds. Bug: 299011882 Test: 1: Apply pre-created snapshots 2: Reboot device: Verify new build 3: Apply OTA when partitions are mounted of snapshots and verify OTA fails. 3: Revert-snapshot and reboot. 4: Verify device goes back to base build. Full OTA on Pixel. vts_libsnapshot_test Change-Id: I36a72d973d8f70ae49773ebd45dd996fac22a4e3 Signed-off-by: Akilesh Kailash <akailash@google.com> |
||
---|---|---|
bootstat | ||
cli-test | ||
code_coverage | ||
debuggerd | ||
diagnose_usb | ||
fastboot | ||
fs_mgr | ||
gatekeeperd | ||
healthd | ||
include | ||
init | ||
janitors | ||
libappfuse | ||
libasyncio | ||
libcrypto_utils | ||
libcutils | ||
libgrallocusage | ||
libkeyutils | ||
libmodprobe | ||
libnetutils | ||
libpackagelistparser | ||
libprocessgroup | ||
libsparse | ||
libstats | ||
libsuspend | ||
libsync | ||
libsystem | ||
libsysutils | ||
libusbhost | ||
libutils | ||
libvndksupport | ||
llkd | ||
mini_keyctl | ||
mkbootfs | ||
property_service | ||
reboot | ||
rootdir | ||
run-as | ||
sdcard | ||
shell_and_utilities | ||
storaged | ||
toolbox | ||
trusty | ||
usbd | ||
watchdogd | ||
.clang-format | ||
.clang-format-2 | ||
.clang-format-4 | ||
.gitignore | ||
CleanSpec.mk | ||
METADATA | ||
MODULE_LICENSE_APACHE2 | ||
OWNERS | ||
PREUPLOAD.cfg | ||
rustfmt.toml |