summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorAlessio Balsini <balsini@google.com>2020-01-07 21:30:18 +0100
committerandroid-build-merger <android-build-merger@google.com>2020-01-07 21:30:18 +0100
commitbc4b2b44e93ab1fc59ba3c564a4ab198d14188f2 (patch)
tree75518fe845376382f12a8ee70691a1cf0c00c387 /recovery.cpp
parentMerge "Link libvndksupport dynamically instead of statically." (diff)
parentMerge "Mount snapshotted /system in Virtual A/B devices" (diff)
downloadandroid_bootable_recovery-bc4b2b44e93ab1fc59ba3c564a4ab198d14188f2.tar
android_bootable_recovery-bc4b2b44e93ab1fc59ba3c564a4ab198d14188f2.tar.gz
android_bootable_recovery-bc4b2b44e93ab1fc59ba3c564a4ab198d14188f2.tar.bz2
android_bootable_recovery-bc4b2b44e93ab1fc59ba3c564a4ab198d14188f2.tar.lz
android_bootable_recovery-bc4b2b44e93ab1fc59ba3c564a4ab198d14188f2.tar.xz
android_bootable_recovery-bc4b2b44e93ab1fc59ba3c564a4ab198d14188f2.tar.zst
android_bootable_recovery-bc4b2b44e93ab1fc59ba3c564a4ab198d14188f2.zip
Diffstat (limited to 'recovery.cpp')
-rw-r--r--recovery.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/recovery.cpp b/recovery.cpp
index f59a940fc..e4b8e45fb 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -50,6 +50,7 @@
#include "install/fuse_install.h"
#include "install/install.h"
#include "install/package.h"
+#include "install/snapshot_utils.h"
#include "install/wipe_data.h"
#include "install/wipe_device.h"
#include "otautil/boot_state.h"
@@ -437,7 +438,13 @@ static Device::BuiltinAction PromptAndWait(Device* device, InstallResult status)
screen_ui->CheckBackgroundTextImages();
break;
}
+
case Device::MOUNT_SYSTEM:
+ // For Virtual A/B, set up the snapshot devices (if exist).
+ if (!CreateSnapshotPartitions()) {
+ ui->Print("Virtual A/B: snapshot partitions creation failed.\n");
+ break;
+ }
if (ensure_path_mounted_at(android::fs_mgr::GetSystemRoot(), "/mnt/system") != -1) {
ui->Print("Mounted /system.\n");
}