title: Android insmod kernel object on boot
body: <p>I am currently trying to insmod a kernel module during the end of the boot process, and so I've created the following entries in init.rc:</p>
  
  <pre><code>on post_late_start
      start myscript
  
  on nonencrypted
      class_start late_start
      trigger post_late_start
  
  on property:void.decrypt=trigger_restart_framework
      class_start main
      class_start late_start
      trigger post_late_start
  
  service myscript /data/my_sh.sh
      disabled
      oneshot
  </code></pre>
  
  <p>Then in my /data directory my_sh.sh has the following:</p>
  
  <pre><code>#!/system/bin/sh
      log -t mytag -p V "Hello World!"
      insmod mymodule.ko mod_parameter=arg
  </code></pre>
  
  <p>But when I run -- sometimes I do not see the "Hello World" tag when I logcat -s "mytag"  and of course, the insmodded module is not installed either.</p>
  
  <p>What is the proper way of late-inserting a kernel module (it needs to go in after network is up and /data is mounted).  And further -- how do I get the output of insmod into the log so that I can debug?  Any help is appreciated and I can post more details if necessary.</p>