From 99281df8e2eb6a302ccbcfd790a6889392541264 Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Wed, 17 Feb 2016 12:21:52 -0800 Subject: recovery: check battery level before installing package. Bug: 26879394 Change-Id: I63dce5bc50c2e104129f1bcab7d3cad5682bf45d (cherry picked from commit 53e7a0628f4acc95481f556ba51800df4a1de37d) --- install.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'install.h') diff --git a/install.h b/install.h index 680499db3..f92f061df 100644 --- a/install.h +++ b/install.h @@ -23,7 +23,7 @@ extern "C" { #endif -enum { INSTALL_SUCCESS, INSTALL_ERROR, INSTALL_CORRUPT, INSTALL_NONE }; +enum { INSTALL_SUCCESS, INSTALL_ERROR, INSTALL_CORRUPT, INSTALL_NONE, INSTALL_SKIPPED }; // Install the package specified by root_path. If INSTALL_SUCCESS is // returned and *wipe_cache is true on exit, caller should wipe the // cache partition. -- cgit v1.2.3 From fa12b9737dd4ab36c3b4abaf25eb79f692e6eba6 Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Fri, 5 Feb 2016 18:25:58 -0800 Subject: Reboot and retry on I/O errors When I/O error happens, reboot and retry installation two times before we abort this OTA update. Bug: 25633753 Change-Id: Iba6d4203a343a725aa625a41d237606980d62f69 (cherry picked from commit 3c62b67faf8a25f1dd1c44dc19759c3997fdfd36) --- install.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'install.h') diff --git a/install.h b/install.h index f92f061df..fd08e3c49 100644 --- a/install.h +++ b/install.h @@ -23,7 +23,8 @@ extern "C" { #endif -enum { INSTALL_SUCCESS, INSTALL_ERROR, INSTALL_CORRUPT, INSTALL_NONE, INSTALL_SKIPPED }; +enum { INSTALL_SUCCESS, INSTALL_ERROR, INSTALL_CORRUPT, INSTALL_NONE, INSTALL_SKIPPED, + INSTALL_RETRY }; // Install the package specified by root_path. If INSTALL_SUCCESS is // returned and *wipe_cache is true on exit, caller should wipe the // cache partition. -- cgit v1.2.3 From 162558382b768a4120b3e41090a4c7b53f11469a Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Sat, 30 Apr 2016 11:49:59 -0700 Subject: Allow recovery to return error codes Write error code, cause code, and retry count into last_install. So we can have more information about the reason of a failed OTA. Example of new last_install: @/cache/recovery/block.map package name 0 install result retry: 1 retry count (new) error: 30 error code (new) cause: 12 error cause (new) Details in: go/android-ota-errorcode Bug: 28471955 Change-Id: I00e7153c821e7355c1be81a86c7f228108f3dc37 --- install.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'install.h') diff --git a/install.h b/install.h index fd08e3c49..66764f542 100644 --- a/install.h +++ b/install.h @@ -28,8 +28,8 @@ enum { INSTALL_SUCCESS, INSTALL_ERROR, INSTALL_CORRUPT, INSTALL_NONE, INSTALL_SK // Install the package specified by root_path. If INSTALL_SUCCESS is // returned and *wipe_cache is true on exit, caller should wipe the // cache partition. -int install_package(const char* root_path, bool* wipe_cache, - const char* install_file, bool needs_mount); +int install_package(const char* root_path, bool* wipe_cache, const char* install_file, + bool needs_mount, int retry_count); #ifdef __cplusplus } -- cgit v1.2.3