Please read the documentation in the SDK on the security model. You can look at the alarm device to see its permissions:
$ adb shell ls -l /dev/alarm crw-rw-r-- system radio 10, 45 2009-04-10 09:03 alarm So anyone can read it, and only the system uid can write it. On Fri, Apr 10, 2009 at 12:53 PM, Richard Schilling < [email protected]> wrote: > > I understand that userland apps on android cannot set the system > clock. Wanting to know more about how the security mechanism is set > up for the system I did some digging around in the source code. > > /dev/alarm is opened R/W to set the system clock using > SystemClock.setCurrentTimeMillis. > > Can someone explain how the permissions work to determine whether or > not an application has permission to set the clock. > > I assume it's just a user level permission, and the write bit for /dev/ > alarm is only enabled for the "system user" and not the "userland > user" applications run under. > > But, if someone can set me straight or confirm that what I'm thinking > is true that would be great. > > Thanks. > > Cheers, > > Richard Schilling > > > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

