I am working on developing the Android service (BSP) in Android 9, it will run boot time. I configured this in init.rc.
Now, service run properly at Android booting. But, I needs to configure the service to start and stop when USB Stick Mount/UMount time.
1) When USB Stick Connected
USB Mounted == 1
2) When USB Stick Disconnected
USB UMount ==1
I need to implement this logic in init.rc file.
Thanks & Regards,
Unfortunately, the free support does not cover the implementation of Android services. If you want to add a new service, I suggest you go with professional service support.