diff options
author | Tianjie Xu <xunchang@google.com> | 2019-10-17 00:20:27 +0200 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-10-17 00:20:27 +0200 |
commit | b8ba2fa86ee0c64dfc5b216a9fdda9d774f87106 (patch) | |
tree | b38f957ec98276d05d00a5fff67d5341c2edd3fe /recovery.cpp | |
parent | Merge "[bootable][recovery] fix -Wreorder-init-list" am: 0d76cad830 am: 843c0bbb01 am: bd99b40ae9 (diff) | |
parent | Force package installation with FUSE unless the package stores on device (diff) | |
download | android_bootable_recovery-b8ba2fa86ee0c64dfc5b216a9fdda9d774f87106.tar android_bootable_recovery-b8ba2fa86ee0c64dfc5b216a9fdda9d774f87106.tar.gz android_bootable_recovery-b8ba2fa86ee0c64dfc5b216a9fdda9d774f87106.tar.bz2 android_bootable_recovery-b8ba2fa86ee0c64dfc5b216a9fdda9d774f87106.tar.lz android_bootable_recovery-b8ba2fa86ee0c64dfc5b216a9fdda9d774f87106.tar.xz android_bootable_recovery-b8ba2fa86ee0c64dfc5b216a9fdda9d774f87106.tar.zst android_bootable_recovery-b8ba2fa86ee0c64dfc5b216a9fdda9d774f87106.zip |
Diffstat (limited to 'recovery.cpp')
-rw-r--r-- | recovery.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/recovery.cpp b/recovery.cpp index f59a940fc..633734285 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( |