How can I execute some application(Simple C application which does not have UI) after android device booting

87 views Asked by At

I made simple status check application in android device. It was used with only C language without Java. It does not have UI. It is made in the /vendor/bin/myapp . How can I execute myapp after android device booting. I have android evaluation board and BSP source code. How should I implement /vendor/bin/myapp is executed after booting. Should I modify /system/core/rootdir/init.rc ? If yes, how can I do? or Are there other way to execute myapp after android device booting?

1

There are 1 answers

0
Alex Samuelraj On

To execute your myapp after android device booting (on system startup), you need to define your myapp as native daemon in the Android build environment

Steps to define myapp as native daemon as below;

  1. Add the service definition to init.rc file
  2. Add your app under the service context in SePolicy file

Here is a link for the detailed reference: https://devarea.com/aosp-adding-a-native-daemon/