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.

Dictionary-based union types

There are functions with similar signatures. It's useful to simplify the interfaces by merging these functions into one. For example, postFooData(arg: FooType) and postBarData(arg: BarType) could be merged into postData(arg: ExampleUnionType). We use a dictionary-based union type for this purpose. Such a union object represents exactly one of the N candidate types, in the form of a dictionary with N optional fields, each corresponding to one candidate type.

Let's see an example. The following table describes a union type ExampleUnionType that is either a FooType or a BarType.

Property NameTypeDescription
fooFooTypeInformation about foo
barBarTypeInformation about bar

To invoke a function os.exampleFunction() that accepts an ExampleUnionType

  • with an object of FooType
    os.exampleFunction(
      arg: {
         foo: aFooObject
      }
    )
    
  • with an object of BarType
    os.exampleFunction(
      arg: {
         bar: aBarObject
      }
    )
    

Notice that exactly one field should be set. That is, the object is invalid when either

  • more than one field is set, or
  • no field is set.

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

getAvailableRoutines()

chrome.os.diagnostics.getAvailableRoutines() => Promise<GetAvailableRoutinesResponse>

Released in Chrome version

M96

Required permission

  • os.diagnostics

getRoutineUpdate()

chrome.os.diagnostics.getRoutineUpdate(
  request: GetRoutineUpdateRequest,
) => Promise<GetRoutineUpdateResponse>

Released in Chrome version

M96

Required permission

  • os.diagnostics

runAcPowerRoutine()

chrome.os.diagnostics.runAcPowerRoutine(
  request: RunAcPowerRoutineRequest,
) => Promise<RunRoutineResponse>

Released in Chrome version

M105

Required permission

  • os.diagnostics

runAudioDriverRoutine()

chrome.os.diagnostics.runAudioDriverRoutine() => Promise<RunRoutineResponse>

Released in Chrome version

M117

Required permission

  • os.diagnostics

runBatteryCapacityRoutine()

chrome.os.diagnostics.runBatteryCapacityRoutine() => Promise<RunRoutineResponse>

Released in Chrome version

M96

Required permission

  • os.diagnostics

runBatteryChargeRoutine()

chrome.os.diagnostics.runBatteryChargeRoutine(
  request: RunBatteryChargeRoutineRequest,
) => Promise<RunRoutineResponse>

Released in Chrome version

M96

Required permission

  • os.diagnostics

runBatteryDischargeRoutine()

chrome.os.diagnostics.runBatteryDischargeRoutine(
  request: RunBatteryDischargeRoutineRequest,
) => Promise<RunRoutineResponse>

Released in Chrome version

M96

Required permission

  • os.diagnostics

runBatteryHealthRoutine()

chrome.os.diagnostics.runBatteryHealthRoutine() => Promise<RunRoutineResponse>

Released in Chrome version

M96

Required permission

  • os.diagnostics

runBluetoothDiscoveryRoutine()

chrome.os.diagnostics.runBluetoothDiscoveryRoutine() => Promise<RunRoutineResponse>

Released in Chrome version

M118

Required permission

  • os.diagnostics

runBluetoothPairingRoutine()

chrome.os.diagnostics.runBluetoothPairingRoutine() => Promise<RunRoutineResponse>

Released in Chrome version

M118

Required permission

  • os.diagnostics
  • os.bluetooth_peripherals_info

runBluetoothPowerRoutine()

chrome.os.diagnostics.runBluetoothPowerRoutine() => Promise<RunRoutineResponse>

Released in Chrome version

M117

Required permission

  • os.diagnostics

runBluetoothScanningRoutine()

chrome.os.diagnostics.runBluetoothScanningRoutine() => Promise<RunRoutineResponse>

Released in Chrome version

M118

Required permission

  • os.diagnostics
  • os.bluetooth_peripherals_info

runCpuCacheRoutine()

chrome.os.diagnostics.runCpuCacheRoutine(
  request: RunCpuRoutineRequest,
) => Promise<RunRoutineResponse>

Released in Chrome version

M96

Required permission

  • os.diagnostics

runCpuFloatingPointAccuracyRoutine()

chrome.os.diagnostics.runCpuFloatingPointAccuracyRoutine(
  request: RunCpuRoutineRequest,
) => Promise<RunRoutineResponse>

Released in Chrome version

M99

Required permission

  • os.diagnostics

runCpuPrimeSearchRoutine()

