keymaster: attempt to provision on startup

Once the strongbox HAL has been enabled,
vold will fail to start unless Citadel has
been provisioned with a pre-shared secret.

This pre-shared secret is normally provisioned
at factory, but we have a number of EVT class
devices that were not correctly provisioned,
and will thus hit a boot-loop on OTA.

Thus, to avoid this situation, attempt a lazy
provisioning step at HAL startup.  A minority
of developer devices may be in `production-mode`, in
which case they will be both unprovisioned, and
disallow lazy provisioning as done here.  In this
case the strongbox HAL does not register itself,
thus avoiding the bootloop.

We should remove this workaround once we have
reasonable confidence that all developer devices
have either been factory, or lazy, provisioned.

Wrote new Android.mk file becaus we have dependencies
defined in other Android.mk files.

Added group drmrpc to be able to talk to
TA apps directly.

Bug: 80452907
Change-Id: I74170a3c0366081864b83ba7fda1a4f4ac29af4f
4 files changed
tree: d3a5b0549882a54b06ed69d733c408cc892c4a4a
  1. citadel/
  2. hals/
  3. manual_tests/
  4. Android.bp
  5. LICENSE
  6. METADATA
  7. README.md
README.md

Android components for Nugget

Android communicates with Nugget apps in order to implement security related HALs. Currently, those HALs are Keymaster, Weaver and OemLock.

Services

Apps that define a protobuf service will have an app interface class autogenerated. These classes will wrap a NuggetClient. The generator can be found in the generator directory.

Asynchronous communication

Work in progress.

Currently, everything is synchronous and just exposes the call_application() function from the Nugget transport API. In future, asynchronous calls may be desired. Support for this could be added in:

  • Nugget transport API
  • NuggetClient on top of call_application()
  • Generated services

citadel

This directory contains the components to support Citadel connected to Android.