How to intercept messages between services in Android which interact via IBinder using AIDL?

35 Views Asked by At

I need to create a mechanism for replacing the android.os.notmyservice service. It should intercept all messages from sender service to the target service, log methods and arguments, and run the method of the original target service.

I can not access the source code of target service and sender service, that's why I want to intercept connection.

// NotMyService.aidl
package android.os;

interface NotMyService{
    int send(int id, int data);
    int get_id();
}

Device: Android 7 with root access

I tried to implement message interception, but I simply got confused in Java for Android and the idea...

0

There are 0 best solutions below