Source code for AAOS OEM Telemetry solution.
CarTelemetryService can be enabled with
adb shell cmd car_service enable-feature car_telemetry_service
Run the commands from $ANDROID_BUILD_TOP
.
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'
./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
adb shell cmd car_service telemetry add sample_wifi_netstats < sample_wifi_netstats.binproto
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.