From 421ff33ee91186014c37abc7b6d8fa075074d894 Mon Sep 17 00:00:00 2001 From: Weidong Guo Date: Mon, 17 Apr 2017 10:08:38 -0700 Subject: Reland update over cellular changes This merge cherrypicks two commits that was reverted in an AOSP git merge. 4b0d6032cbb86ce488c03b31936cda31283f97e3 Add functions to allow update over cellular (including tethered connection) 840703a4cc77228e2606f45665ae3a4bd75ff7dd Fix update over cellular network on guest account Handled multi-package response. Ran clang-format which fixed a lot of issues in those two CLs. BUG=chromium:815356 TEST=unittests, precq Change-Id: I54b6763c4c54755272531b558ed7628ceb0fc6c7 Reviewed-on: https://chromium-review.googlesource.com/965267 Commit-Ready: Amin Hassani Tested-by: Amin Hassani Reviewed-by: Ben Chan --- common/error_code_utils.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common/error_code_utils.cc') diff --git a/common/error_code_utils.cc b/common/error_code_utils.cc index 983d004d..2c485a2a 100644 --- a/common/error_code_utils.cc +++ b/common/error_code_utils.cc @@ -144,6 +144,8 @@ string ErrorCodeToString(ErrorCode code) { return "ErrorCode::kUserCanceled"; case ErrorCode::kNonCriticalUpdateInOOBE: return "ErrorCode::kNonCriticalUpdateInOOBE"; + case ErrorCode::kOmahaUpdateIgnoredOverCellular: + return "ErrorCode::kOmahaUpdateIgnoredOverCellular"; case ErrorCode::kUpdatedButNotActive: return "ErrorCode::kUpdatedButNotActive"; // Don't add a default case to let the compiler warn about newly added -- cgit v1.2.3 From 3978dddfac37ddbb5c1690e399ba474f32c70294 Mon Sep 17 00:00:00 2001 From: Sen Jiang Date: Thu, 22 Mar 2018 18:05:44 -0700 Subject: Fix error code for no update. PayloadState does not get notified if there's no update, so the error code will not be updated, move this to UpdateAttempter. We were using the generic kError for no update, this change added a new error code kNoUpdate for this, now update_engine_client will show kNoUpdate instead of kSuccess or a random last error. Bug: 36946608 Test: update_engine_client --check_for_update --follow Change-Id: Ie1e94841788437140e0894dc2e73c314a7564108 (cherry picked from commit 89e24c11b406fe048382bdf1c89334e10417b899) Reviewed-on: https://chromium-review.googlesource.com/1055857 Commit-Ready: Amin Hassani Tested-by: Amin Hassani Reviewed-by: Nicolas Norvez Reviewed-by: Sen Jiang --- common/error_code_utils.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common/error_code_utils.cc') diff --git a/common/error_code_utils.cc b/common/error_code_utils.cc index 2c485a2a..6b72eee8 100644 --- a/common/error_code_utils.cc +++ b/common/error_code_utils.cc @@ -148,6 +148,8 @@ string ErrorCodeToString(ErrorCode code) { return "ErrorCode::kOmahaUpdateIgnoredOverCellular"; case ErrorCode::kUpdatedButNotActive: return "ErrorCode::kUpdatedButNotActive"; + case ErrorCode::kNoUpdate: + return "ErrorCode::kNoUpdate"; // Don't add a default case to let the compiler warn about newly added // error codes which should be added here. } -- cgit v1.2.3 From 199152d68931cbbffa8b4e3cb34b2ef70c19e8b6 Mon Sep 17 00:00:00 2001 From: Marton Hunyady Date: Mon, 7 May 2018 19:08:48 +0200 Subject: update_engine: Process Omaha response for rollback images Omaha returns whether the image returned is a rollback in the _rollback="true" argument. If this is set, the client has to check whether it's OK to apply the rollback image (policy is specifically requesting a rollback and verified boot will accept the image based on its kernel and firmware key versions). In addition to this, the device has to do a safe powerwash if the image is a rollback. (We're not supporting rollbacks with partial or no powerwash yet.) We're also setting the rollback_happened preference to avoid force updates happening before the policy is available again. Chromium CL adding the error code: http://crrev.com/c/1047866 BUG=chromium:840432 TEST='cros_run_unit_tests --board=caroline --packages update_engine' Change-Id: I1436ca96211b2a8523e78bf83602ef8b6b525570 Reviewed-on: https://chromium-review.googlesource.com/1047610 Commit-Ready: Marton Hunyady Tested-by: Marton Hunyady Reviewed-by: Amin Hassani --- common/error_code_utils.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common/error_code_utils.cc') diff --git a/common/error_code_utils.cc b/common/error_code_utils.cc index 6b72eee8..a0e75f0e 100644 --- a/common/error_code_utils.cc +++ b/common/error_code_utils.cc @@ -150,6 +150,8 @@ string ErrorCodeToString(ErrorCode code) { return "ErrorCode::kUpdatedButNotActive"; case ErrorCode::kNoUpdate: return "ErrorCode::kNoUpdate"; + case ErrorCode::kRollbackNotPossible: + return "ErrorCode::kRollbackNotPossible"; // Don't add a default case to let the compiler warn about newly added // error codes which should be added here. } -- cgit v1.2.3 From 80f4d4cefb5270960d17cd347d71594e97c7a954 Mon Sep 17 00:00:00 2001 From: Amin Hassani Date: Wed, 16 May 2018 13:34:00 -0700 Subject: update_engine: Report VPD write failure to UMA Currently we see many first actives to come from non-FSI images. But we have not been able to figure out why. This CL, reports a new error kFirstActiveOmahaPingSentPersistenceError when writing the first active omaha flag into VPD fails. This allows us to see if that is the actual cause of the problem. CL:1062659 adds the enum value on the Chrome side. BUG=chromium:833980 TEST=unittests TEST=precq Change-Id: I65e233c5f895489ba905494fb20d7b00d0c4af10 Reviewed-on: https://chromium-review.googlesource.com/1062662 Commit-Ready: ChromeOS CL Exonerator Bot Tested-by: Amin Hassani Reviewed-by: Amin Hassani Reviewed-by: Ben Chan --- common/error_code_utils.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common/error_code_utils.cc') diff --git a/common/error_code_utils.cc b/common/error_code_utils.cc index a0e75f0e..2a2a0a3e 100644 --- a/common/error_code_utils.cc +++ b/common/error_code_utils.cc @@ -152,6 +152,8 @@ string ErrorCodeToString(ErrorCode code) { return "ErrorCode::kNoUpdate"; case ErrorCode::kRollbackNotPossible: return "ErrorCode::kRollbackNotPossible"; + case ErrorCode::kFirstActiveOmahaPingSentPersistenceError: + return "ErrorCode::kFirstActiveOmahaPingSentPersistenceError"; // Don't add a default case to let the compiler warn about newly added // error codes which should be added here. } -- cgit v1.2.3