summaryrefslogtreecommitdiff
path: root/recovery.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2019-10-16 22:20:27 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-10-16 22:20:27 +0000
commitb8ba2fa86ee0c64dfc5b216a9fdda9d774f87106 (patch)
treeb38f957ec98276d05d00a5fff67d5341c2edd3fe /recovery.cpp
parentf395e0bf8fdbfa280cc137705542a1e420b60d4c (diff)
parent58a27693b22da9b93c634d053a53deb4c4a71e4e (diff)
Merge "Force package installation with FUSE unless the package stores on device"
Diffstat (limited to 'recovery.cpp')
-rw-r--r--recovery.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/recovery.cpp b/recovery.cpp
index f59a940f..63373428 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -674,13 +674,11 @@ Device::BuiltinAction start_recovery(Device* device, const std::vector<std::stri
set_retry_bootloader_message(retry_count + 1, args);
}
- if (update_package[0] == '@') {
- ensure_path_mounted(update_package + 1);
- } else {
- ensure_path_mounted(update_package);
- }
-
- if (install_with_fuse) {
+ bool should_use_fuse = false;
+ if (!SetupPackageMount(update_package, &should_use_fuse)) {
+ LOG(INFO) << "Failed to set up the package access, skipping installation";
+ status = INSTALL_ERROR;
+ } else if (install_with_fuse || should_use_fuse) {
LOG(INFO) << "Installing package " << update_package << " with fuse";
status = InstallWithFuseFromPath(update_package, ui);
} else if (auto memory_package = Package::CreateMemoryPackage(