Created
September 18, 2013 23:39
-
-
Save chris-piekarski/6617285 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The exec command is not implemend by default for init.rc despite what the readme.txt says. Add the following to get it working. | |
file: android/system/core/init/builtins.c | |
int do_exec(int nargs, char **args) | |
{ | |
const int cmd_line_max = 256; | |
char cmd_line[cmd_line_max]; | |
int cmd_length, i; | |
cmd_line[0] = '\0'; | |
cmd_length = 0; | |
for(i = 1; i < nargs; i++) | |
{ | |
cmd_length += (strlen(args[i]) + 2); | |
if(cmd_length >= cmd_line_max) return -1; | |
strcat(cmd_line, args[i]); | |
strcat(cmd_line, " "); | |
} | |
return system(cmd_line); | |
//return -1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
or do something like this instead
service aName /aPath/aScript.sh
oneshot