History log of /system/update_engine/binder_service_android.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8371c1c852eae461043d8a3d911394a0ec0db909 01-Feb-2018 Sen Jiang <senj@google.com> Implement VerifyPayloadApplicable.

Parse the payload metadata and validate the source hash of all operations.
Return false if any error occur or hash mismatch.

Bug: 65283633
Test: mma

Change-Id: I6f5ae3cb69f4de973cecd0e3d7b733a48b2462f1
/system/update_engine/binder_service_android.cc
07fbb1b7dff86d8b26bf976b72f2722fde66b603 10-Jan-2018 Tao Bao <tbao@google.com> Add a binder function verifyPayloadApplicable().

This CL adds the following function to the Android binder service.

boolean verifyPayloadApplicable(in String metadataFilename);

It verifies whether a payload (delegated by the payload metadta) can be
applied to the current device. A caller can download only the payload
metadata (from the start of the payload, past the last byte that
contains the metadata signature - the actual size is parsable from the
header). The metadata should be saved to a local file, and passed to
update_engine to query whether the payload can be applied.

This is useful for a caller to determine if a delta payload can be
applied to the device, by downloading minimal data (payload metadata
usually takes a few hundred KiB or less). On verification failures, the
caller can take better strategies (e.g. switching to a full payload).

Bug: 65283633
Test: Build and flash on walleye. Trigger a call to the Java API, then
verify the logcat output.
Change-Id: I2e8d21d1073baa0da6faf1292497d61f60e6742f
/system/update_engine/binder_service_android.cc
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)
/system/update_engine/binder_service_android.cc
b7f7380688b4c36a70f2506991666409a6496f4a 19-Jul-2017 Sen Jiang <senj@google.com> Use IBinder to uniquely identify binder callbacks.

The callback pointer might be different for the same callback, convert
it to IBinder and use that to identify callbacks instead.

Bug: 62293007
Test: mma

Change-Id: Ibd1c2de1192dd7d4f4bc498b0590f5b7f3de3aff
/system/update_engine/binder_service_android.cc
5caab19d5aaa564befb60273a703c9a8e8d1a727 08-Jul-2017 Sen Jiang <senj@google.com> Add unbind() binder API.

It will remove the callback from the list and unregister death
notification for the callback.

Bug: 62293007
Test: mma
Change-Id: I527699a160feaad739c50ed1865d557d3cef22e8
/system/update_engine/binder_service_android.cc
3b678db2e7fd4baa38c6d6b8bb8334f7d88b8682 09-Feb-2016 Alex Deymo <deymo@google.com> Implement a new resetStatus() method in Android interface.

When an alredy applied update is deleted from the server (normally
because is was detected to be a bad update), we need to go back to
the idle state and remove the update to prevent it from breaking
more devices.

This patch allows the application side to reset the applied update
back to idle.

Bug: 27081760
TEST=Deployed on a non-Brillo device, sent resetStatus.

Change-Id: I1bf5a141388250d225515e40f13bc3564fa5d957
/system/update_engine/binder_service_android.cc
0e061aebc651e041b6d1d8a3a91834feb87e0d62 10-Feb-2016 Alex Deymo <deymo@google.com> Send an initial status update notification on bind().

When the client calls bind(), this patch now sends an initial status
update so the client can react to the status update that could have
been sent before it called bind().

Bug: 27108108
TEST=`update_engine_client --follow` shows the initial status.

Change-Id: Ifbf056ebb66da17c9e60244561340b3e1ccd4232
/system/update_engine/binder_service_android.cc
f8bfcff8debbcbbb572fdd61e640efe2a3df31dc 03-Feb-2016 Alex Deymo <deymo@google.com> Android: Implement the binder service.

This patch introduces the service delegate interface for non-Brillo
targets, which is the class in charge of implementing the API exposed
by the service. The binder service for non-Brillo targets is now
completed using this interface.

The other side of this interface will be implemented in a follow up CL,
while this CL includes only the interface and its usage.

To accomodate non-Brillo targets, the generic ServiceObserverInterface
is extended with the PayloadApplicationComplete message, which will be
implemented for all targets in the future.

Bug: 25631949
TEST=`mmma system/update_engine` on aosp_arm-eng and edison-eng

