sepolicy_vndr: Add fan service for Anorak

Add fan service to control fan to run and stop as cooling device.

Change-Id: Ibdd81db8f34489796cfc66035b539b19b4016c91
This commit is contained in:
Minghao Zhang 2022-10-28 18:12:07 +08:00
parent 440267122c
commit c1aa3cd657
2 changed files with 12 additions and 0 deletions

9
generic/vendor/anorak/fan_service.te vendored Normal file
View file

@ -0,0 +1,9 @@
# Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause-Clear
type vendor_fan_service, domain;
type vendor_fan_service_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(vendor_fan_service)
allow vendor_fan_service vendor_shell_exec:file rx_file_perms;
allow vendor_fan_service sysfs_thermal:file rw_file_perms;

View file

@ -214,3 +214,6 @@
# VM Specific
/vendor/vm-system(/.*)? u:object_r:same_process_hal_file:s0
#fan_service
/(vendor|system/vendor)/bin/fan_service u:object_r:vendor_fan_service_exec:s0