chrome.os.diagnostics.runCpuPrimeSearchRoutine(
  request: RunCpuRoutineRequest,
) => Promise<RunRoutineResponse>

Released in Chrome version

M99

Required permission

  • os.diagnostics

runCpuStressRoutine()

chrome.os.diagnostics.runCpuStressRoutine(
  request: RunCpuRoutineRequest,
) => Promise<RunRoutineResponse>

Released in Chrome version

M96

Required permission

  • os.diagnostics

runDiskReadRoutine()

chrome.os.diagnostics.runDiskReadRoutine(
  request: RunDiskReadRequest,
) => Promise<RunRoutineResponse>

Released in Chrome version

M102

Required permission

  • os.diagnostics

runDnsResolutionRoutine()

chrome.os.diagnostics.runDnsResolutionRoutine() => Promise<RunRoutineResponse>

Released in Chrome version

M108

Required permission

  • os.diagnostics

runDnsResolverPresentRoutine()

chrome.os.diagnostics.runDnsResolverPresentRoutine() => Promise<RunRoutineResponse>

Released in Chrome version

M108

Required permission

  • os.diagnostics

runEmmcLifetimeRoutine()

chrome.os.diagnostics.runEmmcLifetimeRoutine() => Promise<RunRoutineResponse>

Released in Chrome version

M110

Required permission

  • os.diagnostics

runFanRoutine()

chrome.os.diagnostics.runFanRoutine() => Promise<RunRoutineResponse>

Released in Chrome version

M121

Required permission

  • os.diagnostics

runFingerprintAliveRoutine()

chrome.os.diagnostics.runFingerprintAliveRoutine() => Promise<RunRoutineResponse>

Released in Chrome version

M110

Required permission

  • os.diagnostics

runGatewayCanBePingedRoutine()

chrome.os.diagnostics.runGatewayCanBePingedRoutine() => Promise<RunRoutineResponse>

Released in Chrome version

M108

Required permission

  • os.diagnostics

runLanConnectivityRoutine()

chrome.os.diagnostics.runLanConnectivityRoutine() => Promise<RunRoutineResponse>

Released in Chrome version

M102

Required permission

  • os.diagnostics

runMemoryRoutine()

chrome.os.diagnostics.runMemoryRoutine() => Promise<RunRoutineResponse>

Released in Chrome version

M96

Required permission

  • os.diagnostics

runNvmeSelfTestRoutine()

chrome.os.diagnostics.runNvmeSelfTestRoutine(
  request: RunNvmeSelfTestRequest,
) => Promise<RunRoutineResponse>

Released in Chrome version

M110

Required permission

  • os.diagnostics

runPowerButtonRoutine()

chrome.os.diagnostics.runPowerButtonRoutine(
  request: RunPowerButtonRequest,
) => Promise<RunRoutineResponse>

Released in Chrome version

M117

Required permission

  • os.diagnostics

runSensitiveSensorRoutine()

chrome.os.diagnostics.runSensitiveSensorRoutine() => Promise<RunRoutineResponse>

Released in Chrome version

M110

Required permission

  • os.diagnostics

runSignalStrengthRoutine()

chrome.os.diagnostics.runSignalStrengthRoutine() => Promise<RunRoutineResponse>

Released in Chrome version

M108

Required permission

  • os.diagnostics

runSmartctlCheckRoutine()

chrome.os.diagnostics.runSmartctlCheckRoutine(
  request: RunSmartctlCheckRequest?,
) => Promise<RunRoutineResponse>

Released in Chrome version

M102

Optional parameter request added in M110.

The parameter is only available if “smartctl_check_with_percentage_used” is returned from GetAvailableRoutines().

Required permission

  • os.diagnostics

runUfsLifetimeRoutine()

chrome.os.diagnostics.runUfsLifetimeRoutine() => Promise<RunRoutineResponse>

Released in Chrome version

M117.

Required permission

  • os.diagnostics

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
camera_frontend_not_opened

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

Enum NetworkBandwidthRoutineRunningType

Property Name
download
upload

NetworkBandwidthRoutineRunningInfo

Property NameTypeDescription
typeNetworkBandwidthRoutineRunningTypeThe type of test that routine is running
speedKbpsnumberThe current network speed in Kbit/s

RoutineRunningInfoUnion

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

Property NameTypeDescription
networkBandwidthNetworkBandwidthRoutineRunningInfoExtra detail for a running network bandwidth routine

