This is a small mod, inspired by non other than our great DoomLord (so if it helped you, thank him/donate to him/worship him ) and his thread in the X10 section.
I am trying a lot of things on my phone, so I often switch back and forth from stock kernel to DoomKernel.
However, I use lots of init.d scripts (my favorite one being SuperCharger)
and I just don't want to lose this feature when I'm on stock.
So, without further ado, here are the steps that are needed to make init.d scripts run automatically at boot on stock kernel.
1. Stock Kernel
4. CMW Recovery for Stock Kernel by nAa.
5. Root Explorer or any other similar app.
1. Download the zip and place it in a folder in your SD card.
2. With Root Explorer, go to /system/etc. Press the Mount RW button on top right corner.
a. If the file install-recovery.sh is not there, then press Menu and create a New File.
Name it install-recovery.sh and then long-press on it and select Open in Text Editor.
Paste this text in it:
#!/system/bin/sh # init.d support busybox run-parts /system/etc/init.d/
b. If the file install-recovery.sh is already there, long-press on it and select Open in Text Editor. Paste this text in the end:
# init.d support busybox run-parts /system/etc/init.d/
3. Reboot into Recovery and flash the init.d-autorunner-stock.zip.
4. Reboot your phone and with Root Explorer go to /data/local/tmp.
There should be a txt file there named "init.d_log_test.txt" and once you open it, you should see the word "done".
5. Now you can use your favorite init.d scripts on stock kernel!
If you want to check if the scripts you want to use actually work, please refer to one of my older threads about how to test them.
*** I am not including an install-recovery.sh because this is the file that Link2SD depends on, so it's better if you modify it yourself, rather than use mine.
Let me know if it worked for you!