auto exec the c app when android is booting

85 views
Skip to first unread message

yinux

unread,
May 26, 2012, 3:46:07 AM5/26/12
to android-porting
hello all,

i edit the init.rc file, add the content as follows:
chmod 777 /data/busybox #1
insmod /data/t.ko #2
exec /data/busybox mdev -s #3
exec /data/hello #4

[result]
1. when the andoid is booting ,the #1 and #2 comand is OK.
why the #3 and #4 command cannot be execed
?

2. when the android is booting , i input the #3 and #4 command into
the serail ,the # 3 and #4 can exec,why?

pls help me to solve the issue?

thanks very much.

Alvin Wong

unread,
May 28, 2012, 12:02:50 AM5/28/12
to android-porting
Hi,

I've read somewhere that the `exec` command in init isn't actually
implemented, so you may need to edit the source code for this to work.

If you don't want the program to block the init loading, you can use a
service instead.

chmod 777 /data/busybox
insmod /data/t.ko
start a
start b

service a /data/busybox mdev -s
oneshot
disabled

service b /data/hello
oneshot
disabled

Good luck,
Alvin Wong
Reply all
Reply to author
Forward
0 new messages