Get desktop application:
View/edit binary Protocol Buffers messages
The ADB service enables you to interact with the running Adb service inside the emulator. This service is usually not available as it has the ability to retrieve the private adb key from the running image and make adb accessible if and only if: 1. The private key is available to the running emulator. 2. The public key corresponding the private key is embedded in the encrypted partition. This service is usually *ONLY* available to containerized emulators that are running with mutual authentication on the gRPC endpoint (that is SSL is enabled and a valid client certificate is required.).
Forwards the incoming bytes to the running adb deamon.
Payload that needs to be forwarded.
status fields.
Pulls the private key that the emulator uses to communicate with the emulator. This private key should be made accessible to adb when you wish to establish a connection to this emulator. The following gRPC error codes can be returned: - unimplemented (code 14) if the AdbService is not availab.e - aborted (code 10) if: - The private key file cannot be found. - The private key file cannot be read.
The private key used to derive the public key that is embedded in the emulator. This private key must be made available to ADB in order to establish a connection to the emulator *without* requiring interaction. The private key must be made available to adb. This can be done by: - Saving it as a file and adding it to the $ADB_VENDOR_KEYS enviroment variable and restarting adb. or - Saving it the existing $ADB_VENDOR_KEYS search path used by adb.
An EmulatorController service lets you control the emulator. Note that this is currently an experimental feature, and that the service definition might change without notice. Use at your own risk! We use the following rough conventions: streamXXX --> streams values XXX (usually for emulator lifetime). Values are updated as soon as they become available. getXXX --> gets a single value XXX setXXX --> sets a single value XXX, does not returning state, these usually have an observable lasting side effect. sendXXX --> send a single event XXX, possibly returning state information. android usually responds to these events.
Get the backlight brightness. The following gRPC error codes can be returned: - FAILED_PRECONDITION (code 9) if the AVD does not support hw-control.
Returns all currently valid logical displays. The gRPC error code FAILED_PRECONDITION (code 9) is returned if the AVD does not support a configurable secondary display.
Returns the current mode of the primary display of a resizable AVD. The following gRPC error codes can be returned: - FAILED_PRECONDITION (code 9) if the AVD is not resizable.
Gets the latest gps state as delivered by the setGps call, or location ui if active. Note: this is not necessarily the actual gps coordinate visible at the time, due to gps sample frequency (usually 1hz).
Deprecated, please use the streamLogcat method instead.
Gets an individual screenshot in the desired format. The image will be scaled to the desired ImageFormat, while maintaining the aspect ratio. The returned image will never exceed resolution of the device display. Not setting the width or height (i.e. they are 0) will result in using the display width and height. The resulting image will be properly oriented and can be displayed directly without post processing. For example, if the device has a 1080x1920 screen and is in landscape mode and called with no width or height parameter, it will return a 1920x1080 image. The dimensions of the returned image will never exceed the corresponding display dimensions. For example, this method will return a 1920x1080 screenshot, if the display resolution is 1080x1920 and a screenshot of 2048x2048 is requested when the device is in landscape mode. This method will return an empty image if the display is not visible.
Retrieve the status of the emulator. This will contain general hardware information, and whether the device has booted or not.
The emulator version string.
The time the emulator has been active in .ms
True if the device has completed booting. For P and later this information will accurate, for older images we rely on adb.
The current vm configuration
The hardware configuration of the running emulator as key valure pairs.
Gets the state of the virtual machine.
Injects a series of audio packets to the android microphone. A new frame will be delivered whenever the emulated device requests a new audio frame. Audio is usually delivered at a rate that the emulator is requesting frames. Audio will be stored in a temporary buffer that can hold 300ms of audio. Notes: - Only the first audio format packet that is delivered will be honored. There is no need to send the audio format multiple times. - Real time audio currently immediately overrides the buffer. This means you must provide a constant rate of audio packets. The real time mode is experimental. Timestamps of audio packets might be used in the future to improve synchronization. - INVALID_ARGUMENT (code 3) The sampling rate was too high/low - INVALID_ARGUMENT (code 3) The audio packet was too large to handle. - FAILED_PRECONDITION (code 9) If there was a microphone registered already.
RotationRadian is relative to the camera's current orientation.
x axis is horizontal and orthogonal to the view direction.
y axis points up and is perpendicular to the floor.
z axis is the view direction and is set to 0.0 in
Simulate a touch event on the finger print sensor.
True when the fingprint is touched.
The identifier of the registered fingerprint.
Send a keyboard event. Translating the event.
Make a phone call.
Sends an sms message to the emulator.
The source address where this message came from. The address should be a valid GSM-formatted address as specified by 3GPP 23.040 Sec 9.1.2.5. For example: +3106225412 or (650) 555-1221
A utf8 encoded text message that should be delivered.
Send touch/mouse events. Note that mouse events can be simulated by touch events.
Set/get the battery to the given state.
Set the backlight brightness. The following gRPC error codes can be returned: - FAILED_PRECONDITION (code 9) if the AVD does not support hw-control. - INVALID_ARGUMENT (code 3) The brightness exceeds the valid range.
Atomically set/get the current primary clipboard data. Note that a call to setClipboard will result in an immediate event for those who made a call to streamClipboard and are on a different channel than the one used to set the clipboard.
Atomically changes the current multi-display configuration. After this call the given display configurations will be activated. You can only update secondary displays. Displays with id 0 will be ignored. This call can result in the removal or addition of secondary displays, the final display state can be observed by the returned configuration. The following gRPC error codes can be returned: - FAILED_PRECONDITION (code 9) if the AVD does not support a configurable secondary display. - INVALID_ARGUMENT (code 3) if: - The same display id is defined multiple times. - The display configurations are outside valid ranges. See DisplayConfiguration for details on valid ranges. - INTERNAL (code 13) if there was an internal emulator failure.
Sets the size of the primary display of a resizable AVD. Fails if the AVD is not resizable. The following gRPC error codes can be returned: - FAILED_PRECONDITION (code 9) if the AVD is not resizable.
Set the state of the gps. Note: Setting the gps position will not be reflected in the user interface. Keep in mind that android usually only samples the gps at 1 hz.
Sends an sms message to the emulator.
The phone number should be a valid GSM-formatted number as specified by 3GPP 23.040 Sec 9.1.2.5. For example: +3106225412 or (650) 555-1221
set/get/stream the physical model, this is likely the one you are looking for when you wish to modify the device state.
Set foldable posture
Velocity is absolute
x axis is horizontal and orthogonal to the view direction.
y axis points up and is perpendicular to the floor.
z axis is the view direction
Transition the virtual machine to the desired state. Note that some states are only observable. For example you cannot transition to the error state.
Streams a series of audio packets in the desired format. A new frame will be delivered whenever the emulated device produces a new audio frame. You can expect packets to be delivered in intervals of 20-30ms. Be aware that this can block when the emulator does not produce any audio whatsoever!
Streams the current data on the clipboard. This will immediately produce a result with the current state of the clipboard after which the stream will block and wait until a new clip event is available from the guest. Calling the setClipboard method above will not result in generating a clip event. It is possible to lose clipboard events if the clipboard updates very rapidly.
Stream a series of input events to the emulator, the events will arrive in order.
An input event that can be delivered to the emulator.
Streams the logcat output from the emulator. Note that parsed logcat messages are only available after L (Api >23)
Notifies client of the following changes: - Virtual scene camera status change. - Display configuration changes from extended ui. This will only be fired if the user makes modifications the extended displays through the extended control tab. Note that this method will send the initial virtual scene state immediately.
Deprecated, use the type below to get detailed information regarding the event.
Detailed notification information.
Streams a series of screenshots in the desired format. A new frame will be delivered whenever the device produces a new frame. Beware that this can produce a significant amount of data and that certain translations can be very costly. For example, streaming a series of png images is very cpu intensive. Images are produced according to the getScreenshot API described above. If the display is inactive, or becomes inactive, an empty image will be delivered. Images will be delived again if the display becomes active and new frames are produced.
set/get/stream the sensor data
An RTC service lets you interact with the emulator through WebRTC Note that this is currently an experimental feature, and that the service definition might change without notice. Use at your own risk! The following endpoints are needed to establish the webrtc protocol Due to limitiations in Javascript we cannot make use of bidirectional endpoints See this [blog](https://grpc.io/blog/state-of-grpc-web) for details.
[DEPRECATED] This is only here as the go grpc webproxy used by fuchsia does not support server side streaming. This method will be removed in the future and should not be relied upon. Reads an available jsep messages for the given client id, blocking until one becomes available. Do not use the polling version above if you opt for this one. The ice candidates for example will trickle in on this callback, as will the SDP negotation.
Reads an available jsep messages for the given client id, blocking until one becomes available. Do not use the polling version above if you opt for this one. The ice candidates for example will trickle in on this callback, as will the SDP negotation.
This function will generate a new identifier that the client should use for further interaction. It will initiate the JSEP protocol on the server side.
Sends the given JsepMsg to the server. The RtcId in the message should point to an active stream negotiation in progress, otherwise the message will be ignored.
The SnapshotService enables you to list, insert, store, and retrieve snapshots. Currently there are two types of snapshots: - Local (default): These are snapshots that are created locally. They are stored internally inside qcow2 files and are very efficient. These are the snapshots usually created by interacting with the UI. - Remote: These are snapshots that have been exported at a certain point. an exported snapshot is normalized (completely self contained) and can be imported into an emulator with a similar hardware configuration. Currently the emulator has limited support for importing snapshots: - Once an imported snapshot has been loaded into an emulator it is no longer possible to create new snapshots. - The hardware configuration of the emulator your are pushing a snapshot to must match (or be very similar) to the one you pulled the snapshot from. For example do not expect to be able to restore a snapshot on created on an Intel cpu on an AMD cpu.
Deletes the snapshot with the given snapshot_id from the avd. You must provide the snapshot_id to indicate which snapshot to delete. Will return success and a possible error message when a failure occurs.
Get the screenshot of the given snapshot Returns the emlator display at time of screenshot. The following gRPC error codes can be returned: NOT_FOUND (code 5): The given snapshot id does not exist INTERNAL (code 13): An internal failure occured while accessing the data.
The SnapshotId message represents the ID of a snapshot.
The identifier to the snapshot
The screenshot associated with the snapshot. A screenshot contains the visual display of the emulator at the time of the screenshot.
Format of the image.
The actual bytes of the image.
Lists all the snapshots, filtered by the given query, that are stored locally for the currently running avd. This includes all the snapshots that were imported (pushed) into this emulator. Returns a list of snapshot_id's and associated details that describes the hardware configuration, logical name, etc of the snapshot.
A snapshot filter can be used to filter the results produced by ListSnapshots
Filter snapshots by load status.
A List of on snapshot details.
Loads the given snapshot inside the emulator and activates it. The device will be in the state as it was when the snapshot was created. You will no longer be able to call Save if this was an imported snapshot that was pushed into this emulator. You must provide the snapshot_id to indicate which snapshot to load Will return success and a possible error message when a failure occurs.
Pulls down the snapshot stored inside the AVD as a tar.gz/tar stream This will normalize the snapshot, all relevant data to push a snapshot into a similar emulator will be placed inside the tar file. Pulling down a snapshot will pause the emulator until the snapshots are rebased and ready for exporting. Once the snapshot is rebased the emulator will continue and downloading should commence. Note that pulling .gz stream is slow. You must provide the snapshot_id and (desired) format. If SnapshotPackage.path is set, the gRPC service will directly write the exported snapshot to SnapshotPackage.path without streaming, which is usually significantly faster. It would require emulator to have direct access to SnapshotPackage.path, which usually means it can only be used when pulling from a local emulator.
Push a tar.gz stream contain the snapshot. The tar file should be a snapshot that was exported through the PullSnapshot in the past. The emulator will try to import the snapshot. The hardware configuration of the current emulator should match the one used for pulling. A detailed description of the snapshot (emulator_snapshot.Snapshot) is stored in the snapshot.pb file inside the tar. You must provide the snapshot_id and format in the first message. Will return success and a possible error message when a failure occurs. If SnapshotPackage.path is set, the gRPC service will directly unzip the exported snapshot from SnapshotPackage.path without streaming, which is usually significantly faster. It would require emulator to have direct access to SnapshotPackage.path, which usually means it can only be used when pushing to a local emulator.
Creates as a snapshot of the current state of the emulator. You can only save a snapshot if you never activated (Load) an imported snapshot (Push). For example: - PushSnapshot("some_snap.tar.gz"); - LoadSnapshot("some_snap"); - SaveSnapshot("same_newer_snap"); // <--- Will currently fail. You can provide the snapshot_id to indicate the name used for storing. Will return success and a possible error message when a failure occurs.
Tracks the given process for automated snapshot creation in case of assert failures. Will return success and a possible error message when a failure occurs. The snapshot_id field will contain the name of the snapshot that will be created. The pid field will contain the process id that is being tracked.
This is the process id to attach to, if this value is not set (0) The process name will be used instead.
The process name to attach to if any, if this is not set the pid will be used. This is usually the application name of your application under test, that is passed in to the am instrument command. It is likely what you will find in your AndroidManifest.xml
The name of the snapshot that icebox will create if a snapshot is generated.
[Output Only] True if icebox failed to track the given target.
[Output Only] Detailed error message that might provide more information.
Maximum number of snapshots the emulator can take during one Icebox run. Set to -1 for unlimited number of snapshots.
Updates the snapshot details. This allows you to update the description, logical name of the given snapshot. You must provide all the details, even if you are not changing them. The following gRPC error codes can be returned: NOT_FOUND (code 5): The given snapshot id does not exist INVALID_ARGUMENT (code 3): Neither description, nor logical_name were present. INTERNAL (code 13): An internal failure occured while accessing the data.
The identifier to the snapshot
Optional logical name of the snapshot. This is usually a name a user has provided.
Optional description of the snapshot. This description is usually provided by the user.
this method has no effect if the extended controls are hidden. In that case, visibilityChanged will be set to false;
Returns the user configuration of the running emulator. The user configuration contains information about the user interface.
The user configuration of the running emulator as key value pairs. This contains the data you normally find in emulator-user.ini
PaneEntry specifies which pane will be selected when the extended control is shown. If the extended is visible already, this method will set visibilityChangedto to false.
Set the window position to the specified coordinates if no coordinates are present in the AVD, otherwise this value will be igonred.
The android input event system is a framework for handling input from a variety of devices by generating events that describe changes in the state of the devices and forwarding them to user space applications. An AndroidEvents will be delivered directly to the kernel as is.
Used in:
The type of the event. The types of the event are specified by the android kernel. Some examples are: EV_SYN, EV_KEY, EV_SW, etc.. The exact definitions can be found in the input.h header file.
The actual code to be send to the kernel. The actual meaning of the code depends on the type definition.
The actual value of the event.
The display id associated with this input event.
Used as request type in: EmulatorController.streamAudio
Used as field type in:
Sampling rate to use, defaulting to 44100 if this is not set. Note, that android devices typically will not use a sampling rate higher than 48kHz. See https://developer.android.com/ndk/guides/audio.
[Input Only] The mode used when delivering audio packets.
Used in:
Used in:
The audio queue will block and wait until the emulator requests packets. The client does not have to throttle and can push packets at will. This can result in the client falling behind.
Audio packets will be delivered in real time (when possible). The audio queue will be overwritten with incoming data if data is made available. This means the client needs to control timing properly, or packets will get overwritten.
Used in:
Unsigned 8 bit
Signed 16 bit (little endian)
Used as request type in: EmulatorController.injectAudio
Used as response type in: EmulatorController.streamAudio
Unix epoch in us when this frame was captured.
Contains a sample in the given audio format.
Used as request type in: EmulatorController.setBattery
Used as response type in: EmulatorController.getBattery
Used in:
Used in:
Used in:
Used in:
The time in milliseconds it took for the boot to complete. Note that this value can be 0 when you are loading from a snapshot.
A single backlight brightness value.
Used as request type in: EmulatorController.getBrightness, EmulatorController.setBrightness
Used as response type in: EmulatorController.getBrightness
Used as field type in:
Type of light
Light intensity, ranges from 0-255.
Used in:
Display backlight. This will affect all displays.
Fired when the virtual scene camera is activated or deactivated and also in response to the streamNotification call.
Used in:
Indicates whether the camera app was activated or deactivated.
The display the camera app is associated with.
Representation of a clipped data object on the clipboard.
Used as request type in: EmulatorController.setClipboard
Used as response type in: EmulatorController.getClipboard, EmulatorController.streamClipboard
UTF-8 Encoded text.
A DisplayConfiguration describes a primary or secondary display available to the emulator. The screen aspect ratio cannot be longer (or wider) than 21:9 (or 9:21). Screen sizes larger than 4k will be rejected. Common configurations (w x h) are: - 480p (480x720) 142 dpi - 720p (720x1280) 213 dpi - 1080p (1080x1920) 320 dpi - 4K (2160x3840) 320 dpi - 4K (2160x3840) 640 dpi (upscaled) The behavior of the virtual display depends on the flags that are provided to this method. By default, virtual displays are created to be private, non-presentation and unsecure.
Used in:
The width of the display, restricted to: 320 * (dpi / 160) <= width
The heigh of the display, restricted to: * 320 * (dpi / 160) <= height
The pixel density (dpi). See https://developer.android.com/training/multiscreen/screendensities for details. This value should be in the range [120, ..., 640]
A combination of virtual display flags. These flags can be constructed by combining the DisplayFlags enum described above. The behavior of the virtual display depends on the flags. By default virtual displays are created to be private, non-presentation and unsecure.
The id of the display. The primary (default) display has the display ID of 0. A secondary display has a display ID not 0. A display with the id in the range [1, userConfigurable] can be modified. See DisplayConfigurations below for details. The id can be used to get or stream a screenshot.
These are the set of known android flags and their respective values. you can combine the int values to (de)construct the flags field below.
When this flag is set, the virtual display is public. A public virtual display behaves just like most any other display that is connected to the system such as an external or wireless display. Applications can open windows on the display and the system may mirror the contents of other displays onto it. see: https://developer.android.com/reference/android/hardware/display/DisplayManager#VIRTUAL_DISPLAY_FLAG_PUBLIC
When this flag is set, the virtual display is registered as a presentation display in the presentation display category. Applications may automatically project their content to presentation displays to provide richer second screen experiences. https://developer.android.com/reference/android/hardware/display/DisplayManager#VIRTUAL_DISPLAY_FLAG_PRESENTATION
When this flag is set, the virtual display is considered secure as defined by the Display#FLAG_SECURE display flag. The caller promises to take reasonable measures, such as over-the-air encryption, to prevent the contents of the display from being intercepted or recorded on a persistent medium. see: https://developer.android.com/reference/android/hardware/display/DisplayManager#VIRTUAL_DISPLAY_FLAG_SECURE
This flag is used in conjunction with VIRTUAL_DISPLAY_FLAG_PUBLIC. Ordinarily public virtual displays will automatically mirror the content of the default display if they have no windows of their own. When this flag is specified, the virtual display will only ever show its own content and will be blanked instead if it has no windows. See https://developer.android.com/reference/android/hardware/display/DisplayManager#VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY
Allows content to be mirrored on private displays when no content is being shown. This flag is mutually exclusive with VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY. If both flags are specified then the own-content only behavior will be applied. see: https://developer.android.com/reference/android/hardware/display/DisplayManager#VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR)
Provides information about all the displays that can be attached to the emulator. The emulator will always have at least one display. The emulator usually has the following display configurations: 0: The default display. 1 - 3: User configurable displays. These can be added/removed. For example the standalone emulator allows you to modify these in the extended controls. 6 - 11: Fixed external displays. For example Android Auto uses fixed displays in this range.
Used as request type in: EmulatorController.setDisplayConfigurations
Used as response type in: EmulatorController.getDisplayConfigurations, EmulatorController.setDisplayConfigurations
Used as field type in:
Display configurations with id [1, userConfigurable] are user configurable, that is they can be added, removed or updated.
The maximum number of attached displays this emulator supports. This is the total number of displays that can be attached to the emulator. Note: A display with an id that is larger than userConfigurable cannot be modified.
Fired when an update to a display event has been fired through the extended ui. This does not fire events when the display is changed through the console or the gRPC endpoint.
Used in:
Used as request type in: EmulatorController.setDisplayMode
Used as response type in: EmulatorController.getDisplayMode
in line with android/emulation/resizable_display_config.h
Used in: ,
Used in:
Used in:
Used as response type in: UiController.closeExtendedControls, UiController.showExtendedControls
The aspect ratio (width/height) will be different from the one where the device is unfolded.
Used in:
It is possible for the screen to be folded in different ways depending on which surface is shown to the user. So xOffset and yOffset indicate the top left corner of the folded screen within the original unfolded screen.
Used as request type in: EmulatorController.setGps
Used as response type in: EmulatorController.getGps
Setting this to false will disable auto updating from the LocationUI, otherwise the location UI will override the location at a frequency of 1hz. - This is unused if the emulator is launched with -no-window, or when he location ui is disabled. - This will BREAK the location ui experience if it is set to false. For example routing will no longer function.
The latitude, in degrees.
The longitude, in degrees.
The speed if it is available, in meters/second over ground
gets the horizontal direction of travel of this device, and is not related to the device orientation. It is guaranteed to be in the range [0.0, 360.0] if the device has a bearing. 0=North, 90=East, 180=South, etc..
The altitude if available, in meters above the WGS 84 reference ellipsoid.
The number of satellites used to derive the fix
Used as response type in: EmulatorController.getScreenshot, EmulatorController.streamScreenshot
width is contained in format.
height is contained in format.
The organization of the pixels in the image buffer is from left to right and bottom up. This will be empty if an alternative image transport is requested in the image format. In that case the side channel should be used to obtain the image data.
[Output Only] Monotonically increasing sequence number in a stream of screenshots. The first screenshot will have a sequence of 0. A single screenshot will always have a sequence number of 0. The sequence is not necessarily contiguous, and can be used to detect how many frames were dropped. An example sequence could be: [0, 3, 5, 7, 9, 11].
[Output Only] Unix timestamp in microseconds when the emulator estimates the frame was generated. The timestamp is before the actual frame is copied and transformed. This can be used to calculate variance between frame production time, and frame depiction time.
Used as request type in: EmulatorController.getScreenshot, EmulatorController.streamScreenshot
Used as field type in:
The (desired) format of the resulting bytes.
[Output Only] The rotation of the image. The image will be rotated based upon the coarse grained orientation of the device.
The (desired) width of the image. When passed as input the image will be scaled to match the given width, while maintaining the aspect ratio of the device. The returned image will never exceed the given width, but can be less. Omitting this value (or passing in 0) will result in no scaling, and the width of the actual device will be used.
The (desired) height of the image. When passed as input the image will be scaled to match the given height, while maintaining the aspect ratio of the device. The returned image will never exceed the given height, but can be less. Omitting this value (or passing in 0) will result in no scaling, and the height of the actual device will be used.
The (desired) display id of the device. Setting this to 0 (or omitting) indicates the main display.
Set this if you wish to use a different transport channel to deliver image frames.
[Output Only] Display configuration when screen is folded. The value is the original configuration before scaling.
[Output Only] Display mode when AVD is resizable.
Used in:
Portable Network Graphics format (https://en.wikipedia.org/wiki/Portable_Network_Graphics)
Three-channel RGB color model supplemented with a fourth alpha channel. https://en.wikipedia.org/wiki/RGBA_color_model Each pixel consists of 4 bytes.
Three-channel RGB color model, each pixel consists of 3 bytes
An ImageTransport allows for specifying a side channel for delivering image frames versus using the standard bytes array that is returned with the gRPC request.
Used in:
The desired transport channel used for delivering image frames. Only relevant when streaming screenshots.
Handle used for writing image frames if transport is mmap. The client sets and owns this handle. It can be either a shm region, or a mmap. A mmap should be a url that starts with `file:///` Note: the mmap can result in tearing.
Used in:
Return full frames over the gRPC transport
Write images to the a file/shared memory handle.
Used as request type in: Rtc.sendJsepMessage
Used as response type in: Rtc.receiveJsepMessage, Rtc.receiveJsepMessages
The unique identifier of this connection. You will have to use the same identifier when sending/receiving messages. The server will generate a guid when receiving the start message.
The JSON payload. This usually can be directly handled by the Javascript library. The dictionary can contain the following properties - bye: You can hang up now. No new message expected for you. The server has stopped the RTC stream. - start: An RTCConfiguration dictionary providing options to configure the new connection. This can include the turn configuration the serve is using. This dictionary can be passed in directly to the [RTCPeerConnection](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection) object. - candidate: The WebRTC API's RTCIceCandidateInit dictionary, which contains the information needed to fundamentally describe an RTCIceCandidate. See [RTCIceCandidate](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate) and [Session Lifetime](https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Session_lifetime) for more details. - sdp: RTCSessionDescriptionInit dictionary containing the values to that can be assigned to a [RTCSessionDescription](https://developer.mozilla.org/en-US/docs/Web/API/RTCSessionDescription)
KeyboardEvent objects describe a user interaction with the keyboard; each event describes a single interaction between the user and a key (or combination of a key with modifier keys) on the keyboard. This follows the pattern as set by (javascript)[https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent] Note: that only keyCode, key, or text can be set and that the semantics will slightly vary.
Used as request type in: EmulatorController.sendKey
Used as field type in:
Type of keycode contained in the keyCode field.
The type of keyboard event that should be sent to the emulator
This property represents a physical key on the keyboard (as opposed to the character generated by pressing the key). In other words, this property is a value which isn't altered by keyboard layout or the state of the modifier keys. This value will be interpreted by the emulator depending on the KeyCodeType. The incoming key code will be translated to an evdev code type and send to the emulator. The values in key and text will be ignored.
The value of the key pressed by the user, taking into consideration the state of modifier keys such as Shift as well as the keyboard locale and layout. This follows the w3c standard used in browsers. You can find an accurate description of valid values [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) Note that some keys can result in multiple evdev events that are delivered to the emulator. for example the Key "A" will result in a sequence: ["Shift", "a"] -> [0x2a, 0x1e] whereas "a" results in ["a"] -> [0x1e]. Not all documented keys are understood by android, and only printable ASCII [32-127) characters are properly translated. Keep in mind that there are a set of key values that result in android specific behavior [see](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values#Phone_keys): - "AppSwitch": Behaves as the "Overview" button in android. - "GoBack": The Back button. - "GoHome": The Home button, which takes the user to the phone's main screen (usually an application launcher). - "Power": The Power button.
Series of utf8 encoded characters to send to the emulator. An attempt will be made to translate every character will an EvDev event type and send to the emulator as a keypress event. The values in keyCode, eventType, codeType and key will be ignored. Note that most printable ASCII characters (range [32-127) can be send individually with the "key" param. Do not expect arbitrary UTF symbols to arrive in the emulator (most will be ignored). Note that it is possible to overrun the keyboard buffer by slamming this endpoint with large quantities of text (>1kb). The clipboard api is better suited for transferring large quantities of text.
Code types that the emulator can receive. Note that the emulator will do its best to translate the code to an evdev value that will be send to the emulator. This translation is based on the chromium translation tables. See (this)[https://android.googlesource.com/platform/external/qemu/+/refs/heads/emu-master-dev/android/android-grpc/android/emulation/control/keyboard/keycode_converter_data.inc] for details on the translation.
Used in:
Used in:
Indicates that this keyevent should be send to the emulator as a key down event. Meaning that the key event will be translated to an EvDev event type and bit 11 (0x400) will be set before it is sent to the emulator.
Indicates that the keyevent should be send to the emulator as a key up event. Meaning that the key event will be translated to an EvDev event type and sent to the emulator.
Indicates that the keyevent will be send to the emulator as e key down event and immediately followed by a keyup event.
Used as request type in: EmulatorController.getLogcat, EmulatorController.streamLogcat
Used as response type in: EmulatorController.getLogcat, EmulatorController.streamLogcat
[Output Only] The contents of the log output.
The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output exceeds the size of the buffer, older output will be overwritten by newer content and the start values will be mismatched.
[Output Only] The position of the next byte of content from the serial console output. Use this value in the next request as the start parameter.
Set the sort of response you are interested it in. It the type is "Parsed" the entries field will contain the parsed results. otherwise the contents field will be set.
[Output Only] The parsed logcat entries so far. Only set if sort is set to Parsed
Used in:
A parsed logcat entry.
Used in:
A Unix timestamps in milliseconds (The number of milliseconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds)
Process id.
Thread id.
The possible log levels.
Used in:
The MouseEvent interface represents events that occur due to the user interacting with a pointing device (such as a mouse).
Used as request type in: EmulatorController.sendMouse
Used as field type in:
The horizontal coordinate. This is the physical location on the screen For example 0 indicates the leftmost coordinate.
The vertical coordinate. This is the physical location on the screen For example 0 indicates the top left coordinate.
Indicates which buttons are pressed. 0: No button was pressed 1: Primary button (left) 2: Secondary button (right)
The display device where the mouse event occurred. Omitting or using the value 0 indicates the main display.
Used in:
Fired when an update to a display event has been fired through the extended ui. This does not fire events when the display is changed through the console or gRPC endpoint.
Used in:
When specified as KEEP_CURRENT, extended controls will display the current pane. If it is the first time for extended controls to be shown, LOCATION will be used.
Referenced from external/qemu/android/android-emu/android/skin/qt/extended-window-styles.h
Used in: ,
A Pen is similar to a touch, with the addition of button and rubber information.
Used in:
True if the button is pressed or not
True if it is a rubber pointer.
Used in:
The list of Pen objects, note that these do not need to be unique
The display device where the pen event occurred. Omitting or using the value 0 indicates the main display.
Used in:
Used as response type in: EmulatorController.sendPhone, EmulatorController.sendSms, EmulatorController.setPhoneNumber
Used in:
Enum out of range
Mal-formed telephone number
E.g., disconnect when no call is in progress
Internal error
Radio power off
Used as request type in: EmulatorController.getPhysicalModel, EmulatorController.setPhysicalModel, EmulatorController.streamPhysicalModel
Used as response type in: EmulatorController.getPhysicalModel, EmulatorController.streamPhysicalModel
[Output Only]
Value interpretation depends on sensor.
Details on the sensors documentation can be found here: https://developer.android.com/reference/android/hardware/Sensor.html#TYPE_ The types must follow the order defined in "external/qemu/android/hw-sensors.h"
Used in:
All values are angles in degrees. values = [x,y,z]
Temperature in °C
Proximity sensor distance measured in centimeters
Ambient light level in SI lux units
Atmospheric pressure in hPa (millibar)
Relative ambient air humidity in percent
Describing a hinge angle sensor in degrees.
Describing the device posture; the value should be an enum defined in Posture::PostureValue.
Heart rate in bpm
Ambient RGBC light intensity. Values are in order (Red, Green, Blue, Clear).
Wrist tilt gesture (1 = gaze, 0 = ungaze)
Used in:
qemud service is not available/initiated.
Sensor is disabled.
Unknown sensor (should not happen)
Must follow the definition in "external/qemu/android/hw-sensors.h"
Used as request type in: EmulatorController.setPosture
Used as field type in:
Used in:
Used in:
The rotation of the device, derived from the sensor state of the emulator. The derivation reflects how android observes the rotation state.
Specifies the angle of rotation, in degrees [-180, 180]
Used in:
0 degrees
90 degrees
-180 degrees
-90 degrees
Used as request type in: Rtc.receiveJsepMessage, Rtc.receiveJsepMessages
Used as response type in: Rtc.requestRtcStream
Used as field type in:
The unique identifier of this connection. You will have to use the same identifier when sending/receiving messages. The server will generate a guid when receiving the start message.
A single sensor value.
Used as request type in: EmulatorController.getSensor, EmulatorController.setSensor, EmulatorController.streamSensor
Used as response type in: EmulatorController.getSensor, EmulatorController.streamSensor
Type of sensor
[Output Only]
Value interpretation depends on sensor enum.
These are the various sensors that can be available in an emulated devices.
Used in:
Measures the acceleration force in m/s2 that is applied to a device on all three physical axes (x, y, and z), including the force of gravity.
Measures a device's rate of rotation in rad/s around each of the three physical axes (x, y, and z).
Measures the ambient geomagnetic field for all three physical axes (x, y, z) in μT.
Measures degrees of rotation that a device makes around all three physical axes (x, y, z)
Measures the temperature of the device in degrees Celsius (°C).
Measures the proximity of an object in cm relative to the view screen of a device. This sensor is typically used to determine whether a handset is being held up to a person's ear.
Measures the ambient light level (illumination) in lx.
Measures the ambient air pressure in hPa or mbar.
Measures the relative ambient humidity in percent (%).
Measures the heart rate in bpm.
Measures the ambient RGBC light intensity. Values are in order (Red, Green, Blue, Clear).
WIRST_TILT (16) is skipped; clients should use get/setPhysicalModel() instead. Measures acceleration force and provides bias data.
Used in:
qemud service is not available/initiated.
Sensor is disabled.
Unknown sensor (should not happen)
Provides detailed information regarding the snapshot.
Used as response type in: SnapshotService.UpdateSnapshot
Used as field type in:
The id of this snapshot. Use this id to load/delete/pull/update the snapshot.
Detailed information about this snapshot. This contains a detailed hardware description of the snapshot. These details are the same as the "snapshot.pb" file found in an exported snapshot. Look at the import file for a detailed description of the available fields. Note that some of these fields can be modified with the update method.
Provides information about the ability to restore this snapshot.
The size of the folder that stores required information to load a snapshot.
Used in:
The emulator believes that the snapshot is compatible with the emulator that provided this information. The emulator will attempt to load this snapshot when requested. A snapshot is usually compatible when the following statements are true: - The snapshot was taken by the current emulator version. i.e. emulator_build_id in the details field matches the build_id of the emulator that provided this information. - The snapshot was taken on the current running machine, and no hardware changes have taken place between taking and loading the snapshot. - The avd configuration has not changed between when this snapshot was taken and when the snapshot was loaded. - The system images on which the avd is based have not changed.
The emulator will not allow loading of the snapshot, as it deems the snapshot to be incompatible. Loading of snapshots can be forced by launching the emulator with the feature "AllowSnapshotMigration" enabled.
This snapshot was successfully loaded in the emulator, and was used at the starting point of the current running emulator. The following holds: A loaded snapshot is a compatible snapshot There is at most one snapshot_id that is in the "Loaded" state
Used in:
Only return compatible snapshots
Return all snapshots.
Sets options for SnapshotService. Used for both request and response messages.
Used as request type in: SnapshotService.DeleteSnapshot, SnapshotService.LoadSnapshot, SnapshotService.PullSnapshot, SnapshotService.PushSnapshot, SnapshotService.SaveSnapshot
Used as response type in: SnapshotService.DeleteSnapshot, SnapshotService.LoadSnapshot, SnapshotService.PullSnapshot, SnapshotService.PushSnapshot, SnapshotService.SaveSnapshot
The identifier to the snapshot, only required for request messages. For streaming service, only used in the first stream message of a gRPC call (would be ignored in consequent stream messages of the same call).
A stream of bytes. Encoded as a tar (possibly gzipped) file pending on the value of format.
[response only] status fields, usually indicates end of transmission.
[request only] Format of the payload. Only used in request messages. For streaming service, only used in the first stream message of a gRPC call (would be ignored in consequent stream messages of the same call).
[request only] Path to the snapshot package file. Only used in request messages. When set in a request, the PullSnapshot/PushSnapshot operation will directly write/read the exported snapshot in path without streaming, which is usually significantly faster. It would require emulator to have direct access to path, which usually means it can only be used with a local emulator.
Used in:
Transport as tar.gz
Transport as tar (not zipped)
Write to disk directly
Export a screenshot in png (if available)
Used in:
Portable Network Graphics format (https://en.wikipedia.org/wiki/Portable_Network_Graphics)
Used to communicate the socket state between a waterfall service running inside the emulator (guest) and a domain socket running on the host (emulator) The host does not have the abiliy to open direct connections, but can accept incoming connections. The protocol is as follows: - The first message on a channel from guest -> host is always a "SocketControl" message. - A channel that is identified with fd=0 is called the control channel. Only SocketControl messages are exchanged on this channel. For channel 0: - If the hosts sends an open message: - The guest should respond with a new connection, With the first message an identity message with the requested fd - If the hosts sends a close message: - The guest can close the connection with the given fd, no new messages will be send on the channel. (Be aware of out of order delivery, there still might be some leftover bytes) - If the guests sends a close message: - The host can close the connection with the given fd, no new messages will be send on the channel. (Be aware of out of order delivery, there still might be some leftover bytes) For a new connection the host usually will read the socket control message, and pass on the remaining bytes to whomever wants to consume them.
1 Byte
4 Bytes
Used in:
Indicates the identify of the channel on which this
message is sent.
Request the client to open up a connection with the
requested id.
Indicate that the channel with the given fd is to be
Used in:
The Touch interface represents a single contact point on a touch-sensitive device. The contact point is commonly a finger or stylus and the device may be a touchscreen or trackpad.
Used in: ,
The horizontal coordinate. This is the physical location on the screen For example 0 indicates the leftmost coordinate.
The vertical coordinate. This is the physical location on the screen For example 0 indicates the top left coordinate.
The identifier is an arbitrary non-negative integer that is used to identify and track each tool independently when multiple tools are active. For example, when multiple fingers are touching the device, each finger should be assigned a distinct tracking id that is used as long as the finger remains in contact. Tracking ids may be reused when their associated tools move out of range. The emulator currently supports up to 10 concurrent touch events. The identifier can be any uninque value and will be mapped to the next available internal identifier.
Reports the physical pressure applied to the tip of the tool or the signal strength of the touch contact. The values reported must be non-zero when the tool is touching the device and zero otherwise to indicate that the touch event is completed. Make sure to deliver a pressure of 0 for the given identifier when the touch event is completed, otherwise the touch identifier will not be unregistered!
Optionally reports the cross-sectional area of the touch contact, or the length of the longer dimension of the touch contact.
Optionally reports the length of the shorter dimension of the touch contact. This axis will be ignored if touch_major is reporting an area measurement greater than 0.
The orientation of the contact, if any.
Used in:
The system will use the default time of 120s to track the touch event with the given identifier. If no update happens within this timeframe the identifier is considered expired and can be made available for re-use. This means that a touch event with pressure 0 for this identifier will be send to the emulator.
Never expire the given slot. You must *ALWAYS* close the identifier by sending a touch event with 0 pressure.
A TouchEvent contains a list of Touch objects that are in contact with the touch surface. Touch events are delivered in sequence as specified in the touchList. TouchEvents are delivered to the emulated devices using ["Protocol B"](https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt)
Used as request type in: EmulatorController.sendTouch
Used as field type in:
The list of Touch objects, note that these do not need to be unique
The display device where the touch event occurred. Omitting or using the value 0 indicates the main display.
Used in:
Information about the hypervisor that is currently in use.
Used in:
Used in:
An unknown hypervisor
No hypervisor is in use. This usually means that the guest is running on a different CPU than the host, or you are using a platform where no hypervisor is available.
The Kernel based Virtual Machine (https://www.linux-kvm.org/page/Main_Page)
Intel® Hardware Accelerated Execution Manager (Intel® HAXM) https://github.com/intel/haxm
Hypervisor Framework. https://developer.apple.com/documentation/hypervisor
Window Hypervisor Platform https://docs.microsoft.com/en-us/virtualization/api/
A Run State that describes the state of the Virtual Machine.
Used as request type in: EmulatorController.setVmState
Used as response type in: EmulatorController.getVmState
Used in:
The emulator is in an unknown state. You cannot transition to this state.
Guest is actively running. You can transition to this state from the paused state.
Guest is paused to load a snapshot. You cannot transition to this state.
Guest has been paused. Transitioning to this state will pause the emulator the guest will not be consuming any cpu cycles.
Guest is paused to take or export a snapshot. You cannot transition to this state.
System shutdown, note that it is similar to power off. It tries to set the system status and notify guest. The system is likely going to disappear soon and do proper cleanup of resources, possibly taking a snapshot. This is the same behavior as closing the emulator by clicking the X (close) in the user interface.
Immediately terminate the emulator. No resource cleanup will take place. There is a good change to corrupt the system.
Will cause the emulator to reset. This is not a state you can observe.
Guest experienced some error state, you cannot transition to this state.
Completely restart the emulator.
Resume a stopped emulator
Stop (pause) a running emulator
Used as request type in: EmulatorController.injectWheel
Used as field type in:
The value indicating how much the mouse wheel is rotated. Scaled so that 120 equals to 1 wheel click. (120 is chosen as a multiplier often used to represent wheel movements less than 1 wheel click. e.g. https://doc.qt.io/qt-5/qwheelevent.html#angleDelta) Positive delta value is assigned to dx when the top of wheel is moved to left. Similarly positive delta value is assigned to dy when the top of wheel is moved away from the user.
The display device where the mouse event occurred. Omitting or using the value 0 indicates the main display.
The pixel coordinates are resolution independent, meaning the coordinates are independent from the pixel grid, resulting in a graphical user interface that is displayed at a consistent location, regardless of the resolution of the screen. For technical details: https://doc.qt.io/qt-5/highdpi.html Some things to note: - You cannot move a window offscreen. - There is a padding of around 10px around the frame. This means that moving to (0, 0) or (10, 10) will have the same result. This means that anchoring might not exactly behave as requested.
Used in:
Corresponds to the x and y coordinate of the window geometry. The window geometry includes the window frame. See: https://doc.qt.io/qt-5/application-windows.html#window-geometry for details and pecularities on linux.
Anchor that is used to determine horizontal window placement.
Used in:
The x coordinate will be treated as the left edge of the
window.
The x coordinate will be treated as the middle between
the left and right edges of the window.
The x coordinate will be treated as the right edge of
Anchor that is used to determine vertical window placement.
Used in:
The y coordinate will be treated as the top edge of the
window.
The y coordinate will be treated as the middle between
the top and bottom edges of the window.
The y coordinate will be treated as the bottom edge of