private JSONObject readExtraArgsFile() {
    File extraArgsFile = ExternalStorage.getExtraArgsFile();
    if (!extraArgsFile.exists()) {
      return new JSONObject();
    }

    try {
      return new JSONObject(readFile(extraArgsFile));
    } catch (JSONException e) {
      throw new RuntimeException(
        "Should never have a malformed JSON in extra args file",
        e
      );
    }
  }
Parses arguments passed to instrumentation using 'adb shell am instrument'.
selendroid-server/src/main/java/io/selendroid/server/InstrumentationArguments.java