Sospensione e risveglio Android 6.0.1 Busybox
Sul mio device con Android 6.0.1 ho installato Busybox 1.27.2 Stericson
Lanciando per esempio questo comando da root ottengo
rtcwake -m mem -s 10
rtcwake: RTC_AIE_ON: invalid argument
il mio RTC non supporta dunque l'allarme?
Lanciando lo stesso comando senza i privilegi di root:
rtcwake -m mem -s 10
rtcwake: can't open '/dev/misc/rtc' : No such file or directory
e questo lo comprendo in quanto ho solamente il device /dev/rtc0
il mio dmesg:
[ 2.380595@3] aml_vrtc rtc.34: rtc core: registered aml_vrtc as rtc0
[ 860.995903@5] type=1400 audit(1507717944.328:164): avc: denied { read } for pid=5476 comm="hwclock" name="rtc0" dev="tmpfs" ino=1368 scontext=u:r:toolbox:s0 tcontext=u:object_r:rtc_device:s0 tclass=chr_file permissive=1
[ 861.014873@5] type=1400 audit(1507717944.328:165): avc: denied { open } for pid=5476 comm="hwclock" path="/dev/rtc0" dev="tmpfs" ino=1368 scontext=u:r:toolbox:s0 tcontext=u:object_r:rtc_device:s0 tclass=chr_file permissive=1
[ 861.034642@0] type=1400 audit(1507717944.328:166): avc: denied { ioctl } for pid=5476 comm="hwclock" path="/dev/rtc0" dev="tmpfs" ino=1368 ioctlcmd=7009 scontext=u:r:toolbox:s0 tcontext=u:object_r:rtc_device:s0 tclass=chr_file permissive=1
[ 879.813941@0] type=1400 audit(1507717963.158:169): avc: denied { getattr } for pid=5478 comm="vi" path="/dev/rtc0" dev="tmpfs" ino=1368 scontext=u:r:init:s0 tcontext=u:object_r:rtc_device:s0 tclass=chr_file permissive=1
[ 879.833036@0] type=1400 audit(1507717963.158:170): avc: denied { write } for pid=5478 comm="vi" name="rtc0" dev="tmpfs" ino=1368 scontext=u:r:init:s0 tcontext=u:object_r:rtc_device:s0 tclass=chr_file permissive=1
[ 982.111368@0] type=1400 audit(1507718065.448:173): avc: denied { ioctl } for pid=5488 comm="rtcwake" path="/dev/rtc0" dev="tmpfs" ino=1368 ioctlcmd=7009 scontext=u:r:init:s0 tcontext=u:object_r:rtc_device:s0 tclass=chr_file permissive=1