How to autorun a script on startup(exec command not implemented in init.rc?)

by bord...@gmail.com » Thu, 12 May 2011 18:29:39 GMT


Sponsored Links
 Hi all:
    How to autorun a script to config network on startup.  I try to
use exec command in the init.rc, but it's not implemented yet?
The "do_exec" function in "builtins.c", it simply returns -1 without
doing anything.

Android version 2.2 (Froyo).
Kernel 2.6.32

-- 
Bian Jiang
 http://www.wifihack.net/ 
 http://golang-china.org/ 

-- 



Re: How to autorun a script on startup(exec command not implemented in init.rc?)

by hedwin » Sun, 15 May 2011 05:17:48 GMT


 service aName /aPath/aScript.sh
     oneschot

aName     - name you give to the service to run
aPath       - where the script is located
aScript.sh - your script to start the network stuff

Add this to your init,rc

Hedwin





-- 


Sponsored Links


Other Threads

1. android 1.5 and 1.6 versions of SDK sitting side by side...

You have most of it.

the --target value that you project to 'android create project' or
'android update project' will define what APIs you compile against.
If you want to use APIs from 1.6 you need to update your project with
the 1.6 target.

(The new SDK, starting with 1.5, can contains multiple versions of the
APIs. So if you install 1.1, 1.5 and 1.6 in your SDK, you could work
on different applications using different APIs at the same time. You
PATH environment variable only need to point to the tools folder of
your single SDK. When a new SDK is realeased the new SDK updater will
allow you to add/update your current SDK instead of downloading a new
one in a different location.)

The content of the <uses-sdk> is used at install time (and allows
Market to filter out which apps are seen by which device).

you could technically compile against Android 1.6 but declare
minSdkVersion=3 (== Android 1.5) but if a 1.5 device tries to execute
the new APIs it'll crash.

You might want to read
http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html
for information about how to support older devices while using new
APIs.

Xav








-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

--~--~---------~--~----~------------~-------~--~----~

2. How to mute Hero ?

Sorry silly question :D

Lagi meeting nih.. Hero bunyi mulu :((

Gmana cara mute-nya ya?


Thanks
Ids

www.indraracing.com


--~--~---------~--~----~------------~-------~--~----~
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group, please visit the following page:
 

3. Application using service in different project

4. android 1.5 and 1.6 versions of SDK sitting side by side...

5. launch app from an app

6. GPS applications for turn by turn navigation?

7. Android API