sepolicy_vndr: Allow system app accesses QDSS sysfs nodes

Change-Id: I2a62d152c64a340ce0a59ff3c74f19dfd25ec378
CRs-Fixed: 2980864
diff --git a/generic/vendor/common/device.te b/generic/vendor/common/device.te
index 321febd..6b86582 100644
--- a/generic/vendor/common/device.te
+++ b/generic/vendor/common/device.te
@@ -100,3 +100,4 @@
 type vendor_qce_device, dev_type;
 type vendor_npu_device, dev_type;
 type vendor_qmcs_block_device, dev_type;
+type vendor_qdss_device, dev_type;
diff --git a/generic/vendor/common/file_contexts b/generic/vendor/common/file_contexts
index 23d9d72..a0ad68b 100755
--- a/generic/vendor/common/file_contexts
+++ b/generic/vendor/common/file_contexts
@@ -77,6 +77,7 @@
 /dev/synx_device                                u:object_r:vendor_synx_device:s0
 /dev/ipa_odl_ctl                                u:object_r:vendor_ipa_dev:s0
 /dev/ipa_adpl                                   u:object_r:vendor_ipa_dev:s0
+/dev/byte-cntr                                  u:object_r:vendor_qdss_device:s0
 
 # dev socket nodes
 /dev/socket/chre                                u:object_r:vendor_chre_socket:s0
diff --git a/generic/vendor/test/system_app.te b/generic/vendor/test/system_app.te
index 55d4ecf..d794b34 100755
--- a/generic/vendor/test/system_app.te
+++ b/generic/vendor/test/system_app.te
@@ -39,4 +39,8 @@
   diag_use(system_app)
   hal_client_domain(system_app, vendor_hal_diaghal)
   hal_client_domain(system_app, hal_allocator)
+
+  allow system_app vendor_sysfs_qdss_dev:dir r_dir_perms;
+  allow system_app vendor_sysfs_qdss_dev:file rw_file_perms;
+  allow system_app vendor_qdss_device:chr_file rw_file_perms;
 ')