diff --git a/install/adb_install.cpp b/install/adb_install.cpp index b12e5294..5948e795 100644 --- a/install/adb_install.cpp +++ b/install/adb_install.cpp @@ -347,7 +347,7 @@ InstallResult ApplyFromAdb(Device* device, bool rescue_mode, Device::BuiltinActi RecoveryUI* ui = device->GetUI(); - InstallResult install_result = INSTALL_ERROR; + InstallResult install_result = INSTALL_NONE; std::map command_map{ { MinadbdCommand::kInstall, std::bind(&AdbInstallPackageHandler, device, &install_result) }, { MinadbdCommand::kRebootAndroid, std::bind(&AdbRebootHandler, MinadbdCommand::kRebootAndroid, diff --git a/install/fuse_install.cpp b/install/fuse_install.cpp index 197e1deb..3d4bc09f 100644 --- a/install/fuse_install.cpp +++ b/install/fuse_install.cpp @@ -209,14 +209,14 @@ InstallResult ApplyFromSdcard(Device* device) { auto ui = device->GetUI(); if (ensure_path_mounted(SDCARD_ROOT) != 0) { LOG(ERROR) << "\n-- Couldn't mount " << SDCARD_ROOT << ".\n"; - return INSTALL_ERROR; + return INSTALL_NONE; } std::string path = BrowseDirectory(SDCARD_ROOT, device, ui); if (path.empty()) { LOG(ERROR) << "\n-- No package file selected.\n"; ensure_path_unmounted(SDCARD_ROOT); - return INSTALL_ERROR; + return INSTALL_NONE; } // Hint the install function to read from a block map file. diff --git a/recovery.cpp b/recovery.cpp index fbfe6468..1538744e 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -480,6 +480,9 @@ static Device::BuiltinAction PromptAndWait(Device* device, InstallResult status) if (status == INSTALL_REBOOT) { return reboot_action; } + if (status == INSTALL_NONE) { + update_in_progress = false; + } if (status == INSTALL_SUCCESS) { update_in_progress = false;