From b525463558d4776c12f2e5328987f0131ad1b737 Mon Sep 17 00:00:00 2001 From: Mike McTernan Date: Thu, 18 Jul 2024 14:42:28 +0100 Subject: [PATCH] init: set a new trigger when a vold checkpoint is committed Add post-fs-data-checkpointed trigger when vold completes checkpointing after an OTA update. Bug: 350362101 Test: ABTD Change-Id: I647a73a942174015b46c5f40bd8f8d3347977ecd --- init/README.md | 8 +++++--- rootdir/init.rc | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/init/README.md b/init/README.md index 11c4e1cf3..0bb26e891 100644 --- a/init/README.md +++ b/init/README.md @@ -499,9 +499,11 @@ have been omitted. 4. `late-fs` - Mount partitions marked as latemounted. 5. `post-fs-data` - Mount and configure `/data`; set up encryption. `/metadata` is reformatted here if it couldn't mount in first-stage init. - 6. `zygote-start` - Start the zygote. - 7. `early-boot` - After zygote has started. - 8. `boot` - After `early-boot` actions have completed. + 6. `post-fs-data-checkpointed` - Triggered when vold has completed committing a checkpoint + after an OTA update. Not triggered if checkpointing is not needed or supported. + 7. `zygote-start` - Start the zygote. + 8. `early-boot` - After zygote has started. + 9. `boot` - After `early-boot` actions have completed. Commands -------- diff --git a/rootdir/init.rc b/rootdir/init.rc index 2443b7cf6..b804c1bde 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -1087,6 +1087,9 @@ on post-fs-data # Update dm-verity state and set partition.*.verified properties. verity_update_state +on property:vold.checkpoint_committed=1 + trigger post-fs-data-checkpointed + # It is recommended to put unnecessary data/ initialization from post-fs-data # to start-zygote in device's init.rc to unblock zygote start. on zygote-start