diff --git a/legacy/aocd.te b/aoc/aocd.te similarity index 100% rename from legacy/aocd.te rename to aoc/aocd.te diff --git a/aoc/device.te b/aoc/device.te new file mode 100644 index 00000000..bf9afb58 --- /dev/null +++ b/aoc/device.te @@ -0,0 +1,2 @@ +# AOC device +type aoc_device, dev_type; diff --git a/aoc/file.te b/aoc/file.te new file mode 100644 index 00000000..67f3e945 --- /dev/null +++ b/aoc/file.te @@ -0,0 +1,8 @@ +# sysfs +type sysfs_aoc_boottime, sysfs_type, fs_type; +type sysfs_aoc_firmware, sysfs_type, fs_type; +type sysfs_aoc, sysfs_type, fs_type; +type sysfs_aoc_reset, sysfs_type, fs_type; + +# persist +type persist_aoc_file, file_type, vendor_persist_type; diff --git a/aoc/file_contexts b/aoc/file_contexts new file mode 100644 index 00000000..6a4dea33 --- /dev/null +++ b/aoc/file_contexts @@ -0,0 +1,24 @@ +# AoC devices +/dev/acd-audio_output_tuning u:object_r:aoc_device:s0 +/dev/acd-audio_bulk_tx u:object_r:aoc_device:s0 +/dev/acd-audio_bulk_rx u:object_r:aoc_device:s0 +/dev/acd-audio_input_tuning u:object_r:aoc_device:s0 +/dev/acd-audio_input_bulk_tx u:object_r:aoc_device:s0 +/dev/acd-audio_input_bulk_rx u:object_r:aoc_device:s0 +/dev/acd-sound_trigger u:object_r:aoc_device:s0 +/dev/acd-hotword_notification u:object_r:aoc_device:s0 +/dev/acd-hotword_pcm u:object_r:aoc_device:s0 +/dev/acd-ambient_pcm u:object_r:aoc_device:s0 +/dev/acd-model_data u:object_r:aoc_device:s0 +/dev/acd-debug u:object_r:aoc_device:s0 +/dev/acd-audio_tap[0-9]* u:object_r:aoc_device:s0 +/dev/acd-audio_dcdoff_ref u:object_r:aoc_device:s0 +/dev/acd-com.google.usf u:object_r:aoc_device:s0 +/dev/acd-logging u:object_r:aoc_device:s0 +/dev/aoc u:object_r:aoc_device:s0 + +# AoC vendor binaries +/vendor/bin/aocd u:object_r:aocd_exec:s0 + +# Aoc persist files +/mnt/vendor/persist/aoc(/.*)? u:object_r:persist_aoc_file:s0 diff --git a/aoc/genfs_contexts b/aoc/genfs_contexts new file mode 100644 index 00000000..0ddd61d5 --- /dev/null +++ b/aoc/genfs_contexts @@ -0,0 +1,5 @@ +# AOC +genfscon sysfs /devices/platform/19000000.aoc/aoc_clock_and_kernel_boottime u:object_r:sysfs_aoc_boottime:s0 +genfscon sysfs /devices/platform/19000000.aoc/firmware u:object_r:sysfs_aoc_firmware:s0 +genfscon sysfs /devices/platform/19000000.aoc u:object_r:sysfs_aoc:s0 +genfscon sysfs /devices/platform/19000000.aoc/reset u:object_r:sysfs_aoc_reset:s0 diff --git a/aoc/property.te b/aoc/property.te new file mode 100644 index 00000000..e6f9ddba --- /dev/null +++ b/aoc/property.te @@ -0,0 +1,2 @@ +# AoC +vendor_internal_prop(vendor_aoc_prop) diff --git a/aoc/property_contexts b/aoc/property_contexts new file mode 100644 index 00000000..08388735 --- /dev/null +++ b/aoc/property_contexts @@ -0,0 +1,2 @@ +# AoC +vendor.aoc.firmware.version u:object_r:vendor_aoc_prop:s0 diff --git a/legacy/device.te b/legacy/device.te index 55205990..5a2f4794 100644 --- a/legacy/device.te +++ b/legacy/device.te @@ -46,9 +46,6 @@ type vframe_heap_device, dmabuf_heap_device_type, dev_type; #vscaler-secure DMA-BUF heap type vscaler_heap_device, dmabuf_heap_device_type, dev_type; -# AOC device -type aoc_device, dev_type; - # Fingerprint device type fingerprint_device, dev_type; diff --git a/legacy/file.te b/legacy/file.te index 17c8c0bb..72311d99 100644 --- a/legacy/file.te +++ b/legacy/file.te @@ -83,15 +83,8 @@ type per_boot_file, file_type, data_file_type, core_data_file_type; type proc_touch, proc_type, fs_type, mlstrustedobject; type sysfs_touch, sysfs_type, fs_type; -# AOC -type sysfs_aoc_boottime, sysfs_type, fs_type; -type sysfs_aoc_firmware, sysfs_type, fs_type; -type sysfs_aoc, sysfs_type, fs_type; -type sysfs_aoc_reset, sysfs_type, fs_type; - # Audio type persist_audio_file, file_type, vendor_persist_type; -type persist_aoc_file, file_type, vendor_persist_type; type audio_vendor_data_file, file_type, data_file_type; type aoc_audio_file, file_type, vendor_file_type; diff --git a/legacy/file_contexts b/legacy/file_contexts index 7c759729..9adb249b 100644 --- a/legacy/file_contexts +++ b/legacy/file_contexts @@ -216,9 +216,6 @@ # Sensors /data/vendor/sensor(/.*)? u:object_r:sensor_vendor_data_file:s0 -/dev/acd-com.google.usf u:object_r:aoc_device:s0 -/dev/acd-logging u:object_r:aoc_device:s0 -/dev/aoc u:object_r:aoc_device:s0 # Contexthub /vendor/bin/hw/android\.hardware\.contexthub@1\.2-service\.generic u:object_r:hal_contexthub_default_exec:s0 @@ -267,24 +264,9 @@ /dev/logbuffer_tty16 u:object_r:logbuffer_device:s0 # Audio -/mnt/vendor/persist/aoc(/.*)? u:object_r:persist_aoc_file:s0 /mnt/vendor/persist/audio(/.*)? u:object_r:persist_audio_file:s0 /data/vendor/audio(/.*)? u:object_r:audio_vendor_data_file:s0 /vendor/etc/aoc(/.*)? u:object_r:aoc_audio_file:s0 -/dev/acd-audio_output_tuning u:object_r:aoc_device:s0 -/dev/acd-audio_bulk_tx u:object_r:aoc_device:s0 -/dev/acd-audio_bulk_rx u:object_r:aoc_device:s0 -/dev/acd-audio_input_tuning u:object_r:aoc_device:s0 -/dev/acd-audio_input_bulk_tx u:object_r:aoc_device:s0 -/dev/acd-audio_input_bulk_rx u:object_r:aoc_device:s0 -/dev/acd-sound_trigger u:object_r:aoc_device:s0 -/dev/acd-hotword_notification u:object_r:aoc_device:s0 -/dev/acd-hotword_pcm u:object_r:aoc_device:s0 -/dev/acd-ambient_pcm u:object_r:aoc_device:s0 -/dev/acd-model_data u:object_r:aoc_device:s0 -/dev/acd-debug u:object_r:aoc_device:s0 -/dev/acd-audio_tap[0-9]* u:object_r:aoc_device:s0 -/dev/acd-audio_dcdoff_ref u:object_r:aoc_device:s0 /dev/amcs u:object_r:amcs_device:s0 # AudioMetric @@ -307,9 +289,6 @@ # Battery /mnt/vendor/persist/battery(/.*)? u:object_r:persist_battery_file:s0 -# AoC file contexts. -/vendor/bin/aocd u:object_r:aocd_exec:s0 - # NeuralNetworks file contexts /vendor/bin/hw/android\.hardware\.neuralnetworks@1\.3-service-armnn u:object_r:hal_neuralnetworks_armnn_exec:s0 diff --git a/legacy/genfs_contexts b/legacy/genfs_contexts index b15a6288..461ada53 100644 --- a/legacy/genfs_contexts +++ b/legacy/genfs_contexts @@ -1,9 +1,3 @@ -# AOC -genfscon sysfs /devices/platform/19000000.aoc/aoc_clock_and_kernel_boottime u:object_r:sysfs_aoc_boottime:s0 -genfscon sysfs /devices/platform/19000000.aoc/firmware u:object_r:sysfs_aoc_firmware:s0 -genfscon sysfs /devices/platform/19000000.aoc u:object_r:sysfs_aoc:s0 -genfscon sysfs /devices/platform/19000000.aoc/reset u:object_r:sysfs_aoc_reset:s0 - # WiFi genfscon sysfs /wifi u:object_r:sysfs_wifi:s0 # Battery diff --git a/legacy/property.te b/legacy/property.te index 80976174..ff408785 100644 --- a/legacy/property.te +++ b/legacy/property.te @@ -25,9 +25,6 @@ vendor_internal_prop(vendor_battery_defender_prop) # Battery profile for harness mode vendor_internal_prop(vendor_battery_profile_prop) -# AoC -vendor_internal_prop(vendor_aoc_prop) - # Logger vendor_internal_prop(vendor_logger_prop) diff --git a/legacy/property_contexts b/legacy/property_contexts index 8db6f7d7..d0da2cc2 100644 --- a/legacy/property_contexts +++ b/legacy/property_contexts @@ -65,9 +65,6 @@ vendor.battery.defender. u:object_r:vendor_battery_defend # test battery profile persist.vendor.testing_battery_profile u:object_r:vendor_battery_profile_prop:s0 -# AoC -vendor.aoc.firmware.version u:object_r:vendor_aoc_prop:s0 - # WiFi vendor.wlan.driver.version u:object_r:vendor_wifi_version:s0 vendor.wlan.firmware.version u:object_r:vendor_wifi_version:s0