Telemetry Extension API overview

This document gives a function-level documentation of the Telemetry Extension API. It is separated in the three namespaces telemetry, diagnostics, events and management.

Diagnostics

The diagnostics namespace got a rework since the M119 release and added a new extension-event based interface in M119. The interface is described in V2 Diagnostics API.

Types

Enum RoutineType

Property Name
ac_power
battery_capacity
battery_charge
battery_discharge
battery_health
cpu_cache
cpu_floating_point_accuracy
cpu_prime_search
cpu_stress
disk_read
dns_resolution
memory
smartctl_check
lan_connectivity
signal_strength
dns_resolver_present
gateway_can_be_pinged
sensitive_sensor
nvme_self_test
fingerprint_alive
smartctl_check_with_percentage_used
emmc_lifetime
bluetooth_power
ufs_lifetime
power_button
audio_driver
bluetooth_discovery
bluetooth_scanning
bluetooth_pairing
fan

Enum RoutineStatus

Property Name
unknown
ready
running
waiting_user_action
passed
failed
error
cancelled
failed_to_start
removed
cancelling
unsupported
not_run

Enum RoutineCommandType

Property Name
cancel
remove
resume
status

Enum UserMessageType

Property Name
unknown
unplug_ac_power
plug_in_ac_power
press_power_button

Enum DiskReadRoutineType

Property Name
linear
random

Enum AcPowerStatus

Property Name
connected
disconnected

Enum NvmeSelfTestType

Property Name
short_test
long_test

RunAcPowerRoutineRequest

Property NameTypeDescription
expected_statusAcPowerStatusThe expected status of the AC (‘connected’, ‘disconnected’ or ‘unknown’)
expected_power_type*stringIf specified, this must match the type of power supply for the routine to succeed.

RunBatteryDischargeRoutineRequest

Property NameTypeDescription
length_secondsnumberLength of time to run the routine for
maximum_discharge_percent_allowednumberThe routine will fail if the battery discharges by more than this percentage

RunBatteryChargeRoutineRequest

Property NameTypeDescription
length_secondsnumberLength of time to run the routine for
minimum_charge_percent_requirednumberThe routine will fail if the battery charges by less than this percentage

RunCpuRoutineRequest

Property NameTypeDescription
length_secondsnumberLength of time to run the routine for

RunDiskReadRequest

Property NameTypeDescription
typeDiskReadRoutineTypeType of disk read routine that will be started
length_secondsnumberLength of time to run the routine for
file_size_mbnumbertest file size, in mega bytes, to test with DiskRead routine. Maximum file size is 10 GB

RunPowerButtonRequest

Property NameTypeDescription
timeout_secondsnumberA timeout for the routine

RunNvmeSelfTestRequest

Property NameTypeDescription
test_typeNvmeSelfTestTypeSelects between a “short_test” or a “long_test”.

RunSmartctlCheckRequest

Property NameTypeDescription
percentage_used_thresholdnumberan optional threshold number in percentage, range [0, 255] inclusive, that the routine examines percentage_used against. If not specified, the routine will default to the max allowed value (255).

RunRoutineResponse

Property NameTypeDescription
idnumberId of the routine routine created
statusRoutineStatusCurrent routine status

GetRoutineUpdateRequest

Property NameTypeDescription
idnumberId of the routine you want to query
commandRoutineCommandTypeWhat kind of updated should be performed

GetRoutineUpdateResponse

Property NameTypeDescription
progress_percentnumberCurrent progress of the routine
outputstringOptional debug output
statusRoutineStatusCurrent routine status
status_messagestringOptional routine status message
user_messageUserMessageTypeReturned for routines that require user action (e.g. unplug power cable)

GetAvailableRoutinesResponse

Property NameTypeDescription
routinesArray<RoutineType>Available routine types

Functions

