1# Automotive Telemetry Service 2 3A structured log collection service for CarTelemetryService. See ARCHITECTURE.md to learn internals. 4 5## Useful Commands 6 7**Dumping the service information** 8 9``` 10adb shell dumpsys android.automotive.telemetry.internal.ICarTelemetryInternal/default 11``` 12 13**Enabling VERBOSE logs** 14 15``` 16adb shell setprop log.tag.android.automotive.telemetryd@1.0 V 17adb shell setprop log.tag.cartelemetryd_impl_test V 18``` 19 20**Starting emulator with cold boot** 21 22``` 23emulator -verbose -show-kernel -selinux permissive -writable-system -no-snapshot -wipe-data 24``` 25 26**Running the tests** 27 28``` 29# run a specific test 30atest cartelemetryd_impl_test:CarTelemetryInternalImplTest#TestSetListenerReturnsOk 31 32# run all tests 33atest cartelemetryd_impl_test 34``` 35 36## Enabling cartelemetryd 37 38`cartelemertryd` service is by default not included in the final build. To include it on specific 39targets, add the following lines in necessary `.mk` files: 40 41``` 42# Enable Automotive Telemetry Services (cartelemetryd) only on specific devices. 43ENABLE_CARTELEMETRY_SERVICE ?= true 44``` 45 46To find where the service was included, run this from `$ANDROID_BUILD_TOP`: 47 48``` 49grep -rH --color --exclude-dir='**/.*' --exclude-dir='out' --include='*.mk' \ 50 'ENABLE_CARTELEMETRY_SERVICE' device/ vendor/ 51``` 52 53## Updating cartelemetryd 54 55If AIDL interface were updated, run `m -j` and re-flash. 56 57If implementation were updated, run: 58 59``` 60m -j android.automotive.telemetryd@1.0 61adb root && adb remount && adb push $ANDROID_PRODUCT_OUT/system/bin/android.automotive.telemetryd@1.0 /system/bin && adb shell /system/bin/android.automotive.telemetryd@1.0 62Ctrl+C 63adb reboot 64``` 65