regarding #2,

> it is said that the files are the ones connect kernel and app
> but I just want to know "who" generate the files?and how does it work?
> thanks

these are sysfs entries created by kernel side drivers during bootup
(mostly the case).
 - drivers will create its sysfs entry..
    they have to implement a show API (what to do when its
accessed/read from user side), and a store API (what to do when its
written from user side)
 - user side applications can talk to kernel side components via these
sysfs entries, consider better than regular file i/o,

more details - http://kernel.org/doc/Documentation/filesystems/sysfs.txt
a sample scenario, how the entry is created on kernel side by display
driver - 
http://lxr.linux.no/#linux+v2.6.33/drivers/video/omap2/dss/display.c#L474

since such critical handles are only root-writable, you have to
explicity assign permision to other process and regular users.

-deva


On Mon, Mar 22, 2010 at 6:49 PM, Weber <[email protected]> wrote:
> Hi,I have 2 questions
> 1.
> when use logcat to see it:
> D/dalvikvm(  644): DexOpt: --- BEGIN 'services.jar' (bootstrap=1) ---
> D/dalvikvm(  658): DexOpt: 'Lcom/android/server/AlarmManagerService
> $1;' has an earlier definition; blocking out
> D/dalvikvm(  658): DexOpt: 'Lcom/android/server/AlarmManagerService
> $Alarm;' has an earlier definition; blocking out
> D/dalvikvm(  658): DexOpt: 'Lcom/android/server/AlarmManagerService
> $AlarmHandler;' has an earlier definition; blocking
>
> what does this mean?and why? thanks!
> BTW,the service.jar was not the original one ,it  was my own
> service.jar(just modified a little in Battery.cpp)
>
> 2.
> when i add some LOG in EventHub.cpp,I found that:when open
> acquire_partial_wake_lock ,it return permission denied
> I/power   (  679): *** set_screen_state 1
> I/power   (  679): go_to_sleep  now=44106449000 g_error=Permission
> denied
> so I changed the mod in init.rc
> chmod  0666 /sys/android_power/acquire_partial_wake_lock
> this time it can be open but the ts has no response now ,it has top
> bar slide before the mod being changed
>
> it is said that the files are the ones connect kernel and app
> but I just want to know "who" generate the files?and how does it work?
> thanks
> --Weber
>
> --
> unsubscribe: [email protected]
> website: http://groups.google.com/group/android-porting
>
> To unsubscribe from this group, send email to 
> android-porting+unsubscribegooglegroups.com or reply to this email with the 
> words "REMOVE ME" as the subject.
>

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

To unsubscribe from this group, send email to 
android-porting+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to