diff --git a/adbd.te b/adbd.te index 4026fcb94b593547f699d196b7809f3042f5c32f..a92338fe6c0383c9836171d55b1811b4210f1c14 100644 --- a/adbd.te +++ b/adbd.te @@ -35,3 +35,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 29b21061ce0800ad09815d14ab9912d48ec83de7..06ceeccd4ecb6688ea00eaa71330d565b7cc2392 100644 --- a/file.te +++ b/file.te @@ -81,6 +81,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 3d885b11238930f9e0441e5ba808fcb777253652..8906e389ed7c892266250dfb5fcc5ed7a7fa0eaf 100644 --- a/file_contexts +++ b/file_contexts @@ -211,3 +211,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