RoutineRunningInfo

Property NameTypeDescription
uuidstringUUID of the routine that entered this state
percentagenumberCurrent percentage of the routine status (0-100)
infoRoutineRunningInfoUnionExtra details about a running routine

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

CheckKeyboardBacklightStateInquiry

Details regarding the inquiry to check the keyboard backlight LED state. Clients should inspect the keyboard backlight and report its state using CheckKeyboardBacklightStateReply as the argument of replyToRoutineInquiry.

Property NameTypeDescription

RoutineInquiryUnion

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

Property NameTypeDescription
checkLedLitUpStateCheckLedLitUpStateInquirySee CheckLedLitUpStateInquiry.
checkKeyboardBacklightStateCheckKeyboardBacklightStateInquirySee CheckKeyboardBacklightStateInquiry.

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

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

Property NameTypeDescription
memoryMemoryRoutineFinishedDetailExtra detail for a finished memory routine
fanFanRoutineFinishedDetailExtra detail for a finished fan routine
networkBandwidthNetworkBandwidthRoutineFinishedDetailExtra detail for a finished network bandwidth routine
cameraFrameAnalysisCameraFrameAnalysisRoutineFinishedDetailExtra detail for a finished camera frame analysis 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

NetworkBandwidthRoutineFinishedDetail

Property NameTypeDescription
downloadSpeedKbpsnumberAverage download speed in Kbit/s
uploadSpeedKbpsnumberAverage upload speed in Kbit/s

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

CreateCameraFrameAnalysisRoutineArguments

The routine checks the frames captured by camera. The frontend should ensure the camera is opened during the execution of the routine.

Property NameTypeDescription

CreateKeyboardBacklightRoutineArguments

This routine checks whether the keyboard backlight can be lit up at any brightness level.

Property NameTypeDescription

Enum CameraFrameAnalysisIssue

Property Name
no_issue
camera_service_not_available
blocked_by_privacy_shutter
lens_are_dirty

Enum CameraSubtestResult

Property Name
not_run
passed
failed

CameraFrameAnalysisRoutineFinishedDetail

Property NameTypeDescription
issueCameraFrameAnalysisIssueThe issue caught by the routine. See the fields for each subtest for their details.
privacyShutterOpenTestCameraSubtestResultThe result is failed if the len is blocked by the privacy shutter. To mitigate the issue, users are suggested to open the privacy shutter to unveil the len.
lensNotDirtyTestCameraSubtestResultThe result is failed if the frames are blurred. To mitigate the issue, users are suggested to clean the lens.

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
cameraFrameAnalysisCreateCameraFrameAnalysisRoutineArgumentsM129Arguments to create a camera frame analysis routineNone
keyboardBacklightCreateKeyboardBacklightRoutineArgumentsM128Arguments to create a keyboard backlight 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

Enum KeyboardBacklightState

Property Name
ok
any_not_lit_up

CheckLedLitUpStateReply

Property NameTypeDescription
stateLedLitUpStateState of the target LED

CheckKeyboardBacklightStateReply

Property NameTypeDescription
stateKeyboardBacklightStateState of the keyboard backlight 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
checkKeyboardBacklightStateCheckKeyboardBacklightStateReplyReply to a CheckKeyboardBacklightStateInquiry

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

cancelRoutine()

chrome.os.diagnostics.cancelRoutine(
  request: CancelRoutineRequest,
) => Promise<void>

Stops executing the routine identified by UUID and removes all related resources from the system.

Released in Chrome version

M119

Required permission

  • os.diagnostics

createRoutine()

chrome.os.diagnostics.createRoutine(
  args: CreateRoutineArgumentsUnion,
) => Promise<CreateRoutineResponse>

Create a routine with CreateRoutineArgumentsUnion. Exactly one routine should be set in CreateRoutineArgumentsUnion.

Released in Chrome version

M125

Required permission

  • os.diagnostics

isRoutineArgumentSupported()

chrome.os.diagnostics.isRoutineArgumentSupported(
  args: CreateRoutineArgumentsUnion,
) => Promise<RoutineSupportStatusInfo>

Checks whether a certain CreateRoutineArgumentsUnion is supported on the platform. Exactly one routine should be set in CreateRoutineArgumentsUnion.

Released in Chrome version

M125

Required permission

  • os.diagnostics

replyToRoutineInquiry()

