summaryrefslogtreecommitdiff
authorLiang Ji <liang.ji@amlogic.com>2020-02-26 09:29:15 (GMT)
committer Liang Ji <liang.ji@amlogic.com>2020-02-26 09:29:15 (GMT)
commite7b6921dc020eb28f4d9bc5a388efc96b12472ad (patch)
tree6371388462182c4982548b649f9d6f419b6c9c7c
parentce9d9110130e0618b63ccef5de3d58bfe671dad7 (diff)
downloadcommon-e7b6921dc020eb28f4d9bc5a388efc96b12472ad.zip
common-e7b6921dc020eb28f4d9bc5a388efc96b12472ad.tar.gz
common-e7b6921dc020eb28f4d9bc5a388efc96b12472ad.tar.bz2
Revert "Revert "Revert "a2dp: add hal_audio_amlogic for permission to communicate to bt stack [1/3]"""
This reverts commit ce9d9110130e0618b63ccef5de3d58bfe671dad7. the commit 0d6f8838 is a temporarily unblock the dogfooders for A2DP testing. and we don't need this CL
Diffstat
-rwxr-xr-xsepolicy/file_contexts1
-rw-r--r--sepolicy/hal_audio_amlogic.te61
-rwxr-xr-xsepolicy/hal_audio_default.te49
3 files changed, 49 insertions, 62 deletions
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index b6092b1..138f7b8 100755
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -308,7 +308,6 @@
/vendor/bin/hw/android\.hardware\.power\.stats@1\.0-service\.mock u:object_r:hal_power_stats_default_exec:s0
/vendor/bin/hw/android\.hardware\.graphics\.composer@2\.3-service\.droidlogic u:object_r:hal_graphics_composer_default_exec:s0
/vendor/bin/hw/android\.hardware\.thermal@2\.0-service.droidlogic u:object_r:hal_thermal_default_exec:s0
-/vendor/bin/hw/android\.hardware\.audio@2\.0-service u:object_r:hal_audio_amlogic_exec:s0
/data/vendor/mediadrm(/.*)? u:object_r:hal_drm_data:s0
diff --git a/sepolicy/hal_audio_amlogic.te b/sepolicy/hal_audio_amlogic.te
deleted file mode 100644
index 3b66752..0000000
--- a/sepolicy/hal_audio_amlogic.te
+++ b/dev/null
@@ -1,61 +0,0 @@
-#########################################
-# sepolicy rules for hal_audio_amlogic
-#########################################
-type hal_audio_amlogic, domain, socket_between_core_and_vendor_violators;
-hal_server_domain(hal_audio_amlogic, hal_audio)
-
-type hal_audio_amlogic_exec, exec_type, vendor_file_type, file_type;
-init_daemon_domain(hal_audio_amlogic)
-
-hal_client_domain(hal_audio_amlogic, hal_allocator)
-
-# allow audioserver to call hal_audio dump with its own fd to retrieve status
-allow hal_audio_amlogic audioserver:fifo_file write;
-
-allow hal_audio_amlogic sysfs_audio_cap:file { read open };
-allow hal_audio_amlogic sysfs_digital_codec:file { write read open };
-allow hal_audio_amlogic sysfs_amhdmitx:dir search;
-allow hal_audio_amlogic kernel:system { module_request };
-allow hal_audio_amlogic media_prop:file { read open getattr };
-allow hal_audio_amlogic media_prop:property_service { set };
-allow hal_audio_amlogic shell_data_file:file { read write };
-allow hal_audio_amlogic sysfs_xbmc:file { read open write };
-allow hal_audio_amlogic hidraw_device:chr_file { create read write open ioctl};
-allow hal_audio_amlogic property_socket:sock_file { write };
-allow hal_audio_amlogic init:unix_stream_socket { connectto };
-allow hal_audio_amlogic sysfs_video:file { read open };
-allow hal_audio_amlogic sysfs_video:dir search;
-#--------------------------------------------------------------------#
-# product_shipping_api_level=28
-#--------------------------------------------------------------------#
-get_prop(hal_audio_amlogic, vendor_platform_prop)
-
-allow hal_audio_amlogic sysfs_aud_output_chs:file { open read write };
-allow hal_audio_amlogic sysfs_aud_output_chs:file { read write open };
-allow hal_audio_amlogic remotecontrol_hwservice:hwservice_manager find;
-allow hal_audio_amlogic sysfs:file { open read write };
-allow hal_audio_amlogic sysfs_extcon:dir { search };
-allow hal_audio_amlogic uio_device:chr_file { open read write };
-allow hal_audio_amlogic system_app:binder call;
-allow hal_audio_amlogic tv_prop:file { read getattr open };
-allow hal_audio_amlogic hidraw_audio_device:chr_file { create read write open ioctl};
-allow hal_audio_amlogic device:dir {read open};
-allow hal_audio_amlogic btmic_data_file:dir {write read open add_name search};
-allow hal_audio_amlogic btmic_data_file:file {write open create};
-#[SEI-zhaopf-2018-12-18]add for hbg remote {
-allow hal_audio_amlogic sysfs:dir { open read };
-allow hal_audio_amlogic vendor_data_file:dir { add_name remove_name write };
-allow hal_audio_amlogic vendor_data_file:lnk_file { read };
-allow hal_audio_amlogic vendor_data_file:file { create read open setattr unlink};
-allow hal_audio_amlogic dvb_device:chr_file { open read write ioctl };
-allow hal_audio_amlogic frontend_device:chr_file { open read write ioctl };
-allow hal_audio_amlogic codec_device:chr_file { read write open ioctl };
-#allow hal_audio_amlogic hidraw_audio_device:chr_file { create read write open ioctl};
-#allow hal_audio_amlogic device:dir{ read };
-#allow hal_audio_amlogic default_prop:file{ read };
-#[SEI-zhaopf-2018-12-18]add for hbg remote }
-allow hal_audio_amlogic sysfs_astream:file { open read };
-allow hal_audio_amlogic sysfs_astream:dir { search };
-allow hal_audio_amlogic sysfs_audio:file { read write open };
-allow hal_audio_amlogic bluetooth:unix_stream_socket connectto;
-allow hal_audio_amlogic self:netlink_kobject_uevent_socket { create bind setopt read };
diff --git a/sepolicy/hal_audio_default.te b/sepolicy/hal_audio_default.te
new file mode 100755
index 0000000..5d7bc6e
--- a/dev/null
+++ b/sepolicy/hal_audio_default.te
@@ -0,0 +1,49 @@
+#########################################
+# sepolicy rules for hal_audio_default
+#########################################
+allow hal_audio_default sysfs_audio_cap:file { read open };
+allow hal_audio_default sysfs_digital_codec:file { write read open };
+allow hal_audio_default sysfs_amhdmitx:dir search;
+allow hal_audio_default kernel:system { module_request };
+allow hal_audio_default media_prop:file { read open getattr };
+allow hal_audio_default media_prop:property_service { set };
+allow hal_audio_default shell_data_file:file { read write };
+allow hal_audio_default sysfs_xbmc:file { read open write };
+allow hal_audio_default hidraw_device:chr_file { create read write open ioctl};
+allow hal_audio_default property_socket:sock_file { write };
+allow hal_audio_default init:unix_stream_socket { connectto };
+allow hal_audio_default sysfs_video:file { read open };
+allow hal_audio_default sysfs_video:dir search;
+
+#--------------------------------------------------------------------#
+# product_shipping_api_level=28
+#--------------------------------------------------------------------#
+get_prop(hal_audio_default, vendor_platform_prop)
+
+allow hal_audio_default sysfs_aud_output_chs:file { open read write };
+allow hal_audio_default sysfs_aud_output_chs:file { read write open };
+allow hal_audio_default remotecontrol_hwservice:hwservice_manager find;
+allow hal_audio_default sysfs:file { open read write };
+allow hal_audio_default sysfs_extcon:dir { search };
+allow hal_audio_default uio_device:chr_file { open read write };
+allow hal_audio_default system_app:binder call;
+allow hal_audio_default tv_prop:file { read getattr open };
+allow hal_audio_default hidraw_audio_device:chr_file { create read write open ioctl};
+allow hal_audio_default device:dir {read open};
+allow hal_audio_default btmic_data_file:dir {write read open add_name search};
+allow hal_audio_default btmic_data_file:file {write open create};
+#[SEI-zhaopf-2018-12-18]add for hbg remote {
+allow hal_audio_default sysfs:dir { open read };
+allow hal_audio_default vendor_data_file:dir { add_name remove_name write };
+allow hal_audio_default vendor_data_file:lnk_file { read };
+allow hal_audio_default vendor_data_file:file { create read open setattr unlink};
+allow hal_audio_default dvb_device:chr_file { open read write ioctl };
+allow hal_audio_default frontend_device:chr_file { open read write ioctl };
+allow hal_audio_default codec_device:chr_file { read write open ioctl };
+#allow hal_audio_default hidraw_audio_device:chr_file { create read write open ioctl};
+#allow hal_audio_default device:dir{ read };
+#allow hal_audio_default default_prop:file{ read };
+#[SEI-zhaopf-2018-12-18]add for hbg remote }
+allow hal_audio_default sysfs_astream:file { open read };
+allow hal_audio_default sysfs_astream:dir { search };
+allow hal_audio_default sysfs_audio:file { read write open };