From c7594898dbce021677e6444eb855eb591df1097b Mon Sep 17 00:00:00 2001 From: dcashman Date: Mon, 18 May 2015 14:01:37 -0700 Subject: [PATCH] Label /dev/rtc0 as rtc_device. Grant access to system_server, as it is used by AlarmManagerService. Change-Id: I4f099fe30ba206db07d636dd454d43d3df9d3015 --- device.te | 1 + file_contexts | 1 + system_server.te | 1 + 3 files changed, 3 insertions(+) diff --git a/device.te b/device.te index c155fcced..b2f4f1d32 100644 --- a/device.te +++ b/device.te @@ -12,6 +12,7 @@ type loop_device, dev_type; type pmsg_device, dev_type, mlstrustedobject; type radio_device, dev_type; type ram_device, dev_type; +type rtc_device, dev_type; type vold_device, dev_type; type console_device, dev_type; type cpuctl_device, dev_type; diff --git a/file_contexts b/file_contexts index 75c718a2d..689cc4833 100644 --- a/file_contexts +++ b/file_contexts @@ -77,6 +77,7 @@ /dev/random u:object_r:random_device:s0 /dev/rpmsg-omx[0-9] u:object_r:rpmsg_device:s0 /dev/rproc_user u:object_r:rpmsg_device:s0 +/dev/rtc0 u:object_r:rtc_device:s0 /dev/snd(/.*)? u:object_r:audio_device:s0 /dev/socket(/.*)? u:object_r:socket_device:s0 /dev/socket/adbd u:object_r:adbd_socket:s0 diff --git a/system_server.te b/system_server.te index 42c3b62fa..a2093ffe8 100644 --- a/system_server.te +++ b/system_server.te @@ -163,6 +163,7 @@ allow system_server video_device:chr_file rw_file_perms; allow system_server adbd_socket:sock_file rw_file_perms; allow system_server audio_device:dir r_dir_perms; allow system_server audio_device:chr_file r_file_perms; +allow system_server rtc_device:chr_file rw_file_perms; # tun device used for 3rd party vpn apps allow system_server tun_device:chr_file rw_file_perms;