chrome.os.diagnostics.replyToRoutineInquiry(
  request: ReplyToRoutineInquiryRequest,
) => Promise<void>

Replies 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.

Released in Chrome version

M125

Required permission

  • os.diagnostics

startRoutine()

chrome.os.diagnostics.startRoutine(
  request: StartRoutineRequest,
) => Promise<void>

Starts execution of a routine. This can only be expected to work after the onRoutineInitialized event was emitted for the routine with UUID.

Released in Chrome version

M119

Required permission

  • os.diagnostics

(Deprecated) createFanRoutine()

chrome.os.diagnostics.createFanRoutine(
  args: CreateFanRoutineArguments,
) => Promise<CreateRoutineResponse>

Create a fan routine.

Released in Chrome version

M121

Deprecated in M125, use createRoutine() with a fan arg.

Required permission

  • os.diagnostics

(Deprecated) createMemoryRoutine()

chrome.os.diagnostics.createMemoryRoutine(
  args: CreateMemoryRoutineArguments,
) => Promise<CreateRoutineResponse>

Create a memory routine.

Released in Chrome version

M119

Deprecated in M125, use createRoutine() with a memory arg.

Required permission

  • os.diagnostics

(Deprecated) createVolumeButtonRoutine()

chrome.os.diagnostics.createVolumeButtonRoutine(
  args: LegacyCreateVolumeButtonRoutineArguments,
) => Promise<CreateRoutineResponse>

Create a volume button routine.

Released in Chrome version

M121

Deprecated in M125, use createRoutine() with a volumeButton arg.

Required permission

  • os.diagnostics

(Deprecated) isFanRoutineArgumentSupported()

chrome.os.diagnostics.isFanRoutineArgumentSupported(
  args: CreateFanRoutineArguments,
) => Promise<RoutineSupportStatusInfo>

Checks whether a certain CreateFanRoutineArguments is supported on the platform.

Released in Chrome version

M121

Deprecated in M125, use isRoutineArgumentSupported() with a fan arg.

Required permission

  • os.diagnostics

(Deprecated) isMemoryRoutineArgumentSupported()

chrome.os.diagnostics.isMemoryRoutineArgumentSupported(
  args: CreateMemoryRoutineArguments,
) => Promise<RoutineSupportStatusInfo>

Checks whether a certain CreateMemoryRoutineArguments is supported on the platform.

Released in Chrome version

M119

Deprecated in M125, use isRoutineArgumentSupported() with a memory arg.

Required permission

  • os.diagnostics

(Deprecated) isVolumeButtonRoutineArgumentSupported()

chrome.os.diagnostics.isVolumeButtonRoutineArgumentSupported(
  args: LegacyCreateVolumeButtonRoutineArguments,
) => Promise<RoutineSupportStatusInfo>

Checks whether a certain LegacyCreateVolumeButtonRoutineArguments is supported on the platform.

Released in Chrome version

M121

Deprecated in M125, use isRoutineArgumentSupported() with a volumeButton arg.

Required permission

  • os.diagnostics

Events

onRoutineException

chrome.os.diagnostics.onRoutineException(
  function(ExceptionInfo),
)

Fired when an exception occurs. The error passed in ExceptionInfo is non-recoverable.

Released in Chrome version

M119

Required permission

  • os.diagnostics

onRoutineFinished

chrome.os.diagnostics.onRoutineFinished(
  function(RoutineFinishedInfo),
)

Fired when a routine finishes.

Released in Chrome version

M125

Required permission

  • os.diagnostics

onRoutineInitialized

chrome.os.diagnostics.onRoutineInitialized(
  function(RoutineInitializedInfo),
)

Fired when a routine is initialized.

Released in Chrome version

M119

Required permission

  • os.diagnostics

onRoutineRunning

chrome.os.diagnostics.onRoutineRunning(
  function(RoutineRunningInfo),
)

Fired when a routine starts 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.

Released in Chrome version

M119

Required permission

  • os.diagnostics

onRoutineWaiting

chrome.os.diagnostics.onRoutineWaiting(
  function(RoutineWaitingInfo),
)

Fired when a routine stops execution and waits for an action, for example, user interaction. RoutineWaitingInfo contains information about what the routine is waiting for.

Released in Chrome version

M119

Required permission

  • os.diagnostics

(Deprecated) onFanRoutineFinished

chrome.os.diagnostics.onFanRoutineFinished(
  function(LegacyFanRoutineFinishedInfo),
)

