2013年7月20日星期六

android boot process how to call C program

I want to achieve is performed automatically during the boot process a C program, I tried to add the following in init.rc contents have not worked (I want to start the C program is smackload):
service smackload / data / local / smackload
oneshot
as well as an Action Add a command:
exec / data / local / smackload

great God who seek guidance
------ Solution --------------------------------------------------------
c ndk way to swap it
------ Solution --------------------------------------------------------
Calling java jni blocks to implement
------ Solution ------------------------------------------ --------------
Smackload into your / system / bin Try the following, in addition to no increase in the Action
------ Solution --------------------------------------------------------
You can talk about service on init. "Hardware". Rc inside, in the form similar to the
service hix5hd-logcat / system / bin / logcat-Q
oneshot

Or you can play a script, how you want to play all right.
service hix5hd-setup / system / etc / init.godbox.sh
oneshot
------ Solution --------------------------------------------------------
You can use the NDK. See here a detailed description: http://developer.android.com/tools/sdk/ndk/index.html






没有评论:

发表评论