diff --git a/device-common.mk b/device-common.mk index 042e9e3..2b09c83 100644 --- a/device-common.mk +++ b/device-common.mk @@ -78,6 +78,8 @@ PRODUCT_PACKAGES += \ update_engine \ update_verifier +PRODUCT_PACKAGES += SSRestartDetector + PRODUCT_PACKAGES += \ bootctrl.msm8998 diff --git a/sepolicy/file.te b/sepolicy/file.te index 5e1f401..2cb4808 100644 --- a/sepolicy/file.te +++ b/sepolicy/file.te @@ -5,6 +5,9 @@ type sysfs_rmtfs, sysfs_type, fs_type; type sysfs_net, sysfs_type, fs_type; type sysfs_fingerprint, sysfs_type, fs_type; +type sysfs_msm_subsys, sysfs_type, fs_type; +type sysfs_msm_subsys_restart, sysfs_type, fs_type; + type qmuxd_socket, file_type; type netmgrd_socket, file_type; type thermal_socket, file_type; @@ -20,3 +23,5 @@ type persist_display_file, file_type; type persist_sensors_file, file_type; type netmgr_data_file, file_type, data_file_type; + +type ramdump_data_file, file_type, data_file_type, mlstrustedobject; diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 6055bdb..6611bc7 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -57,6 +57,7 @@ /sys/devices/soc0(/.*)? u:object_r:sysfs_soc:s0 /sys/devices/soc/caa0000\.qcom,jpeg(/.*)? u:object_r:sysfs_camera:s0 /sys/devices/soc/caa4000\.qcom,fd(/.*)? u:object_r:sysfs_camera:s0 +/sys/bus/msm_subsys(/.*)? u:object_r:sysfs_msm_subsys:s0 # files in /system /system/bin/init\.power\.sh u:object_r:init_power_exec:s0 diff --git a/sepolicy/property.te b/sepolicy/property.te index f0554bc..aadf876 100644 --- a/sepolicy/property.te +++ b/sepolicy/property.te @@ -1,2 +1,3 @@ type wc_prop, property_type; type camera_prop, property_type; +type ssr_prop, property_type; diff --git a/sepolicy/system_app.te b/sepolicy/system_app.te new file mode 100644 index 0000000..44b8dfd --- /dev/null +++ b/sepolicy/system_app.te @@ -0,0 +1,6 @@ +r_dir_file(system_app, sysfs_msm_subsys) +userdebug_or_eng(` + allow system_app ramdump_data_file:dir r_dir_perms; + allow system_app ramdump_data_file:file r_file_perms; + get_prop(system_app, ssr_prop) +')