diff --git a/sepolicy/public/te_macros b/sepolicy/public/te_macros new file mode 100644 index 00000000..701ef555 --- /dev/null +++ b/sepolicy/public/te_macros @@ -0,0 +1,9 @@ +########################################### +# dump_hal(hal_type) +# Ability to dump the hal debug info +# +define(`dump_hal', ` + hal_client_domain(dumpstate, $1); + allow $1_server dumpstate:fifo_file write; + allow $1_server dumpstate:fd use; +') diff --git a/sepolicy/vendor/dumpstate.te b/sepolicy/vendor/dumpstate.te index faa81a65..a0a8af40 100644 --- a/sepolicy/vendor/dumpstate.te +++ b/sepolicy/vendor/dumpstate.te @@ -1,3 +1,7 @@ +dump_hal(hal_thermal) +dump_hal(hal_power) +dump_hal(hal_power_stats) + userdebug_or_eng(` allow dumpstate proc_modules:file r_file_perms; allow dumpstate proc_stat:file r_file_perms;