diff --git a/universal7885-common/sepolicy/private/hal_fmradio_default.te b/universal7885-common/sepolicy/private/hal_fmradio_default.te index af5960a..f4af7b9 100644 --- a/universal7885-common/sepolicy/private/hal_fmradio_default.te +++ b/universal7885-common/sepolicy/private/hal_fmradio_default.te @@ -1,4 +1,4 @@ -type hal_fmradio_default, domain; +type hal_fmradio_default, domain, coredomain; type hal_fmradio_default_exec, exec_type, file_type, system_file_type; add_hwservice(hal_fmradio_default, hal_fmradio_hwservice); init_daemon_domain(hal_fmradio_default); diff --git a/universal7885-common/sepolicy/public/file.te b/universal7885-common/sepolicy/public/file.te index f6683ea..c5e8fd0 100644 --- a/universal7885-common/sepolicy/public/file.te +++ b/universal7885-common/sepolicy/public/file.te @@ -4,5 +4,11 @@ type zram_data_file, file_type, data_file_type, core_data_file_type; ## SYSFS -type sysfs_gpu_tmu, sysfs_type, rw_fs_type, fs_type; +type sysfs_virtual, fs_type, sysfs_type, mlstrustedobject; +type sysfs_sec_switch, sysfs_type, r_fs_type, fs_type; +type sysfs_battery, sysfs_type, r_fs_type, fs_type; +type sysfs_sec_touchscreen, sysfs_type, r_fs_type, fs_type; +type sysfs_sec_switch_writable, sysfs_type, rw_fs_type, fs_type; +type sysfs_touchscreen_writable, sysfs_type, rw_fs_type, fs_type; +type sysfs_battery_writable, sysfs_type, rw_fs_type, fs_type; type sysfs_flashlight, sysfs_type, rw_fs_type, fs_type; diff --git a/universal7885-common/sepolicy/public/genfs_contexts b/universal7885-common/sepolicy/public/genfs_contexts index 232975b..f00185f 100644 --- a/universal7885-common/sepolicy/public/genfs_contexts +++ b/universal7885-common/sepolicy/public/genfs_contexts @@ -1,4 +1,18 @@ -genfscon sysfs /devices/platform/11500000.mali/tmu u:object_r:sysfs_gpu_tmu:s0 +genfscon sysfs /devices/virtual u:object_r:sysfs_virtual:s0 genfscon sysfs /devices/virtual/camera/flash/torch_brightness_lvl u:object_r:sysfs_flashlight:s0 genfscon sysfs /devices/virtual/camera/flash/torch_brightness_lvl_enable u:object_r:sysfs_flashlight:s0 +genfscon sysfs /class/sec/tsp u:object_r:sysfs_sec_touchscreen:s0 +genfscon sysfs /devices/virtual/sec/tsp u:object_r:sysfs_sec_touchscreen:s0 +genfscon sysfs /devices/virtual/sec/tsp/cmd u:object_r:sysfs_touchscreen_writable:s0 +genfscon sysfs /devices/virtual/sec/tsp/ear_detect_enable u:object_r:sysfs_touchscreen_writable:s0 +genfscon sysfs /devices/virtual/sec/tsp/prox_power_off u:object_r:sysfs_touchscreen_writable:s0 +genfscon sysfs /devices/virtual/sec/tsp/input/enabled u:object_r:sysfs_touchscreen_writable:s0 +genfscon sysfs /devices/virtual/sec/switch u:object_r:sysfs_sec_switch:s0 +genfscon sysfs /devices/virtual/sec/switch/afc_disable u:object_r:sysfs_sec_switch_writable:s0 +genfscon sysfs /devices/platform/battery/power_supply/battery u:object_r:sysfs_battery_writable:s0 +genfscon sysfs /devices/platform/battery/power_supply/ac/type u:object_r:sysfs_battery_writable:s0 +genfscon sysfs /devices/platform/battery/power_supply/wireless/type u:object_r:sysfs_battery_writable:s0 +genfscon sysfs /devices/platform/battery/power_supply/ps/type u:object_r:sysfs_battery_writable:s0 +genfscon sysfs /devices/platform/battery/power_supply/ps/status u:object_r:sysfs_battery_writable:s0 +genfscon sysfs /devices/platform/battery/power_supply u:object_r:sysfs_battery:s0 diff --git a/universal7885-common/sepolicy/vendor/file.te b/universal7885-common/sepolicy/vendor/file.te index edf073d..dbea522 100644 --- a/universal7885-common/sepolicy/vendor/file.te +++ b/universal7885-common/sepolicy/vendor/file.te @@ -28,7 +28,6 @@ type epicd_socket, file_type, data_file_type; ### SYSFS type sysfs_argos, sysfs_type, r_fs_type, fs_type; -type sysfs_battery, sysfs_type, r_fs_type, fs_type; type sysfs_bbd, sysfs_type, r_fs_type, fs_type; type sysfs_fingerprint, sysfs_type, r_fs_type, fs_type; type sysfs_iio, sysfs_type, r_fs_type, fs_type; @@ -36,14 +35,11 @@ type sysfs_input, sysfs_type, r_fs_type, fs_type; type sysfs_sec_gps, sysfs_type, r_fs_type, fs_type; type sysfs_sec_key, sysfs_type, r_fs_type, fs_type; type sysfs_sec_sensors, sysfs_type, r_fs_type, fs_type; -type sysfs_sec_switch, sysfs_type, r_fs_type, fs_type; -type sysfs_sec_touchscreen, sysfs_type, r_fs_type, fs_type; type sysfs_sim, sysfs_type, r_fs_type, fs_type; type sysfs_sensors, sysfs_type, r_fs_type, fs_type; type sysfs_wifi, sysfs_type, r_fs_type, fs_type; type sysfs_gpu, sysfs_type, r_fs_type, fs_type; type sysfs_backlight_writable, sysfs_type, rw_fs_type, fs_type; -type sysfs_battery_writable, sysfs_type, rw_fs_type, fs_type; type sysfs_bt_writable, sysfs_type, rw_fs_type, fs_type; type sysfs_gps_writable, sysfs_type, rw_fs_type, fs_type; type sysfs_lcd_writable, sysfs_type, rw_fs_type, fs_type; @@ -53,8 +49,6 @@ type sysfs_sensorhub_writable, sysfs_type, rw_fs_type, fs_type; type sysfs_sensors_writable, sysfs_type, rw_fs_type, fs_type; type sysfs_sim_writable, sysfs_type, rw_fs_type, fs_type; type sysfs_spi_writeable, sysfs_type, rw_fs_type, fs_type; -type sysfs_sec_switch_writable, sysfs_type, rw_fs_type, fs_type; -type sysfs_touchscreen_writable, sysfs_type, rw_fs_type, fs_type; type sysfs_wifi_writable, sysfs_type, rw_fs_type, fs_type; ### VENDOR @@ -65,6 +59,7 @@ type tee_vendor_data_file, file_type, data_file_type; # DEV SOCKET type tz_socket, file_type; + ### efs types type radio_factoryapp_efs_file, file_type; type factoryprop_efs_file, file_type; @@ -110,7 +105,6 @@ type sysfs_multipdp, fs_type, sysfs_type, mlstrustedobject; type sysfs_sec, fs_type, sysfs_type, mlstrustedobject; type sysfs_gps, fs_type, sysfs_type, mlstrustedobject; type sysfs_brightness, fs_type, sysfs_type, mlstrustedobject; -type sysfs_virtual, fs_type, sysfs_type, mlstrustedobject; type sysfs_fuelgauge, fs_type, sysfs_type, mlstrustedobject; type sysfs_charger, fs_type, sysfs_type, mlstrustedobject; type sysfs_modem, fs_type, sysfs_type, mlstrustedobject; diff --git a/universal7885-common/sepolicy/vendor/genfs_contexts b/universal7885-common/sepolicy/vendor/genfs_contexts index f0dda2a..ea903a9 100644 --- a/universal7885-common/sepolicy/vendor/genfs_contexts +++ b/universal7885-common/sepolicy/vendor/genfs_contexts @@ -15,7 +15,6 @@ genfscon sysfs /class/power_supply u:obje genfscon sysfs /class/rtc/rtc0 u:object_r:sysfs_rtc:s0 genfscon sysfs /class/sec/gps u:object_r:sysfs_sec_gps:s0 genfscon sysfs /class/sec/sensors u:object_r:sysfs_sec_sensors:s0 -genfscon sysfs /class/sec/tsp u:object_r:sysfs_sec_touchscreen:s0 genfscon sysfs /class/sensor_event u:object_r:sysfs_sensors:s0 genfscon sysfs /class/sensors u:object_r:sysfs_sensors:s0 genfscon sysfs /class/thermal u:object_r:sysfs_thermal:s0 @@ -23,8 +22,6 @@ genfscon sysfs /class/timed_output/vibrator/intensity u:obje genfscon sysfs /class/timed_output/vibrator/multi_freq u:object_r:sysfs_vibrator:s0 genfscon sysfs /devices/platform/argos u:object_r:sysfs_argos:s0 -genfscon sysfs /devices/platform/battery/power_supply u:object_r:sysfs_battery:s0 -genfscon sysfs /devices/platform/battery/power_supply/battery/lcd u:object_r:sysfs_battery_writable:s0 genfscon sysfs /devices/platform/panel@0/backlight/panel/brightness u:object_r:sysfs_backlight_writable:s0 genfscon sysfs /devices/platform/panel@0/backlight/panel/max_brightness u:object_r:sysfs_backlight_writable:s0 genfscon sysfs /devices/platform/panel@0/lcd/panel u:object_r:sysfs_lcd_writable:s0 @@ -34,18 +31,11 @@ genfscon sysfs /devices/virtual/input u:obje genfscon sysfs /devices/virtual/lcd/panel u:object_r:sysfs_lcd_writable:s0 genfscon sysfs /devices/virtual/sec/gps u:object_r:sysfs_sec_gps:s0 genfscon sysfs /devices/virtual/sec/sec_key u:object_r:sysfs_sec_key:s0 -genfscon sysfs /devices/virtual/sec/tsp u:object_r:sysfs_sec_touchscreen:s0 -genfscon sysfs /devices/virtual/sec/tsp/cmd u:object_r:sysfs_touchscreen_writable:s0 -genfscon sysfs /devices/virtual/sec/tsp/ear_detect_enable u:object_r:sysfs_touchscreen_writable:s0 -genfscon sysfs /devices/virtual/sec/tsp/prox_power_off u:object_r:sysfs_touchscreen_writable:s0 -genfscon sysfs /devices/virtual/sec/tsp/input/enabled u:object_r:sysfs_touchscreen_writable:s0 genfscon sysfs /devices/virtual/sensor_event u:object_r:sysfs_sensors:s0 genfscon sysfs /devices/virtual/sensors u:object_r:sysfs_sensors:s0 genfscon sysfs /devices/virtual/sensors/hidden_hole/hh_check_coef u:object_r:sysfs_sensors_writable:s0 genfscon sysfs /devices/virtual/sensors/ssp_sensor/enable u:object_r:sysfs_sensors_writable:s0 genfscon sysfs /devices/virtual/sensors/ssp_sensor/ssp_flush u:object_r:sysfs_sensors_writable:s0 -genfscon sysfs /devices/virtual/sec/switch u:object_r:sysfs_sec_switch:s0 -genfscon sysfs /devices/virtual/sec/switch/afc_disable u:object_r:sysfs_sec_switch_writable:s0 genfscon sysfs /devices/virtual/thermal u:object_r:sysfs_thermal:s0 genfscon sysfs /devices/virtual/timed_output/vibrator/cp_trigger_index u:object_r:sysfs_vibrator:s0 genfscon sysfs /devices/virtual/timed_output/vibrator/intensity u:object_r:sysfs_vibrator:s0 @@ -88,7 +78,7 @@ genfscon sysfs /class/backlight/panel/max_brightness genfscon sysfs /class/power_supply/battery/ u:object_r:sysfs_battery_info:s0 # devices -genfscon sysfs /devices/virtual u:object_r:sysfs_virtual:s0 + genfscon sysfs /devices/virtual/misc/multipdp u:object_r:sysfs_multipdp:s0 genfscon sysfs /devices/virtual/sensors/sensor_dev/flush u:object_r:sysfs_sensor_writable:s0 genfscon sysfs /devices/virtual/input/input1/enable u:object_r:sysfs_input_writable:s0 @@ -154,14 +144,6 @@ genfscon sysfs /devices/soc0/machine genfscon sysfs /devices/soc0/revision u:object_r:sysfs_sec_gps:s0 genfscon sysfs /devices/virtual/block/zram0/mm_stat u:object_r:sysfs_zram:s0 genfscon sysfs /devices/system/chip-id/revision u:object_r:sysfs_ss_writable:s0 -genfscon sysfs /devices/platform/battery/power_supply/battery u:object_r:sysfs_battery_writable:s0 -genfscon sysfs /devices/platform/battery/power_supply/battery/batt_capacity_max u:object_r:sysfs_battery_writable:s0 -genfscon sysfs /devices/platform/battery/power_supply/battery/status u:object_r:sysfs_battery_writable:s0 -genfscon sysfs /devices/platform/battery/power_supply/battery/type u:object_r:sysfs_battery_writable:s0 -genfscon sysfs /devices/platform/battery/power_supply/ac/type u:object_r:sysfs_battery_writable:s0 -genfscon sysfs /devices/platform/battery/power_supply/wireless/type u:object_r:sysfs_battery_writable:s0 -genfscon sysfs /devices/platform/battery/power_supply/ps/type u:object_r:sysfs_battery_writable:s0 -genfscon sysfs /devices/platform/battery/power_supply/ps/status u:object_r:sysfs_battery_writable:s0 # S2MU005 CHARGER (A10) genfscon sysfs /devices/platform/13840000.i2c/i2c-9/9-003d/s2mu004-charger/power_supply/s2mu004-charger u:object_r:sysfs_charger:s0