summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2019-08-06 21:32:05 +0200
committerTianjie Xu <xunchang@google.com>2019-10-16 20:35:17 +0200
commit58a27693b22da9b93c634d053a53deb4c4a71e4e (patch)
treecba636e772425eb8680c6b9356cc4a749425c232 /recovery.cpp
parentMerge "otautil: Factor out the utils that're private to recovery." am: c6fb9f9df5 am: dc717a5c2b am: 2772cfcb1a (diff)
downloadandroid_bootable_recovery-58a27693b22da9b93c634d053a53deb4c4a71e4e.tar
android_bootable_recovery-58a27693b22da9b93c634d053a53deb4c4a71e4e.tar.gz
android_bootable_recovery-58a27693b22da9b93c634d053a53deb4c4a71e4e.tar.bz2
android_bootable_recovery-58a27693b22da9b93c634d053a53deb4c4a71e4e.tar.lz
android_bootable_recovery-58a27693b22da9b93c634d053a53deb4c4a71e4e.tar.xz
android_bootable_recovery-58a27693b22da9b93c634d053a53deb4c4a71e4e.tar.zst
android_bootable_recovery-58a27693b22da9b93c634d053a53deb4c4a71e4e.zip
Diffstat (limited to '')
-rw-r--r--recovery.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/recovery.cpp b/recovery.cpp
index 682ddbc4c..8f8f7dc02 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -733,13 +733,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(