title: List of Android native servers
body: <p>How to get a full list of the Android native servers. To be specific I ask about Android 7.1.2. I try a several approaches but in my opinion both of them are wrong.</p>
  
  <p>First:  </p>
  
  <pre><code>AOSP$ ls -l out/target/product/generic_x86_64/system/bin/ | grep server
  -rwxrwxr-x 1 gluttton gluttton   13840 сер  7 00:37 audioserver
  -rwxrwxr-x 1 gluttton gluttton    5560 сер  7 00:40 cameraserver
  -rwxrwxr-x 1 gluttton gluttton  124432 сер  7 01:00 drmserver
  -rwxrwxr-x 1 gluttton gluttton 1125788 сер  7 01:00 gdbserver
  -rwxrwxr-x 1 gluttton gluttton 1115512 сер  7 01:00 gdbserver64
  -rwxrwxr-x 1 gluttton gluttton   17936 сер  7 01:05 mediadrmserver
  -rwxrwxr-x 1 gluttton gluttton    9652 сер  7 01:05 mediaserver
  </code></pre>
  
  <p>But not all servers are called <code>&lt;some&gt;server</code> and <code>surfaceflinger</code> is a example of such exception.</p>
  
  <p>Second:</p>
  
  <pre><code>AOSP$ grep native frameworks/base/services/java/com/android/server/SystemServer.java
      private static native void startSensorService();
              // libnativehelper's JniInvocation::Init code where we already
             // Initialize native services.
                      reportWtf("observing native crashes", e);
  </code></pre>
  
  <p>But it looks like not all servers are started by the <code>SystemServer</code>.</p>
  
  <p>Bonus question: is there difference between <code>native server</code> and <code>native service</code>?</p>