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. CheckBoxPreference Error

okay so here it is:
public static boolean getGPSOption(Context context){
                return
PreferenceManager.getDefaultSharedPreferences(context).getBoolean(GPS_SENSOR,
true);
        }
this seems to work perfectly when it is selected in preferences, but
when I try to access it in another class by
XYZ = Prefs.getGPSOption(this);
and the option is deselected, My application crashes.

Why is it only working for true values (ie when the checkboxpreference
is selected) and not false?

-- 

2. How can I get current running Activity from Context

Hi,

Does anyone knows how to get current running Activity from Context?
Because I need Activity in my junit class.

Best regards,
Takeyuki

-- 

3. service notification in case device sleeps

4. Inner-Active ad network

5. Huawei Ascend

6. Interested in making a killer GTD app?

7. destruction and creation of android activity happens TWICE upon changing the screen orientation