summaryrefslogtreecommitdiffstats
path: root/install.cpp
diff options
context:
space:
mode:
authorDoug Zongker <dougz@google.com>2014-06-27 00:35:51 +0200
committerDoug Zongker <dougz@google.com>2014-07-02 21:16:36 +0200
commit075ad800c539503d0515e5e0b4af160eccedead9 (patch)
tree0fa4e4f99556393317ae486eb66aeb3cbad220df /install.cpp
parentam 3e0fc39e: am 974fe112: Merge "Fix recovery mode." (diff)
downloadandroid_bootable_recovery-075ad800c539503d0515e5e0b4af160eccedead9.tar
android_bootable_recovery-075ad800c539503d0515e5e0b4af160eccedead9.tar.gz
android_bootable_recovery-075ad800c539503d0515e5e0b4af160eccedead9.tar.bz2
android_bootable_recovery-075ad800c539503d0515e5e0b4af160eccedead9.tar.lz
android_bootable_recovery-075ad800c539503d0515e5e0b4af160eccedead9.tar.xz
android_bootable_recovery-075ad800c539503d0515e5e0b4af160eccedead9.tar.zst
android_bootable_recovery-075ad800c539503d0515e5e0b4af160eccedead9.zip
Diffstat (limited to 'install.cpp')
-rw-r--r--install.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/install.cpp b/install.cpp
index 0f059602a..9db5640a0 100644
--- a/install.cpp
+++ b/install.cpp
@@ -182,7 +182,7 @@ try_update_binary(const char *path, ZipArchive *zip, int* wipe_cache) {
}
static int
-really_install_package(const char *path, int* wipe_cache)
+really_install_package(const char *path, int* wipe_cache, bool needs_mount)
{
ui->SetBackground(RecoveryUI::INSTALLING_UPDATE);
ui->Print("Finding update package...\n");
@@ -194,7 +194,7 @@ really_install_package(const char *path, int* wipe_cache)
// Map the update package into memory.
ui->Print("Opening update package...\n");
- if (path) {
+ if (path && needs_mount) {
if (path[0] == '@') {
ensure_path_mounted(path+1);
} else {
@@ -244,6 +244,7 @@ really_install_package(const char *path, int* wipe_cache)
ui->SetEnableReboot(false);
int result = try_update_binary(path, &zip, wipe_cache);
ui->SetEnableReboot(true);
+ ui->Print("\n");
sysReleaseMap(&map);
@@ -251,7 +252,8 @@ really_install_package(const char *path, int* wipe_cache)
}
int
-install_package(const char* path, int* wipe_cache, const char* install_file)
+install_package(const char* path, int* wipe_cache, const char* install_file,
+ bool needs_mount)
{
FILE* install_log = fopen_path(install_file, "w");
if (install_log) {
@@ -265,7 +267,7 @@ install_package(const char* path, int* wipe_cache, const char* install_file)
LOGE("failed to set up expected mounts for install; aborting\n");
result = INSTALL_ERROR;
} else {
- result = really_install_package(path, wipe_cache);
+ result = really_install_package(path, wipe_cache, needs_mount);
}
if (install_log) {
fputc(result == INSTALL_SUCCESS ? '1' : '0', install_log);