tree: 3b67063ef90dec171134b8abd7212ad4fa16af38 [path history] [tgz]
  1. databroker/
  2. publisher/
  3. scriptexecutorinterface/
  4. sessioncontroller/
  5. systemmonitor/
  6. util/
  7. CarTelemetryService.java
  8. MetricsConfigStore.java
  9. README.md
  10. ResultStore.java
  11. TEST_MAPPING
  12. UidPackageMapper.java
service/src/com/android/car/telemetry/README.md

CarTelemetryService

Source code for AAOS OEM Telemetry solution.

Enabling CarTelemetryService

CarTelemetryService can be enabled with

adb shell cmd car_service enable-feature car_telemetry_service

Car Shell Command

Run the commands from $ANDROID_BUILD_TOP.

  1. Create a MetricsConfig text proto - sample_wifi_netstats.textproto
name: "sample_wifi_netstats"
version: 1
subscribers {
  handler: "onWifiStats"
  publisher: {
    connectivity: {
        transport: TRANSPORT_WIFI
        oem_type: OEM_NONE
    }
  }
  priority: 0
}
script:
  'function onWifiStats(data, state)\n'
  '    on_script_finished(data)\n'
  'end\n'
  1. Generate MetricsConfig binary proto
./out/host/linux-x86/bin/aprotoc \
  --encode=android.car.telemetry.MetricsConfig \
  packages/services/Car/car-lib/src/android/car/telemetry/telemetry.proto \
  < sample_wifi_netstats.textproto > sample_wifi_netstats.binproto
  1. Add the config to CarTelemetryService
adb shell cmd car_service telemetry add sample_wifi_netstats < sample_wifi_netstats.binproto
  1. Get results
adb shell cmd car_service telemetry get-result sample_wifi_netstats --result_count 10000 --timeout 20 --print-results

where result_count is the number of reports we expect to receive in this call, timeout is how many seconds should we wait for the results to be returned, and --print-results is an optional flag whether we want every result to be printed on the screen.