summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2019-06-14 02:24:49 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-06-14 02:24:49 +0200
commit87e22759704b58b41db224696362ebe10e140ea0 (patch)
treeff928d36e2e09d8ba9adf5af638de01423384c75 /recovery.cpp
parentMerge "Use the new ziparchive Next std::string_view overload." (diff)
parentInstallPackage now takes a package as parameter (diff)
downloadandroid_bootable_recovery-87e22759704b58b41db224696362ebe10e140ea0.tar
android_bootable_recovery-87e22759704b58b41db224696362ebe10e140ea0.tar.gz
android_bootable_recovery-87e22759704b58b41db224696362ebe10e140ea0.tar.bz2
android_bootable_recovery-87e22759704b58b41db224696362ebe10e140ea0.tar.lz
android_bootable_recovery-87e22759704b58b41db224696362ebe10e140ea0.tar.xz
android_bootable_recovery-87e22759704b58b41db224696362ebe10e140ea0.tar.zst
android_bootable_recovery-87e22759704b58b41db224696362ebe10e140ea0.zip
Diffstat (limited to '')
-rw-r--r--recovery.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/recovery.cpp b/recovery.cpp
index eb0c2b216..db66ea7e9 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -732,7 +732,15 @@ Device::BuiltinAction start_recovery(Device* device, const std::vector<std::stri
set_retry_bootloader_message(retry_count + 1, args);
}
- status = InstallPackage(update_package, should_wipe_cache, true, retry_count, ui);
+ if (update_package[0] == '@') {
+ ensure_path_mounted(update_package + 1);
+ } else {
+ ensure_path_mounted(update_package);
+ }
+ // TODO(xunchang) install package from fuse for large packages on ILP32 builds.
+ auto package = Package::CreateMemoryPackage(
+ update_package, std::bind(&RecoveryUI::SetProgress, ui, std::placeholders::_1));
+ status = InstallPackage(package.get(), update_package, should_wipe_cache, retry_count, ui);
if (status != INSTALL_SUCCESS) {
ui->Print("Installation aborted.\n");