From 3a99f0fba1dd93dc733d5e9c14c32fa436c0cefe Mon Sep 17 00:00:00 2001 From: Matthew Maurer Date: Thu, 7 Mar 2019 17:01:23 -0800 Subject: Enable Trusty Gatekeeper 1.0 and Keymaster 3.0 Activates both services, and installs VTS to allow for testing them. Fails one subtest of keymaster@3.0 VTS at the moment, but so does the default emulator, so this is either a bug in system/keymaster or VTS. Bug: 127700127 Test: VTS for gatekeeper@1.0, VTS for keymaster@3.0 Change-Id: I53a901c090dd5cbaddab0d430e28f9b7de8dda89 --- BoardConfig.mk | 5 +- manifest.xml | 206 +++++++++++++++++++++++++++++++++++++++++++++++++ qemu_trusty_base.mk | 5 ++ sepolicy/file_contexts | 2 + 4 files changed, 217 insertions(+), 1 deletion(-) create mode 100644 manifest.xml diff --git a/BoardConfig.mk b/BoardConfig.mk index 50a330f..6fcb5c4 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -37,7 +37,7 @@ BUILD_QEMU_IMAGES := true TARGET_USERIMAGES_USE_EXT4 := true BOARD_SYSTEMIMAGE_PARTITION_SIZE := 268435456 # 256M -BOARD_USERDATAIMAGE_PARTITION_SIZE := 4194304 # 4M +BOARD_USERDATAIMAGE_PARTITION_SIZE := 67108864 # 64M TARGET_COPY_OUT_VENDOR := vendor # ~100 MB vendor image. Please adjust system image / vendor image sizes # when finalizing them. @@ -53,3 +53,6 @@ BOARD_SEPOLICY_DIRS += build/target/board/generic/sepolicy # Enable A/B update TARGET_NO_RECOVERY := true BOARD_BUILD_SYSTEM_ROOT_IMAGE := true + +# Specify HALs +DEVICE_MANIFEST_FILE := device/generic/trusty/manifest.xml diff --git a/manifest.xml b/manifest.xml new file mode 100644 index 0000000..26d4b3d --- /dev/null +++ b/manifest.xml @@ -0,0 +1,206 @@ + + + android.hardware.drm + hwbinder + 1.0 + + ICryptoFactory + default + + + IDrmFactory + default + + @1.1::ICryptoFactory/clearkey + @1.1::IDrmFactory/clearkey + @1.1::ICryptoFactory/widevine + @1.1::IDrmFactory/widevine + + + android.hardware.audio.effect + hwbinder + 4.0 + + IEffectsFactory + default + + + + android.hardware.biometrics.fingerprint + hwbinder + 2.1 + + IBiometricsFingerprint + default + + + + android.hardware.configstore + hwbinder + 1.0 + + ISurfaceFlingerConfigs + default + + + + android.hardware.audio + hwbinder + 4.0 + + IDevicesFactory + default + + + + android.hardware.keymaster + hwbinder + 3.0 + + IKeymasterDevice + default + + + + android.hardware.graphics.allocator + hwbinder + 2.0 + + IAllocator + default + + + + android.hardware.graphics.mapper + passthrough + 2.0 + + IMapper + default + + + + android.hardware.graphics.composer + hwbinder + 2.1 + + IComposer + default + + + + android.hardware.power + hwbinder + 1.1 + + IPower + default + + + + android.hardware.broadcastradio + hwbinder + 1.0 + + IBroadcastRadioFactory + default + + + + android.hardware.camera.provider + hwbinder + 2.4 + + ICameraProvider + legacy/0 + + + + android.hardware.sensors + hwbinder + 1.0 + + ISensors + default + + + + android.hardware.gatekeeper + hwbinder + 1.0 + + IGatekeeper + default + + + + android.hardware.gnss + hwbinder + 1.0 + + IGnss + default + + + + android.hardware.media.omx + hwbinder + 1.0 + + IOmx + default + + + IOmxStore + default + + + + android.hardware.radio + hwbinder + 1.0 + + IRadio + slot1 + + + + android.hardware.wifi + hwbinder + 1.0 + + IWifi + default + + + + android.hardware.wifi.hostapd + hwbinder + 1.0 + + IHostapd + default + + + + android.hardware.wifi.supplicant + hwbinder + 1.0 + + ISupplicant + default + + + + android.hardware.health + hwbinder + 2.0 + + IHealth + default + + + + 27.0 + + diff --git a/qemu_trusty_base.mk b/qemu_trusty_base.mk index 7862ebe..8262de1 100644 --- a/qemu_trusty_base.mk +++ b/qemu_trusty_base.mk @@ -24,6 +24,7 @@ PRODUCT_PACKAGES += \ apexd \ com.android.runtime \ dhcpclient \ + gatekeeperd \ hwservicemanager \ init \ init_system \ @@ -85,9 +86,13 @@ PRODUCT_COPY_FILES += \ $(call inherit-product, system/core/trusty/trusty-base.mk) $(call inherit-product, system/core/trusty/trusty-storage.mk) +# Test Utilities PRODUCT_PACKAGES += \ tipc-test \ trusty-ut-ctrl \ + VtsHalGatekeeperV1_0TargetTest \ + VtsHalKeymasterV3_0TargetTest \ + VtsHalKeymasterV4_0TargetTest \ PRODUCT_BOOT_JARS := \ core-oj \ diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 42e1b50..94f5594 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -4,3 +4,5 @@ /vendor/bin/storageproxyd u:object_r:tee_exec:s0 /data/vendor/var/run(/.*)? u:object_r:varrun_file:s0 /data/vendor/ss(/.*)? u:object_r:tee_data_file:s0 +/vendor/bin/hw/android.hardware.gatekeeper@1.0-service.trusty u:object_r:hal_gatekeeper_default_exec:s0 +/vendor/bin/hw/android.hardware.keymaster@3.0-service.trusty u:object_r:hal_keymaster_default_exec:s0 -- cgit v1.2.3