summaryrefslogtreecommitdiff
path: root/sepolicy
diff options
context:
space:
mode:
Diffstat (limited to 'sepolicy')
-rw-r--r--sepolicy/file_contexts5
-rw-r--r--sepolicy/tfa_amp.te8
2 files changed, 11 insertions, 2 deletions
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 79a08ec..ecc8452 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -1,8 +1,9 @@
# NFC
-/dev/pn547 u:object_r:nfc_device:s0
+/dev/pn547 u:object_r:nfc_device:s0
# Audio
-/dev/tfa98xx u:object_r:audio_device:s0
+/dev/tfa98xx u:object_r:audio_device:s0
+/system/bin/tfa9890_amp u:object_r:tfa_amp_exec:s0
# Modem
/system/bin/mlog_qmi_service u:object_r:mlog_qmi_exec:s0
diff --git a/sepolicy/tfa_amp.te b/sepolicy/tfa_amp.te
new file mode 100644
index 0000000..9191e40
--- /dev/null
+++ b/sepolicy/tfa_amp.te
@@ -0,0 +1,8 @@
+type tfa_amp, domain;
+type tfa_amp_exec, exec_type, file_type;
+
+# Started by init
+init_daemon_domain(tfa_amp)
+
+# Access to /dev/tfa98xx
+allow tfa_amp audio_device:chr_file rw_file_perms;