Fired when a fan routine finishes.

Released in Chrome version

M121

Deprecated in M125, use onRoutineFinished.

Required permission

  • os.diagnostics

(Deprecated) onMemoryRoutineFinished

chrome.os.diagnostics.onMemoryRoutineFinished(
  function(LegacyMemoryRoutineFinishedInfo),
)

Fired when a memory routine finishes.

Released in Chrome version

M119

Deprecated in M125, use onRoutineFinished.

Required permission

  • os.diagnostics

(Deprecated) onVolumeButtonRoutineFinished

chrome.os.diagnostics.onVolumeButtonRoutineFinished(
  function(LegacyVolumeButtonRoutineFinishedInfo),
)

Fired when a volume button routine finishes.

Released in Chrome version

M121

Deprecated in M125, use onRoutineFinished.

Required permission

  • os.diagnostics

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

isEventSupported()

chrome.os.events.isEventSupported(
  category: EventCategory,
) => Promise<EventSupportStatusInfo>

Checks whether an event is supported. The information returned by this method is valid across reboots of the device.

Released in Chrome version

M115

Required permissions

  • os.events

startCapturingEvents()

chrome.os.events.startCapturingEvents(
  category: EventCategory,
) => Promise<void>

Starts 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.

Released in Chrome version

M115

Required permissions

  • os.events

stopCapturingEvents()

chrome.os.events.stopCapturingEvents(
  category: EventCategory,
) => Promise<void>

Stops capturing EventCategory events. This means on<EventCategory>Event won't be invoked until startCapturingEvents() is successfully called.

Released in Chrome version

M115

Required permissions

  • os.events

Events

onAudioJackEvent

chrome.os.events.onAudioJackEvent(
  function(AudioJackEventInfo),
)

Fired when an audio device is plugged in or out.

Released in Chrome version

M115

Required permissions

  • os.events

onExternalDisplayEvent

chrome.os.events.onExternalDisplayEvent(
  function(ExternalDisplayEventInfo),
)

Fired when an ExternalDisplay event occurs.

Released in Chrome version

M117

Required permissions

  • os.events

onKeyboardDiagnosticEvent

chrome.os.events.onKeyboardDiagnosticEvent(
  function(KeyboardDiagnosticEventInfo),
)

Fired when a keyboard diagnostic has been completed in the first party diagnostic tool.

Released in Chrome version

M117

Required permissions

  • os.events

onLidEvent

chrome.os.events.onLidEvent(
  function(LidEventInfo),
)

Fired when the device lid is opened or closed.

Released in Chrome version

M115

Required permissions

  • os.events

onPowerEvent

chrome.os.events.onPowerEvent(
  function(PowerEventInfo),
)

Fired when a Power event occurs.

Released in Chrome version

M117

Required permissions

  • os.events

onSdCardEvent

chrome.os.events.onSdCardEvent(
  function(SdCardEventInfo),
)

Fired when an SD Card event occurs.

Released in Chrome version

M117

Required permissions

  • os.events

onStylusConnectedEvent

chrome.os.events.onStylusConnectedEvent(
  function(StylusConnectedEventInfo),
)

Fired when a Stylus Connected event occurs.

Released in Chrome version

M117

Required permissions

  • os.events

onStylusGarageEvent

chrome.os.events.onStylusGarageEvent(
  function(StylusGarageEventInfo),
)

Fired when a Stylus Garage event occurs.

Released in Chrome version

M117

Required permissions

  • os.events

onStylusTouchEvent

chrome.os.events.onStylusTouchEvent(
  function(StylusTouchEventInfo),
)

Fired when a Stylus Touch event occurs.

Released in Chrome version

M117

Required permissions

  • os.events

onTouchpadButtonEvent

chrome.os.events.onTouchpadButtonEvent(
  function(TouchpadButtonEventInfo),
)

Fired when a Touchpad Button event occurs.

Released in Chrome version

M117

Required permissions

  • os.events

onTouchpadConnectedEvent

chrome.os.events.onTouchpadConnectedEvent(
  function(TouchpadConnectedEventInfo),
)

Fired when a Touchpad Connected event occurs.

Released in Chrome version

M117

Required permissions

  • os.events

onTouchpadTouchEvent

chrome.os.events.onTouchpadTouchEvent(
  function(TouchpadTouchEventInfo),
)

Fired when a Touchpad Touch event occurs.

Released in Chrome version

