From 7dcdd5b9c8ed98a3ffac4de337bb043724c1c5aa Mon Sep 17 00:00:00 2001 From: David Drysdale Date: Thu, 28 Nov 2024 11:50:55 +0000 Subject: [PATCH] Add manifest fragments for all KeyMint versions Make it easier for vendors to declare the Package Manager flag that matches the version of KeyMint that their device implements. Test: TreeHugger Bug: 381125092 Change-Id: I13f781836b4b06c43811b315ca78da076ecd928f --- security/keymint/aidl/default/Android.bp | 19 +++++++++++++++++++ .../android.hardware.hardware_keystore_V1.xml | 18 ++++++++++++++++++ .../android.hardware.hardware_keystore_V2.xml | 18 ++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 security/keymint/aidl/default/android.hardware.hardware_keystore_V1.xml create mode 100644 security/keymint/aidl/default/android.hardware.hardware_keystore_V2.xml diff --git a/security/keymint/aidl/default/Android.bp b/security/keymint/aidl/default/Android.bp index 0f008ce52b..0197141858 100644 --- a/security/keymint/aidl/default/Android.bp +++ b/security/keymint/aidl/default/Android.bp @@ -104,6 +104,7 @@ rust_binary { ], } +// The following target declares the latest version of KeyMint. prebuilt_etc { name: "android.hardware.hardware_keystore.xml", sub_dir: "permissions", @@ -111,6 +112,24 @@ prebuilt_etc { src: "android.hardware.hardware_keystore.xml", } +// The following targets (and underlying XML files) declare specific +// versions of KeyMint. Vendors should use the version that matches the +// version of the KeyMint HAL that the device implements. + +prebuilt_etc { + name: "android.hardware.hardware_keystore_V1.xml", + sub_dir: "permissions", + vendor: true, + src: "android.hardware.hardware_keystore_V1.xml", +} + +prebuilt_etc { + name: "android.hardware.hardware_keystore_V2.xml", + sub_dir: "permissions", + vendor: true, + src: "android.hardware.hardware_keystore_V2.xml", +} + prebuilt_etc { name: "android.hardware.hardware_keystore_V3.xml", sub_dir: "permissions", diff --git a/security/keymint/aidl/default/android.hardware.hardware_keystore_V1.xml b/security/keymint/aidl/default/android.hardware.hardware_keystore_V1.xml new file mode 100644 index 0000000000..e5a93457c2 --- /dev/null +++ b/security/keymint/aidl/default/android.hardware.hardware_keystore_V1.xml @@ -0,0 +1,18 @@ + + + + + diff --git a/security/keymint/aidl/default/android.hardware.hardware_keystore_V2.xml b/security/keymint/aidl/default/android.hardware.hardware_keystore_V2.xml new file mode 100644 index 0000000000..2ebf1fe741 --- /dev/null +++ b/security/keymint/aidl/default/android.hardware.hardware_keystore_V2.xml @@ -0,0 +1,18 @@ + + + + +