Change-Id: I9fa8e9565ae92515e81e07d2cef562fc4e11a7ba
/system/update_engine/binder_service_android.cc
95b8f248088934180732cd7e166e70a7d8fe4d0c 29-Jan-2016 Alex Deymo <deymo@google.com> Android: Extend the API with the payload offset and size.

The payload offset and size of the CrAU binary file inside the .zip
file are required parameters to properly apply the payload so we
explicitly required them in the API.

The update_engine_client command was extended to support these two
parameters.

Bug: 25631767
TEST=`mmma system/update_engine` on aosp_arm-eng.

Change-Id: Id5ef2f45b711039309173cb0309b9fe5cc82e485
/system/update_engine/binder_service_android.cc
fa78f14d818e8e0b8ed5d05ebc389bf833342e7a 27-Jan-2016 Alex Deymo <deymo@google.com> Refactor daemon state and service async notification.

There are three supported IPC mechanism in this code: DBus, binder and
weave (over binder); which are mostly supported by all three platforms
Chrome OS, Brillo and Android. The exceptions are that Brillo and
Chrome OS still *require* DBus and support the others, while the new
Android daemon requires and supports only Binder.

This CL introduces two new interfaces: the ServiceObserverInterface and
the DaemonStateInterface.

The first one abstracts a service (or IPC service) into an interfcae
from the point of view of the daemon initialization and async
notifications of status changes. The second interface encapsulates the
state and main functionality of the update_engine daemon while leaving
the shared initialization in the main.cc and daemon.cc classes.

Bug: 25631949
TEST=`mmma system/update_engine` on edison-eng and aosp_arm-eng
TEST=FEATURES=test emerge-link update_engine

Change-Id: Ic15621031a153e14bdc4df8fcedbca1032e82c21
/system/update_engine/binder_service_android.cc
e97b39c4140af015f5a2939808cf8ee39bde43a2 20-Jan-2016 Alex Deymo <deymo@google.com> Implement Android UE daemon using brillo::Daemon.

The setup logic for Brillo and Android devices is very similar despite
the differences in the daemon logic and exposed service interface.
This patch reuses the brillo::Daemon derived class and the main()
function from Brillo to implement the daemon and service setup in
Android as well.

In addition, the Chromium OS build now defines the __CHROMEOS__ macro
to make the code behave the same way as in the Brillo case.

Bug: 25631949
TEST=`mmma system/update_engine` on edison-eng and aosp_arm-eng

Change-Id: I0f9690264e0822ef7e71318c73c2f16eda99e07c
/system/update_engine/binder_service_android.cc
bdd765e3157a2b04265dcdab0d7a55e747924555 23-Jan-2016 Alex Vakulenko <avakulenko@google.com> Revert "Implement Android UE daemon using brillo::Daemon."

This reverts commit c180400937eac75e8b7119f68d44593713dd4557.

This breaks both AOSP and Chrome OS

Change-Id: Ie9686a4d03a8fd53a614ed1706e3268918c414fb
/system/update_engine/binder_service_android.cc
c180400937eac75e8b7119f68d44593713dd4557 20-Jan-2016 Alex Deymo <deymo@google.com> Implement Android UE daemon using brillo::Daemon.

The setup logic for Brillo and Android devices is very similar despite
the differences in the daemon logic and exposed service interface.
This patch reuses the brillo::Daemon derived class and the main()
function from Brillo to implement the daemon and service setup in
Android as well.

Bug: 25631949
TEST=`mmma system/update_engine` on edison-eng and aosp_arm-eng

Change-Id: I15b2c2990a8055619dd407b2996ea92216c602a2
/system/update_engine/binder_service_android.cc
a93cd53c4f8ab8cb926ed9223373567ebbf45cb6 15-Jan-2016 Casey Dahlin <sadmac@google.com> Introduce brillo binder interface

This is more or less an exact analogue of the DBus interface, but
available over binder. We also add support to the client library and let
update_engine_client build with binder. We don't yet support an
equivalent of the status signal/the HandleStatusUpdate method. That will
come in a future CL.

Bug: 25908638
TEST=Verified update_engine_client functionality

Change-Id: Ic793619c8019b0d50aa184e0f592b6a9ab71e0b0
/system/update_engine/binder_service_android.cc