Event supportability

Healthd develops more and more events, our clients use them as part of their diagnostic flow. However, our clients want to know if a certain event is supported or not so that they can decide to render an icon on the UI or not. Hence, we release an interface CrosHealthdEventService.IsEventSupported for our clients to query the event support status.

This document focuses on the following things:

  • How we determine if an event is supported.
  • What we need from OEMs to configure to make the event supported.

This document assumes that OEMs/ODMs understand how to make changes to the Boxster config. If OEMs/ODMs have any trouble on this, please contact us.

Command line interface

Some commands help you debug the issue or have a quick try:

  1. cros-health-tool event --help Use this command to check all possible event types.
  2. cros-health-tool event --category=$EVENT --check_supported Use this command to see if $EVENT is supported or not.

Events

USB

Always supported.

Spec (Partners only): Chromebook, Convertible, Detachable, Chromeslate, Chromebox, Chromebase

Thunderbolt

Always supported. If any OEMs need to distinguish it with the USB, please reach out to us.

Lid

Supported only when form-factor is explicitly configured as one of the following:

  • CLAMSHELL
  • CONVERTIBLE
  • DETACHABLE

You can run the following commands on your DUT:

  1. cros_config /hardware-properties form-factor This is helpful to understand what the value of form-factor is.
  2. cros-health-tool event --category=lid --check_supported Use this to see if healthd reports the correct support status.

To configure form-factor in Boxster, you can use the create_form_factor function defined in hw_topology.star to set it up.

Bluetooth

Always supported.

Spec (Partners only): Chromebook, Convertible, Detachable, Chromeslate, Chromebox, Chromebase

Power

Always supported.

Audio

Always supported. Chromebox may not have a speaker so the event may not be suitable, if OEMs want us to report it as non-supported, please reach out to us.

Spec (Partners only): Chromebook, Convertible, Detachable, Chromeslate, Chromebox, Chromebase

Audio Jack

Supported only when has-audio-jack is explicitly configured as “true”.

You can run the following commands on your DUT:

  1. cros_config /hardware-properties has-audio-jack This is helpful to understand what the value of has-audio-jack is.
  2. cros-health-tool event --category=audio_jack --check_supported Use this to see if healthd reports the correct support status.

To configure has-audio-jack in Boxster, you can use create_audio function defined in hw_topology.star to set it up by filling up the headphone_codec value to non AUDIO_CODEC_UNKNOWN. Because as long as there is a headphone codec, the audio jack is supported. So we transform this into has-audio-jack in chromeos-config.

SD Card

Supported only when has-sd-reader is explicitly configured as “true”.

You can run the following commands on your DUT:

  1. cros_config /hardware-properties has-sd-reader This is helpful to understand what the value of has-sd-reader is.
  2. cros-health-tool event --category=sd_card --check_supported Use this to see if healthd reports the correct support status.

To configure has-sd-reader in Boxster, you can use the create_sd_reader function defined in hw_topology.star to set it up.

Network

Not supported by the new event interface. Since there are no users at this moment. Please reach out to us if you need network events.

Keyboard Diagnostic

Supported only when form-factor is explicitly configured as one of the following:

  • CLAMSHELL
  • CONVERTIBLE
  • DETACHABLE

You can run the following commands on your DUT:

  1. cros_config /hardware-properties form-factor This is helpful to understand what the value of form-factor is.
  2. cros-health-tool event --category=keyboard_diagnostic --check_supported Use this to see if healthd reports the correct support status.

To configure form-factor in Boxster, you can use the create_form_factor function defined in hw_topology.star to set it up.

Touchpad

Supported only when form-factor is explicitly configured as one of the following:

  • CLAMSHELL
  • CONVERTIBLE
  • DETACHABLE

You can run the following commands on your DUT:

  1. cros_config /hardware-properties form-factor This is helpful to understand what the value of form-factor is.
  2. cros-health-tool event --category=touchpad --check_supported Use this to see if healthd reports the correct support status.

To configure form-factor in Boxster, you can use create_form_factor function defined in hw_topology.star to set it up.

External Display

Always supported.

Touchscreen

Supported only when has-touchscreen is explicitly configured as “true”.

You can run the following commands on your DUT:

  1. cros_config /hardware-properties has-touchscreen This is helpful to understand what the value of has-touchscreen is.
  2. cros-health-tool event --category=touchscreen --check_supported Use this to see if healthd reports the correct support status.

To configure has-touchscreen in Boxster, you can use create_screen function defined in hw_topology.star to set it up, in this case, you should fill the touch parameter as True.

Stylus Garage

Supported only when stylus-category is explicitly configured as “internal”, which means it's a “garaged stylus”.

You can run the following commands on your DUT:

  1. cros_config /hardware-properties stylus-category This is helpful to understand what the value of stylus-category is.
  2. cros-health-tool event --category=stylus_garage --check_supported Use this to see if healthd reports the correct support status.

To configure stylus-category in Boxster, you can use the create_stylus function defined in hw_topology.star to set it up.

Stylus

Supported only when stylus-category is explicitly configured as “internal” or “external”.

You can run the following commands on your DUT:

  1. cros_config /hardware-properties stylus-category This is helpful to understand what the value of stylus-category is.
  2. cros-health-tool event --category=stylus --check_supported Use this to see if healthd reports the correct support status.

To configure stylus-category in Boxster, you can use the create_stylus function defined in hw_topology.star to set it up.