Search code examples
androidandroid-serviceandroid-binder

Android: system service has no interface?


After executing the service list command, you can see that many system services have no interfaces?

    # service list | grep '\[\]'
    5   app_binding: []
    24  network_time_update_service: []
    25  runtime: []
    26  diskstats: []
    39  DockObserver: []
    43  devicestoragemonitor: []
    63  testharness: []
    70  pinner: []
    80  device_config: []
    81  settings: []
    88  looper_stats: []
    89  binder_calls_stats: []
    93  battery: []
    102 cpuinfo: []
    103 dbinfo: []
    104 gfxinfo: []
    105 meminfo: []

Why is there such a system service? If they do not use the binder, how do they communicate with other processes?


Solution

  • Services which do not show an interface to service list did not respond to the INTERFACE_TRANSACTION ('_NTF', or 1598968902). There are two possible reasons for that:

    A) The service has no interface, so it responds to the default transactions only (you can find a list of those transactions here. Normally, this would be the DUMP_TRANSACTION (_DMP), which is used by /system/bin/dumpsys, and in rare cases SHELL_COMMAND_TRANSACTION (_CMD), for /system/bin/cmd.

    B) The service declines answering _NTF, because you are not permitted to, or you couldn't get a handle to them. To try this, su to an isolated app (su 90000) and try service list - only services which allow_isolated (activity, webviewupdate and maybe one more) will respond. But even as AID shell, vold for example won't answer.

    In the above, you were doing this as root, so it's A - and they all are meant to be dump sys only.