universal7580: Enable v1.3 clearkey drm plugin
authorRobert Shih <robertshih@google.com>
Tue, 26 Nov 2019 06:25:42 +0000 (22:25 -0800)
committerDanny Wood <danwood76@gmail.com>
Sun, 1 Aug 2021 12:53:39 +0000 (13:53 +0100)
Bug: 139134043
Test: MediaDrmTest
Change-Id: Ie34e59947577988f75fae52d22e3f573f4b92420
Signed-off-by: Arian <arian.kulmer@web.de>
device-common.mk
sepolicy/file.te
sepolicy/file_contexts
sepolicy/hal_drm_clearkey.te [new file with mode: 0644]

index c93a52d96a7660353413995148f2eae40c8e2b35..54c31235e55a0497a893f88dd5073370de8c8d84 100644 (file)
@@ -55,7 +55,8 @@ PRODUCT_PACKAGES += \
 # DRM
 PRODUCT_PACKAGES += \
     android.hardware.drm@1.0-impl \
-    android.hardware.drm@1.0-service
+    android.hardware.drm@1.0-service \
+    android.hardware.drm@1.3-service.clearkey
 
 # Flat device tree for boot image
 PRODUCT_HOST_PACKAGES += \
index 47d1f338647d3012f6593bf1a87e464759fbb79a..5ba38996c10d19160379ea6573b60e6d51e6f4ba 100644 (file)
@@ -50,3 +50,5 @@ type sysfs_sswap, sysfs_type, fs_type, mlstrustedobject;
 
 ### data types
 type display_vendor_data_file, file_type, data_file_type;
+
+type mediadrm_vendor_data_file, file_type, data_file_type;
index 2fcfe4f390c1833f67c7bfeaec39be5ec0b34902..339efd7fb15a0524a85f0b30a878bc0f17b6a49b 100644 (file)
 
 /(vendor|system/vendor)/bin/hw/vendor\.lineage\.livedisplay@2\.0-service\.samsung-exynos    u:object_r:hal_lineage_livedisplay_sysfs_exec:s0
 /(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch@1\.0-service\.samsung                 u:object_r:hal_lineage_touch_default_exec:s0
-
+/(vendor|system/vendor)/bin/hw/android\.hardware\.drm@1\.3-service\.clearkey                u:object_r:hal_drm_clearkey_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.light@2\.0-service\.samsung               u:object_r:hal_light_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.1-service\.samsung u:object_r:hal_fingerprint_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.power@1\.0-service\.exynos                u:object_r:hal_power_default_exec:s0
diff --git a/sepolicy/hal_drm_clearkey.te b/sepolicy/hal_drm_clearkey.te
new file mode 100644 (file)
index 0000000..22ff18c
--- /dev/null
@@ -0,0 +1,16 @@
+# hal_drm_clearkey.te
+
+# policy for /vendor/bin/hw/android.hardware.drm clearkey service
+type hal_drm_clearkey, domain;
+type hal_drm_clearkey_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(hal_drm_clearkey)
+
+hal_server_domain(hal_drm_clearkey, hal_drm)
+
+vndbinder_use(hal_drm_clearkey);
+
+allow hal_drm_clearkey { appdomain -isolated_app }:fd use;
+
+allow hal_drm_clearkey mediadrm_vendor_data_file:dir create_dir_perms;
+allow hal_drm_clearkey mediadrm_vendor_data_file:file create_file_perms;