Function NameDefinitionPermission needed to accessReleased in Chrome version
getAvailableRoutines() => Promise<GetAvailableRoutinesResponse>os.diagnosticsM96
getRoutineUpdate(params: GetRoutineUpdateRequest) => Promise<GetRoutineUpdateResponse>os.diagnosticsM96
runAcPowerRoutine(params: RunAcPowerRoutineRequest) => Promise<RunRoutineResponse>os.diagnosticsM105
runAudioDriverRoutine() => Promise<RunRoutineResponse>os.diagnosticsM117
runBatteryCapacityRoutine() => Promise<RunRoutineResponse>os.diagnosticsM96
runBatteryHealthRoutine() => Promise<RunRoutineResponse>os.diagnosticsM96
runBatteryDischargeRoutine(params: RunBatteryDischargeRoutineRequest) => Promise<RunRoutineResponse>os.diagnosticsM96
runBatteryChargeRoutine(params: RunBatteryChargeRoutineRequest) => Promise<RunRoutineResponse>os.diagnosticsM96
runBluetoothDiscoveryRoutine() => Promise<RunRoutineResponse>os.diagnosticsM118
runBluetoothPairingRoutine() => Promise<RunRoutineResponse>os.diagnostics, os.bluetooth_peripherals_infoM118
runBluetoothPowerRoutine() => Promise<RunRoutineResponse>os.diagnosticsM117
runBluetoothScanningRoutine() => Promise<RunRoutineResponse>os.diagnostics, os.bluetooth_peripherals_infoM118
runCpuCacheRoutine(params: RunCpuRoutineRequest) => Promise<RunRoutineResponse>os.diagnosticsM96
runCpuFloatingPointAccuracyRoutine(params: RunCpuRoutineRequest) => Promise<RunRoutineResponse>os.diagnosticsM99
runCpuPrimeSearchRoutine(params: RunCpuRoutineRequest) => Promise<RunRoutineResponse>os.diagnosticsM99
runCpuStressRoutine(params: RunCpuRoutineRequest) => Promise<RunRoutineResponse>os.diagnosticsM96
runDiskReadRoutine(params: RunDiskReadRequest) => Promise<RunRoutineResponse>os.diagnosticsM102
runDnsResolutionRoutine() => Promise<RunRoutineResponse>os.diagnosticsM108
runDnsResolverPresentRoutine() => Promise<RunRoutineResponse>os.diagnosticsM108
runEmmcLifetimeRoutine() => Promise<RunRoutineResponse>os.diagnosticsM110
runFanRoutine() => Promise<RunRoutineResponse>os.diagnosticsM121
runFingerprintAliveRoutine() => Promise<RunRoutineResponse>os.diagnosticsM110
runGatewayCanBePingedRoutine() => Promise<RunRoutineResponse>os.diagnosticsM108
runLanConnectivityRoutine() => Promise<RunRoutineResponse>os.diagnosticsM102
runMemoryRoutine() => Promise<RunRoutineResponse>os.diagnosticsM96
runNvmeSelfTestRoutine(params: RunNvmeSelfTestRequest) => Promise<RunRoutineResponse>os.diagnosticsM110
runPowerButtonRoutine(params: RunPowerButtonRequest) => Promise<RunRoutineResponse>os.diagnosticsM117
runSensitiveSensorRoutine() => Promise<RunRoutineResponse>os.diagnosticsM110
runSignalStrengthRoutine() => Promise<RunRoutineResponse>os.diagnosticsM108
runSmartctlCheckRoutine(params: RunSmartctlCheckRequest?) => Promise<RunRoutineResponse>os.diagnosticsinitial release: M102, new parameter added: M110. The parameter is only available if “smartctl_check_with_percentage_used” is returned from GetAvailableRoutines
runUfsLifetimeRoutine() => Promise<RunRoutineResponse>os.diagnosticsM117

V2 Diagnostics API

Types

Enum RoutineWaitingReason

Property Name
waiting_to_be_scheduled
waiting_for_interaction

Enum ExceptionReason

Property Name
unknown
unexpected
unsupported
app_ui_closed

Enum MemtesterTestItemEnum

Property Name
unknown
stuck_address
compare_and
compare_div
compare_mul
compare_or
compare_sub
compare_xor
sequential_increment
bit_flip
bit_spread
block_sequential
checkerboard
random_value
solid_bits
walking_ones
walking_zeroes
eight_bit_writes
sixteen_bit_writes

Enum RoutineSupportStatus

Property Name
supported
unsupported

RoutineInitializedInfo

Property NameTypeDescription
uuidstringUUID of the routine that entered this state

RoutineRunningInfo

Property NameTypeDescription
uuidstringUUID of the routine that entered this state
percentagenumberCurrent percentage of the routine status (0-100)

CheckLedLitUpStateInquiry

Details regarding the inquiry to check the LED lit up state. Clients should inspect the target LED and report its state using CheckLedLitUpStateReply as the argument of replyToRoutineInquiry.

Property NameTypeDescription

RoutineInquiryUnion

This is a union type. Exactly one field is set.

Property NameTypeDescription
checkLedLitUpStateCheckLedLitUpStateInquirySee CheckLedLitUpStateInquiry.

RoutineInteractionUnion

This is a union type. Exactly one field is set.

Property NameTypeDescription
inquiryRoutineInquiryUnionRoutine inquiries need to be replied to with the replyToRoutineInquiry method

RoutineWaitingInfo

Property NameTypeDescription
uuidstringUUID of the routine that entered this state
percentagenumberCurrent percentage of the routine status (0-100)
reasonRoutineWaitingReasonReason why the routine waits
messagestringAdditional information, may be used to pass instruction or explanation
interactionRoutineInteractionUnionThe requested interaction. When set, clients must respond to the interaction for the routine to proceed. See RoutineInteractionUnion to learn about how to respond to each interaction.

RoutineFinishedInfo

Property NameTypeDescription
uuidstringUUID of the routine that entered this state
hasPassedbooleanWhether the routine finished successfully
detailRoutineFinishedDetailUnionExtra details about a finished routine

ExceptionInfo

Property NameTypeDescription
uuidstringUUID of the routine that entered this state
reasonExceptionReasonReason why the routine threw an exception
debugMessagestringA human readable message for debugging. Don't rely on the content because it could change anytime

RoutineFinishedDetailUnion

Property NameTypeDescription
memoryMemoryRoutineFinishedDetailExtra detail for a finished memory routine
fanFanRoutineFinishedDetailExtra detail for a finished fan routine

MemtesterResult

Property NameTypeDescription
passedItemsArray<MemtesterTestItemEnum>Passed test items
failedItemsArray<MemtesterTestItemEnum>Failed test items

LegacyMemtesterResult

Property NameTypeDescription
passed_itemsArray<MemtesterTestItemEnum>Passed test items
failed_itemsArray<MemtesterTestItemEnum>Failed test items

MemoryRoutineFinishedDetail

Property NameTypeDescription
bytesTestednumberNumber of bytes tested in the memory routine
resultMemtesterResultContains the memtester test results

LegacyMemoryRoutineFinishedInfo

Property NameTypeDescription
uuidstringUUID of the routine that entered this state
has_passedbooleanWhether the routine finished successfully
bytesTestednumberNumber of bytes tested in the memory routine
resultLegacyMemtesterResultContains the memtester test results

CreateMemoryRoutineArguments