M117

Required permissions

  • os.events

onTouchscreenConnectedEvent

chrome.os.events.onTouchscreenConnectedEvent(
  function(TouchscreenConnectedEventInfo),
)

Fired when a Touchscreen Connected event occurs.

Released in Chrome version

M118

Required permissions

  • os.events

onTouchscreenTouchEvent

chrome.os.events.onTouchscreenTouchEvent(
  function(TouchscreenTouchEventInfo),
)

Fired when a Touchscreen Touch event occurs.

Released in Chrome version

M118

Required permissions

  • os.events

onUsbEvent

chrome.os.events.onUsbEvent(
  function(UsbEventInfo),
)

Fired when a Usb event occurs.

Released in Chrome version

M115

Required permissions

  • os.events

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 a TPM is enabled on the system
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

getAudioInfo()

chrome.os.telemetry.getAudioInfo() => Promise<AudioInfo>

Released in Chrome version

M111

Required permissions

  • os.telemetry

getBatteryInfo()

chrome.os.telemetry.getBatteryInfo() => Promise<BatteryInfo>

Released in Chrome version

M102

Required permissions

  • os.telemetry
  • os.telemetry.serial_number for serial number field

getCpuInfo()

chrome.os.telemetry.getCpuInfo() => Promise<CpuInfo>

Released in Chrome version

M96

Required permissions

  • os.telemetry

getDisplayInfo()

chrome.os.telemetry.getDisplayInfo() => Promise<DisplayInfo>

Released in Chrome version

M117

Required permissions

  • os.telemetry

getInternetConnectivityInfo()

chrome.os.telemetry.getInternetConnectivityInfo() => Promise<InternetConnectivityInfo>

Released in Chrome version

M108

Mac address added in M111.

Required permissions

  • os.telemetry
  • os.telemetry.network_info for MAC address field

getMarketingInfo()

chrome.os.telemetry.getMarketingInfo() => Promise<MarketingInfo>

Released in Chrome version

M111

Required permissions

  • os.telemetry

getMemoryInfo()

chrome.os.telemetry.getMemoryInfo() => Promise<MemoryInfo>

Released in Chrome version

M99

Required permissions

  • os.telemetry

getNonRemovableBlockDevicesInfo()

chrome.os.telemetry.getNonRemovableBlockDevicesInfo() => Promise<NonRemovableBlockDeviceInfoResponse>

Released in Chrome version

M108

Required permissions

  • os.telemetry

getOemData()

chrome.os.telemetry.getOemData() => Promise<OemDataInfo>

Released in Chrome version

M96

Required permissions

  • os.telemetry
  • os.telemetry.serial_number

getOsVersionInfo()

chrome.os.telemetry.getOsVersionInfo() => Promise<OsVersionInfo>

Released in Chrome version

M105

Required permissions

  • os.telemetry

getStatefulPartitionInfo()

chrome.os.telemetry.getStatefulPartitionInfo() => Promise<StatefulPartitionInfo>

Released in Chrome version

M105

Required permissions

  • os.telemetry

getThermalInfo()

chrome.os.telemetry.getThermalInfo() => Promise<ThermalInfo>

Released in Chrome version

M122

Required permissions

  • os.telemetry

getTpmInfo()

chrome.os.telemetry.getTpmInfo() => Promise<TpmInfo>

Released in Chrome version

M108

Required permissions

  • os.telemetry

getUsbBusInfo()

chrome.os.telemetry.getUsbBusInfo() => Promise<UsbDevicesInfo>

Released in Chrome version

M114

Required permissions

  • os.telemetry
  • os.attached_device_info

getVpdInfo()

chrome.os.telemetry.getVpdInfo() => Promise<VpdInfo>

Released in Chrome version

M96

Required permissions

  • os.telemetry
  • os.telemetry.serial_number for serial number field

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

setAudioGain()

chrome.os.management.setAudioGain(
  args: SetAudioGainArguments,
) => Promise<boolean>

Sets the specified input audio device's gain to value. Returns false if args.nodeId is invalid.

Released in Chrome version

M122

Required permissions

  • os.management.audio

setAudioVolume()

chrome.os.management.setAudioGain(
  args: SetAudioVolumeArguments,
) => Promise<boolean>

Sets the specified output audio device's volume and mute state to the given value. Returns false if args.nodeId is invalid.

Released in Chrome version

M122

Required permissions

  • os.management.audio