Sunday, January 10, 2016

android start the process of how to call a C program




            


I would like to achieve is performed automatically during startup of a C program, I tried to add the following in init.rc, they did not work (I want to start a C program is smackload):
service smackload / data / local / smackload
oneshot
And adding a command in an Action:
exec / data / local / smackload

Find great God who gets
Reply:
c ndk way out of it
Reply:
quote 1 floor tsplaycool reply:
ndk way out c it
After starting the call does not want to, but let the Android system automatically run my program at boot time
Reply:
java jni call blocks to implement
Reply:
quote 3rd floor ConnectionUtils reply:
java jni call blocks to implement

Hello, Thank you for your suggestion.
I know you said this method, the purpose I want to achieve in the initial stages of system start calling my C program, and is called automatically by the system, rather than by since the launch of the application to complete the call, so that you too Too late.
I do not know if you understand what I mean, but also please exhibitions.
Reply:
Your smackload into / system / bin Try the following, in addition to not need to add in Action
Reply:
You can talk service on init. "Hardware" .rc inside, in the form of similar
service hix5hd-logcat / system / bin / logcat -Q
oneshot

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







Reply:
quote 5th floor luowenlong860502 reply:
your smackload into / system / bin Try the following, in addition to not need to add in Action
< / fieldset>
Thank you for your advice have been tried to no avail
Reply:
quote, 6th Floor wuxy_shenzhen reply:
can talk service on init "hardware" .rc inside, in the form of similar
.service hix5hd-logcat / system / bin / logcat -Q
oneshot

Or you can play a script, you want to how to play all right.
service hix5hd-setup /system/etc/init.godbox.sh
oneshot
......


Thank you for your reply have tried not start the problem is that class
Reply:
quote 7th floor CSDN_Ask reply:
You can use the NDK. See here for a detailed description: http: //developer.android.com/tools/sdk/ndk/index.html

Thank you for pointing me in the C program is a separate program is not part of a program
Reply:
quote 9th floor dywisdomno2 reply:
Quote: quote, 6th Floor wuxy_shenzhen reply:

You can talk service on init. "Hardware" .rc inside, in the form of similar
service hix5hd-logcat / system / bin / logcat -Q
oneshot

Or you can play a script, you want to how to play all right.
service hix5hd-setup /system/etc/init.godbox.sh
oneshot
......


Thank you for your reply have tried not start the problem is class


Plus class root
Reply:
http://blog.csdn.net/jiangdou88/article/details/42169263

No comments:

Post a Comment