Property NameTypeDescription
maxTestingMemKibnumberAn optional field to indicate how much memory should be tested. If the value is null, memory test will run with as much memory as possible

Enum HardwarePresenceStatus

Property Name
matched
not_matched
not_configured

FanRoutineFinishedDetail

Property NameTypeDescription
passedFanIdsArray<number>The ids of fans that can be controlled
failedFanIdsArray<number>The ids of fans that cannot be controlled
fanCountStatusHardwarePresenceStatusWhether the number of fan probed is matched

LegacyFanRoutineFinishedInfo

Property NameTypeDescription
uuidstringUUID of the routine that entered this state
has_passedbooleanWhether the routine finished successfully
passed_fan_idsArray<number>The ids of fans that can be controlled
failed_fan_idsArray<number>The ids of fans that cannot be controlled
fan_count_statusHardwarePresenceStatusWhether the number of fan probed is matched

CreateFanRoutineArguments

Property NameTypeDescription

Enum VolumeButtonType

Property Name
volume_up
volume_down

LegacyVolumeButtonRoutineFinishedInfo

Property NameTypeDescription
uuidstringUUID of the routine that entered this state
has_passedbooleanWhether the routine finished successfully

LegacyCreateVolumeButtonRoutineArguments

Property NameTypeDescription
button_typeVolumeButtonTypeThe volume button to be tested
timeout_secondsnumberLength of time to listen to the volume button events. The value should be positive and less or equal to 600 seconds

CreateVolumeButtonRoutineArguments

Property NameTypeDescription
buttonTypeVolumeButtonTypeThe volume button to be tested
timeoutSecondsnumberLength of time to listen to the volume button events. The value should be positive and less or equal to 600 seconds

CreateNetworkBandwidthRoutineArguments

Checks the network bandwidth and reports the speed info.

This routine is supported when oem-name in cros-config is set and not empty string. The external service for the routine is not available for the unrecognized devices.

Property NameTypeDescription

Enum LedName

Property Name
battery
power
adapter
left
right

Enum LedColor

Property Name
red
green
blue
yellow
white
amber

CreateLedLitUpRoutineArguments

The routine lights up the target LED in the specified color and requests the caller to verify the change.

This routine is supported if and only if the device has a ChromeOS EC.

When an LED name or LED color is not supported by the EC, it will cause a routine exception (by emitting an onRoutineException event) at runtime.

The routine proceeds with the following steps:

  1. Set the specified LED with the specified color and enter the waiting state with the CheckLedLitUpStateInquiry interaction request.W
  2. After receiving CheckLedLitUpStateReply with the observed LED state, the color of the LED will be reset (back to auto control). Notice that there is no timeout so the routine will be in the waiting state indefinitely.
  3. The routine passes if the LED is lit up in the correct color. Otherwise, the routine fails.
Property NameTypeDescription
nameLedNameThe LED to be lit up
colorLedColorThe color to be lit up

CreateRoutineArgumentsUnion

This is a union type. Exactly one field is set.

Property NameTypeReleased in Chrome versionDescriptionAdditional permission needed to access
memoryCreateMemoryRoutineArgumentsM125Arguments to create a memory routineNone
volumeButtonCreateVolumeButtonRoutineArgumentsM125Arguments to create a volume button routineNone
fanCreateFanRoutineArgumentsM125Arguments to create a fan routineNone
networkBandwidthCreateNetworkBandwidthRoutineArgumentsM125Arguments to create a network bandwidth routineos.diagnostics.network_info_mlab
ledLitUpCreateLedLitUpRoutineArgumentsM125Arguments to create a LED lit up routineNone

CreateRoutineResponse

Property NameTypeDescription
uuidstringUUID of the routine that was just created

RoutineSupportStatusInfo

Property NameTypeDescription
statusRoutineSupportStatusWhether a routine with the provided arguments is supported or unsupported

StartRoutineRequest

Property NameTypeDescription
uuidstringUUID of the routine that shall be created

Enum LedLitUpState

Property Name
correct_color
not_lit_up

CheckLedLitUpStateReply

Property NameTypeDescription
stateLedLitUpStateState of the target LED

RoutineInquiryReplyUnion

This is a union type. Exactly one field is set.

Property NameTypeDescription
uuidstringUUID of the routine that shall be replied
checkLedLitUpStateCheckLedLitUpStateReplyReply to a CheckLedLitUpStateInquiry

ReplyToRoutineInquiryRequest

Property NameTypeDescription
uuidstringUUID of the routine that shall be replied
replyRoutineInquiryReplyUnionReply to an inquiry in the routine waiting info

CancelRoutineRequest

Property NameTypeDescription
uuidstringUUID of the routine that shall be cancelled

Functions

Function NameDefinitionPermission needed to accessReleased in Chrome versionDescription
createRoutine(args: CreateRoutineArgumentsUnion) => Promise<CreateRoutineResponse>os.diagnosticsM125Create a routine with CreateRoutineArgumentsUnion. Exactly one routine should be set in CreateRoutineArgumentsUnion.
isRoutineArgumentSupported(args: CreateRoutineArgumentsUnion) => Promise<RoutineSupportStatusInfo>os.diagnosticsM125Checks whether a certain CreateRoutineArgumentsUnion is supported on the platform. Exactly one routine should be set in CreateRoutineArgumentsUnion.
startRoutine(params: StartRoutineRequest) => Promise<void>os.diagnosticsM119Starts execution of a routine. This can only be expected to work after onRoutineInitialized was emitted for the routine with UUID.
replyToRoutineInquiry(params: ReplyToRoutineInquiryRequest) => Promise<void>os.diagnosticsM125Replies to a routine inquiry. This can only work when the routine with UUID is in the waiting state and has set an inquiry in the waiting info
cancelRoutine(params: CancelRoutineRequest) => Promise<void>os.diagnosticsM119Stops executing the routine identified by UUID and removes all related resources from the system.
createMemoryRoutine(args: CreateMemoryRoutineArguments) => Promise<CreateRoutineResponse>os.diagnosticsM119(Deprecated in M125, use createRoutine with memory arg) Create a memory routine.
createFanRoutine(args: CreateFanRoutineArguments) => Promise<CreateRoutineResponse>os.diagnosticsM121(Deprecated in M125, use createRoutine with fan arg) Create a fan routine.
createVolumeButtonRoutine(args: LegacyCreateVolumeButtonRoutineArguments) => Promise<CreateRoutineResponse>os.diagnosticsM121(Deprecated in M125, use createRoutine with volumeButton arg) Create a volume button routine.
isMemoryRoutineArgumentSupported(args: CreateMemoryRoutineArguments) => Promise<RoutineSupportStatusInfo>os.diagnosticsM119(Deprecated in M125, use isRoutineArgumentSupported with memory arg) Checks whether a certain CreateMemoryRoutineArguments is supported on the platform.
isFanRoutineArgumentSupported(args: CreateFanRoutineArguments) => Promise<RoutineSupportStatusInfo>os.diagnosticsM121(Deprecated in M125, use isRoutineArgumentSupported with fan arg) Checks whether a certain CreateFanRoutineArguments is supported on the platform.
isVolumeButtonRoutineArgumentSupported(args: LegacyCreateVolumeButtonRoutineArguments) => Promise<RoutineSupportStatusInfo>os.diagnosticsM121(Deprecated in M125, use isRoutineArgumentSupported with volumeButton arg) Checks whether a certain LegacyCreateVolumeButtonRoutineArguments is supported on the platform.

Events

Function NameDefinitionPermission needed to accessReleased in Chrome versionEmitted on
onRoutineInitializedfunction(RoutineInitializedInfo)os.diagnosticsM119Informs the extension that a routine was initialized
onRoutineRunningfunction(RoutineRunningInfo)os.diagnosticsM119Informs the extension that a routine started running. This can happen in two situations: 1. startRoutine was called and the routine successfully started execution. 2. The routine exited the “waiting” state and returned to running
onRoutineWaitingfunction(RoutineWaitingInfo)os.diagnosticsM119Informs the extension that a routine stopped execution and waits for an event, e.g. user interaction. RoutineWaitingInfo contains information about what the routine is waiting for
onRoutineExceptionfunction(ExceptionInfo)os.diagnosticsM119Informs the extension that an exception occurred. The error passed in ExceptionInfo is non-recoverable
onRoutineFinishedfunction(RoutineFinishedInfo)os.diagnosticsM125Informs the extension that a routine finished
onMemoryRoutineFinishedfunction(LegacyMemoryRoutineFinishedInfo)os.diagnosticsM119(Deprecated, use onRoutineFinished) Informs the extension that a memory routine finished
onFanRoutineFinishedfunction(LegacyFanRoutineFinishedInfo)os.diagnosticsM121(Deprecated, use onRoutineFinished) Informs the extension that a fan routine finished
onVolumeButtonRoutineFinishedfunction(LegacyVolumeButtonRoutineFinishedInfo)os.diagnosticsM121(Deprecated, use onRoutineFinished) Informs the extension that a volume button routine finished

Events

Types

Enum EventCategory

Property Name
audio_jack
lid
usb
sd_card
power
keyboard_diagnostic
stylus_garage
touchpad_button
touchpad_touch
touchpad_connected
touchscreen_touch
touchscreen_connected
external_display
stylus_touch
stylus_connected

Enum EventSupportStatus

Property Name
supported
unsupported

EventSupportStatusInfo

Property NameTypeDescription
statusEventSupportStatusSupport status of an event

Enum AudioJackEvent

Property Name
connected
disconnected

Enum AudioJackDeviceType

Property Name
headphone
microphone

AudioJackEventInfo

Property NameTypeDescription
eventAudioJackEventThe event that occurred
deviceTypeAudioJackDeviceTypeThe device type of

Enum LidEvent

Property Name
closed
opened

LidEventInfo

Property NameTypeDescription
eventLidEventThe event that occurred

Enum KeyboardConnectionType

Property Name
internal
usb
bluetooth
unknown

Enum PhysicalKeyboardLayout

Property Name
unknown
chrome_os

Enum MechanicalKeyboardLayout

Property Name
unknown
ansi
iso
jis

Enum KeyboardNumberPadPresence

Property Name
unknown
present
not_present

Enum KeyboardTopRowKey

Property Name
no_key
unknown
back
forward
refresh
fullscreen
overview
screenshot
screen_brightness_down
screen_brightness_up
privacy_screen_toggle
microphone_mute
volume_mute
volume_down
volume_up
keyboard_backlight_toggle
keyboard_backlight_down
keyboard_backlight_up
next_track
previous_track
play_pause
screen_mirror
delete

Enum KeyboardTopRightKey

Property Name
unknown
power
lock
control_panel

KeyboardInfo

Property NameTypeDescription
idnumberThe number of the keyboard's /dev/input/event* node
connectionTypeKeyboardConnectionTypeThe keyboard's connection type
namestringThe keyboard's name
physicalLayoutPhysicalKeyboardLayoutThe keyboard's physical layout
mechanicalLayoutMechanicalKeyboardLayoutThe keyboard's mechanical layout
regionCodestringFor internal keyboards, the region code of the device (from which the visual layout can be determined)
numberPadPresentKeyboardNumberPadPresenceWhether the keyboard has a number pad or not
topRowKeysArray<KeyboardTopRowKey>List of ChromeOS specific action keys in the top row. This list excludes the left-most Escape key, and right-most key (usually Power/Lock). If a keyboard has F11-F15 keys beyond the rightmost action key, they may not be included in this list (even as “none”)
topRightKeyKeyboardTopRightKeyFor CrOS keyboards, the glyph shown on the key at the far right end of the top row
hasAssistantKeybooleanOnly applicable on ChromeOS keyboards

KeyboardDiagnosticEventInfo

Property NameTypeDescription
keyboardInfoKeyboardInfoThe keyboard which has been tested
testedKeysArray<number>Keys which have been tested. It is an array of the evdev key code
testedTopRowKeysArray<number>Top row keys which have been tested. They are positions of the key on the top row after escape (0 is leftmost, 1 is next to the right, etc.). Generally, 0 is F1, in some fashion. NOTE: This position may exceed the length of keyboard_info->top_row_keys, for external keyboards with keys in the F11-F15 range

Enum UsbEvent

Property Name
connected
disconnected

UsbEventInfo

Property NameTypeDescription
vendorstringVendor name
namestringThe device's name
vidnumberVendor ID of the device
pidnumberProduct ID of the device
categoriesArray<string>USB device categories: https://www.usb.org/defined-class-codes
eventUsbEventThe event that occurred

Enum ExternalDisplayEvent

Property Name
connected
disconnected

ExternalDisplayEventInfo

Property NameTypeDescription
eventExternalDisplayEventThe event that occurred
display_infoExternalDisplayInfoThe information related to the plugged in external display

Enum SdCardEvent

Property Name
connected
disconnected

SdCardEventInfo

Property NameTypeDescription
eventSdCardEventThe event that occurred

Enum PowerEvent

Property Name
ac_inserted
ac_removed
os_suspend
os_resume

PowerEventInfo

Property NameTypeDescription
eventPowerEventThe event that occurred

Enum StylusGarageEvent

Property Name
inserted
removed

StylusGarageEventInfo

Property NameTypeDescription
eventStylusGarageEventThe event that occurred

Enum InputTouchButton

Property Name
left
middle
right

Enum InputTouchButtonState

Property Name
pressed
released

TouchpadButtonEventInfo

Property NameTypeDescription
buttonInputTouchButtonThe input button that was interacted with
stateInputTouchButtonStateThe new state of the button

TouchPointInfo

Property NameTypeDescription
trackingIdnumberAn id to track an initiated contact throughout its life cycle
xnumberThe x position
ynumberThe y position
pressurenumberThe pressure applied to the touch contact. The value ranges from 0 to max_pressure as defined in TouchpadConnectedEventInfo and TouchscreenConnectedEventInfo
touchMajornumberThe length of the longer dimension of the touch contact
touchMinornumberThe length of the shorter dimension of the touch contact

TouchpadTouchEventInfo

Property NameTypeDescription
touchPointsArray<TouchPointInfo>The touch points reported by the touchpad

TouchpadConnectedEventInfo

Property NameTypeDescription
maxXnumberThe maximum possible x position of touch points
maxYnumberThe maximum possible y position of touch points
maxPressurenumberThe maximum possible pressure of touch points, or 0 if pressure is not supported
buttonsArray<InputTouchButton>The supported buttons

TouchscreenTouchEventInfo

Property NameTypeDescription
touchPointsArray<TouchPointInfo>The touch points reported by the touchscreen

TouchscreenConnectedEventInfo

Property NameTypeDescription
maxXnumberThe maximum possible x position of touch points
maxYnumberThe maximum possible y position of touch points
maxPressurenumberThe maximum possible pressure of touch points, or 0 if pressure is not supported

StylusTouchPointInfo

Property NameTypeDescription
xnumberThe x position in the cartesian XY plane. The value ranges from 0 to max_x as defined in StylusConnectedEventInfo
ynumberThe y position in the cartesian XY plane. The value ranges from 0 to max_y as defined in StylusConnectedEventInfo
pressurenumberThe pressure applied to the touch contact. The value ranges from 0 to max_pressure as defined in StylusConnectedEventInfo

StylusTouchEventInfo

Property NameTypeDescription
touchPointStylusTouchPointInfoThe info of the stylus touch point. A null touch point means the stylus leaves the contact

StylusConnectedEventInfo

Property NameTypeDescription
maxXnumberThe maximum possible x position of touch points
maxYnumberThe maximum possible y position of touch points
maxPressurenumberThe maximum possible pressure of touch points, or 0 if pressure is not supported

Functions

Function NameDefinitionPermission needed to accessReleased in Chrome versionDescription
isEventSupported(category: EventCategory) => Promise<EventSupportStatusInfo>os.eventsM115Checks whether an event is supported. The information returned by this method is valid across reboots of the device
startCapturingEvents(category: EventCategory) => ()os.eventsM115Starts capturing events for EventCategory. After calling this method, an extension can expect to be updated about events through invocations of on<EventCategory>Event, until either the PWA is closed or stopCapturingEvents is called. Note that an extension is only able to subscribe to events if the PWA is currently open
stopCapturingEvents(category: EventCategory) => ()os.eventsM115Stops capturing EventCategory events. This means on<EventCategory>Event won't be invoked until startCapturingEvents is successfully called

Events

Function NameDefinitionPermission needed to accessReleased in Chrome versionEmitted on
onAudioJackEventfunction(AudioJackEventInfo)os.eventsM115An audio device was plugged in or out
onKeyboardDiagnosticEventfunction(KeyboardDiagnosticEventInfo)os.eventsM117Informs the extension that a Keyboard diagnostic has been completed in the first party diagnostic tool
onLidEventfunction(LidEventInfo)os.eventsM115The device lid was opened or closed
onUsbEventfunction(UsbEventInfo)os.eventsM115Informs the extension that a Usb event occurred
onExternalDisplayEventfunction(ExternalDisplayEventInfo)os.eventsM117Informs the extension that a ExternalDisplay event occurred
onSdCardEventfunction(SdCardEventInfo)os.eventsM117Informs the extension that a SD Card event occurred
onPowerEventfunction(PowerEventInfo)os.eventsM117Informs the extension that a Power event occurred
onStylusGarageEventfunction(StylusGarageEventInfo)os.eventsM117Informs the extension that a Stylus Garage event occurred
onTouchpadButtonEventfunction(TouchpadButtonEventInfo)os.eventsM117Informs the extension that a Touchpad Button event occurred
onTouchpadTouchEventfunction(TouchpadTouchEventInfo)os.eventsM117Informs the extension that a Touchpad Touch event occurred
onTouchpadConnectedEventfunction(TouchpadConnectedEventInfo)os.eventsM117Informs the extension that a Touchpad Connected event occurred
onTouchscreenTouchEventfunction(TouchscreenTouchEventInfo)os.eventsM118Informs the extension that a Touchscreen Touch event occurred
onTouchscreenConnectedEventfunction(TouchscreenConnectedEventInfo)os.eventsM118Informs the extension that a Touchscreen Connected event occurred
onStylusTouchEventfunction(StylusTouchEventInfo)os.eventsM117Informs the extension that a Stylus Touch event occurred
onStylusConnectedEventfunction(StylusConnectedEventInfo)os.eventsM117Informs the extension that a Stylus Connected event occurred

Telemetry

Types

AudioOutputNodeInfo

Property NameTypeDescription
idnumberNode id
namestringThe name of this node. For example, “Speaker”
deviceNamestringThe name of the device that this node belongs to. For example, “HDA Intel PCH: CA0132 Analog:0,0”
activebooleanWhether this node is currently used for output. There is one active node for output
nodeVolumenumberThe node volume in [0, 100]

AudioInputNodeInfo

Property NameTypeDescription
idnumberNode id
namestringThe name of this node. For example, “Internal Mic”
deviceNamestringThe name of the device that this node belongs to. For example, “HDA Intel PCH: CA0132 Analog:0,0”
activebooleanWhether this node is currently used for input. There is one active node for input
nodeGainnumberThe input node gain set by UI, the value is in [0, 100]

AudioInfo

Property NameTypeDescription
outputMutebooleanIs the active output device mute or not
inputMutebooleanIs the active input device mute or not
underrunsnumberNumber of underruns
severeUnderrunsnumberNumber of severe underruns
outputNodesArray<AudioOutputNodeInfo>Output nodes
inputNodesArray<AudioInputNodeInfo>Input nodes

BatteryInfo

Property NameTypeDescription
chargeFullnumberFull capacity (Ah)
chargeFullDesignnumberDesign capacity (Ah)
chargeNownumberBattery's charge (Ah)
currentNownumberBattery's current (A)
cycleCountnumberBattery's cycle count
manufactureDatestringManufacturing date in yyyy-mm-dd format. Included when the main battery is Smart
modelNamestringBattery's model name
serialNumberstringBattery's serial number
statusstringBattery's status (e.g. charging)
technologystringUsed technology in the battery
temperaturenumberTemperature in 0.1K. Included when the main battery is Smart
vendorstringBattery's manufacturer
voltageMinDesignnumberDesired minimum output voltage
voltageNownumberBattery's voltage (V)

NonRemovableBlockDeviceInfo

Property NameTypeDescription
namestringThe name of the block device.
typestringThe type of the block device, (e.g. “MMC”, “NVMe” or “ATA”).
sizenumberThe device size in bytes.

NonRemovableBlockDeviceInfoResponse

Property NameTypeDescription
deviceInfosArray<NonRemovableBlockDeviceInfo>The list of block devices.

Enum CpuArchitectureEnum

Property Name
unknown
x86_64
aarch64
armv7l

PhysicalCpuInfo

Property NameTypeDescription
logicalCpusArray<LogicalCpuInfo>Logical CPUs corresponding to this physical CPU
modelNamestringThe CPU model name

LogicalCpuInfo

Property NameTypeDescription
cStatesArray<CpuCStateInfo>Information about the logical CPU's time in various C-states
idleTimeMsnumberIdle time since last boot, in milliseconds
maxClockSpeedKhznumberThe max CPU clock speed in kilohertz
scalingCurrentFrequencyKhznumberCurrent frequency the CPU is running at
scalingMaxFrequencyKhznumberMaximum frequency the CPU is allowed to run at, by policy
coreIdnumberThe ID of this logical CPU core

CpuCStateInfo

Property NameTypeDescription
namestringState name
timeInStateSinceLastBootUsnumberTime spent in the state since the last reboot, in microseconds

CpuInfo

Property NameTypeDescription
architectureCpuArchitectureEnumThe CPU architecture - it‘s assumed all of a device’s CPUs share the same architecture
numTotalThreadsnumberNumber of total threads available
physicalCpusArray<PhysicalCpuInfo>Information about the device's physical CPUs

Enum DisplayInputType

Property Name
unknown
digital
analog

EmbeddedDisplayInfo

Property NameTypeDescription
privacyScreenSupportedbooleanWhether a privacy screen is supported or not
privacyScreenEnabledbooleanWhether a privacy screen is enabled or not
displayWidthnumberDisplay width in millimeters
displayHeightnumberDisplay height in millimeters
resolutionHorizontalnumberHorizontal resolution
resolutionVerticalnumberVertical resolution
refreshRatenumberRefresh rate
manufacturerstringThree letter manufacturer ID
modelIdnumberManufacturer product code
serialNumbernumber32 bits serial number
manufactureWeeknumberWeek of manufacture
manufactureYearnumberYear of manufacture
edidVersionstringEDID version
inputTypeDisplayInputTypeDigital or analog input
displayNamestringName of display product

ExternalDisplayInfo

Property NameTypeDescription
displayWidthnumberDisplay width in millimeters
displayHeightnumberDisplay height in millimeters
resolutionHorizontalnumberHorizontal resolution
resolutionVerticalnumberVertical resolution
refreshRatenumberRefresh rate
manufacturerstringThree letter manufacturer ID
modelIdnumberManufacturer product code
serialNumbernumber32 bits serial number
manufacture_weeknumberWeek of manufacture
manufacture_yearnumberYear of manufacture
edidVersionstringEDID version
inputTypeDisplayInputTypeDigital or analog input
displayNamestringName of display product

DisplayInfo

ExternalDisplayInfo

Property NameTypeDescription
embeddedDisplayEmbeddedDisplayInfoEmbedded display info
externalDisplaysArray<ExternalDisplayInfo>External display info

Enum NetworkType

Property Name
cellular
ethernet
tether
vpn
wifi

Enum NetworkState

Property Namedescription
uninitializedThe network type is available but not yet initialized
disabledThe network type is available but disabled or disabling
prohibitedThe network type is prohibited by policy
not_connectedThe network type is available and enabled or enabling, but no network connection has been established
connectingThe network type is available and enabled, and a network connection is in progress
portalThe network is in a portal state
connectedThe network is in a connected state, but connectivity is limited
onlineThe network is connected and online

NetworkInfo

Property NameTypeDescription
typeNetworkTypeThe type of network interface (wifi, ethernet, etc.)
stateNetworkStateThe current state of the network interface (disabled, enabled, online, etc.)
macAddressstring(Added in M110): The currently assigned mac address. Only available with the permission os.telemetry.network_info.
ipv4AddressstringThe currently assigned ipv4Address of the interface
ipv6AddressesArray<string>The list of currently assigned ipv6Addresses of the interface
signalStrengthnumberThe current signal strength in percent

InternetConnectivityInfo

Property NameTypeDescription
networksArray<NetworkInfo>List of available network interfaces and their configuration

MarketingInfo

Property NameTypeDescription
marketingNamestringContents of CrosConfig in /branding/marketing-name

MemoryInfo

Property NameTypeDescription
totalMemoryKiBnumberTotal memory, in kilobytes
freeMemoryKiBnumberFree memory, in kilobytes
availableMemoryKiBnumberAvailable memory, in kilobytes
pageFaultsSinceLastBootnumberNumber of page faults since the last boot

OemDataInfo

Property NameTypeDescription
oemDatastringOEM's specific data. This field is used to store battery serial number by some OEMs

OsVersionInfo

Property NameTypeDescription
releaseMilestonestringThe release milestone (e.g. “87”)
buildNumberstringThe build number (e.g. “13544”)
patchNumberstringThe build number (e.g. “59.0”)
releaseChannelstringThe release channel (e.g. “stable-channel”)

VpdInfo

Property NameTypeDescription
skuNumberstringDevice's SKU number, a.k.a. product number
serialNumberstringDevice's serial number
modelNamestringDevice's model name
activateDatestringDevice's activate date: Format: YYYY-WW

StatefulPartitionInfo

Property NameTypeDescription
availableSpacenumberThe currently available space in the user partition (Bytes)
totalSpacenumberThe total space of the user partition (Bytes)

Enum ThermalSensorSource

Property Name
unknown
ec
sysFs

ThermalSensorInfo

Property NameTypeDescription
namestringName of the thermal sensor
temperatureCelsiusnumberTemperature detected by the thermal sensor in celsius
sourceThermalSensorSourceWhere the thermal sensor is detected from

ThermalInfo

Property NameTypeDescription
thermalSensorsArray<ThermalSensorInfo>An array containing all the information retrieved for thermal sensors

Enum TpmGSCVersion

Property Name
not_gsc
cr50
ti5

TpmVersion

Property NameTypeDescription
gscVersionTpmGSCVersionThe version of Google security chip(GSC), or “not_gsc” if not applicable
familynumberTPM family. We use the TPM 2.0 style encoding (see here for reference), e.g.: TPM 1.2: “1.2” -> 0x312e3200 TPM 2.0: “2.0” -> 0x322e3000
specLevelnumberThe level of the specification that is implemented by the TPM
manufacturernumberA manufacturer specific code
tpmModelnumberThe TPM model number
firmwareVersionnumberThe current firmware version of the TPM
vendorSpecificstringInformation set by the vendor

TpmStatus

Property NameTypeDescription
enabledbooleanWhether the
ownedbooleanWhether the TPM has been owned
specLevelbooleanWhether the owner password is still retained (as part of the TPM initialization)

TpmDictionaryAttack

