문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top