Force merges to complete before wiping data or metadata.

After an OTA is applied, a wipe in recovery may overwrite components of
dynamic partitions living in userdata. If the OTA has not yet begun
merging, we mark the current slot unbootable. If the OTA has begun
merging, we wait for the merge to complete. This logic is encapsulated
in libsnapshot.

Bug: 139156011
Test: manual test
Change-Id: Id6544a1b8583afcbba11559d46214ec2e68ffa40
diff --git a/install/Android.bp b/install/Android.bp
index d4606e9..be08506 100644
--- a/install/Android.bp
+++ b/install/Android.bp
@@ -39,6 +39,7 @@
     static_libs: [
         "librecovery_utils",
         "libotautil",
+        "libsnapshot_nobinder",
 
         // external dependencies
         "libvintf_recovery",
@@ -60,6 +61,7 @@
         "fuse_install.cpp",
         "install.cpp",
         "package.cpp",
+        "snapshot_utils.cpp",
         "verifier.cpp",
         "wipe_data.cpp",
         "wipe_device.cpp",