The readme.txt in 'system/core/init' says how to use it but there is no reference for device-added in the init code. So this trigger is not implemented. That might be the reason that you this unexpected result.
On Fri, Sep 23, 2011 at 9:47 PM, Tim Bird <[email protected]> wrote: > On 09/23/2011 09:29 AM, Pratik Prajapati wrote: > > > > I have checked that when init runs chmod the sysfs entry is present. > > logwrapper says chmod finished with return value 0. > > > > Further I created a oneshot service which does the chmod, but no luck > > Also I created a oneshot service which call a script and the script does > > the chmod, but no luck. > > If I run the same chmod command from console, It works fine. > > > > Any further inputs? > > First, are you sure it's not getting reset some time later > in the initialization? How are you examining it after the fact? > (Sorry to come in late, but did you verify you can do this on > the command line?) > > One thing to try would be to wrap the execution of chmod with > strace and get a log of the syscalls directly. > > Try something like this in /init.rc: > service mychmod /system/xbin/strace -f -tt -o /cache/debug/chmod.strace > /system/bin/chmod 777 <file> > > (make sure that /cache/debug exists, and is writeable) > > ------ > Or run strace on the entire init program. > > This will be a pain to set up, however. You'd have to modify > the kernel command line (or do a custom wrapper and replace > /init with something that invoked strace on a saved 'init'. > > ------ > > Or, directly instrument the chmod syscalls in the kernel. > > ----- > Or, make a custom 'init' program with debug information in the chmod path, > run that, and see what's going on. > > Those are a few ideas. > -- Tim > > ============================= > Tim Bird > Architecture Group Chair, CE Workgroup of the Linux Foundation > Senior Staff Engineer, Sony Network Entertainment > ============================= > > -- > unsubscribe: [email protected] > website: http://groups.google.com/group/android-porting > -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting
