sepolicy for usb hal
Bug: 31015010
cherry-pick from b6e4d4bdf12e8a61414596d3d23c5016ae0d6477
Test: checked for selinux denial msgs in the dmesg logs.
Change-Id: I8285ea05162ea0d75459e873e5c2bad2dbc7e5ba
diff --git a/private/file_contexts b/private/file_contexts
index 95b2782..31b7076 100644
--- a/private/file_contexts
+++ b/private/file_contexts
@@ -259,6 +259,7 @@
/system/bin/hw/android\.hardware\.power@1\.0-service u:object_r:hal_power_default_exec:s0
/system/bin/hw/android\.hardware\.sensors@1\.0-service u:object_r:hal_sensors_default_exec:s0
/system/bin/hw/android\.hardware\.thermal@1\.0-service u:object_r:hal_thermal_default_exec:s0
+/system/bin/hw/android\.hardware\.usb@1\.0-service u:object_r:hal_usb_default_exec:s0
/system/bin/hw/android\.hardware\.vibrator@1\.0-service u:object_r:hal_vibrator_default_exec:s0
/system/bin/hw/android\.hardware\.vr@1\.0-service u:object_r:hal_vr_default_exec:s0
/system/bin/hw/android\.hardware\.wifi@1\.0-service u:object_r:hal_wifi_default_exec:s0
diff --git a/private/hal_usb_default.te b/private/hal_usb_default.te
new file mode 100644
index 0000000..24017f9
--- /dev/null
+++ b/private/hal_usb_default.te
@@ -0,0 +1,4 @@
+type hal_usb_default, domain;
+hal_impl_domain(hal_usb_default, hal_usb)
+type hal_usb_default_exec, exec_type, file_type;
+init_daemon_domain(hal_usb_default)