I want to create a system service. My requirements:
The service should be protected by permission. If possible, it should not be accessible to the user (accessible only inside Android system).
Service should be able to return some values. All the tutorials available on the internet give same example of setting int value.
I want to add this service to SystemServer.java so that it will be automatically started. Some of solutions on stackoverflow suggest to create a system app/service, but I will be modifying Android source code to create a custom ROM.