-1
-rwxr-x---    1 root     root          3265 Jan  1  1970 init.class_main.sh
-rwxr-x---    1 root     root          1730 Jan  1  1970 init.mdm.sh
-rwxr-x---    1 root     root          3347 Jan  1  1970 init.mmi.boot.sh
-rwxr-x---    1 root     root           325 Jan  1  1970 init.mmi.dtv.sh
-rwxr-x---    1 root     root           562 Jan  1  1970 init.mmi.early_boot.sh
-rwxr-x---    1 root     root          6341 Jan  1  1970 init.mmi.touch.sh
-rwxr-x---    1 root     root          8592 Jan  1  1970 init.mmi.usb.sh
-rwxr-x---    1 root     root          7054 Jan  1  1970 init.qcom.class_core.sh
-rwxr-x---    1 root     root          6920 Jan  1  1970 init.qcom.early_boot.sh
-rwxr-x---    1 root     root          6987 Jan  1  1970 init.qcom.sh
-rwxr-x---    1 root     root          2962 Jan  1  1970 init.qcom.syspart_fixup.sh
-rwxr-x---    1 root     root          2844 Jan  1  1970 init.rc
-rwxr-x---    1 root     root          1327 Jan  1  1970 init.recovery.usb.rc
-rwxr-x---    1 root     root           683 Jan  1  1970 init.surnia.sh

These are all the files that begin with init.* in my /partition. In /system/etc I have some as well:

-rw-r--r--    1 root     root          2767 Mar 26  2015 init.ath3k.bt.sh
-rw-r--r--    1 root     root          1773 Mar 26  2015 init.crda.sh
-rw-r--r--    1 root     root          4987 Mar 26  2015 init.qcom.audio.sh
-rw-r--r--    1 root     root          9938 Mar 26  2015 init.qcom.bt.sh
-rw-r--r--    1 root     root          3651 Mar 26  2015 init.qcom.coex.sh
-rw-r--r--    1 root     root          3791 Mar 26  2015 init.qcom.debug.sh
-rw-r--r--    1 root     root          1725 Mar 26  2015 init.qcom.efs.sync.sh
-rw-r--r--    1 root     root          3083 Mar 26  2015 init.qcom.fm.sh
-rw-r--r--    1 root     root          4023 Mar 26  2015 init.qcom.modem_links.sh
-rw-r--r--    1 root     root         54877 Mar 26  2015 init.qcom.post_boot.sh
-rw-r--r--    1 root     root          2767 Mar 26  2015 init.qcom.sdio.sh
-rw-r--r--    1 root     root         19105 Mar 26  2015 init.qcom.wifi.sh

Are these similar to the init.d feature? How can I check if these init.* are run at boot? If so, how can I use this structure to add a custom script to run at boot?

  • 1
    You probably can't. Just because the files carry init in their names doesn't mean the device supports init.d – if it would, they'd rather be in /system/etc/init.d and not have the init in their names. If you want init.d support on a device not having it, check my list of init.d apps :) – Izzy Mar 08 '16 at 06:53
  • If I recall correctly, only the init.rc is executed at boot. I believe that, by further investigating the syntax, you could create a similar file, in the same location, that will have to be included by the init.rc. Please keep in mind that I never tested what I said. – Grimoire Mar 08 '16 at 07:54
  • 1
    I did a quick test. What I did, was to create a little file (init.dms.rc), which was meant to create a blank text file on /data by using touch. I then included the file into the main init.rc, with the syntax /include /init.dms.rc. After the reboot, not only had the blank file not been created, but all of my modifications (inclusion into init.rc and the whole init.dms.rc) were reverted. – Grimoire Mar 08 '16 at 08:59

1 Answers1