Commit Graph

3 Commits

Author SHA1 Message Date
Billy Lau
0f55c59324 Revamp BinaryTransparencyService.
BinaryTransparencyService:
- change default binary measurement method from SHA256 digest to
  APK content digest. This allows for more performant measurements.

- got rid of in-memory caches of digest results because:
  a) larger scope: more binaries will be covered (in the magnitude
     of hundreds);
  b) the digest length using APK content digest might be longer than
     256 bits: e.g. CHUNKED_SHA512 which is 512 bits;
  c) the computation of these new digests are not as computationally
     intensive that it causes noticible lags even when commands are
     invoked repeatedly in adb shell.

- changed scheduled job to be scheduled periodically (once in a 24
  hour period) instead of a one-off job.

- make use of method calls to BackgroundInstallControlService (BICS)
  to obtain list of newly installed mobile bundled apps (MBAs).

BinaryTransparencyServiceTest:
- modified the return type for `getApexInfo` to receive a List instead
 of Map.

Bug: 245944666

Test: atest BinaryTransparencyServiceTest.
      Also, adb shell cmd jobscheduler run android <job-id>.
      <job-id> can be found in debug printouts with TransparencyService
      tag.
Change-Id: Ie305e71c514f4fb65b9e640301093ec83f01f718
2022-11-16 12:55:48 -06:00
Wenhao Wang
a53ca1928f transparency: update OWNERS file
Add owner and update bug component ID.

Bug: 229285107
Test: N/A
Ignore-AOSP-First: currently unavailable on AOSP
Change-Id: I137ae36b942987c85f7668a8333aee8e9fa6307f
2022-04-14 14:06:10 -07:00
Billy Lau
d1fb08be0a Add BinaryTransparencyService as new SystemService.
Bug: 197684182

Created a new system service that aggregates information about:
1) signed partitions on device
2) APEXs installed on device
3) Modules installed on device

Introduces new adb shell commands as below:
adb shell cmd transparency get image_info [-a]
adb shell cmd transparency get apex_info [-v]
adb shell cmd transparency get module_info [-v]

Test: Built and tested locally on a bramble - the device boots.
Issuing adb shell commands as above provides correct outputs.

Change-Id: I2cae1bd794456688779c70c65b3f5ec8bcd7c6b3
2022-01-24 15:58:05 -08:00