snapshotctl: merge when boot
Test: reboot after OTA on virtual A/B device, see merge
Bug: 135752105
Change-Id: I92eb8d0961635008366c336ead40e3038173257f
diff --git a/fs_mgr/libsnapshot/Android.bp b/fs_mgr/libsnapshot/Android.bp
index 0c32c15..a012099 100644
--- a/fs_mgr/libsnapshot/Android.bp
+++ b/fs_mgr/libsnapshot/Android.bp
@@ -136,4 +136,7 @@
"liblog",
"liblp",
],
+ init_rc: [
+ "snapshotctl.rc",
+ ],
}
diff --git a/fs_mgr/libsnapshot/snapshotctl.rc b/fs_mgr/libsnapshot/snapshotctl.rc
new file mode 100644
index 0000000..29707f1
--- /dev/null
+++ b/fs_mgr/libsnapshot/snapshotctl.rc
@@ -0,0 +1,2 @@
+on property:sys.boot_completed=1
+ exec - root root -- /system/bin/snapshotctl merge --logcat