From 3f127a002e92592206acb61f0ca6610328d9d218 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sat, 21 Sep 2019 14:40:38 -0400 Subject: [PATCH] document Android 10 building changes --- static/build.html | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/static/build.html b/static/build.html index 9e5825a2..2270c5e0 100644 --- a/static/build.html +++ b/static/build.html @@ -65,6 +65,7 @@
  • Generating signed factory images and full update packages
  • @@ -511,6 +512,7 @@ cd keys/marlin ../../development/tools/make_key platform '/CN=GrapheneOS/' ../../development/tools/make_key shared '/CN=GrapheneOS/' ../../development/tools/make_key media '/CN=GrapheneOS/' +../../development/tools/make_key networkstack '/CN=GrapheneOS/' ../../development/tools/make_key verity '/CN=GrapheneOS/' cd ../.. @@ -539,6 +541,7 @@ cd keys/crosshatch ../../development/tools/make_key platform '/CN=GrapheneOS/' ../../development/tools/make_key shared '/CN=GrapheneOS/' ../../development/tools/make_key media '/CN=GrapheneOS/' +../../development/tools/make_key networkstack '/CN=GrapheneOS/' openssl genrsa -out avb.pem 2048 ../../external/avb/avbtool extract_public_key --key avb.pem --output avb_pkmd.bin cd ../.. @@ -546,6 +549,29 @@ cd ../..

    The avb_pkmd.bin file isn't needed for generating a signed release but rather to set the public key used by the device to enforce verified boot.

    +

    + Upgrading to Android 10 +

    + +

    For Android 10, there's a new networkstack key and you need to + generate one to avoid using the test key. For example, with crosshatch (needs to be + done for each set of device keys):

    + +
    cd keys/crosshatch
    +../../development/tools/make_key networkstack '/CN=GrapheneOS/'
    + +

    GrapheneOS disables updatable APEX components for the officially supported + devices and targets inheriting from the mainline target. GrapheneOS uses the + TARGET_FLATTEN_APEX := true format to include APEX components as part of + the base OS without supporting out-of-band updates. If you don't disable updatable + APEX packages, you need to generate an APK and AVB key for each APEX component and + extend the GrapheneOS release.sh script to pass the appropriate parameters to replace + the APK and AVB keys for each APEX component. APEX components that are not flattened + are a signed APK (used for verify updates) with an embedded filesystem using verified + boot with the AVB key. Each APEX package must have a unique set of keys. GrapheneOS + has no use for these out-of-band updates at this time and flattening APEX components + avoids needing a bunch of extra keys and complexity.

    +

    Generating signed factory images and full update packages