Merge "WLC: Cleanup the sysfs_wlc policies"

This commit is contained in:
Ken Yang 2023-01-13 14:41:32 +00:00 committed by Android (Google) Code Review
commit c4d610a86b
8 changed files with 16 additions and 11 deletions

3
vendor/file.te vendored
View file

@ -12,3 +12,6 @@ type sysfs_trusty, sysfs_type, fs_type;
# mount FS
allow proc_vendor_sched proc:filesystem associate;
allow bootdevice_sysdev sysfs:filesystem associate;
# WLC
type sysfs_wlc, sysfs_type, fs_type;

10
vendor/genfs_contexts vendored
View file

@ -89,16 +89,6 @@ genfscon sysfs /devices/platform/13120000.pcie/power_stats u:objec
genfscon sysfs /devices/platform/cpif/modem/power_stats u:object_r:sysfs_power_stats:s0
# Battery
genfscon sysfs /devices/platform/10c90000.hsi2c/i2c-0/0-003c u:object_r:sysfs_wlc:s0
genfscon sysfs /devices/platform/10c90000.hsi2c/i2c-1/1-003c u:object_r:sysfs_wlc:s0
genfscon sysfs /devices/platform/10c90000.hsi2c/i2c-2/2-003c u:object_r:sysfs_wlc:s0
genfscon sysfs /devices/platform/10c90000.hsi2c/i2c-3/3-003c u:object_r:sysfs_wlc:s0
genfscon sysfs /devices/platform/10c90000.hsi2c/i2c-4/4-003c u:object_r:sysfs_wlc:s0
genfscon sysfs /devices/platform/10c90000.hsi2c/i2c-5/5-003c u:object_r:sysfs_wlc:s0
genfscon sysfs /devices/platform/10c90000.hsi2c/i2c-6/6-003c u:object_r:sysfs_wlc:s0
genfscon sysfs /devices/platform/10c90000.hsi2c/i2c-7/7-003c u:object_r:sysfs_wlc:s0
genfscon sysfs /devices/platform/10c90000.hsi2c/i2c-8/8-003c u:object_r:sysfs_wlc:s0
genfscon sysfs /devices/platform/10c90000.hsi2c/i2c-9/9-003c u:object_r:sysfs_wlc:s0
genfscon sysfs /devices/platform/google,battery/power_supply/battery u:object_r:sysfs_batteryinfo:s0
genfscon sysfs /devices/platform/google,cpm u:object_r:sysfs_batteryinfo:s0
genfscon sysfs /devices/platform/google,charger u:object_r:sysfs_batteryinfo:s0

View file

@ -11,5 +11,4 @@ allow hal_health_default fwk_stats_service:service_manager find;
allow hal_health_default sysfs_scsi_devices_0000:dir r_dir_perms;
allow hal_health_default sysfs_scsi_devices_0000:file rw_file_perms;
allow hal_health_default sysfs_wlc:dir search;
allow hal_health_default sysfs_batteryinfo:file w_file_perms;

2
vendor/hal_wireless_charger.te vendored Normal file
View file

@ -0,0 +1,2 @@
type hal_wireless_charger, domain;
type hal_wireless_charger_exec, exec_type, vendor_file_type, file_type;

3
vendor/platform_app.te vendored Normal file
View file

@ -0,0 +1,3 @@
# WLC
allow platform_app hal_wireless_charger_service:service_manager find;
binder_call(platform_app, hal_wireless_charger)

3
vendor/service.te vendored
View file

@ -1 +1,4 @@
type hal_pixel_display_service, service_manager_type, hal_service_type;
# WLC
type hal_wireless_charger_service, hal_service_type, protected_service, service_manager_type;

View file

@ -1 +1,3 @@
com.google.hardware.pixel.display.IDisplay/default u:object_r:hal_pixel_display_service:s0
vendor.google.wireless_charger.IWirelessCharger/default u:object_r:hal_wireless_charger_service:s0

3
vendor/system_app.te vendored Normal file
View file

@ -0,0 +1,3 @@
# WLC
allow system_app hal_wireless_charger_service:service_manager find;
binder_call(system_app, hal_wireless_charger)