Initial device tangorpro sepolicy

Bug: 220073297
Change-Id: Icbae09127d46c74aaa49bf417be263e62ce0c0ca
This commit is contained in:
Roger Liao 2022-03-08 23:10:42 +08:00
parent eeb18c67fd
commit aa2098ee18
12 changed files with 43 additions and 0 deletions

3
OWNERS Normal file
View file

@ -0,0 +1,3 @@
include platform/system/sepolicy:/OWNERS
rurumihong@google.com

1
bluetooth/device.te Normal file
View file

@ -0,0 +1 @@
type bt_device, dev_type;

5
bluetooth/file_contexts Normal file
View file

@ -0,0 +1,5 @@
# Bluetooth
/vendor/bin/hw/android\.hardware\.bluetooth@1\.0-service-qti u:object_r:hal_bluetooth_default_exec:s0
/dev/btpower u:object_r:bt_device:s0
/dev/ttySAC18 u:object_r:hci_attach_dev:s0

1
bluetooth/genfs_contexts Normal file
View file

@ -0,0 +1 @@
genfscon sysfs /devices/platform/odm/odm:btqcom/rfkill/rfkill0/state u:object_r:sysfs_bluetooth_writable:s0

View file

@ -0,0 +1,9 @@
allow hal_bluetooth_default bt_device:chr_file rw_file_perms;
add_hwservice(hal_bluetooth_default, hal_bluetooth_coexistence_hwservice)
userdebug_or_eng(`
allow hal_bluetooth_default sscoredump_vendor_data_crashinfo_file:dir rw_dir_perms;
allow hal_bluetooth_default sscoredump_vendor_data_crashinfo_file:file { create_file_perms };
set_prop(hal_bluetooth_default, vendor_ssrdump_prop)
')

2
bluetooth/hwservice.te Normal file
View file

@ -0,0 +1,2 @@
# Bluetooth HAL extension
type hal_bluetooth_coexistence_hwservice, hwservice_manager_type, vendor_hwservice_type;

View file

@ -0,0 +1,3 @@
# Bluetooth HAL extension
hardware.google.bluetooth.bt_channel_avoidance::IBTChannelAvoidance u:object_r:hal_bluetooth_coexistence_hwservice:s0
hardware.google.bluetooth.sar::IBluetoothSar u:object_r:hal_bluetooth_coexistence_hwservice:s0

2
tangorpro-sepolicy.mk Normal file
View file

@ -0,0 +1,2 @@
# sepolicy that are shared among devices using whitechapel
BOARD_SEPOLICY_DIRS += device/google/tangorpro-sepolicy/vendor

2
vendor/README.txt vendored Normal file
View file

@ -0,0 +1,2 @@
This folder holds sepolicy exclusively for one device. For example, genfs_contexts
paths that are affected by device tree.

2
vendor/device.te vendored Normal file
View file

@ -0,0 +1,2 @@
# Wifi
type vendor_wlan_device, dev_type;

12
vendor/file_contexts vendored Normal file
View file

@ -0,0 +1,12 @@
# Devices
/dev/lwis-act-lc898129 u:object_r:lwis_device:s0
/dev/lwis-eeprom-lc898129 u:object_r:lwis_device:s0
/dev/lwis-eeprom-m24c64x-imx712 u:object_r:lwis_device:s0
/dev/lwis-eeprom-m24c64x-imx712-uw u:object_r:lwis_device:s0
/dev/lwis-ois-lc898129 u:object_r:lwis_device:s0
/dev/lwis-sensor-imx712 u:object_r:lwis_device:s0
/dev/lwis-sensor-imx712-uw u:object_r:lwis_device:s0
/dev/lwis-sensor-imx787 u:object_r:lwis_device:s0
# Wifi
/dev/wlan u:object_r:vendor_wlan_device:s0

1
vendor/hal_wifi_ext.te vendored Normal file
View file

@ -0,0 +1 @@
allow hal_wifi_ext vendor_wlan_device:chr_file w_file_perms;