Property NameTypeDescription
counternumberThe current dictionary attack counter value
thresholdnumberThe current dictionary attack counter threshold
lockoutInEffectbooleanWhether the TPM is currently in some form of dictionary attack lockout
lockoutSecondsRemainingnumberThe number of seconds remaining in the lockout (if applicable)

TpmInfo

Property NameTypeDescription
versionTpmVersionThe current version of the Trusted Platform Module (TPM)
statusTpmStatusThe current status of the TPM
dictionaryAttackTpmDictionaryAttackTPM dictionary attack (DA) related information

UsbBusInterfaceInfo

Property NameTypeDescription
interfaceNumbernumberThe zero-based number (index) of the interface
classIdnumberThe class id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids)
subclassIdnumberThe subclass id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids)
protocolIdnumberThe protocol id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids)
driverstringThe driver used by the device. This is the name of the matched driver which is registered in the kernel. See “{kernel root}/drivers/” for the list of the built in drivers

Enum FwupdVersionFormat

Property NameDescription
plainAn unidentified format text string
numberA single integer version number
pairTwo AABB.CCDD version numbers
tripletMicrosoft-style AA.BB.CCDD version numbers
quadUEFI-style AA.BB.CC.DD version numbers
bcdBinary coded decimal notation
intelMeIntel ME-style bitshifted notation
intelMe2Intel ME-style A.B.CC.DDDD notation
surfaceLegacyLegacy Microsoft Surface 10b.12b.10b
surfaceMicrosoft Surface 8b.16b.8b
dellBiosDell BIOS BB.CC.DD style
hexHexadecimal 0xAABCCDD style

FwupdFirmwareVersionInfo

Property NameTypeDescription
versionstringThe string form of the firmware version
version_formatFwupdVersionFormatThe format for parsing the version string

Enum UsbVersion

Property Name
unknown
usb1
usb2
usb3

Enum UsbSpecSpeed

An enumeration of the usb spec speed in Mbps. Source:

  1. https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-usb
  2. https://www.kernel.org/doc/Documentation/ABI/stable/sysfs-bus-usb
  3. https://en.wikipedia.org/wiki/USB
Property NameDescription
unknownUnknown speed
n1_5MbpsLow speed
n12MbpsFull speed
n480MbpsHigh Speed
n5GbpsSuper Speed
n10GbpsSuper Speed+
n20GbpsSuper Speed+ Gen 2x2

UsbBusInfo

Property NameTypeDescription
classIdnumberThe class id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids)
subclassIdnumberThe subclass id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids)
protocolIdnumberThe protocol id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids)
vendorIdnumberThe vendor id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids)
productIdnumberThe product id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids)
interfacesArray<UsbBusInterfaceInfo>The usb interfaces under the device. A usb device has at least one interface. Each interface may or may not work independently, based on each device. This allows a usb device to provide multiple features. The interfaces are sorted by the interface_number field
fwupdFirmwareVersionInfoFwupdFirmwareVersionInfoThe firmware version obtained from fwupd
versionUsbVersionThe recognized usb version. It may not be the highest USB version supported by the hardware
spec_speedUsbSpecSpeedThe spec usb speed

UsbDevicesInfo

Property NameTypeDescription
devicesArray<UsbBusInfo>Information about all connected USB devices

Functions

Function NameDefinitionPermission needed to accessReleased in Chrome version
getVpdInfo() => Promise<VpdInfo>os.telemetry, os.telemetry.serial_number for serial number fieldM96
getOemData() => Promise<OemDataInfo>os.telemetry, os.telemetry.serial_number for the whole resultM96
getCpuInfo() => Promise<CpuInfo>os.telemetryM99
getDisplayInfo() => Promise<DisplayInfo>os.telemetryM117
getMemoryInfo() => Promise<MemoryInfo>os.telemetryM99
getBatteryInfo() => Promise<BatteryInfo>os.telemetry, os.telemetry.serial_number for serial number fieldM102
getStatefulPartitionInfo() => Promise<StatefulPartitionInfo>os.telemetryM105
getOsVersionInfo() => Promise<OsVersionInfo>os.telemetryM105
getNonRemovableBlockDevicesInfo() => Promise<NonRemovableBlockDeviceInfoResponse>os.telemetryM108
getInternetConnectivityInfo() => Promise<InternetConnectivityInfo>os.telemetry, os.telemetry.network_info for MAC address fieldM108 - Mac address in M111
getTpmInfo() => Promise<TpmInfo>os.telemetryM108
getAudioInfo() => Promise<AudioInfo>os.telemetryM111
getMarketingInfo() => Promise<MarketingInfo>os.telemetryM111
getUsbBusInfo() => Promise<UsbDevicesInfo>os.telemetry, os.attached_device_infoM114
getThermalInfo() => Promise<ThermalInfo>os.telemetryM122

Management

Types

SetAudioGainArguments

Property NameTypeDescription
nodeIdnumberNode id of the audio device to be configured
gainnumberTarget gain percent in [0, 100]. Sets to 0 or 100 if outside

SetAudioVolumeArguments

Property NameTypeDescription
nodeIdnumberNode id of the audio device to be configured
volumenumberTarget volume percent in [0, 100]. Sets to 0 or 100 if outside
isMutedbooleanWhether to mute the device

Functions

Function NameDefinitionPermission needed to accessReleased in Chrome versionDescription
setAudioGain(args: SetAudioGainArguments) => Promise<boolean>os.management.audioM122Sets the specified input audio device's gain to value. Returns false if args.nodeId is invalid
setAudioVolume(args: SetAudioVolumeArguments) => Promise<boolean>os.management.audioM122Sets the specified output audio device's volume and mute state to the given value. Returns false if args.nodeId is invalid