Hi, I guess the right way to make "init" aware of the native daemon. To achieve this, please try the following (I'm assuming that you have sufficient privileges on the device to modify "init.rc")
1. Add new service entry in "init.rc" 2. service mydaemon /system/bin/mydaemon user <whatever is applicable> disabled 3.Now from the JNI code, start the daemon using "property_set("ctl.start", "mydaemon"); This should start your native daemon. It's not advised to invoke system() function from JNI as that would spawn a new shell to carry out the command specified. Warm Regards, Anil On Fri, Oct 22, 2010 at 10:41 PM, neeloor2004 <neeloor2...@gmail.com> wrote: > Hi All > (I am working for an OEM so I have access to full source code) > > I have written a daemon and included in the rom (\system\bin > \mydaemon) I also created another lib and JNI interface (Which I will > call from Android connection Manager) > > Now when I get a call from JAVA (through jni) I wanted to start my > daemon > I am doing the following but not working > r= system ("(\system\bin\mydaemon") > > Also I tried it using script, I created /system/etc/start.sh and done > chmod 0777 in init.rc still it is not working > > Please help > > -- > unsubscribe: > android-porting+unsubscr...@googlegroups.com<android-porting%2bunsubscr...@googlegroups.com> > website: http://groups.google.com/group/android-porting > -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting