How to edit init.rc in Samsung Galaxy S3 i9300? I would like to edit the init.rc in an i9300. I understand that editing the file as-is will not work as the file is reloaded from the boot image's ramdisk upon every bootup. After some googling, I read that I have to unpack, edit and repack the boot image. I came across the following link: http://android-dls.com/wiki/index.php?title=HOWTO%3a_Unpack,_Edit,_and_Re-Pack_Boot_Images

However, upon trying out the first command "cat /proc/mtd", I realize that my i9300 doesn't even have a /proc/mtd, so I'm wondering if any of the instructions there apply to this device.

/dev/block shows mmcblk0p1 to mmcblk0p12, but I'm not sure which one is the boot image. From my googling it seems that mmcblk0p6 is the recovery image though.

How can I edit the init.rc in this device?

Thanks!
You have two choices here:


Edit the stock kernel (or the kernel you're using) to enable init.d support or edit the init.rc
Use a custom kernel with init.d support already enabled.


I would suggest the second option as is far more easier to achieve. Once flashed a kernel with init.d support, you can add all the scripts you want to the folder that will be executed at boot time. The folder is located in /etc/init.d and all scripts inside that folder will be executed in order.

For example, if you have:


/etc/init.d/10-startup-daemon
/etc/init.d/50-mount-extra-partition


They will be executed in the same order I've typed them. You can change the order by changing the number at the begining of the file.