diff --git a/adbd.te b/adbd.te index 8b809e2c81f191bf5da099b351faa96b1d608e2c..b88f59aa181676796aa74638aeb1d1b463d4e855 100644 --- a/adbd.te +++ b/adbd.te @@ -36,3 +36,6 @@ allow adbd shell:process noatsecure; # XXX Run screencap in a separate domain? binder_use(adbd) binder_call(adbd, surfaceflinger) + +# Write to the sysrq file +allow adbd sysrq_file:file w_file_perms; diff --git a/file.te b/file.te index 2f30e4c02dce14ba2fb619aff575a1cfbed764dc..6731c0688563cef11fcc594b2da5fa1bc51051cb 100644 --- a/file.te +++ b/file.te @@ -78,6 +78,8 @@ type security_file, file_type; type bluetooth_efs_file, file_type; # Downloaded files type download_file, file_type; +# The sysrq special file +type sysrq_file, file_type; # Socket types type adbd_socket, file_type; diff --git a/file_contexts b/file_contexts index 87f816f6788fa69e200c8f5a48920c1fd594f41f..353f4be244e72bb4cff24559099d3019459dbf82 100644 --- a/file_contexts +++ b/file_contexts @@ -208,3 +208,6 @@ # asec containers /mnt/asec(/.*)? u:object_r:asec_apk_file:s0 /data/app-asec(/.*)? u:object_r:asec_image_file:s0 +############################# +# special /proc files +/proc/sysrq-trigger u:object_r:sysrq_file:s0