El Fri, Apr 22, 2011 at 07:57:17AM -0700 ImperatorRj ha dit:

> On Apr 20, 8:15 pm, Shanth Murthy <[email protected]> wrote:
>
> > I have a question related to Android System Service.
> >
> > I have added system service into Android framework..
> >
> > During the run-time of the system service, it has to modify certain sysfs
> > parameter exposed by underlying device driver to achieve the required
> > functionality.
> > Native method is used to modify the sysfs parameter.
> >
> > Given the fact that, usually sysfs interface parameters are modified by root
> > user only, and system services don't have root permission. how do we tackle
> > this problem?
> >
> > Any pointer or suggestions would be highly appreciated.
> 
> You could modify the permissions either in init.rc if they are already
> created or in the driver that creates them by callying a user process
> with chown.

calling a user process from a driver doesn't sound like a good idea
(and is impossible afaik). sysfs attributes of builtin drivers should
already exist when init is running. attributes of dynamically loaded
modules can be modified by a script/program which is executed from
init after having loaded the module(s)

-- 
Matthias Kaehlcke
Embedded Linux Developer
Amsterdam

               For to be free is not merely to cast off
               one's chains, but to live in a way that
              respects and enhances the freedom of others
                           (Nelson Mandela)
                                                                 .''`.
    using free software / Debian GNU/Linux | http://debian.org  : :'  :
                                                                `. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4                  `-

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to