7 Commits

Author SHA1 Message Date
nathch
d153d5fd22 Avoid warning logs on blocking Binder calls out of system_server to IBackupTransport
The implementations of IBackupTransport are whitelisted therefore in the short-term,
its OK to allow these calls and avoid the warning logs which can be distracting when
looking at logs to investigate bugs and are not of any real value since we are already
aware of this.

Bug: 148783926

Test: atest -v CtsBackupTestCases
Test: atest -v CtsBackupHostTestCases
Change-Id: I13e2a638891d0369310bc2c665fa772306a28199
2020-02-03 17:09:34 +00:00
Jiyong Park
bae2e90796 Add filegroups for services.* libraries
... in preparation for creating a stub library from services.jar

Bug: 139391334
Test: m
Change-Id: Ifd6cfc77acf2284804a2f64011c2733b5c222369
2019-11-17 14:05:08 +09:00
nathch
07d5c5b3ef Revert "Route backup data through IntermediateEncryptingTransport"
This is a revert of the "Route backup data through IntermediateEncryptingTransport" in ag/9447053

This is to fix the possible device crash from the new code till the new
code is fixed

Bug: 142381823
Test: atest -v RunBackupFrameworksServicesRoboTests
Test: atest -v $(find frameworks/base/services/tests/servicestests/src/com/android/server/backup -name '\''*Test.java'\'')'
Test: atest -v CtsBackupTestCases CtsBackupHostTestCases
Change-Id: I6fb1e513f481fb5d58816057bb69212511239707
2019-10-11 18:12:22 +01:00
nathch
e778ed3a3a Route backup data through IntermediateEncryptingTransport
The main change is in TransportManager which now uses
TransportClientManager.createEncryptingClientManager

We do this so that IntermediateEncryptingTransport can encrypt (decrypt) the
data when sending it (receiving it) from the real transport.

Test: atest -v BackupEncryptionUnitTests
Test: atest -v RunBackupFrameworksServicesRoboTests
Test: atest -v $(find frameworks/base/services/tests/servicestests/src/com/android/server/backup -name '\''*Test.java'\'')'
Test: atest -v CtsBackupTestCases CtsBackupHostTestCases
Change-Id: I01a0108da6b1f868ac6cb4591445ecc62316452f
2019-09-25 15:54:36 +01:00
nathch
52eba65fbc Add BackupEncryptionService which provides an IntermediateEncryptingTransport
BackupEncryptionService (which is in a separate APK) provides a IntermediateTransport
which binds to the real transport.

We do this so that IntermediateEncryptingTransport can encrypt (decrypt) the
data when sending it (receiving it) from the real transport.
In this CL, IntermediateTransport does not do any encryption. It simply forwards
the data on. We will add the actual encryption in the next CL.

Bug: 139269919

Test: atest -v BackupEncryptionUnitTests
Test: atest -v RunBackupFrameworksServicesRoboTests
Test: atest -v $(find frameworks/base/services/tests/servicestests/src/com/android/server/backup -name '\''*Test.java'\'')'
Test: atest -v CtsBackupTestCases CtsBackupHostTestCases
Change-Id: I83a84ed3e638eb1dd165fffe406495f80ff930aa
2019-09-25 13:58:40 +01:00
nathch
c5990e696a Add DelegatingTransport which delegates all transport methods to its delegate
The delegating methods were all auto-generated with IntelliJ (hence the
docs are a copy).

We do this so that IntermediateEncryptingTransport can extend DelegatingTransport and override
only the specific data send/get methods to be able to encrypt (decrypt) the
data when sending it (receiving it) from the real transport.
This way, we can separate the encryption specific changes in IntermediateEncryptingTransport
and keep the other transport administration methods in DelegatingTransport

Bug: 139269919

Test: atest -v DelegatingTransportTest
Change-Id: I8ea90fc390fe870e026a7479ad10d140a06250c0
2019-09-23 16:55:33 +01:00
nathch
b85b36ac09 Move transport client code into its own lib
We will route backup through the BackupEncryption APK which will
implement an intermediate transport which will encrypt (or decrypt) the data when
sending it (receiving it) from the real transport.

Since both backup services and IntermediateTransport need to bind to
IBackupTransport, they both need the transport client code so we move that
into its own lib.

Bug: 139269919

Test: atest -v RunBackupFrameworksServicesRoboTests
Test: atest -v $(find frameworks/base/services/tests/servicestests/src/com/android/server/backup -name '\''*Test.java'\'')'
Test: atest -v CtsBackupTestCases CtsBackupHostTestCases
Change-Id: Id986162ac71adf8638e5797169ef70e0d3d58b0c
2019-09-22 17:23:17 +01:00