795c5b444fc57876c74ec44116553b4504d44979 |
06-Dec-2017 |
Aaron Wood <aaronwood@google.com> |
Correct variable name for last update check time Align the name of the last update check time variable to the units within it (seconds since epoch). Bug: 70178109 Test: unit-tests Change-Id: Ic06890f0e234528d80dc1bcd053e8b602c6f9309 (cherry picked from commit 4adf279cecb8b6c5f85d66e504b9c847b72e0e4c)
pdate_status.h
|
0b3cc24cf092acd316e3890d8413ab2b66bd9bbf |
07-Dec-2017 |
Aaron Wood <aaronwood@google.com> |
Use new bitwise operators for UpdateAttemptFlags Switch the bitwise operator overloads to the new standardized ones from libbrillo. Test: unit-tests Test: manual exercising of update_engine via APIs Change-Id: Ia8bd7d90adc9469826a906c127c87bfac8272f6c (cherry picked from commit 931b955fc5c8427b90a123859e1dab22baae7f7d)
pdate_status.h
|
bf5a2522481c1e26a8d645a1575824dcd5fbd08e |
04-Oct-2017 |
Aaron Wood <aaronwood@google.com> |
Add flag for restricting downloads This adds a flag that can be used to turn off the ability to download and apply updates from the API. This value applies to all future update checks that the update_engine performs. Changing this value during an update check has no effect on the current update check. Bug: 66016687 Test: unit-tests, manual OTA Change-Id: I655adf23cae44c63079bfa9dc18ba8ca65d7a304 (cherry picked from commit e22f2ddfec92623d38efbf17c17917f68e52907a)
pdate_status.h
|
7f92e2b7060cb35719acf96ef96a4e273e165bc5 |
28-Aug-2017 |
Aaron Wood <aaronwood@google.com> |
Update API: initial support Initial pieces of the Update API callback framework. - move the status callback params to a new object, UpdateEngineStatus to allow for the easier addition of new params in the future. - switch the IUpdateEngineStatusCallback to provide a ParcelableUpdateEngineStatus instead of a series of individual params - move the various GetStatus() methods to use the UpdateEngineStatus object instead of a series of params (which will need future expansion) - Add current and new product/os versions to both the UpdateEngineStatus and the ParcelableUpdateEngineStatus. Bug: 64808702 Test: unit tests, and performing OTAs via a test app calling IUpdateEngine::AttemptUpdate() via UpdateManager::performUpdateNow() Change-Id: I53f66f3511049f0809855814e1e758023cd8cc08 (cherry picked from commit 4f96ebf85022837603f2e10100a044d234b7d86f)
pdate_status.h
|
5688d16057d34b770c070e2b4a27841092003a4e |
06-Jun-2017 |
Tao Bao <tbao@google.com> |
Revert "Add functions to allow update over cellular (including tethered connection)" This reverts commit 4b0d6032cbb86ce488c03b31936cda31283f97e3. Bug: 62366504 Test: GmsCore sees the old status code (i.e. UPDATED_NEED_REBOOT == 6). Change-Id: I9185614a41bd621ad85e7f773b0f96919b0f70d5
pdate_status.h
|
4b0d6032cbb86ce488c03b31936cda31283f97e3 |
17-Apr-2017 |
Weidong Guo <weidongg@chromium.org> |
Add functions to allow update over cellular (including tethered connection) - Add an update state NEED_PERMISSION_TO_UPDATE which is broadcasted along with the update info (version and size) when |OmahaRequestAction| aborts update due to cellular connection. So the state transition will be: IDLE->CHECKING_FOR_UPDATE->NEED_PERMISSION_TO_UPDATE->REPORTING_ERROR_EVENT ->IDLE (The Chrome UI prompts an alert window showing update size and asks user whether to proceed upon receiving this state.) - Add a dbus interface to set update over cellular target (kPrefsUpdateOverCellularTargetVersion and kPrefsUpdateOverCellularTargetSize). The target is the one received by Chrome UI in NEED_PERMISSION_TO_UPDATE broadcast. By sending the target back with the dbus call, update engine can double check the target with the server to make sure there's no new server push after NEED_PERMISSION_TO_UPDATE is broadcasted to Chrome UI. (This dbus call is invoked when the user chooses to proceed to update at the alert window. The dbus call is followed by another dbus call |AttemptUpdate|) - So, the the decision tree as to whether to allow update over cellular connection has changed to: IF (device policy DeviceUpdateAllowedConnectionTypes set) follow device policy's decision ELSE IF (kPrefsUpdateOverCellularPermission set to true) allow update ELSE IF (Either kPrefsUpdateOverCellularTargetVersion or kPrefsUpdateOverCellularTargetSize is not set, or they are set but do not match the version and size in |OmahaResponse| retrieved by |OmahaRequestAction|) disallow update, and broadcast NEED_PERMISSION_TO_UPDATE ELSE allow update ENDIF - This decision making happens at |OmahaRequestAction| after |OmahaResponse| is retrieved. Since we want to separate the device policy check with the user preferences check which depends on |OmahaResponse| during checking for update, we modify ConnectionManager::IsUpdateAllowedOver by moving the user preferences check to |OmahaRequestAction|. Thus, the function by default returns true for cellular connection if device policy is not set. - Corner case: Adding kPrefsUpdateOverCellularPermission and kPrefsUpdateOverCellularTargetSize seems to complicate the logic here. But they could effectively solve a corner case where the target does not match |OmahaResponse| due to new server push after broadcasting NEED_PERMISSION_TO_UPDATE. In that case, we simply broadcast NEED_PERMISSION_TO_UPDATE again along with new update info. CQ-DEPEND=CL:481102 BUG=chromium:691108 TEST='FEATURES=test emerge-link update_engine' (cherry picked from commit 70063d9f7e229db8c5b42443ca96ac23a971a6dd) Cherry-pick updated to compile on Android. Reviewed-on: https://chromium-review.googlesource.com/479467 Commit-Ready: Weidong Guo <weidongg@chromium.org> Tested-by: Weidong Guo <weidongg@chromium.org> Reviewed-by: Weidong Guo <weidongg@chromium.org> Reviewed-by: Andrew de los Reyes <adlr@chromium.org> Reviewed-by: Ben Chan <benchan@chromium.org>
pdate_status.h
|
5b5fa8b412312a41cfd4d7ab475b54d4f730ed2a |
07-Oct-2016 |
Alex Deymo <deymo@google.com> |
Add {Get,Set}CohortHint interface. Export the "cohort hint" getter and setter in the client interfaces (D-Bus and Binder). The cohort hint is sent to Omaha on every update check request but can be ignored and/or reset by Omaha on every response. Other minor linter fixes to the affected files. Bug: 31740109 Test: Build with D-Bus and with Binder. Change-Id: I93214f6ffb8662c238b3351e52bf2bdf23e46a9c
lient.h
|
b3fa53bf760bd0a6fd1ef9df28cb425586d733f6 |
19-Apr-2016 |
Alex Deymo <deymo@google.com> |
Parse and expose end-of-life flag. Omaha update or noupdate response can include _key=value pairs with arbitrary data. One of those key can be "_eol" with the one of the values "supported", "security-only" or "eol" which notifies the device the end-of-life status of the device with respect to updates. This information is now exposed via GetEolStatus() to the client so it can be properly displayed in the UI. Bug: 27924505 TEST=Added unittest. Run `update_engine_client --eol_status` on link. Change-Id: Icc15f25b4d0b19cc894f5afc52ac7c43c7818982
lient.h
|
2997173235e88c5e4cb13d2844f74afc7b25d6e2 |
05-Feb-2016 |
Shuqian Zhao <shuqianz@google.com> |
Add a feature to get the last UpdateAttempt ErrorCode from update_engine For autotest, update_engine test failures are always hard to debug, since the error message is not clear. Add a new flag 'last_attempt_error' to get the last UpdateAttempt ErrorCode from update_engine. Bug:25598547 Test:emerge-peppy update_engine emerge-peppy update_engine_client cros flash a test image to DUT. (on the DUT):update_engine_client --last_attempt_error Compare the results with the update_engine logs, matched. Change-Id: Id12681097ed30b0826cad68809f17f934a07e5b2
lient.h
|
a715f7b8a211b5c4b74206539e9aa7ddacf4b243 |
30-Jan-2016 |
Casey Dahlin <sadmac@google.com> |
Properly handle handler registering and unregistering In addition to now supporting unregistering, we now correctly support multiple handlers under DBus, and correctly send initial events under binder. TEST=Verified update_engine_client still works as expected Bug: None Change-Id: I60955d4d9ca61dfe7857b9fc78f77fa4292ed218
lient.h
|
40892497a9b1ea124058baf09f5f2873a15cb696 |
26-Jan-2016 |
Casey Dahlin <sadmac@google.com> |
Make client use binder interface on brillo TEST=Verified status and update commands Bug: 25908638 Change-Id: I7994de41001b4e116bffa539f23f1344ab1deae9
lient.h
|
194414134a954d921c8063610304c4fd21f19df2 |
07-Jan-2016 |
Casey Dahlin <sadmac@google.com> |
Initialize DBus in CreateInstance We now expect the bus to be ready to go as soon as CreateInstance is finished. The downside is that CreateInstance can now fail when the bus isn't available, so we must handle nullptr returns. Change-Id: I1e8d20f8d85d93e7e8b5e93ee1e5ba6043a347c4 Test: Verified commands continue to work Bug: 26233663
lient.h
|
97c870518ce1149b32966d98ebfe93f3eb5d1fef |
06-Jan-2016 |
Casey Dahlin <sadmac@google.com> |
Introduce status handlers and use them in client We introduce a StatusUpdateHandler class which can be overridden to provide a method with which to react to status updates. This replaces manual dbus logic in several places in update_engine_client with a consistent interface for asynchronously handling status updates. Change-Id: Idca4229de82074fb7a87a315b45dd0292c1b1f16 Test: Confirmed --update blocks and resumes correctly Bug: 26233663
lient.h
tatus_update_handler.h
|
ef361136cea1e423dc462d2b347923ae60b2cf08 |
17-Dec-2015 |
Casey Dahlin <sadmac@google.com> |
Move all blocking client calls to libupdate_engine_client Change-Id: I27bc86ad2eef3a573c60fde1bb10b6b37af81c1c Test: Affected commands continue to work Bug: 26233663 Signed-off-by: Casey Dahlin <sadmac@google.com>
lient.h
|
87ab88e35fac5d3ded1c70c8911d307ec47a7db9 |
17-Dec-2015 |
Casey Dahlin <sadmac@google.com> |
Port all available calls to libupdate_engine_client This is as far as the port can go without improving the library itself. Change-Id: I5d5dbf14b62746786364b2a7e1a9131d8ef7bfb1 Test: All affected commands still signal the daemon on dragonboard Bug: 26233663
lient.h
|
e844c1a5604765bbddafa7e05f1143a27f136747 |
16-Dec-2015 |
Casey Dahlin <sadmac@google.com> |
Port update_engine_client ResetStatus command to lib This is the first step in getting update_engine_client completely off of direct DBus calls Test: Ran --reset_status command and verified update_engine received the signal. Bug: 26233663 Signed-off-by: Casey Dahlin <sadmac@google.com> Change-Id: Iac54d890fd796f91a7813755d6061cf468255347
lient.h
|
39910dcd1d68987ccee7c3031dc269233a8490bb |
10-Nov-2015 |
Alex Deymo <deymo@google.com> |
Split payload application code into a subdirectory. This patch splits from the main libupdate_engine code the part that is strictly used to download and apply a payload into a new static library, moving the code to subdirectories. The new library is divided in two subdirectories: common/ and payload_consumer/, and should not depend on other update_engine files outside those two subdirectories. The main difference between those two is that the common/ tools are more generic and not tied to the payload consumer process, but otherwise they are both compiled together. There are still dependencies from the new libpayload_consumer library into the main directory files and DBus generated files. Those will be addressed in follow up CLs. Bug: 25197634 Test: FEATURES=test emerge-link update_engine; `mm` on Brillo. Change-Id: Id8d0204ea573627e6e26ca9ea17b9592ca95bc23
lient.h
pdate_status.h
|
16daa08470beb5021b85618f1b3ee214d89e59a1 |
02-Oct-2015 |
Christopher Wiley <wiley@google.com> |
Add DBus hiding client library This library hides update_engine's legacy DBus dependencies until we can remove them completely. Bug: 24547247 Test: mmm system/update_engine; emerge-panther update_engine Change-Id: I7f87f2a7c31d0940c376ef43368e53b0f3bc3407
lient.h
|
cc8ce0e3b11ac76412c26c687d11140cbe18ad91 |
02-Oct-2015 |
Christopher Wiley <wiley@google.com> |
Move UpdateStatus and helpers to dedicated files This allows us to easily share it between the update_engine proper and a forthcoming client library. Bug: 24547247 Test: mmm system/update_engine; emerge-panther update_engine Change-Id: I8c0db7a0f95dd6368bfc886f1b0d1a9d2efb461f
pdate_status.h
|