Question

I'd like to make a system level service in android.
But i need to edit SystemServer.java in the framework. Is there anyway to 'reflect' into this to get it done ?

The line i'd like to add is:

ServiceManager.addService(“TestServiceDescription”, new
TestService(context));

Then others would be able to call my service the same way they call other android system level services. I would supply the AIDL of my service to the clients.

Was it helpful?

Solution

No, as @AleksG pointed this is impossible. The reason for this is that System Server is a privileged component in the system, i.e. it has access to critical system resources. Thus, a user application should have no possibility to be reflected into the system process. Otherwise, the security and reliability of the system will be questioned.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top