From ffc779eaa89bbc7123a7fbe503c392320e2f9256 Mon Sep 17 00:00:00 2001 From: Adam Shih Date: Mon, 30 Aug 2021 14:02:30 +0800 Subject: [PATCH] review chre Bug: 198109521 Test: boot with chre started Change-Id: Ibca6cc3ca0049a412d36e433cb5dcb3363d60527 --- legacy/file.te | 3 --- legacy/file_contexts | 2 -- {legacy => whitechapel_pro}/chre.te | 0 whitechapel_pro/file.te | 3 +++ whitechapel_pro/file_contexts | 2 ++ {legacy => whitechapel_pro}/hal_contexthub.te | 0 6 files changed, 5 insertions(+), 5 deletions(-) rename {legacy => whitechapel_pro}/chre.te (100%) rename {legacy => whitechapel_pro}/hal_contexthub.te (100%) diff --git a/legacy/file.te b/legacy/file.te index 3a19a94a..de51ba8b 100644 --- a/legacy/file.te +++ b/legacy/file.te @@ -51,9 +51,6 @@ type sysfs_nanoapp_cmd, sysfs_type, fs_type; # Fingerprint type sysfs_fingerprint, sysfs_type, fs_type; -# CHRE -type chre_socket, file_type; - # IOMMU type sysfs_iommu, sysfs_type, fs_type; diff --git a/legacy/file_contexts b/legacy/file_contexts index 7e8c5d11..1bfcc884 100644 --- a/legacy/file_contexts +++ b/legacy/file_contexts @@ -204,8 +204,6 @@ # Contexthub /vendor/bin/hw/android\.hardware\.contexthub@1\.2-service\.generic u:object_r:hal_contexthub_default_exec:s0 -/(vendor|system/vendor)/bin/chre u:object_r:chre_exec:s0 -/dev/socket/chre u:object_r:chre_socket:s0 # TCP logging /vendor/bin/tcpdump_logger u:object_r:tcpdump_logger_exec:s0 diff --git a/legacy/chre.te b/whitechapel_pro/chre.te similarity index 100% rename from legacy/chre.te rename to whitechapel_pro/chre.te diff --git a/whitechapel_pro/file.te b/whitechapel_pro/file.te index d7103146..308bc247 100644 --- a/whitechapel_pro/file.te +++ b/whitechapel_pro/file.te @@ -16,3 +16,6 @@ type sysfs_chosen, sysfs_type, fs_type; type modem_img_file, contextmount_type, file_type, vendor_file_type; allow modem_img_file self:filesystem associate; +# CHRE +type chre_socket, file_type; + diff --git a/whitechapel_pro/file_contexts b/whitechapel_pro/file_contexts index b584a425..f503b4ae 100644 --- a/whitechapel_pro/file_contexts +++ b/whitechapel_pro/file_contexts @@ -3,6 +3,7 @@ /vendor/bin/modem_logging_control u:object_r:modem_logging_control_exec:s0 /vendor/bin/sced u:object_r:sced_exec:s0 /vendor/bin/vcd u:object_r:vcd_exec:s0 +/vendor/bin/chre u:object_r:chre_exec:s0 # Vendor Firmwares /vendor/firmware(/.*)? u:object_r:vendor_fw_file:s0 @@ -16,6 +17,7 @@ /dev/umts_rfs0 u:object_r:radio_device:s0 /dev/umts_dm0 u:object_r:radio_device:s0 /dev/umts_router u:object_r:radio_device:s0 +/dev/socket/chre u:object_r:chre_socket:s0 # Data /data/vendor/slog(/.*)? u:object_r:vendor_slog_file:s0 diff --git a/legacy/hal_contexthub.te b/whitechapel_pro/hal_contexthub.te similarity index 100% rename from legacy/hal_contexthub.te rename to whitechapel_pro/hal_contexthub.te