This document gives a function-level documentation of the Telemetry Extension API. It is separated in the three namespaces telemetry, diagnostics, events and management.
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 Name | Type | Description |
---|---|---|
foo | FooType | Information about foo |
bar | BarType | Information about bar |
To invoke a function os.exampleFunction()
that accepts an ExampleUnionType
FooType
os.exampleFunction( arg: { foo: aFooObject } )
BarType
os.exampleFunction( arg: { bar: aBarObject } )
Notice that exactly one field should be set. That is, the object is invalid when either
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.
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 |
Property Name |
---|
unknown |
ready |
running |
waiting_user_action |
passed |
failed |
error |
cancelled |
failed_to_start |
removed |
cancelling |
unsupported |
not_run |
Property Name |
---|
cancel |
remove |
resume |
status |
Property Name |
---|
unknown |
unplug_ac_power |
plug_in_ac_power |
press_power_button |
Property Name |
---|
linear |
random |
Property Name |
---|
connected |
disconnected |
Property Name |
---|
short_test |
long_test |
Property Name | Type | Description |
---|---|---|
expected_status | AcPowerStatus | The expected status of the AC (‘connected’, ‘disconnected’ or ‘unknown’) |
expected_power_type* | string | If specified, this must match the type of power supply for the routine to succeed. |
Property Name | Type | Description |
---|---|---|
length_seconds | number | Length of time to run the routine for |
maximum_discharge_percent_allowed | number | The routine will fail if the battery discharges by more than this percentage |
Property Name | Type | Description |
---|---|---|
length_seconds | number | Length of time to run the routine for |
minimum_charge_percent_required | number | The routine will fail if the battery charges by less than this percentage |
Property Name | Type | Description |
---|---|---|
length_seconds | number | Length of time to run the routine for |
Property Name | Type | Description |
---|---|---|
type | DiskReadRoutineType | Type of disk read routine that will be started |
length_seconds | number | Length of time to run the routine for |
file_size_mb | number | test file size, in mega bytes, to test with DiskRead routine. Maximum file size is 10 GB |
Property Name | Type | Description |
---|---|---|
timeout_seconds | number | A timeout for the routine |
Property Name | Type | Description |
---|---|---|
test_type | NvmeSelfTestType | Selects between a “short_test” or a “long_test”. |
Property Name | Type | Description |
---|---|---|
percentage_used_threshold | number | an 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). |
Property Name | Type | Description |
---|---|---|
id | number | Id of the routine routine created |
status | RoutineStatus | Current routine status |
Property Name | Type | Description |
---|---|---|
id | number | Id of the routine you want to query |
command | RoutineCommandType | What kind of updated should be performed |
Property Name | Type | Description |
---|---|---|
progress_percent | number | Current progress of the routine |
output | string | Optional debug output |
status | RoutineStatus | Current routine status |
status_message | string | Optional routine status message |
user_message | UserMessageType | Returned for routines that require user action (e.g. unplug power cable) |
Property Name | Type | Description |
---|---|---|
routines | Array<RoutineType> | Available routine types |
chrome.os.diagnostics.getAvailableRoutines() => Promise<GetAvailableRoutinesResponse>
M96
os.diagnostics
chrome.os.diagnostics.getRoutineUpdate( request: GetRoutineUpdateRequest, ) => Promise<GetRoutineUpdateResponse>
M96
os.diagnostics
chrome.os.diagnostics.runAcPowerRoutine( request: RunAcPowerRoutineRequest, ) => Promise<RunRoutineResponse>
M105
os.diagnostics
chrome.os.diagnostics.runAudioDriverRoutine() => Promise<RunRoutineResponse>
M117
os.diagnostics
chrome.os.diagnostics.runBatteryCapacityRoutine() => Promise<RunRoutineResponse>
M96
os.diagnostics
chrome.os.diagnostics.runBatteryChargeRoutine( request: RunBatteryChargeRoutineRequest, ) => Promise<RunRoutineResponse>
M96
os.diagnostics
chrome.os.diagnostics.runBatteryDischargeRoutine( request: RunBatteryDischargeRoutineRequest, ) => Promise<RunRoutineResponse>
M96
os.diagnostics
chrome.os.diagnostics.runBatteryHealthRoutine() => Promise<RunRoutineResponse>
M96
os.diagnostics
chrome.os.diagnostics.runBluetoothDiscoveryRoutine() => Promise<RunRoutineResponse>
M118
os.diagnostics
chrome.os.diagnostics.runBluetoothPairingRoutine() => Promise<RunRoutineResponse>
M118
os.diagnostics
os.bluetooth_peripherals_info
chrome.os.diagnostics.runBluetoothPowerRoutine() => Promise<RunRoutineResponse>
M117
os.diagnostics
chrome.os.diagnostics.runBluetoothScanningRoutine() => Promise<RunRoutineResponse>
M118
os.diagnostics
os.bluetooth_peripherals_info
chrome.os.diagnostics.runCpuCacheRoutine( request: RunCpuRoutineRequest, ) => Promise<RunRoutineResponse>
M96
os.diagnostics
chrome.os.diagnostics.runCpuFloatingPointAccuracyRoutine( request: RunCpuRoutineRequest, ) => Promise<RunRoutineResponse>
M99
os.diagnostics
chrome.os.diagnostics.runCpuPrimeSearchRoutine( request: RunCpuRoutineRequest, ) => Promise<RunRoutineResponse>
M99
os.diagnostics
chrome.os.diagnostics.runCpuStressRoutine( request: RunCpuRoutineRequest, ) => Promise<RunRoutineResponse>
M96
os.diagnostics
chrome.os.diagnostics.runDiskReadRoutine( request: RunDiskReadRequest, ) => Promise<RunRoutineResponse>
M102
os.diagnostics
chrome.os.diagnostics.runDnsResolutionRoutine() => Promise<RunRoutineResponse>
M108
os.diagnostics
chrome.os.diagnostics.runDnsResolverPresentRoutine() => Promise<RunRoutineResponse>
M108
os.diagnostics
chrome.os.diagnostics.runEmmcLifetimeRoutine() => Promise<RunRoutineResponse>
M110
os.diagnostics
chrome.os.diagnostics.runFanRoutine() => Promise<RunRoutineResponse>
M121
os.diagnostics
chrome.os.diagnostics.runFingerprintAliveRoutine() => Promise<RunRoutineResponse>
M110
os.diagnostics
chrome.os.diagnostics.runGatewayCanBePingedRoutine() => Promise<RunRoutineResponse>
M108
os.diagnostics
chrome.os.diagnostics.runLanConnectivityRoutine() => Promise<RunRoutineResponse>
M102
os.diagnostics
chrome.os.diagnostics.runMemoryRoutine() => Promise<RunRoutineResponse>
M96
os.diagnostics
chrome.os.diagnostics.runNvmeSelfTestRoutine( request: RunNvmeSelfTestRequest, ) => Promise<RunRoutineResponse>
M110
os.diagnostics
chrome.os.diagnostics.runPowerButtonRoutine( request: RunPowerButtonRequest, ) => Promise<RunRoutineResponse>
M117
os.diagnostics
chrome.os.diagnostics.runSensitiveSensorRoutine() => Promise<RunRoutineResponse>
M110
os.diagnostics
chrome.os.diagnostics.runSignalStrengthRoutine() => Promise<RunRoutineResponse>
M108
os.diagnostics
chrome.os.diagnostics.runSmartctlCheckRoutine( request: RunSmartctlCheckRequest?, ) => Promise<RunRoutineResponse>
M102
Optional parameter request
added in M110.
The parameter is only available if “smartctl_check_with_percentage_used” is returned from GetAvailableRoutines()
.
os.diagnostics
chrome.os.diagnostics.runUfsLifetimeRoutine() => Promise<RunRoutineResponse>
M117.
os.diagnostics
Property Name |
---|
waiting_to_be_scheduled |
waiting_for_interaction |
Property Name |
---|
unknown |
unexpected |
unsupported |
app_ui_closed |
camera_frontend_not_opened |
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 |
Property Name |
---|
supported |
unsupported |
Property Name | Type | Description |
---|---|---|
uuid | string | UUID of the routine that entered this state |
Property Name |
---|
download |
upload |
Property Name | Type | Description |
---|---|---|
type | NetworkBandwidthRoutineRunningType | The type of test that routine is running |
speedKbps | number | The current network speed in Kbit/s |
This is a union type. Exactly one field is set.
Property Name | Type | Description |
---|---|---|
networkBandwidth | NetworkBandwidthRoutineRunningInfo | Extra detail for a running network bandwidth routine |
Property Name | Type | Description |
---|---|---|
uuid | string | UUID of the routine that entered this state |
percentage | number | Current percentage of the routine status (0-100) |
info | RoutineRunningInfoUnion | Extra details about a running routine |
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 Name | Type | Description |
---|
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 Name | Type | Description |
---|
This is a union type. Exactly one field is set.
Property Name | Type | Description |
---|---|---|
checkLedLitUpState | CheckLedLitUpStateInquiry | See CheckLedLitUpStateInquiry . |
checkKeyboardBacklightState | CheckKeyboardBacklightStateInquiry | See CheckKeyboardBacklightStateInquiry . |
This is a union type. Exactly one field is set.
Property Name | Type | Description |
---|---|---|
inquiry | RoutineInquiryUnion | Routine inquiries need to be replied to with the replyToRoutineInquiry method |
Property Name | Type | Description |
---|---|---|
uuid | string | UUID of the routine that entered this state |
percentage | number | Current percentage of the routine status (0-100) |
reason | RoutineWaitingReason | Reason why the routine waits |
message | string | Additional information, may be used to pass instruction or explanation |
interaction | RoutineInteractionUnion | The 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. |
Property Name | Type | Description |
---|---|---|
uuid | string | UUID of the routine that entered this state |
hasPassed | boolean | Whether the routine finished successfully |
detail | RoutineFinishedDetailUnion | Extra details about a finished routine |
Property Name | Type | Description |
---|---|---|
uuid | string | UUID of the routine that entered this state |
reason | ExceptionReason | Reason why the routine threw an exception |
debugMessage | string | A human readable message for debugging. Don't rely on the content because it could change anytime |
This is a union type. Exactly one field is set.
Property Name | Type | Description |
---|---|---|
memory | MemoryRoutineFinishedDetail | Extra detail for a finished memory routine |
fan | FanRoutineFinishedDetail | Extra detail for a finished fan routine |
networkBandwidth | NetworkBandwidthRoutineFinishedDetail | Extra detail for a finished network bandwidth routine |
cameraFrameAnalysis | CameraFrameAnalysisRoutineFinishedDetail | Extra detail for a finished camera frame analysis routine |
Property Name | Type | Description |
---|---|---|
passedItems | Array<MemtesterTestItemEnum> | Passed test items |
failedItems | Array<MemtesterTestItemEnum> | Failed test items |
Property Name | Type | Description |
---|---|---|
passed_items | Array<MemtesterTestItemEnum> | Passed test items |
failed_items | Array<MemtesterTestItemEnum> | Failed test items |
Property Name | Type | Description |
---|---|---|
bytesTested | number | Number of bytes tested in the memory routine |
result | MemtesterResult | Contains the memtester test results |
Property Name | Type | Description |
---|---|---|
uuid | string | UUID of the routine that entered this state |
has_passed | boolean | Whether the routine finished successfully |
bytesTested | number | Number of bytes tested in the memory routine |
result | LegacyMemtesterResult | Contains the memtester test results |
Property Name | Type | Description |
---|---|---|
maxTestingMemKib | number | An 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 |
Property Name |
---|
matched |
not_matched |
not_configured |
Property Name | Type | Description |
---|---|---|
passedFanIds | Array<number> | The ids of fans that can be controlled |
failedFanIds | Array<number> | The ids of fans that cannot be controlled |
fanCountStatus | HardwarePresenceStatus | Whether the number of fan probed is matched |
Property Name | Type | Description |
---|---|---|
uuid | string | UUID of the routine that entered this state |
has_passed | boolean | Whether the routine finished successfully |
passed_fan_ids | Array<number> | The ids of fans that can be controlled |
failed_fan_ids | Array<number> | The ids of fans that cannot be controlled |
fan_count_status | HardwarePresenceStatus | Whether the number of fan probed is matched |
Property Name | Type | Description |
---|
Property Name |
---|
volume_up |
volume_down |
Property Name | Type | Description |
---|---|---|
uuid | string | UUID of the routine that entered this state |
has_passed | boolean | Whether the routine finished successfully |
Property Name | Type | Description |
---|---|---|
button_type | VolumeButtonType | The volume button to be tested |
timeout_seconds | number | Length of time to listen to the volume button events. The value should be positive and less or equal to 600 seconds |
Property Name | Type | Description |
---|---|---|
buttonType | VolumeButtonType | The volume button to be tested |
timeoutSeconds | number | Length of time to listen to the volume button events. The value should be positive and less or equal to 600 seconds |
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 Name | Type | Description |
---|
Property Name | Type | Description |
---|---|---|
downloadSpeedKbps | number | Average download speed in Kbit/s |
uploadSpeedKbps | number | Average upload speed in Kbit/s |
Property Name |
---|
battery |
power |
adapter |
left |
right |
Property Name |
---|
red |
green |
blue |
yellow |
white |
amber |
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:
CheckLedLitUpStateInquiry
interaction request.WCheckLedLitUpStateReply
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.Property Name | Type | Description |
---|---|---|
name | LedName | The LED to be lit up |
color | LedColor | The color to be lit up |
The routine checks the frames captured by camera. The frontend should ensure the camera is opened during the execution of the routine.
Property Name | Type | Description |
---|
This routine checks whether the keyboard backlight can be lit up at any brightness level.
Property Name | Type | Description |
---|
Property Name |
---|
no_issue |
camera_service_not_available |
blocked_by_privacy_shutter |
lens_are_dirty |
Property Name |
---|
not_run |
passed |
failed |
Property Name | Type | Description |
---|---|---|
issue | CameraFrameAnalysisIssue | The issue caught by the routine. See the fields for each subtest for their details. |
privacyShutterOpenTest | CameraSubtestResult | The 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. |
lensNotDirtyTest | CameraSubtestResult | The result is failed if the frames are blurred. To mitigate the issue, users are suggested to clean the lens. |
This is a union type. Exactly one field is set.
Property Name | Type | Released in Chrome version | Description | Additional permission needed to access |
---|---|---|---|---|
memory | CreateMemoryRoutineArguments | M125 | Arguments to create a memory routine | None |
volumeButton | CreateVolumeButtonRoutineArguments | M125 | Arguments to create a volume button routine | None |
fan | CreateFanRoutineArguments | M125 | Arguments to create a fan routine | None |
networkBandwidth | CreateNetworkBandwidthRoutineArguments | M125 | Arguments to create a network bandwidth routine | os.diagnostics.network_info_mlab |
ledLitUp | CreateLedLitUpRoutineArguments | M125 | Arguments to create a LED lit up routine | None |
cameraFrameAnalysis | CreateCameraFrameAnalysisRoutineArguments | M129 | Arguments to create a camera frame analysis routine | None |
keyboardBacklight | CreateKeyboardBacklightRoutineArguments | M128 | Arguments to create a keyboard backlight routine | None |
Property Name | Type | Description |
---|---|---|
uuid | string | UUID of the routine that was just created |
Property Name | Type | Description |
---|---|---|
status | RoutineSupportStatus | Whether a routine with the provided arguments is supported or unsupported |
Property Name | Type | Description |
---|---|---|
uuid | string | UUID of the routine that shall be created |
Property Name |
---|
correct_color |
not_lit_up |
Property Name |
---|
ok |
any_not_lit_up |
Property Name | Type | Description |
---|---|---|
state | LedLitUpState | State of the target LED |
Property Name | Type | Description |
---|---|---|
state | KeyboardBacklightState | State of the keyboard backlight LED |
This is a union type. Exactly one field is set.
Property Name | Type | Description |
---|---|---|
uuid | string | UUID of the routine that shall be replied |
checkLedLitUpState | CheckLedLitUpStateReply | Reply to a CheckLedLitUpStateInquiry |
checkKeyboardBacklightState | CheckKeyboardBacklightStateReply | Reply to a CheckKeyboardBacklightStateInquiry |
Property Name | Type | Description |
---|---|---|
uuid | string | UUID of the routine that shall be replied |
reply | RoutineInquiryReplyUnion | Reply to an inquiry in the routine waiting info |
Property Name | Type | Description |
---|---|---|
uuid | string | UUID of the routine that shall be cancelled |
chrome.os.diagnostics.cancelRoutine( request: CancelRoutineRequest, ) => Promise<void>
Stops executing the routine identified by UUID
and removes all related resources from the system.
M119
os.diagnostics
chrome.os.diagnostics.createRoutine( args: CreateRoutineArgumentsUnion, ) => Promise<CreateRoutineResponse>
Create a routine with CreateRoutineArgumentsUnion
. Exactly one routine should be set in CreateRoutineArgumentsUnion
.
M125
os.diagnostics
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
.
M125
os.diagnostics
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.
M125
os.diagnostics
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
.
M119
os.diagnostics
chrome.os.diagnostics.createFanRoutine( args: CreateFanRoutineArguments, ) => Promise<CreateRoutineResponse>
Create a fan routine.
M121
Deprecated in M125, use createRoutine()
with a fan
arg.
os.diagnostics
chrome.os.diagnostics.createMemoryRoutine( args: CreateMemoryRoutineArguments, ) => Promise<CreateRoutineResponse>
Create a memory routine.
M119
Deprecated in M125, use createRoutine()
with a memory
arg.
os.diagnostics
chrome.os.diagnostics.createVolumeButtonRoutine( args: LegacyCreateVolumeButtonRoutineArguments, ) => Promise<CreateRoutineResponse>
Create a volume button routine.
M121
Deprecated in M125, use createRoutine()
with a volumeButton
arg.
os.diagnostics
chrome.os.diagnostics.isFanRoutineArgumentSupported( args: CreateFanRoutineArguments, ) => Promise<RoutineSupportStatusInfo>
Checks whether a certain CreateFanRoutineArguments
is supported on the platform.
M121
Deprecated in M125, use isRoutineArgumentSupported()
with a fan
arg.
os.diagnostics
chrome.os.diagnostics.isMemoryRoutineArgumentSupported( args: CreateMemoryRoutineArguments, ) => Promise<RoutineSupportStatusInfo>
Checks whether a certain CreateMemoryRoutineArguments
is supported on the platform.
M119
Deprecated in M125, use isRoutineArgumentSupported()
with a memory
arg.
os.diagnostics
chrome.os.diagnostics.isVolumeButtonRoutineArgumentSupported( args: LegacyCreateVolumeButtonRoutineArguments, ) => Promise<RoutineSupportStatusInfo>
Checks whether a certain LegacyCreateVolumeButtonRoutineArguments
is supported on the platform.
M121
Deprecated in M125, use isRoutineArgumentSupported()
with a volumeButton
arg.
os.diagnostics
chrome.os.diagnostics.onRoutineException( function(ExceptionInfo), )
Fired when an exception occurs. The error passed in ExceptionInfo
is non-recoverable.
M119
os.diagnostics
chrome.os.diagnostics.onRoutineFinished( function(RoutineFinishedInfo), )
Fired when a routine finishes.
M125
os.diagnostics
chrome.os.diagnostics.onRoutineInitialized( function(RoutineInitializedInfo), )
Fired when a routine is initialized.
M119
os.diagnostics
chrome.os.diagnostics.onRoutineRunning( function(RoutineRunningInfo), )
Fired when a routine starts running. This can happen in two situations:
startRoutine
was called and the routine successfully started execution.M119
os.diagnostics
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.
M119
os.diagnostics
chrome.os.diagnostics.onFanRoutineFinished( function(LegacyFanRoutineFinishedInfo), )
Fired when a fan routine finishes.
M121
Deprecated in M125, use onRoutineFinished
.
os.diagnostics
chrome.os.diagnostics.onMemoryRoutineFinished( function(LegacyMemoryRoutineFinishedInfo), )
Fired when a memory routine finishes.
M119
Deprecated in M125, use onRoutineFinished
.
os.diagnostics
chrome.os.diagnostics.onVolumeButtonRoutineFinished( function(LegacyVolumeButtonRoutineFinishedInfo), )
Fired when a volume button routine finishes.
M121
Deprecated in M125, use onRoutineFinished
.
os.diagnostics
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 |
Property Name |
---|
supported |
unsupported |
Property Name | Type | Description |
---|---|---|
status | EventSupportStatus | Support status of an event |
Property Name |
---|
connected |
disconnected |
Property Name |
---|
headphone |
microphone |
Property Name | Type | Description |
---|---|---|
event | AudioJackEvent | The event that occurred |
deviceType | AudioJackDeviceType | The device type of |
Property Name |
---|
closed |
opened |
Property Name | Type | Description |
---|---|---|
event | LidEvent | The event that occurred |
Property Name |
---|
internal |
usb |
bluetooth |
unknown |
Property Name |
---|
unknown |
chrome_os |
Property Name |
---|
unknown |
ansi |
iso |
jis |
Property Name |
---|
unknown |
present |
not_present |
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 |
Property Name |
---|
unknown |
power |
lock |
control_panel |
Property Name | Type | Description |
---|---|---|
id | number | The number of the keyboard's /dev/input/event* node |
connectionType | KeyboardConnectionType | The keyboard's connection type |
name | string | The keyboard's name |
physicalLayout | PhysicalKeyboardLayout | The keyboard's physical layout |
mechanicalLayout | MechanicalKeyboardLayout | The keyboard's mechanical layout |
regionCode | string | For internal keyboards, the region code of the device (from which the visual layout can be determined) |
numberPadPresent | KeyboardNumberPadPresence | Whether the keyboard has a number pad or not |
topRowKeys | Array<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”) |
topRightKey | KeyboardTopRightKey | For CrOS keyboards, the glyph shown on the key at the far right end of the top row |
hasAssistantKey | boolean | Only applicable on ChromeOS keyboards |
Property Name | Type | Description |
---|---|---|
keyboardInfo | KeyboardInfo | The keyboard which has been tested |
testedKeys | Array<number> | Keys which have been tested. It is an array of the evdev key code |
testedTopRowKeys | Array<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 |
Property Name |
---|
connected |
disconnected |
Property Name | Type | Description |
---|---|---|
vendor | string | Vendor name |
name | string | The device's name |
vid | number | Vendor ID of the device |
pid | number | Product ID of the device |
categories | Array<string> | USB device categories: https://www.usb.org/defined-class-codes |
event | UsbEvent | The event that occurred |
Property Name |
---|
connected |
disconnected |
Property Name | Type | Description |
---|---|---|
event | ExternalDisplayEvent | The event that occurred |
display_info | ExternalDisplayInfo | The information related to the plugged in external display |
Property Name |
---|
connected |
disconnected |
Property Name | Type | Description |
---|---|---|
event | SdCardEvent | The event that occurred |
Property Name |
---|
ac_inserted |
ac_removed |
os_suspend |
os_resume |
Property Name | Type | Description |
---|---|---|
event | PowerEvent | The event that occurred |
Property Name |
---|
inserted |
removed |
Property Name | Type | Description |
---|---|---|
event | StylusGarageEvent | The event that occurred |
Property Name |
---|
left |
middle |
right |
Property Name |
---|
pressed |
released |
Property Name | Type | Description |
---|---|---|
button | InputTouchButton | The input button that was interacted with |
state | InputTouchButtonState | The new state of the button |
Property Name | Type | Description |
---|---|---|
trackingId | number | An id to track an initiated contact throughout its life cycle |
x | number | The x position |
y | number | The y position |
pressure | number | The pressure applied to the touch contact. The value ranges from 0 to max_pressure as defined in TouchpadConnectedEventInfo and TouchscreenConnectedEventInfo |
touchMajor | number | The length of the longer dimension of the touch contact |
touchMinor | number | The length of the shorter dimension of the touch contact |
Property Name | Type | Description |
---|---|---|
touchPoints | Array<TouchPointInfo> | The touch points reported by the touchpad |
Property Name | Type | Description |
---|---|---|
maxX | number | The maximum possible x position of touch points |
maxY | number | The maximum possible y position of touch points |
maxPressure | number | The maximum possible pressure of touch points, or 0 if pressure is not supported |
buttons | Array<InputTouchButton> | The supported buttons |
Property Name | Type | Description |
---|---|---|
touchPoints | Array<TouchPointInfo> | The touch points reported by the touchscreen |
Property Name | Type | Description |
---|---|---|
maxX | number | The maximum possible x position of touch points |
maxY | number | The maximum possible y position of touch points |
maxPressure | number | The maximum possible pressure of touch points, or 0 if pressure is not supported |
Property Name | Type | Description |
---|---|---|
x | number | The x position in the cartesian XY plane. The value ranges from 0 to max_x as defined in StylusConnectedEventInfo |
y | number | The y position in the cartesian XY plane. The value ranges from 0 to max_y as defined in StylusConnectedEventInfo |
pressure | number | The pressure applied to the touch contact. The value ranges from 0 to max_pressure as defined in StylusConnectedEventInfo |
Property Name | Type | Description |
---|---|---|
touchPoint | StylusTouchPointInfo | The info of the stylus touch point. A null touch point means the stylus leaves the contact |
Property Name | Type | Description |
---|---|---|
maxX | number | The maximum possible x position of touch points |
maxY | number | The maximum possible y position of touch points |
maxPressure | number | The maximum possible pressure of touch points, or 0 if pressure is not supported |
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.
M115
os.events
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.
M115
os.events
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.
M115
os.events
chrome.os.events.onAudioJackEvent( function(AudioJackEventInfo), )
Fired when an audio device is plugged in or out.
M115
os.events
chrome.os.events.onExternalDisplayEvent( function(ExternalDisplayEventInfo), )
Fired when an ExternalDisplay
event occurs.
M117
os.events
chrome.os.events.onKeyboardDiagnosticEvent( function(KeyboardDiagnosticEventInfo), )
Fired when a keyboard diagnostic has been completed in the first party diagnostic tool.
M117
os.events
chrome.os.events.onLidEvent( function(LidEventInfo), )
Fired when the device lid is opened or closed.
M115
os.events
chrome.os.events.onPowerEvent( function(PowerEventInfo), )
Fired when a Power
event occurs.
M117
os.events
chrome.os.events.onSdCardEvent( function(SdCardEventInfo), )
Fired when an SD Card
event occurs.
M117
os.events
chrome.os.events.onStylusConnectedEvent( function(StylusConnectedEventInfo), )
Fired when a Stylus Connected
event occurs.
M117
os.events
chrome.os.events.onStylusGarageEvent( function(StylusGarageEventInfo), )
Fired when a Stylus Garage
event occurs.
M117
os.events
chrome.os.events.onStylusTouchEvent( function(StylusTouchEventInfo), )
Fired when a Stylus Touch
event occurs.
M117
os.events
chrome.os.events.onTouchpadButtonEvent( function(TouchpadButtonEventInfo), )
Fired when a Touchpad Button
event occurs.
M117
os.events
chrome.os.events.onTouchpadConnectedEvent( function(TouchpadConnectedEventInfo), )
Fired when a Touchpad Connected
event occurs.
M117
os.events
chrome.os.events.onTouchpadTouchEvent( function(TouchpadTouchEventInfo), )
Fired when a Touchpad Touch
event occurs.
M117
os.events
chrome.os.events.onTouchscreenConnectedEvent( function(TouchscreenConnectedEventInfo), )
Fired when a Touchscreen Connected
event occurs.
M118
os.events
chrome.os.events.onTouchscreenTouchEvent( function(TouchscreenTouchEventInfo), )
Fired when a Touchscreen Touch
event occurs.
M118
os.events
chrome.os.events.onUsbEvent( function(UsbEventInfo), )
Fired when a Usb
event occurs.
M115
os.events
Property Name | Type | Description |
---|---|---|
id | number | Node id |
name | string | The name of this node. For example, “Speaker” |
deviceName | string | The name of the device that this node belongs to. For example, “HDA Intel PCH: CA0132 Analog:0,0” |
active | boolean | Whether this node is currently used for output. There is one active node for output |
nodeVolume | number | The node volume in [0, 100] |
Property Name | Type | Description |
---|---|---|
id | number | Node id |
name | string | The name of this node. For example, “Internal Mic” |
deviceName | string | The name of the device that this node belongs to. For example, “HDA Intel PCH: CA0132 Analog:0,0” |
active | boolean | Whether this node is currently used for input. There is one active node for input |
nodeGain | number | The input node gain set by UI, the value is in [0, 100] |
Property Name | Type | Description |
---|---|---|
outputMute | boolean | Is the active output device mute or not |
inputMute | boolean | Is the active input device mute or not |
underruns | number | Number of underruns |
severeUnderruns | number | Number of severe underruns |
outputNodes | Array<AudioOutputNodeInfo> | Output nodes |
inputNodes | Array<AudioInputNodeInfo> | Input nodes |
Property Name | Type | Description |
---|---|---|
chargeFull | number | Full capacity (Ah) |
chargeFullDesign | number | Design capacity (Ah) |
chargeNow | number | Battery's charge (Ah) |
currentNow | number | Battery's current (A) |
cycleCount | number | Battery's cycle count |
manufactureDate | string | Manufacturing date in yyyy-mm-dd format. Included when the main battery is Smart |
modelName | string | Battery's model name |
serialNumber | string | Battery's serial number |
status | string | Battery's status (e.g. charging) |
technology | string | Used technology in the battery |
temperature | number | Temperature in 0.1K. Included when the main battery is Smart |
vendor | string | Battery's manufacturer |
voltageMinDesign | number | Desired minimum output voltage |
voltageNow | number | Battery's voltage (V) |
Property Name | Type | Description |
---|---|---|
name | string | The name of the block device. |
type | string | The type of the block device, (e.g. “MMC”, “NVMe” or “ATA”). |
size | number | The device size in bytes. |
Property Name | Type | Description |
---|---|---|
deviceInfos | Array<NonRemovableBlockDeviceInfo> | The list of block devices. |
Property Name |
---|
unknown |
x86_64 |
aarch64 |
armv7l |
Property Name | Type | Description |
---|---|---|
logicalCpus | Array<LogicalCpuInfo> | Logical CPUs corresponding to this physical CPU |
modelName | string | The CPU model name |
Property Name | Type | Description |
---|---|---|
cStates | Array<CpuCStateInfo> | Information about the logical CPU's time in various C-states |
idleTimeMs | number | Idle time since last boot, in milliseconds |
maxClockSpeedKhz | number | The max CPU clock speed in kilohertz |
scalingCurrentFrequencyKhz | number | Current frequency the CPU is running at |
scalingMaxFrequencyKhz | number | Maximum frequency the CPU is allowed to run at, by policy |
coreId | number | The ID of this logical CPU core |
Property Name | Type | Description |
---|---|---|
name | string | State name |
timeInStateSinceLastBootUs | number | Time spent in the state since the last reboot, in microseconds |
Property Name | Type | Description |
---|---|---|
architecture | CpuArchitectureEnum | The CPU architecture - it‘s assumed all of a device’s CPUs share the same architecture |
numTotalThreads | number | Number of total threads available |
physicalCpus | Array<PhysicalCpuInfo> | Information about the device's physical CPUs |
Property Name |
---|
unknown |
digital |
analog |
Property Name | Type | Description |
---|---|---|
privacyScreenSupported | boolean | Whether a privacy screen is supported or not |
privacyScreenEnabled | boolean | Whether a privacy screen is enabled or not |
displayWidth | number | Display width in millimeters |
displayHeight | number | Display height in millimeters |
resolutionHorizontal | number | Horizontal resolution |
resolutionVertical | number | Vertical resolution |
refreshRate | number | Refresh rate |
manufacturer | string | Three letter manufacturer ID |
modelId | number | Manufacturer product code |
serialNumber | number | 32 bits serial number |
manufactureWeek | number | Week of manufacture |
manufactureYear | number | Year of manufacture |
edidVersion | string | EDID version |
inputType | DisplayInputType | Digital or analog input |
displayName | string | Name of display product |
Property Name | Type | Description |
---|---|---|
displayWidth | number | Display width in millimeters |
displayHeight | number | Display height in millimeters |
resolutionHorizontal | number | Horizontal resolution |
resolutionVertical | number | Vertical resolution |
refreshRate | number | Refresh rate |
manufacturer | string | Three letter manufacturer ID |
modelId | number | Manufacturer product code |
serialNumber | number | 32 bits serial number |
manufacture_week | number | Week of manufacture |
manufacture_year | number | Year of manufacture |
edidVersion | string | EDID version |
inputType | DisplayInputType | Digital or analog input |
displayName | string | Name of display product |
Property Name | Type | Description |
---|---|---|
embeddedDisplay | EmbeddedDisplayInfo | Embedded display info |
externalDisplays | Array<ExternalDisplayInfo> | External display info |
Property Name |
---|
cellular |
ethernet |
tether |
vpn |
wifi |
Property Name | description |
---|---|
uninitialized | The network type is available but not yet initialized |
disabled | The network type is available but disabled or disabling |
prohibited | The network type is prohibited by policy |
not_connected | The network type is available and enabled or enabling, but no network connection has been established |
connecting | The network type is available and enabled, and a network connection is in progress |
portal | The network is in a portal state |
connected | The network is in a connected state, but connectivity is limited |
online | The network is connected and online |
Property Name | Type | Description |
---|---|---|
type | NetworkType | The type of network interface (wifi, ethernet, etc.) |
state | NetworkState | The current state of the network interface (disabled, enabled, online, etc.) |
macAddress | string | (Added in M110): The currently assigned mac address. Only available with the permission os.telemetry.network_info. |
ipv4Address | string | The currently assigned ipv4Address of the interface |
ipv6Addresses | Array<string> | The list of currently assigned ipv6Addresses of the interface |
signalStrength | number | The current signal strength in percent |
Property Name | Type | Description |
---|---|---|
networks | Array<NetworkInfo> | List of available network interfaces and their configuration |
Property Name | Type | Description |
---|---|---|
marketingName | string | Contents of CrosConfig in /branding/marketing-name |
Property Name | Type | Description |
---|---|---|
totalMemoryKiB | number | Total memory, in kilobytes |
freeMemoryKiB | number | Free memory, in kilobytes |
availableMemoryKiB | number | Available memory, in kilobytes |
pageFaultsSinceLastBoot | number | Number of page faults since the last boot |
Property Name | Type | Description |
---|---|---|
oemData | string | OEM's specific data. This field is used to store battery serial number by some OEMs |
Property Name | Type | Description |
---|---|---|
releaseMilestone | string | The release milestone (e.g. “87”) |
buildNumber | string | The build number (e.g. “13544”) |
patchNumber | string | The build number (e.g. “59.0”) |
releaseChannel | string | The release channel (e.g. “stable-channel”) |
Property Name | Type | Description |
---|---|---|
skuNumber | string | Device's SKU number, a.k.a. product number |
serialNumber | string | Device's serial number |
modelName | string | Device's model name |
activateDate | string | Device's activate date: Format: YYYY-WW |
Property Name | Type | Description |
---|---|---|
availableSpace | number | The currently available space in the user partition (Bytes) |
totalSpace | number | The total space of the user partition (Bytes) |
Property Name |
---|
unknown |
ec |
sysFs |
Property Name | Type | Description |
---|---|---|
name | string | Name of the thermal sensor |
temperatureCelsius | number | Temperature detected by the thermal sensor in celsius |
source | ThermalSensorSource | Where the thermal sensor is detected from |
Property Name | Type | Description |
---|---|---|
thermalSensors | Array<ThermalSensorInfo> | An array containing all the information retrieved for thermal sensors |
Property Name |
---|
not_gsc |
cr50 |
ti5 |
Property Name | Type | Description |
---|---|---|
gscVersion | TpmGSCVersion | The version of Google security chip(GSC), or “not_gsc” if not applicable |
family | number | TPM 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 |
specLevel | number | The level of the specification that is implemented by the TPM |
manufacturer | number | A manufacturer specific code |
tpmModel | number | The TPM model number |
firmwareVersion | number | The current firmware version of the TPM |
vendorSpecific | string | Information set by the vendor |
Property Name | Type | Description |
---|---|---|
enabled | boolean | Whether a TPM is enabled on the system |
owned | boolean | Whether the TPM has been owned |
specLevel | boolean | Whether the owner password is still retained (as part of the TPM initialization) |
Property Name | Type | Description |
---|---|---|
counter | number | The current dictionary attack counter value |
threshold | number | The current dictionary attack counter threshold |
lockoutInEffect | boolean | Whether the TPM is currently in some form of dictionary attack lockout |
lockoutSecondsRemaining | number | The number of seconds remaining in the lockout (if applicable) |
Property Name | Type | Description |
---|---|---|
version | TpmVersion | The current version of the Trusted Platform Module (TPM) |
status | TpmStatus | The current status of the TPM |
dictionaryAttack | TpmDictionaryAttack | TPM dictionary attack (DA) related information |
Property Name | Type | Description |
---|---|---|
interfaceNumber | number | The zero-based number (index) of the interface |
classId | number | The class id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids) |
subclassId | number | The subclass id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids) |
protocolId | number | The protocol id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids) |
driver | string | The 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 |
Property Name | Description |
---|---|
plain | An unidentified format text string |
number | A single integer version number |
pair | Two AABB.CCDD version numbers |
triplet | Microsoft-style AA.BB.CCDD version numbers |
quad | UEFI-style AA.BB.CC.DD version numbers |
bcd | Binary coded decimal notation |
intelMe | Intel ME-style bitshifted notation |
intelMe2 | Intel ME-style A.B.CC.DDDD notation |
surfaceLegacy | Legacy Microsoft Surface 10b.12b.10b |
surface | Microsoft Surface 8b.16b.8b |
dellBios | Dell BIOS BB.CC.DD style |
hex | Hexadecimal 0xAABCCDD style |
Property Name | Type | Description |
---|---|---|
version | string | The string form of the firmware version |
version_format | FwupdVersionFormat | The format for parsing the version string |
Property Name |
---|
unknown |
usb1 |
usb2 |
usb3 |
An enumeration of the usb spec speed in Mbps. Source:
Property Name | Description |
---|---|
unknown | Unknown speed |
n1_5Mbps | Low speed |
n12Mbps | Full speed |
n480Mbps | High Speed |
n5Gbps | Super Speed |
n10Gbps | Super Speed+ |
n20Gbps | Super Speed+ Gen 2x2 |
Property Name | Type | Description |
---|---|---|
classId | number | The class id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids) |
subclassId | number | The subclass id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids) |
protocolId | number | The protocol id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids) |
vendorId | number | The vendor id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids) |
productId | number | The product id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids) |
interfaces | Array<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 |
fwupdFirmwareVersionInfo | FwupdFirmwareVersionInfo | The firmware version obtained from fwupd |
version | UsbVersion | The recognized usb version. It may not be the highest USB version supported by the hardware |
spec_speed | UsbSpecSpeed | The spec usb speed |
Property Name | Type | Description |
---|---|---|
devices | Array<UsbBusInfo> | Information about all connected USB devices |
chrome.os.telemetry.getAudioInfo() => Promise<AudioInfo>
M111
os.telemetry
chrome.os.telemetry.getBatteryInfo() => Promise<BatteryInfo>
M102
os.telemetry
os.telemetry.serial_number
for serial number fieldchrome.os.telemetry.getCpuInfo() => Promise<CpuInfo>
M96
os.telemetry
chrome.os.telemetry.getDisplayInfo() => Promise<DisplayInfo>
M117
os.telemetry
chrome.os.telemetry.getInternetConnectivityInfo() => Promise<InternetConnectivityInfo>
M108
Mac address added in M111.
os.telemetry
os.telemetry.network_info
for MAC address fieldchrome.os.telemetry.getMarketingInfo() => Promise<MarketingInfo>
M111
os.telemetry
chrome.os.telemetry.getMemoryInfo() => Promise<MemoryInfo>
M99
os.telemetry
chrome.os.telemetry.getNonRemovableBlockDevicesInfo() => Promise<NonRemovableBlockDeviceInfoResponse>
M108
os.telemetry
chrome.os.telemetry.getOemData() => Promise<OemDataInfo>
M96
os.telemetry
os.telemetry.serial_number
chrome.os.telemetry.getOsVersionInfo() => Promise<OsVersionInfo>
M105
os.telemetry
chrome.os.telemetry.getStatefulPartitionInfo() => Promise<StatefulPartitionInfo>
M105
os.telemetry
chrome.os.telemetry.getThermalInfo() => Promise<ThermalInfo>
M122
os.telemetry
chrome.os.telemetry.getTpmInfo() => Promise<TpmInfo>
M108
os.telemetry
chrome.os.telemetry.getUsbBusInfo() => Promise<UsbDevicesInfo>
M114
os.telemetry
os.attached_device_info
chrome.os.telemetry.getVpdInfo() => Promise<VpdInfo>
M96
os.telemetry
os.telemetry.serial_number
for serial number fieldProperty Name | Type | Description |
---|---|---|
nodeId | number | Node id of the audio device to be configured |
gain | number | Target gain percent in [0, 100]. Sets to 0 or 100 if outside |
Property Name | Type | Description |
---|---|---|
nodeId | number | Node id of the audio device to be configured |
volume | number | Target volume percent in [0, 100]. Sets to 0 or 100 if outside |
isMuted | boolean | Whether to mute the device |
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.
M122
os.management.audio
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.
M122
os.management.audio