Modifying init.rc to add my own android native service
This cannot be done from shell. init.rc
is part of ramdisk
and not system
partition. So at bootup, the init.rc
picked up will be from ramdisk. So whatever changes you do to init.rc
will not get reflected.
AFAIK Only way is to build the ROM and reflash
Check this post, it is related, might help
Related videos on Youtube
user1118764
Updated on September 16, 2022Comments
-
user1118764 almost 2 years
I'm working on a Freescale i.mx53 board with Android 2.3.3, and I'm trying to add my own android native service into init.rc so that it runs on boot. I've tried following the guide at http://www.androidenea.com/2009/08/init-process-and-initrc.html, including their example service code. However, I'm building the example service code into an ARM binary with android ndk instead.
The example service works if I run it manually in an adb shell. However, when I put it at the end of src/system/core/rootdir/init.rc nothing seems to happen.
I look at the init.rc in the device root directory after booting up and it isn't the same as the init.rc in the source. Notably, the lines that I've added in aren't there.
What could be wrong?