title: Execute a daemon in Android init.rc
body: <p>I am trying to execute a daemon on boot of my Nexus 5. This is a daemon built from source in <code>c++</code>. But whenever I build AOSP and flash the images on my Nexus 5 device, the daemon is not running in the background. I added this code to my <strong>init.rc</strong> file: (which should make it run in the background on boot)</p>
  
  <pre><code>setenforce 0
  service my_daemon /system/bin/my_daemon 
      class main     # Also tried: class core (but it didn't make a difference)
      user root
      group root
  setenforce 1
  </code></pre>
  
  <p>The reason I use setenfonce is because of SELinux on Android 5.0 and above. The problem is that on boot, the daemon is not running on boot. I don't have any clue as to why. Any suggestions?</p>