private JSONObject getDeviceConfig(final JSONObject device, final JSONObject supportedApp) throws JSONException {
    JSONObject capa = new JSONObject(device, JSONObject.getNames(device));
    // For each device, register as "android" for WebView tests and also selendroid if an aut is specified
    if (ANDROIDDRIVER_APP.equals(supportedApp.get(APP_BASE_PACKAGE))) {
      //it's possible the user does not want to register the device as capable to recieve webview tests
      if (!config.isNoWebViewApp()) {
        capa.put(CapabilityType.BROWSER_NAME, "android");
      }
    } else {
      capa.put(CapabilityType.BROWSER_NAME, "selendroid");
      capa.put(SelendroidCapabilities.AUT, supportedApp.get(APP_ID));
    }
    capa.put(CapabilityType.PLATFORM, "ANDROID");
    capa.put(SelendroidCapabilities.PLATFORM_NAME, "android");
    capa.put(CapabilityType.VERSION, device.getString(SelendroidCapabilities.PLATFORM_VERSION));
    capa.put("maxInstances", config.getMaxInstances());
    return capa;
  }
Get the node configuration and capabilities for Grid registration

@return The configuration
selendroid-standalone/src/main/java/io/selendroid/standalone/server/grid/SelfRegisteringRemote.java