android-emulator-webrtc 1.0.16 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +3 -0
- package/api_descriptor.pb +0 -0
- package/cloudbuilders/Dockerfile +2 -2
- package/dist/components/emulator/emulator.js +43 -56
- package/dist/components/emulator/net/emulator_status.js +15 -23
- package/dist/components/emulator/net/jsep_protocol_driver.js +54 -104
- package/dist/components/emulator/net/logcat.js +34 -34
- package/dist/components/emulator/views/event_handler.js +57 -75
- package/dist/components/emulator/views/simple_png_view.js +89 -206
- package/dist/components/emulator/views/webrtc_view.js +108 -177
- package/dist/index.js +4 -8
- package/dist/proto/emulator_controller_grpc_web_pb.js +454 -634
- package/dist/proto/emulator_controller_pb.js +4620 -3945
- package/dist/proto/emulator_web_client.js +26 -56
- package/dist/proto/rtc_service_grpc_web_pb.js +35 -101
- package/dist/proto/rtc_service_pb.js +31 -88
- package/package.json +24 -21
- package/proto/README.MD +1 -1
- package/proto/emulator_controller.proto +1090 -804
- package/protoc-plugin/grpc_generator.cc +661 -549
- package/src/components/emulator/emulator.js +3 -10
- package/src/components/emulator/net/jsep_protocol_driver.js +0 -2
- package/src/components/emulator/views/simple_png_view.js +80 -134
- package/src/components/emulator/views/webrtc_view.js +83 -95
- package/test/emulator.test.js +7 -7
- package/test/event_handler.test.js +3 -0
- package/test/jsep_protocol_driver.test.js +3 -0
- package/test/simple_png_view.test.js +54 -42
- package/test/touch_event_handler.test.js +3 -1
|
@@ -44,449 +44,588 @@ import "google/protobuf/empty.proto";
|
|
|
44
44
|
// sendXXX --> send a single event XXX, possibly returning state information.
|
|
45
45
|
// android usually responds to these events.
|
|
46
46
|
service EmulatorController {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
47
|
+
// set/get/stream the sensor data
|
|
48
|
+
rpc streamSensor(SensorValue) returns (stream SensorValue) {}
|
|
49
|
+
rpc getSensor(SensorValue) returns (SensorValue) {}
|
|
50
|
+
rpc setSensor(SensorValue) returns (google.protobuf.Empty) {}
|
|
51
|
+
|
|
52
|
+
// set/get/stream the physical model, this is likely the one you are
|
|
53
|
+
// looking for when you wish to modify the device state.
|
|
54
|
+
rpc setPhysicalModel(PhysicalModelValue) returns (google.protobuf.Empty) {}
|
|
55
|
+
rpc getPhysicalModel(PhysicalModelValue) returns (PhysicalModelValue) {}
|
|
56
|
+
rpc streamPhysicalModel(PhysicalModelValue)
|
|
57
|
+
returns (stream PhysicalModelValue) {}
|
|
58
|
+
|
|
59
|
+
// Atomically set/get the current primary clipboard data.
|
|
60
|
+
rpc setClipboard(ClipData) returns (google.protobuf.Empty) {}
|
|
61
|
+
rpc getClipboard(google.protobuf.Empty) returns (ClipData) {}
|
|
62
|
+
|
|
63
|
+
// Streams the current data on the clipboard. This will immediately produce
|
|
64
|
+
// a result with the current state of the clipboard after which the stream
|
|
65
|
+
// will block and wait until a new clip event is available from the guest.
|
|
66
|
+
// Calling the setClipboard method above will not result in generating a
|
|
67
|
+
// clip event. It is possible to lose clipboard events if the clipboard
|
|
68
|
+
// updates very rapidly.
|
|
69
|
+
rpc streamClipboard(google.protobuf.Empty) returns (stream ClipData) {}
|
|
70
|
+
|
|
71
|
+
// Set/get the battery to the given state.
|
|
72
|
+
rpc setBattery(BatteryState) returns (google.protobuf.Empty) {}
|
|
73
|
+
rpc getBattery(google.protobuf.Empty) returns (BatteryState) {}
|
|
74
|
+
|
|
75
|
+
// Set the state of the gps.
|
|
76
|
+
// Note: Setting the gps position will not be reflected in the user
|
|
77
|
+
// interface. Keep in mind that android usually only samples the gps at 1
|
|
78
|
+
// hz.
|
|
79
|
+
rpc setGps(GpsState) returns (google.protobuf.Empty) {}
|
|
80
|
+
|
|
81
|
+
// Gets the latest gps state as delivered by the setGps call, or location ui
|
|
82
|
+
// if active.
|
|
83
|
+
//
|
|
84
|
+
// Note: this is not necessarily the actual gps coordinate visible at the
|
|
85
|
+
// time, due to gps sample frequency (usually 1hz).
|
|
86
|
+
rpc getGps(google.protobuf.Empty) returns (GpsState) {}
|
|
87
|
+
|
|
88
|
+
// Simulate a touch event on the finger print sensor.
|
|
89
|
+
rpc sendFingerprint(Fingerprint) returns (google.protobuf.Empty) {}
|
|
90
|
+
|
|
91
|
+
// Send a keyboard event. Translating the event.
|
|
92
|
+
rpc sendKey(KeyboardEvent) returns (google.protobuf.Empty) {}
|
|
93
|
+
|
|
94
|
+
// Send touch/mouse events. Note that mouse events can be simulated
|
|
95
|
+
// by touch events.
|
|
96
|
+
rpc sendTouch(TouchEvent) returns (google.protobuf.Empty) {}
|
|
97
|
+
rpc sendMouse(MouseEvent) returns (google.protobuf.Empty) {}
|
|
98
|
+
rpc injectWheel(stream WheelEvent) returns (google.protobuf.Empty) {}
|
|
99
|
+
|
|
100
|
+
// Make a phone call.
|
|
101
|
+
rpc sendPhone(PhoneCall) returns (PhoneResponse) {}
|
|
102
|
+
|
|
103
|
+
// Sends an sms message to the emulator.
|
|
104
|
+
rpc sendSms(SmsMessage) returns (PhoneResponse) {}
|
|
105
|
+
|
|
106
|
+
// Sends an sms message to the emulator.
|
|
107
|
+
rpc setPhoneNumber(PhoneNumber) returns (PhoneResponse) {}
|
|
108
|
+
|
|
109
|
+
// Retrieve the status of the emulator. This will contain general
|
|
110
|
+
// hardware information, and whether the device has booted or not.
|
|
111
|
+
rpc getStatus(google.protobuf.Empty) returns (EmulatorStatus) {}
|
|
112
|
+
|
|
113
|
+
// Gets an individual screenshot in the desired format.
|
|
114
|
+
//
|
|
115
|
+
// The image will be scaled to the desired ImageFormat, while maintaining
|
|
116
|
+
// the aspect ratio. The returned image will never exceed resolution of the
|
|
117
|
+
// device display. Not setting the width or height (i.e. they are 0) will
|
|
118
|
+
// result in using the display width and height.
|
|
119
|
+
//
|
|
120
|
+
// The resulting image will be properly oriented and can be displayed
|
|
121
|
+
// directly without post processing. For example, if the device has a
|
|
122
|
+
// 1080x1920 screen and is in landscape mode and called with no width or
|
|
123
|
+
// height parameter, it will return a 1920x1080 image.
|
|
124
|
+
//
|
|
125
|
+
// The dimensions of the returned image will never exceed the corresponding
|
|
126
|
+
// display dimensions. For example, this method will return a 1920x1080
|
|
127
|
+
// screenshot, if the display resolution is 1080x1920 and a screenshot of
|
|
128
|
+
// 2048x2048 is requested when the device is in landscape mode.
|
|
129
|
+
//
|
|
130
|
+
// This method will return an empty image if the display is not visible.
|
|
131
|
+
rpc getScreenshot(ImageFormat) returns (Image) {}
|
|
132
|
+
|
|
133
|
+
// Streams a series of screenshots in the desired format.
|
|
134
|
+
//
|
|
135
|
+
// A new frame will be delivered whenever the device produces a new frame.
|
|
136
|
+
// Beware that this can produce a significant amount of data and that
|
|
137
|
+
// certain translations can be very costly. For example, streaming a series
|
|
138
|
+
// of png images is very cpu intensive.
|
|
139
|
+
//
|
|
140
|
+
// Images are produced according to the getScreenshot API described above.
|
|
141
|
+
//
|
|
142
|
+
// If the display is inactive, or becomes inactive, an empty image will be
|
|
143
|
+
// delivered. Images will be delived again if the display becomes active and
|
|
144
|
+
// new frames are produced.
|
|
145
|
+
rpc streamScreenshot(ImageFormat) returns (stream Image) {}
|
|
146
|
+
|
|
147
|
+
// Streams a series of audio packets in the desired format.
|
|
148
|
+
// A new frame will be delivered whenever the emulated device
|
|
149
|
+
// produces a new audio frame. You can expect packets to be
|
|
150
|
+
// delivered in intervals of 20-30ms.
|
|
151
|
+
//
|
|
152
|
+
// Be aware that this can block when the emulator does not
|
|
153
|
+
// produce any audio whatsoever!
|
|
154
|
+
rpc streamAudio(AudioFormat) returns (stream AudioPacket) {}
|
|
155
|
+
|
|
156
|
+
// Injects a series of audio packets to the android microphone.
|
|
157
|
+
// A new frame will be delivered whenever the emulated device
|
|
158
|
+
// requests a new audio frame. Audio is usually delivered at a rate
|
|
159
|
+
// that the emulator is requesting frames. Audio will be stored in a
|
|
160
|
+
// temporary buffer that can hold 300ms of audio.
|
|
161
|
+
//
|
|
162
|
+
// Notes:
|
|
163
|
+
// - Only the first audio format packet that is delivered will be
|
|
164
|
+
// honored. There is no need to send the audio format multiple times.
|
|
165
|
+
// - Real time audio currently immediately overrides the buffer. This
|
|
166
|
+
// means you must provide a constant rate of audio packets. The real
|
|
167
|
+
// time mode is experimental. Timestamps of audio packets might be
|
|
168
|
+
// used in the future to improve synchronization.
|
|
169
|
+
//
|
|
170
|
+
// - INVALID_ARGUMENT (code 3) The sampling rate was too high/low
|
|
171
|
+
// - INVALID_ARGUMENT (code 3) The audio packet was too large to handle.
|
|
172
|
+
// - FAILED_PRECONDITION (code 9) If there was a microphone registered
|
|
173
|
+
// already.
|
|
174
|
+
rpc injectAudio(stream AudioPacket) returns (google.protobuf.Empty) {}
|
|
175
|
+
|
|
176
|
+
// Returns the last 128Kb of logcat output from the emulator
|
|
177
|
+
// Note that parsed logcat messages are only available after L (Api >23).
|
|
178
|
+
// it is possible that the logcat buffer gets overwritten, or falls behind.
|
|
179
|
+
rpc getLogcat(LogMessage) returns (LogMessage) {}
|
|
180
|
+
|
|
181
|
+
// Streams the logcat output from the emulator. The first call
|
|
182
|
+
// can retrieve up to 128Kb. This call will not return.
|
|
183
|
+
// Note that parsed logcat messages are only available after L (Api >23)
|
|
184
|
+
// it is possible that the logcat buffer gets overwritten, or falls behind.
|
|
185
|
+
rpc streamLogcat(LogMessage) returns (stream LogMessage) {}
|
|
186
|
+
|
|
187
|
+
// Transition the virtual machine to the desired state. Note that
|
|
188
|
+
// some states are only observable. For example you cannot transition
|
|
189
|
+
// to the error state.
|
|
190
|
+
rpc setVmState(VmRunState) returns (google.protobuf.Empty) {}
|
|
191
|
+
|
|
192
|
+
// Gets the state of the virtual machine.
|
|
193
|
+
rpc getVmState(google.protobuf.Empty) returns (VmRunState) {}
|
|
194
|
+
|
|
195
|
+
// Atomically changes the current multi-display configuration.
|
|
196
|
+
// After this call the given display configurations will be activated. You
|
|
197
|
+
// can only update secondary displays. Displays with id 0 will be ignored.
|
|
198
|
+
//
|
|
199
|
+
// This call can result in the removal or addition of secondary displays,
|
|
200
|
+
// the final display state can be observed by the returned configuration.
|
|
201
|
+
//
|
|
202
|
+
// The following gRPC error codes can be returned:
|
|
203
|
+
// - FAILED_PRECONDITION (code 9) if the AVD does not support a
|
|
204
|
+
// configurable
|
|
205
|
+
// secondary display.
|
|
206
|
+
// - INVALID_ARGUMENT (code 3) if:
|
|
207
|
+
// - The same display id is defined multiple times.
|
|
208
|
+
// - The display configurations are outside valid ranges.
|
|
209
|
+
// See DisplayConfiguration for details on valid ranges.
|
|
210
|
+
// - INTERNAL (code 13) if there was an internal emulator failure.
|
|
211
|
+
rpc setDisplayConfigurations(DisplayConfigurations)
|
|
212
|
+
returns (DisplayConfigurations) {}
|
|
213
|
+
|
|
214
|
+
// Returns all currently valid logical displays.
|
|
215
|
+
//
|
|
216
|
+
// The gRPC error code FAILED_PRECONDITION (code 9) is returned if the AVD
|
|
217
|
+
// does not support a configurable secondary display.
|
|
218
|
+
rpc getDisplayConfigurations(google.protobuf.Empty)
|
|
219
|
+
returns (DisplayConfigurations) {}
|
|
220
|
+
|
|
221
|
+
// Notifies client of the following changes:
|
|
222
|
+
//
|
|
223
|
+
// - Virtual scene camera status change.
|
|
224
|
+
// - Display configuration changes from extended ui. This will only be fired
|
|
225
|
+
// if the user makes modifications the extended displays through the
|
|
226
|
+
// extended control tab.
|
|
227
|
+
//
|
|
228
|
+
// Note that this method will send the initial virtual scene state
|
|
229
|
+
// immediately.
|
|
230
|
+
rpc streamNotification(google.protobuf.Empty)
|
|
231
|
+
returns (stream Notification) {}
|
|
232
|
+
|
|
233
|
+
// RotationRadian is relative to the camera's current orientation.
|
|
234
|
+
rpc rotateVirtualSceneCamera(RotationRadian)
|
|
235
|
+
returns (google.protobuf.Empty) {}
|
|
236
|
+
// Velocity is absolute
|
|
237
|
+
rpc setVirtualSceneCameraVelocity(Velocity)
|
|
238
|
+
returns (google.protobuf.Empty) {}
|
|
239
|
+
// Set foldable posture
|
|
240
|
+
rpc setPosture(Posture) returns (google.protobuf.Empty) {}
|
|
241
|
+
|
|
242
|
+
// Get the backlight brightness.
|
|
243
|
+
// The following gRPC error codes can be returned:
|
|
244
|
+
// - FAILED_PRECONDITION (code 9) if the AVD does not support hw-control.
|
|
245
|
+
rpc getBrightness(BrightnessValue) returns (BrightnessValue) {}
|
|
246
|
+
|
|
247
|
+
// Set the backlight brightness.
|
|
248
|
+
// The following gRPC error codes can be returned:
|
|
249
|
+
// - FAILED_PRECONDITION (code 9) if the AVD does not support hw-control.
|
|
250
|
+
// - INVALID_ARGUMENT (code 3) The brightness exceeds the valid range.
|
|
251
|
+
rpc setBrightness(BrightnessValue) returns (google.protobuf.Empty) {}
|
|
252
|
+
|
|
253
|
+
// Returns the current mode of the primary display of a resizable AVD.
|
|
254
|
+
// The following gRPC error codes can be returned:
|
|
255
|
+
// - FAILED_PRECONDITION (code 9) if the AVD is not resizable.
|
|
256
|
+
rpc getDisplayMode(google.protobuf.Empty) returns (DisplayMode) {}
|
|
257
|
+
|
|
258
|
+
// Sets the size of the primary display of a resizable AVD. Fails if the AVD
|
|
259
|
+
// is not resizable. The following gRPC error codes can be returned:
|
|
260
|
+
// - FAILED_PRECONDITION (code 9) if the AVD is not resizable.
|
|
261
|
+
rpc setDisplayMode(DisplayMode) returns (google.protobuf.Empty) {}
|
|
195
262
|
}
|
|
196
263
|
|
|
197
264
|
// A Run State that describes the state of the Virtual Machine.
|
|
198
265
|
message VmRunState {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
266
|
+
enum RunState {
|
|
267
|
+
// The emulator is in an unknown state. You cannot transition to this
|
|
268
|
+
// state.
|
|
269
|
+
UNKNOWN = 0;
|
|
270
|
+
// Guest is actively running. You can transition to this state from the
|
|
271
|
+
// paused state.
|
|
272
|
+
RUNNING = 1;
|
|
273
|
+
// Guest is paused to load a snapshot. You cannot transition to this
|
|
274
|
+
// state.
|
|
275
|
+
RESTORE_VM = 2;
|
|
276
|
+
// Guest has been paused. Transitioning to this state will pause the
|
|
277
|
+
// emulator the guest will not be consuming any cpu cycles.
|
|
278
|
+
PAUSED = 3;
|
|
279
|
+
// Guest is paused to take or export a snapshot. You cannot
|
|
280
|
+
// transition to this state.
|
|
281
|
+
SAVE_VM = 4;
|
|
282
|
+
// System shutdown, note that it is similar to power off. It tries to
|
|
283
|
+
// set the system status and notify guest. The system is likely going to
|
|
284
|
+
// disappear soon and do proper cleanup of resources, possibly taking
|
|
285
|
+
// a snapshot. This is the same behavior as closing the emulator by
|
|
286
|
+
// clicking the X (close) in the user interface.
|
|
287
|
+
SHUTDOWN = 5;
|
|
288
|
+
// Immediately terminate the emulator. No resource cleanup will take
|
|
289
|
+
// place. There is a good change to corrupt the system.
|
|
290
|
+
TERMINATE = 7;
|
|
291
|
+
// Will cause the emulator to reset. This is not a state you can
|
|
292
|
+
// observe.
|
|
293
|
+
RESET = 9;
|
|
294
|
+
// Guest experienced some error state, you cannot transition to this
|
|
295
|
+
// state.
|
|
296
|
+
INTERNAL_ERROR = 10;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
RunState state = 1;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
message ParameterValue {
|
|
303
|
+
repeated float data = 1 [packed = true];
|
|
304
|
+
}
|
|
232
305
|
|
|
233
306
|
message PhysicalModelValue {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
307
|
+
enum State {
|
|
308
|
+
OK = 0;
|
|
309
|
+
NO_SERVICE = -3; // qemud service is not available/initiated.
|
|
310
|
+
DISABLED = -2; // Sensor is disabled.
|
|
311
|
+
UNKNOWN = -1; // Unknown sensor (should not happen)
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// Details on the sensors documentation can be found here:
|
|
315
|
+
// https://developer.android.com/reference/android/hardware/Sensor.html#TYPE_
|
|
316
|
+
// The types must follow the order defined in
|
|
317
|
+
// "external/qemu/android/hw-sensors.h"
|
|
318
|
+
enum PhysicalType {
|
|
319
|
+
POSITION = 0;
|
|
320
|
+
|
|
321
|
+
// All values are angles in degrees.
|
|
322
|
+
// values = [x,y,z]
|
|
323
|
+
ROTATION = 1;
|
|
324
|
+
|
|
325
|
+
MAGNETIC_FIELD = 2;
|
|
326
|
+
|
|
327
|
+
// Temperature in °C
|
|
328
|
+
TEMPERATURE = 3;
|
|
329
|
+
|
|
330
|
+
// Proximity sensor distance measured in centimeters
|
|
331
|
+
PROXIMITY = 4;
|
|
240
332
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
enum PhysicalType {
|
|
244
|
-
POSITION = 0;
|
|
333
|
+
// Ambient light level in SI lux units
|
|
334
|
+
LIGHT = 5;
|
|
245
335
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
ROTATION = 1;
|
|
336
|
+
// Atmospheric pressure in hPa (millibar)
|
|
337
|
+
PRESSURE = 6;
|
|
249
338
|
|
|
250
|
-
|
|
339
|
+
// Relative ambient air humidity in percent
|
|
340
|
+
HUMIDITY = 7;
|
|
251
341
|
|
|
252
|
-
|
|
253
|
-
|
|
342
|
+
VELOCITY = 8;
|
|
343
|
+
AMBIENT_MOTION = 9;
|
|
254
344
|
|
|
255
|
-
|
|
256
|
-
|
|
345
|
+
// Describing a hinge angle sensor in degrees.
|
|
346
|
+
HINGE_ANGLE0 = 10;
|
|
347
|
+
HINGE_ANGLE1 = 11;
|
|
348
|
+
HINGE_ANGLE2 = 12;
|
|
257
349
|
|
|
258
|
-
|
|
259
|
-
|
|
350
|
+
ROLLABLE0 = 13;
|
|
351
|
+
ROLLABLE1 = 14;
|
|
352
|
+
ROLLABLE2 = 15;
|
|
260
353
|
|
|
261
|
-
|
|
262
|
-
|
|
354
|
+
// Describing the device posture; the value should be an enum defined
|
|
355
|
+
// in Posture::PostureValue.
|
|
356
|
+
POSTURE = 16;
|
|
263
357
|
|
|
264
|
-
|
|
265
|
-
|
|
358
|
+
// Heart rate in bpm
|
|
359
|
+
HEART_RATE = 17;
|
|
266
360
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
PhysicalType target = 1;
|
|
361
|
+
// Ambient RGBC light intensity. Values are in order (Red, Green, Blue,
|
|
362
|
+
// Clear).
|
|
363
|
+
RGBC_LIGHT = 18;
|
|
271
364
|
|
|
272
|
-
|
|
273
|
-
|
|
365
|
+
// Wrist tilt gesture (1 = gaze, 0 = ungaze)
|
|
366
|
+
WRIST_TILT = 19;
|
|
367
|
+
}
|
|
368
|
+
PhysicalType target = 1;
|
|
369
|
+
|
|
370
|
+
// [Output Only]
|
|
371
|
+
State status = 2;
|
|
274
372
|
|
|
275
|
-
|
|
276
|
-
|
|
373
|
+
// Value interpretation depends on sensor.
|
|
374
|
+
ParameterValue value = 3;
|
|
277
375
|
}
|
|
278
376
|
|
|
279
377
|
// A single sensor value.
|
|
280
378
|
message SensorValue {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
379
|
+
enum State {
|
|
380
|
+
OK = 0;
|
|
381
|
+
NO_SERVICE = -3; // qemud service is not available/initiated.
|
|
382
|
+
DISABLED = -2; // Sensor is disabled.
|
|
383
|
+
UNKNOWN = -1; // Unknown sensor (should not happen)
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// These are the various sensors that can be available in an emulated
|
|
387
|
+
// devices.
|
|
388
|
+
enum SensorType {
|
|
389
|
+
// Measures the acceleration force in m/s2 that is applied to a device
|
|
390
|
+
// on all three physical axes (x, y, and z), including the force of
|
|
391
|
+
// gravity.
|
|
392
|
+
ACCELERATION = 0;
|
|
393
|
+
// Measures a device's rate of rotation in rad/s around each of the
|
|
394
|
+
// three physical axes (x, y, and z).
|
|
395
|
+
GYROSCOPE = 1;
|
|
396
|
+
// Measures the ambient geomagnetic field for all three physical axes
|
|
397
|
+
// (x, y, z) in μT.
|
|
398
|
+
MAGNETIC_FIELD = 2;
|
|
399
|
+
// Measures degrees of rotation that a device makes around all three
|
|
400
|
+
// physical axes (x, y, z)
|
|
401
|
+
ORIENTATION = 3;
|
|
402
|
+
// Measures the temperature of the device in degrees Celsius (°C).
|
|
403
|
+
TEMPERATURE = 4;
|
|
404
|
+
// Measures the proximity of an object in cm relative to the view screen
|
|
405
|
+
// of a device. This sensor is typically used to determine whether a
|
|
406
|
+
// handset is being held up to a person's ear.
|
|
407
|
+
PROXIMITY = 5;
|
|
408
|
+
// Measures the ambient light level (illumination) in lx.
|
|
409
|
+
LIGHT = 6;
|
|
410
|
+
// Measures the ambient air pressure in hPa or mbar.
|
|
411
|
+
PRESSURE = 7;
|
|
412
|
+
// Measures the relative ambient humidity in percent (%).
|
|
413
|
+
HUMIDITY = 8;
|
|
414
|
+
MAGNETIC_FIELD_UNCALIBRATED = 9;
|
|
415
|
+
GYROSCOPE_UNCALIBRATED = 10;
|
|
416
|
+
|
|
417
|
+
// HINGE_ANGLE0 (11), HINGE_ANGLE1 (12), HINGE_ANGLE2 (13) are
|
|
418
|
+
// skipped; clients should use get/setPhysicalModel() instead for these
|
|
419
|
+
// "sensors".
|
|
420
|
+
|
|
421
|
+
// Measures the heart rate in bpm.
|
|
422
|
+
HEART_RATE = 14;
|
|
423
|
+
// Measures the ambient RGBC light intensity.
|
|
424
|
+
// Values are in order (Red, Green, Blue, Clear).
|
|
425
|
+
RGBC_LIGHT = 15;
|
|
426
|
+
// WIRST_TILT (16) is skipped; clients should use get/setPhysicalModel()
|
|
427
|
+
// instead.
|
|
428
|
+
// Measures acceleration force and provides bias data.
|
|
429
|
+
ACCELERATION_UNCALIBRATED = 17;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
// Type of sensor
|
|
433
|
+
SensorType target = 1;
|
|
434
|
+
|
|
435
|
+
// [Output Only]
|
|
436
|
+
State status = 2;
|
|
437
|
+
|
|
438
|
+
// Value interpretation depends on sensor enum.
|
|
439
|
+
ParameterValue value = 3;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
// A single backlight brightness value.
|
|
443
|
+
message BrightnessValue {
|
|
444
|
+
enum LightType {
|
|
445
|
+
// Display backlight. This will affect all displays.
|
|
446
|
+
LCD = 0;
|
|
447
|
+
KEYBOARD = 1;
|
|
448
|
+
BUTTON = 2;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// Type of light
|
|
452
|
+
LightType target = 1;
|
|
453
|
+
|
|
454
|
+
// Light intensity, ranges from 0-255.
|
|
455
|
+
uint32 value = 2;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
// in line with android/emulation/resizable_display_config.h
|
|
459
|
+
enum DisplayModeValue {
|
|
460
|
+
PHONE = 0;
|
|
461
|
+
FOLDABLE = 1;
|
|
462
|
+
TABLET = 2;
|
|
463
|
+
DESKTOP = 3;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
message DisplayMode {
|
|
467
|
+
DisplayModeValue value = 1;
|
|
329
468
|
}
|
|
330
469
|
|
|
331
470
|
message LogMessage {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
471
|
+
// [Output Only] The contents of the log output.
|
|
472
|
+
string contents = 1;
|
|
473
|
+
// The starting byte position of the output that was returned. This
|
|
474
|
+
// should match the start parameter sent with the request. If the serial
|
|
475
|
+
// console output exceeds the size of the buffer, older output will be
|
|
476
|
+
// overwritten by newer content and the start values will be mismatched.
|
|
477
|
+
int64 start = 2;
|
|
478
|
+
//[Output Only] The position of the next byte of content from the serial
|
|
479
|
+
// console output. Use this value in the next request as the start
|
|
480
|
+
// parameter.
|
|
481
|
+
int64 next = 3;
|
|
482
|
+
|
|
483
|
+
// Set the sort of response you are interested it in.
|
|
484
|
+
// It the type is "Parsed" the entries field will contain the parsed
|
|
485
|
+
// results. otherwise the contents field will be set.
|
|
486
|
+
LogType sort = 4;
|
|
487
|
+
|
|
488
|
+
// [Output Only] The parsed logcat entries so far. Only set if sort is
|
|
489
|
+
// set to Parsed
|
|
490
|
+
repeated LogcatEntry entries = 5;
|
|
491
|
+
|
|
492
|
+
enum LogType {
|
|
493
|
+
Text = 0;
|
|
494
|
+
Parsed = 1;
|
|
495
|
+
}
|
|
357
496
|
}
|
|
358
497
|
|
|
359
498
|
// A parsed logcat entry.
|
|
360
499
|
message LogcatEntry {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
500
|
+
// The possible log levels.
|
|
501
|
+
enum LogLevel {
|
|
502
|
+
UNKNOWN = 0;
|
|
503
|
+
DEFAULT = 1;
|
|
504
|
+
VERBOSE = 2;
|
|
505
|
+
DEBUG = 3;
|
|
506
|
+
INFO = 4;
|
|
507
|
+
WARN = 5;
|
|
508
|
+
ERR = 6;
|
|
509
|
+
FATAL = 7;
|
|
510
|
+
SILENT = 8;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
// A Unix timestamps in milliseconds (The number of milliseconds that
|
|
514
|
+
// have elapsed since January 1, 1970 (midnight UTC/GMT), not counting
|
|
515
|
+
// leap seconds)
|
|
516
|
+
uint64 timestamp = 1;
|
|
517
|
+
|
|
518
|
+
// Process id.
|
|
519
|
+
uint32 pid = 2;
|
|
520
|
+
|
|
521
|
+
// Thread id.
|
|
522
|
+
uint32 tid = 3;
|
|
523
|
+
LogLevel level = 4;
|
|
524
|
+
string tag = 5;
|
|
525
|
+
string msg = 6;
|
|
387
526
|
}
|
|
388
527
|
|
|
389
528
|
// Information about the hypervisor that is currently in use.
|
|
390
529
|
message VmConfiguration {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
530
|
+
enum VmHypervisorType {
|
|
531
|
+
// An unknown hypervisor
|
|
532
|
+
UNKNOWN = 0;
|
|
394
533
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
534
|
+
// No hypervisor is in use. This usually means that the guest is
|
|
535
|
+
// running on a different CPU than the host, or you are using a
|
|
536
|
+
// platform where no hypervisor is available.
|
|
537
|
+
NONE = 1;
|
|
399
538
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
539
|
+
// The Kernel based Virtual Machine
|
|
540
|
+
// (https://www.linux-kvm.org/page/Main_Page)
|
|
541
|
+
KVM = 2;
|
|
403
542
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
543
|
+
// Intel® Hardware Accelerated Execution Manager (Intel® HAXM)
|
|
544
|
+
// https://github.com/intel/haxm
|
|
545
|
+
HAXM = 3;
|
|
407
546
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
547
|
+
// Hypervisor Framework.
|
|
548
|
+
// https://developer.apple.com/documentation/hypervisor
|
|
549
|
+
HVF = 4;
|
|
411
550
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
551
|
+
// Window Hypervisor Platform
|
|
552
|
+
// https://docs.microsoft.com/en-us/virtualization/api/
|
|
553
|
+
WHPX = 5;
|
|
415
554
|
|
|
416
|
-
|
|
417
|
-
|
|
555
|
+
AEHD = 6;
|
|
556
|
+
}
|
|
418
557
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
558
|
+
VmHypervisorType hypervisorType = 1;
|
|
559
|
+
int32 numberOfCpuCores = 2;
|
|
560
|
+
int64 ramSizeBytes = 3;
|
|
422
561
|
}
|
|
423
562
|
|
|
424
563
|
// Representation of a clipped data object on the clipboard.
|
|
425
564
|
message ClipData {
|
|
426
|
-
|
|
427
|
-
|
|
565
|
+
// UTF-8 Encoded text.
|
|
566
|
+
string text = 1;
|
|
428
567
|
}
|
|
429
568
|
|
|
430
569
|
// The Touch interface represents a single contact point on a
|
|
431
570
|
// touch-sensitive device. The contact point is commonly a finger or stylus
|
|
432
571
|
// and the device may be a touchscreen or trackpad.
|
|
433
572
|
message Touch {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
573
|
+
// The horizontal coordinate. This is the physical location on the
|
|
574
|
+
// screen For example 0 indicates the leftmost coordinate.
|
|
575
|
+
int32 x = 1;
|
|
576
|
+
|
|
577
|
+
// The vertical coordinate. This is the physical location on the screen
|
|
578
|
+
// For example 0 indicates the top left coordinate.
|
|
579
|
+
int32 y = 2;
|
|
580
|
+
|
|
581
|
+
// The identifier is an arbitrary non-negative integer that is used to
|
|
582
|
+
// identify and track each tool independently when multiple tools are
|
|
583
|
+
// active. For example, when multiple fingers are touching the device,
|
|
584
|
+
// each finger should be assigned a distinct tracking id that is used as
|
|
585
|
+
// long as the finger remains in contact. Tracking ids may be reused
|
|
586
|
+
// when their associated tools move out of range.
|
|
587
|
+
//
|
|
588
|
+
// The emulator currently supports up to 10 concurrent touch events. The
|
|
589
|
+
// identifier can be any uninque value and will be mapped to the next
|
|
590
|
+
// available internal identifier.
|
|
591
|
+
int32 identifier = 3;
|
|
592
|
+
|
|
593
|
+
// Reports the physical pressure applied to the tip of the tool or the
|
|
594
|
+
// signal strength of the touch contact.
|
|
595
|
+
//
|
|
596
|
+
// The values reported must be non-zero when the tool is touching the
|
|
597
|
+
// device and zero otherwise to indicate that the touch event is
|
|
598
|
+
// completed.
|
|
599
|
+
//
|
|
600
|
+
// Make sure to deliver a pressure of 0 for the given identifier when
|
|
601
|
+
// the touch event is completed, otherwise the touch identifier will not
|
|
602
|
+
// be unregistered!
|
|
603
|
+
int32 pressure = 4;
|
|
604
|
+
|
|
605
|
+
// Optionally reports the cross-sectional area of the touch contact, or
|
|
606
|
+
// the length of the longer dimension of the touch contact.
|
|
607
|
+
int32 touch_major = 5;
|
|
608
|
+
|
|
609
|
+
// Optionally reports the length of the shorter dimension of the touch
|
|
610
|
+
// contact. This axis will be ignored if touch_major is reporting an
|
|
611
|
+
// area measurement greater than 0.
|
|
612
|
+
int32 touch_minor = 6;
|
|
474
613
|
|
|
475
614
|
enum EventExpiration {
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
615
|
+
// The system will use the default time of 120s to track
|
|
616
|
+
// the touch event with the given identifier. If no update happens
|
|
617
|
+
// within this timeframe the identifier is considered expired
|
|
618
|
+
// and can be made available for re-use. This means that a touch event
|
|
619
|
+
// with pressure 0 for this identifier will be send to the emulator.
|
|
620
|
+
EVENT_EXPIRATION_UNSPECIFIED = 0;
|
|
621
|
+
|
|
622
|
+
// Never expire the given slot. You must *ALWAYS* close the identifier
|
|
623
|
+
// by sending a touch event with 0 pressure.
|
|
624
|
+
NEVER_EXPIRE = 1;
|
|
486
625
|
}
|
|
487
626
|
|
|
488
627
|
EventExpiration expiration = 7;
|
|
489
|
-
|
|
628
|
+
}
|
|
490
629
|
|
|
491
630
|
// A TouchEvent contains a list of Touch objects that are in contact with
|
|
492
631
|
// the touch surface.
|
|
@@ -496,37 +635,53 @@ message Touch {
|
|
|
496
635
|
// TouchEvents are delivered to the emulated devices using ["Protocol
|
|
497
636
|
// B"](https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt)
|
|
498
637
|
message TouchEvent {
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
638
|
+
// The list of Touch objects, note that these do not need to be unique
|
|
639
|
+
repeated Touch touches = 1;
|
|
640
|
+
|
|
641
|
+
// The display device where the touch event occurred.
|
|
642
|
+
// Omitting or using the value 0 indicates the main display.
|
|
643
|
+
//
|
|
644
|
+
// Touch events cannot be send to displays other than 0, due to
|
|
645
|
+
// https://issuetracker.google.com/issues/150699691
|
|
646
|
+
int32 display = 2;
|
|
508
647
|
}
|
|
509
648
|
|
|
510
649
|
// The MouseEvent interface represents events that occur due to the user
|
|
511
650
|
// interacting with a pointing device (such as a mouse).
|
|
512
651
|
message MouseEvent {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
652
|
+
// The horizontal coordinate. This is the physical location on the
|
|
653
|
+
// screen For example 0 indicates the leftmost coordinate.
|
|
654
|
+
int32 x = 1;
|
|
655
|
+
|
|
656
|
+
// The vertical coordinate. This is the physical location on the screen
|
|
657
|
+
// For example 0 indicates the top left coordinate.
|
|
658
|
+
int32 y = 2;
|
|
659
|
+
|
|
660
|
+
// Indicates which buttons are pressed.
|
|
661
|
+
// 0: No button was pressed
|
|
662
|
+
// 1: Primary button (left)
|
|
663
|
+
// 2: Secondary button (right)
|
|
664
|
+
int32 buttons = 3;
|
|
665
|
+
|
|
666
|
+
// The display device where the mouse event occurred.
|
|
667
|
+
// Omitting or using the value 0 indicates the main display.
|
|
668
|
+
int32 display = 4;
|
|
669
|
+
}
|
|
526
670
|
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
671
|
+
message WheelEvent {
|
|
672
|
+
// The value indicating how much the mouse wheel is rotated. Scaled so that
|
|
673
|
+
// 120 equals to 1 wheel click. (120 is chosen as a multiplier often used to
|
|
674
|
+
// represent wheel movements less than 1 wheel click. e.g.
|
|
675
|
+
// https://doc.qt.io/qt-5/qwheelevent.html#angleDelta) Positive delta value
|
|
676
|
+
// is assigned to dx when the top of wheel is moved to left. Similarly
|
|
677
|
+
// positive delta value is assigned to dy when the top of wheel is moved
|
|
678
|
+
// away from the user.
|
|
679
|
+
int32 dx = 1;
|
|
680
|
+
int32 dy = 2;
|
|
681
|
+
|
|
682
|
+
// The display device where the mouse event occurred.
|
|
683
|
+
// Omitting or using the value 0 indicates the main display.
|
|
684
|
+
int32 display = 3;
|
|
530
685
|
}
|
|
531
686
|
|
|
532
687
|
// KeyboardEvent objects describe a user interaction with the keyboard; each
|
|
@@ -538,368 +693,413 @@ message MouseEvent {
|
|
|
538
693
|
// Note: that only keyCode, key, or text can be set and that the semantics
|
|
539
694
|
// will slightly vary.
|
|
540
695
|
message KeyboardEvent {
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
696
|
+
// Code types that the emulator can receive. Note that the emulator
|
|
697
|
+
// will do its best to translate the code to an evdev value that
|
|
698
|
+
// will be send to the emulator. This translation is based on
|
|
699
|
+
// the chromium translation tables. See
|
|
700
|
+
// (this)[https://android.googlesource.com/platform/external/qemu/+/refs/heads/emu-master-dev/android/android-grpc/android/emulation/control/keyboard/keycode_converter_data.inc]
|
|
701
|
+
// for details on the translation.
|
|
702
|
+
enum KeyCodeType {
|
|
703
|
+
Usb = 0;
|
|
704
|
+
Evdev = 1;
|
|
705
|
+
XKB = 2;
|
|
706
|
+
Win = 3;
|
|
707
|
+
Mac = 4;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
enum KeyEventType {
|
|
711
|
+
// Indicates that this keyevent should be send to the emulator
|
|
712
|
+
// as a key down event. Meaning that the key event will be
|
|
713
|
+
// translated to an EvDev event type and bit 11 (0x400) will be
|
|
714
|
+
// set before it is sent to the emulator.
|
|
715
|
+
keydown = 0;
|
|
716
|
+
|
|
717
|
+
// Indicates that the keyevent should be send to the emulator
|
|
718
|
+
// as a key up event. Meaning that the key event will be
|
|
719
|
+
// translated to an EvDev event type and
|
|
720
|
+
// sent to the emulator.
|
|
721
|
+
keyup = 1;
|
|
722
|
+
|
|
723
|
+
// Indicates that the keyevent will be send to the emulator
|
|
724
|
+
// as e key down event and immediately followed by a keyup event.
|
|
725
|
+
keypress = 2;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
// Type of keycode contained in the keyCode field.
|
|
729
|
+
KeyCodeType codeType = 1;
|
|
730
|
+
|
|
731
|
+
// The type of keyboard event that should be sent to the emulator
|
|
732
|
+
KeyEventType eventType = 2;
|
|
733
|
+
|
|
734
|
+
// This property represents a physical key on the keyboard (as opposed
|
|
735
|
+
// to the character generated by pressing the key). In other words, this
|
|
736
|
+
// property is a value which isn't altered by keyboard layout or the
|
|
737
|
+
// state of the modifier keys. This value will be interpreted by the
|
|
738
|
+
// emulator depending on the KeyCodeType. The incoming key code will be
|
|
739
|
+
// translated to an evdev code type and send to the emulator.
|
|
740
|
+
// The values in key and text will be ignored.
|
|
741
|
+
int32 keyCode = 3;
|
|
742
|
+
|
|
743
|
+
// The value of the key pressed by the user, taking into consideration
|
|
744
|
+
// the state of modifier keys such as Shift as well as the keyboard
|
|
745
|
+
// locale and layout. This follows the w3c standard used in browsers.
|
|
746
|
+
// You can find an accurate description of valid values
|
|
747
|
+
// [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values)
|
|
748
|
+
//
|
|
749
|
+
// Note that some keys can result in multiple evdev events that are
|
|
750
|
+
// delivered to the emulator. for example the Key "A" will result in a
|
|
751
|
+
// sequence:
|
|
752
|
+
// ["Shift", "a"] -> [0x2a, 0x1e] whereas "a" results in ["a"] -> [0x1e].
|
|
753
|
+
//
|
|
754
|
+
// Not all documented keys are understood by android, and only printable
|
|
755
|
+
// ASCII [32-127) characters are properly translated.
|
|
756
|
+
//
|
|
757
|
+
// Keep in mind that there are a set of key values that result in android
|
|
758
|
+
// specific behavior
|
|
759
|
+
// [see](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values#Phone_keys):
|
|
760
|
+
//
|
|
761
|
+
// - "AppSwitch": Behaves as the "Overview" button in android.
|
|
762
|
+
// - "GoBack": The Back button.
|
|
763
|
+
// - "GoHome": The Home button, which takes the user to the phone's main
|
|
764
|
+
// screen (usually an application launcher).
|
|
765
|
+
// - "Power": The Power button.
|
|
766
|
+
string key = 4;
|
|
767
|
+
|
|
768
|
+
// Series of utf8 encoded characters to send to the emulator. An attempt
|
|
769
|
+
// will be made to translate every character will an EvDev event type and
|
|
770
|
+
// send to the emulator as a keypress event. The values in keyCode,
|
|
771
|
+
// eventType, codeType and key will be ignored.
|
|
772
|
+
//
|
|
773
|
+
// Note that most printable ASCII characters (range [32-127) can be send
|
|
774
|
+
// individually with the "key" param. Do not expect arbitrary UTF symbols to
|
|
775
|
+
// arrive in the emulator (most will be ignored).
|
|
776
|
+
//
|
|
777
|
+
// Note that it is possible to overrun the keyboard buffer by slamming this
|
|
778
|
+
// endpoint with large quantities of text (>1kb). The clipboard api is
|
|
779
|
+
// better suited for transferring large quantities of text.
|
|
780
|
+
string text = 5;
|
|
622
781
|
}
|
|
623
782
|
|
|
624
783
|
message Fingerprint {
|
|
625
|
-
|
|
626
|
-
|
|
784
|
+
// True when the fingprint is touched.
|
|
785
|
+
bool isTouching = 1;
|
|
627
786
|
|
|
628
|
-
|
|
629
|
-
|
|
787
|
+
// The identifier of the registered fingerprint.
|
|
788
|
+
int32 touchId = 2;
|
|
630
789
|
}
|
|
631
790
|
|
|
632
791
|
message GpsState {
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
792
|
+
// Setting this to false will disable auto updating from the LocationUI,
|
|
793
|
+
// otherwise the location UI will override the location at a frequency of
|
|
794
|
+
// 1hz.
|
|
795
|
+
//
|
|
796
|
+
// - This is unused if the emulator is launched with -no-window, or when he
|
|
797
|
+
// location ui is disabled.
|
|
798
|
+
// - This will BREAK the location ui experience if it is set to false. For
|
|
799
|
+
// example routing will no longer function.
|
|
800
|
+
bool passiveUpdate = 1;
|
|
801
|
+
|
|
802
|
+
// The latitude, in degrees.
|
|
803
|
+
double latitude = 2;
|
|
804
|
+
|
|
805
|
+
// The longitude, in degrees.
|
|
806
|
+
double longitude = 3;
|
|
807
|
+
|
|
808
|
+
// The speed if it is available, in meters/second over ground
|
|
809
|
+
double speed = 4;
|
|
810
|
+
|
|
811
|
+
// gets the horizontal direction of travel of this device, and is not
|
|
812
|
+
// related to the device orientation. It is guaranteed to be in the
|
|
813
|
+
// range [0.0, 360.0] if the device has a bearing. 0=North, 90=East,
|
|
814
|
+
// 180=South, etc..
|
|
815
|
+
double bearing = 5;
|
|
816
|
+
|
|
817
|
+
// The altitude if available, in meters above the WGS 84 reference
|
|
818
|
+
// ellipsoid.
|
|
819
|
+
double altitude = 6;
|
|
820
|
+
|
|
821
|
+
// The number of satellites used to derive the fix
|
|
822
|
+
int32 satellites = 7;
|
|
823
|
+
}
|
|
650
824
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
825
|
+
message BatteryState {
|
|
826
|
+
enum BatteryStatus {
|
|
827
|
+
UNKNOWN = 0;
|
|
828
|
+
CHARGING = 1;
|
|
829
|
+
DISCHARGING = 2;
|
|
830
|
+
NOT_CHARGING = 3;
|
|
831
|
+
FULL = 4;
|
|
832
|
+
}
|
|
656
833
|
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
834
|
+
enum BatteryCharger {
|
|
835
|
+
NONE = 0;
|
|
836
|
+
AC = 1;
|
|
837
|
+
USB = 2;
|
|
838
|
+
WIRELESS = 3;
|
|
839
|
+
}
|
|
660
840
|
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
841
|
+
enum BatteryHealth {
|
|
842
|
+
GOOD = 0;
|
|
843
|
+
FAILED = 1;
|
|
844
|
+
DEAD = 2;
|
|
845
|
+
OVERVOLTAGE = 3;
|
|
846
|
+
OVERHEATED = 4;
|
|
847
|
+
}
|
|
664
848
|
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
FULL = 4;
|
|
672
|
-
};
|
|
673
|
-
enum BatteryCharger {
|
|
674
|
-
NONE = 0;
|
|
675
|
-
AC = 1;
|
|
676
|
-
USB = 2;
|
|
677
|
-
WIRELESS = 3;
|
|
678
|
-
};
|
|
679
|
-
|
|
680
|
-
enum BatteryHealth {
|
|
681
|
-
GOOD = 0;
|
|
682
|
-
FAILED = 1;
|
|
683
|
-
DEAD = 2;
|
|
684
|
-
OVERVOLTAGE = 3;
|
|
685
|
-
OVERHEATED = 4;
|
|
686
|
-
};
|
|
687
|
-
bool hasBattery = 1;
|
|
688
|
-
bool isPresent = 2;
|
|
689
|
-
BatteryCharger charger = 3;
|
|
690
|
-
int32 chargeLevel = 4;
|
|
691
|
-
BatteryHealth health = 5;
|
|
692
|
-
BatteryStatus status = 6;
|
|
849
|
+
bool hasBattery = 1;
|
|
850
|
+
bool isPresent = 2;
|
|
851
|
+
BatteryCharger charger = 3;
|
|
852
|
+
int32 chargeLevel = 4;
|
|
853
|
+
BatteryHealth health = 5;
|
|
854
|
+
BatteryStatus status = 6;
|
|
693
855
|
}
|
|
694
856
|
|
|
695
857
|
// An ImageTransport allows for specifying a side channel for
|
|
696
858
|
// delivering image frames versus using the standard bytes array that is
|
|
697
859
|
// returned with the gRPC request.
|
|
698
860
|
message ImageTransport {
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
861
|
+
enum TransportChannel {
|
|
862
|
+
// Return full frames over the gRPC transport
|
|
863
|
+
TRANSPORT_CHANNEL_UNSPECIFIED = 0;
|
|
702
864
|
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
865
|
+
// Write images to the a file/shared memory handle.
|
|
866
|
+
MMAP = 1;
|
|
867
|
+
}
|
|
706
868
|
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
869
|
+
// The desired transport channel used for delivering image frames. Only
|
|
870
|
+
// relevant when streaming screenshots.
|
|
871
|
+
TransportChannel channel = 1;
|
|
710
872
|
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
873
|
+
// Handle used for writing image frames if transport is mmap. The client
|
|
874
|
+
// sets and owns this handle. It can be either a shm region, or a mmap. A
|
|
875
|
+
// mmap should be a url that starts with `file:///` Note: the mmap can
|
|
876
|
+
// result in tearing.
|
|
877
|
+
string handle = 2;
|
|
716
878
|
}
|
|
717
879
|
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
//
|
|
725
|
-
//
|
|
726
|
-
//
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
// Three-channel RGB color model, each pixel consists of 3 bytes
|
|
730
|
-
RGB888 = 2;
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
// The (desired) format of the resulting bytes.
|
|
734
|
-
ImgFormat format = 1;
|
|
735
|
-
|
|
736
|
-
// [Output Only] The rotation of the image. The image will be rotated
|
|
737
|
-
// based upon the coarse grained orientation of the device.
|
|
738
|
-
Rotation rotation = 2;
|
|
739
|
-
|
|
740
|
-
// The (desired) width of the image. When passed as input
|
|
741
|
-
// the image will be scaled to match the given
|
|
742
|
-
// width, while maintaining the aspect ratio of the device.
|
|
743
|
-
// The returned image will never exceed the given width, but can be less.
|
|
744
|
-
// Omitting this value (or passing in 0) will result in no scaling,
|
|
745
|
-
// and the width of the actual device will be used.
|
|
746
|
-
uint32 width = 3;
|
|
747
|
-
|
|
748
|
-
// The (desired) height of the image. When passed as input
|
|
749
|
-
// the image will be scaled to match the given
|
|
750
|
-
// height, while maintaining the aspect ratio of the device.
|
|
751
|
-
// The returned image will never exceed the given height, but can be less.
|
|
752
|
-
// Omitting this value (or passing in 0) will result in no scaling,
|
|
753
|
-
// and the height of the actual device will be used.
|
|
754
|
-
uint32 height = 4;
|
|
755
|
-
|
|
756
|
-
// The (desired) display id of the device. Setting this to 0 (or omitting)
|
|
757
|
-
// indicates the main display.
|
|
758
|
-
uint32 display = 5;
|
|
759
|
-
|
|
760
|
-
// Set this if you wish to use a different transport channel to deliver image
|
|
761
|
-
// frames.
|
|
762
|
-
ImageTransport transport = 6;
|
|
880
|
+
// The aspect ratio (width/height) will be different from the one
|
|
881
|
+
// where the device is unfolded.
|
|
882
|
+
message FoldedDisplay {
|
|
883
|
+
uint32 width = 1;
|
|
884
|
+
uint32 height = 2;
|
|
885
|
+
// It is possible for the screen to be folded in different ways depending
|
|
886
|
+
// on which surface is shown to the user. So xOffset and yOffset indicate
|
|
887
|
+
// the top left corner of the folded screen within the original unfolded
|
|
888
|
+
// screen.
|
|
889
|
+
uint32 xOffset = 3;
|
|
890
|
+
uint32 yOffset = 4;
|
|
763
891
|
}
|
|
764
892
|
|
|
765
|
-
message
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
893
|
+
message ImageFormat {
|
|
894
|
+
enum ImgFormat {
|
|
895
|
+
// Portable Network Graphics format
|
|
896
|
+
// (https://en.wikipedia.org/wiki/Portable_Network_Graphics)
|
|
897
|
+
PNG = 0;
|
|
898
|
+
|
|
899
|
+
// Three-channel RGB color model supplemented with a fourth alpha
|
|
900
|
+
// channel. https://en.wikipedia.org/wiki/RGBA_color_model
|
|
901
|
+
// Each pixel consists of 4 bytes.
|
|
902
|
+
RGBA8888 = 1;
|
|
903
|
+
|
|
904
|
+
// Three-channel RGB color model, each pixel consists of 3 bytes
|
|
905
|
+
RGB888 = 2;
|
|
906
|
+
}
|
|
776
907
|
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
908
|
+
// The (desired) format of the resulting bytes.
|
|
909
|
+
ImgFormat format = 1;
|
|
910
|
+
|
|
911
|
+
// [Output Only] The rotation of the image. The image will be rotated
|
|
912
|
+
// based upon the coarse grained orientation of the device.
|
|
913
|
+
Rotation rotation = 2;
|
|
914
|
+
|
|
915
|
+
// The (desired) width of the image. When passed as input
|
|
916
|
+
// the image will be scaled to match the given
|
|
917
|
+
// width, while maintaining the aspect ratio of the device.
|
|
918
|
+
// The returned image will never exceed the given width, but can be less.
|
|
919
|
+
// Omitting this value (or passing in 0) will result in no scaling,
|
|
920
|
+
// and the width of the actual device will be used.
|
|
921
|
+
uint32 width = 3;
|
|
922
|
+
|
|
923
|
+
// The (desired) height of the image. When passed as input
|
|
924
|
+
// the image will be scaled to match the given
|
|
925
|
+
// height, while maintaining the aspect ratio of the device.
|
|
926
|
+
// The returned image will never exceed the given height, but can be less.
|
|
927
|
+
// Omitting this value (or passing in 0) will result in no scaling,
|
|
928
|
+
// and the height of the actual device will be used.
|
|
929
|
+
uint32 height = 4;
|
|
930
|
+
|
|
931
|
+
// The (desired) display id of the device. Setting this to 0 (or omitting)
|
|
932
|
+
// indicates the main display.
|
|
933
|
+
uint32 display = 5;
|
|
934
|
+
|
|
935
|
+
// Set this if you wish to use a different transport channel to deliver
|
|
936
|
+
// image frames.
|
|
937
|
+
ImageTransport transport = 6;
|
|
938
|
+
|
|
939
|
+
// [Output Only] Display configuration when screen is folded. The value is
|
|
940
|
+
// the original configuration before scaling.
|
|
941
|
+
FoldedDisplay foldedDisplay = 7;
|
|
942
|
+
|
|
943
|
+
// [Output Only] Display mode when AVD is resizable.
|
|
944
|
+
DisplayModeValue displayMode = 8;
|
|
945
|
+
}
|
|
783
946
|
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
947
|
+
message Image {
|
|
948
|
+
ImageFormat format = 1;
|
|
949
|
+
|
|
950
|
+
uint32 width = 2 [deprecated = true]; // width is contained in format.
|
|
951
|
+
uint32 height = 3 [deprecated = true]; // height is contained in format.
|
|
952
|
+
|
|
953
|
+
// The organization of the pixels in the image buffer is from left to
|
|
954
|
+
// right and bottom up. This will be empty if an alternative image transport
|
|
955
|
+
// is requested in the image format. In that case the side channel should
|
|
956
|
+
// be used to obtain the image data.
|
|
957
|
+
bytes image = 4;
|
|
958
|
+
|
|
959
|
+
// [Output Only] Monotonically increasing sequence number in a stream of
|
|
960
|
+
// screenshots. The first screenshot will have a sequence of 0. A single
|
|
961
|
+
// screenshot will always have a sequence number of 0. The sequence is not
|
|
962
|
+
// necessarily contiguous, and can be used to detect how many frames were
|
|
963
|
+
// dropped. An example sequence could be: [0, 3, 5, 7, 9, 11].
|
|
964
|
+
uint32 seq = 5;
|
|
965
|
+
|
|
966
|
+
// [Output Only] Unix timestamp in microseconds when the emulator estimates
|
|
967
|
+
// the frame was generated. The timestamp is before the actual frame is
|
|
968
|
+
// copied and transformed. This can be used to calculate variance between
|
|
969
|
+
// frame production time, and frame depiction time.
|
|
970
|
+
uint64 timestampUs = 6;
|
|
789
971
|
}
|
|
790
972
|
|
|
791
973
|
message Rotation {
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
974
|
+
enum SkinRotation {
|
|
975
|
+
PORTRAIT = 0; // 0 degrees
|
|
976
|
+
LANDSCAPE = 1; // 90 degrees
|
|
977
|
+
REVERSE_PORTRAIT = 2; // -180 degrees
|
|
978
|
+
REVERSE_LANDSCAPE = 3; // -90 degrees
|
|
979
|
+
}
|
|
798
980
|
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
981
|
+
// The rotation of the device, derived from the sensor state
|
|
982
|
+
// of the emulator. The derivation reflects how android observes
|
|
983
|
+
// the rotation state.
|
|
984
|
+
SkinRotation rotation = 1;
|
|
803
985
|
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
986
|
+
// Specifies the angle of rotation, in degrees [-180, 180]
|
|
987
|
+
double xAxis = 2;
|
|
988
|
+
double yAxis = 3;
|
|
989
|
+
double zAxis = 4;
|
|
808
990
|
}
|
|
809
991
|
|
|
810
992
|
message PhoneCall {
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
993
|
+
enum Operation {
|
|
994
|
+
InitCall = 0;
|
|
995
|
+
AcceptCall = 1;
|
|
996
|
+
RejectCallExplicit = 2;
|
|
997
|
+
RejectCallBusy = 3;
|
|
998
|
+
DisconnectCall = 4;
|
|
999
|
+
PlaceCallOnHold = 5;
|
|
1000
|
+
TakeCallOffHold = 6;
|
|
1001
|
+
}
|
|
1002
|
+
Operation operation = 1;
|
|
1003
|
+
string number = 2;
|
|
822
1004
|
}
|
|
823
1005
|
|
|
824
1006
|
message PhoneResponse {
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
1007
|
+
enum Response {
|
|
1008
|
+
OK = 0;
|
|
1009
|
+
BadOperation = 1; // Enum out of range
|
|
1010
|
+
BadNumber = 2; // Mal-formed telephone number
|
|
1011
|
+
InvalidAction = 3; // E.g., disconnect when no call is in progress
|
|
1012
|
+
ActionFailed = 4; // Internal error
|
|
1013
|
+
RadioOff = 5; // Radio power off
|
|
1014
|
+
}
|
|
1015
|
+
Response response = 1;
|
|
834
1016
|
}
|
|
835
1017
|
|
|
836
1018
|
message Entry {
|
|
837
|
-
|
|
838
|
-
|
|
1019
|
+
string key = 1;
|
|
1020
|
+
string value = 2;
|
|
839
1021
|
}
|
|
840
1022
|
|
|
841
|
-
message EntryList {
|
|
1023
|
+
message EntryList {
|
|
1024
|
+
repeated Entry entry = 1;
|
|
1025
|
+
}
|
|
842
1026
|
|
|
843
1027
|
message EmulatorStatus {
|
|
844
|
-
|
|
845
|
-
|
|
1028
|
+
// The emulator version string.
|
|
1029
|
+
string version = 1;
|
|
846
1030
|
|
|
847
|
-
|
|
848
|
-
|
|
1031
|
+
// The time the emulator has been active in .ms
|
|
1032
|
+
uint64 uptime = 2;
|
|
849
1033
|
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
1034
|
+
// True if the device has completed booting.
|
|
1035
|
+
// For P and later this information will accurate,
|
|
1036
|
+
// for older images we rely on adb.
|
|
1037
|
+
bool booted = 3;
|
|
854
1038
|
|
|
855
|
-
|
|
856
|
-
|
|
1039
|
+
// The current vm configuration
|
|
1040
|
+
VmConfiguration vmConfig = 4;
|
|
857
1041
|
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
}
|
|
1042
|
+
// The hardware configuration of the running emulator as
|
|
1043
|
+
// key valure pairs.
|
|
1044
|
+
EntryList hardwareConfig = 5;
|
|
1045
|
+
}
|
|
862
1046
|
|
|
863
1047
|
message AudioFormat {
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
1048
|
+
enum SampleFormat {
|
|
1049
|
+
AUD_FMT_U8 = 0; // Unsigned 8 bit
|
|
1050
|
+
AUD_FMT_S16 = 1; // Signed 16 bit (little endian)
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
enum Channels {
|
|
1054
|
+
Mono = 0;
|
|
1055
|
+
Stereo = 1;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
enum DeliveryMode {
|
|
1059
|
+
// The audio queue will block and wait until the emulator requests
|
|
1060
|
+
// packets. The client does not have to throttle and can push packets at
|
|
1061
|
+
// will. This can result in the client falling behind.
|
|
1062
|
+
MODE_UNSPECIFIED = 0;
|
|
1063
|
+
// Audio packets will be delivered in real time (when possible). The
|
|
1064
|
+
// audio queue will be overwritten with incoming data if data is made
|
|
1065
|
+
// available. This means the client needs to control timing properly, or
|
|
1066
|
+
// packets will get overwritten.
|
|
1067
|
+
MODE_REAL_TIME = 1; //
|
|
1068
|
+
}
|
|
1069
|
+
// Sampling rate to use, defaulting to 44100 if this is not set.
|
|
1070
|
+
// Note, that android devices typically will not use a sampling
|
|
1071
|
+
// rate higher than 48kHz. See
|
|
1072
|
+
// https://developer.android.com/ndk/guides/audio.
|
|
1073
|
+
uint64 samplingRate = 1;
|
|
1074
|
+
Channels channels = 2;
|
|
1075
|
+
SampleFormat format = 3;
|
|
1076
|
+
|
|
1077
|
+
// [Input Only]
|
|
1078
|
+
// The mode used when delivering audio packets.
|
|
1079
|
+
DeliveryMode mode = 4;
|
|
1080
|
+
}
|
|
881
1081
|
|
|
882
1082
|
message AudioPacket {
|
|
883
|
-
|
|
1083
|
+
AudioFormat format = 1;
|
|
884
1084
|
|
|
885
|
-
|
|
886
|
-
|
|
1085
|
+
// Unix epoch in us when this frame was captured.
|
|
1086
|
+
uint64 timestamp = 2;
|
|
887
1087
|
|
|
888
|
-
|
|
889
|
-
|
|
1088
|
+
// Contains a sample in the given audio format.
|
|
1089
|
+
bytes audio = 3;
|
|
890
1090
|
}
|
|
891
1091
|
|
|
892
1092
|
message SmsMessage {
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
1093
|
+
// The source address where this message came from.
|
|
1094
|
+
//
|
|
1095
|
+
// The address should be a valid GSM-formatted address as specified by
|
|
1096
|
+
// 3GPP 23.040 Sec 9.1.2.5.
|
|
1097
|
+
//
|
|
1098
|
+
// For example: +3106225412 or (650) 555-1221
|
|
1099
|
+
string srcAddress = 1;
|
|
1100
|
+
|
|
1101
|
+
// A utf8 encoded text message that should be delivered.
|
|
1102
|
+
string text = 2;
|
|
903
1103
|
}
|
|
904
1104
|
|
|
905
1105
|
// A DisplayConfiguration describes a primary or secondary
|
|
@@ -918,97 +1118,183 @@ message SmsMessage {
|
|
|
918
1118
|
// this method. By default, virtual displays are created to be private,
|
|
919
1119
|
// non-presentation and unsecure.
|
|
920
1120
|
message DisplayConfiguration {
|
|
1121
|
+
// These are the set of known android flags and their respective values.
|
|
1122
|
+
// you can combine the int values to (de)construct the flags field below.
|
|
1123
|
+
enum DisplayFlags {
|
|
1124
|
+
DISPLAYFLAGS_UNSPECIFIED = 0;
|
|
1125
|
+
|
|
1126
|
+
// When this flag is set, the virtual display is public.
|
|
1127
|
+
// A public virtual display behaves just like most any other display
|
|
1128
|
+
// that is connected to the system such as an external or wireless
|
|
1129
|
+
// display. Applications can open windows on the display and the system
|
|
1130
|
+
// may mirror the contents of other displays onto it. see:
|
|
1131
|
+
// https://developer.android.com/reference/android/hardware/display/DisplayManager#VIRTUAL_DISPLAY_FLAG_PUBLIC
|
|
1132
|
+
VIRTUAL_DISPLAY_FLAG_PUBLIC = 1;
|
|
1133
|
+
|
|
1134
|
+
// When this flag is set, the virtual display is registered as a
|
|
1135
|
+
// presentation display in the presentation display category.
|
|
1136
|
+
// Applications may automatically project their content to presentation
|
|
1137
|
+
// displays to provide richer second screen experiences.
|
|
1138
|
+
// https://developer.android.com/reference/android/hardware/display/DisplayManager#VIRTUAL_DISPLAY_FLAG_PRESENTATION
|
|
1139
|
+
VIRTUAL_DISPLAY_FLAG_PRESENTATION = 2;
|
|
1140
|
+
|
|
1141
|
+
// When this flag is set, the virtual display is considered secure as
|
|
1142
|
+
// defined by the Display#FLAG_SECURE display flag. The caller promises
|
|
1143
|
+
// to take reasonable measures, such as over-the-air encryption, to
|
|
1144
|
+
// prevent the contents of the display from being intercepted or
|
|
1145
|
+
// recorded on a persistent medium.
|
|
1146
|
+
// see:
|
|
1147
|
+
// https://developer.android.com/reference/android/hardware/display/DisplayManager#VIRTUAL_DISPLAY_FLAG_SECURE
|
|
1148
|
+
VIRTUAL_DISPLAY_FLAG_SECURE = 4;
|
|
1149
|
+
|
|
1150
|
+
// This flag is used in conjunction with VIRTUAL_DISPLAY_FLAG_PUBLIC.
|
|
1151
|
+
// Ordinarily public virtual displays will automatically mirror the
|
|
1152
|
+
// content of the default display if they have no windows of their own.
|
|
1153
|
+
// When this flag is specified, the virtual display will only ever show
|
|
1154
|
+
// its own content and will be blanked instead if it has no windows. See
|
|
1155
|
+
// https://developer.android.com/reference/android/hardware/display/DisplayManager#VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY
|
|
1156
|
+
VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY = 8;
|
|
1157
|
+
|
|
1158
|
+
// Allows content to be mirrored on private displays when no content is
|
|
1159
|
+
// being shown.
|
|
1160
|
+
// This flag is mutually exclusive with
|
|
1161
|
+
// VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY. If both flags are specified
|
|
1162
|
+
// then the own-content only behavior will be applied.
|
|
1163
|
+
// see:
|
|
1164
|
+
// https://developer.android.com/reference/android/hardware/display/DisplayManager#VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR)
|
|
1165
|
+
VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR = 16;
|
|
1166
|
+
}
|
|
921
1167
|
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
//
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
//
|
|
931
|
-
//
|
|
932
|
-
//
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
//
|
|
936
|
-
//
|
|
937
|
-
//
|
|
938
|
-
//
|
|
939
|
-
//
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
//
|
|
944
|
-
//
|
|
945
|
-
//
|
|
946
|
-
//
|
|
947
|
-
//
|
|
948
|
-
//
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
// Ordinarily public virtual displays will automatically mirror the
|
|
953
|
-
// content of the default display if they have no windows of their own.
|
|
954
|
-
// When this flag is specified, the virtual display will only ever show
|
|
955
|
-
// its own content and will be blanked instead if it has no windows. See
|
|
956
|
-
// https://developer.android.com/reference/android/hardware/display/DisplayManager#VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY
|
|
957
|
-
VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY = 8;
|
|
958
|
-
|
|
959
|
-
// Allows content to be mirrored on private displays when no content is
|
|
960
|
-
// being shown.
|
|
961
|
-
// This flag is mutually exclusive with
|
|
962
|
-
// VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY. If both flags are specified
|
|
963
|
-
// then the own-content only behavior will be applied.
|
|
964
|
-
// see:
|
|
965
|
-
// https://developer.android.com/reference/android/hardware/display/DisplayManager#VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR)
|
|
966
|
-
VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR = 16;
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
// The width of the display, restricted to:
|
|
970
|
-
// 320 * (dpi / 160) <= width
|
|
971
|
-
uint32 width = 1;
|
|
972
|
-
|
|
973
|
-
// The heigh of the display, restricted to:
|
|
974
|
-
// * 320 * (dpi / 160) <= height
|
|
975
|
-
uint32 height = 2;
|
|
976
|
-
|
|
977
|
-
// The pixel density (dpi).
|
|
978
|
-
// See https://developer.android.com/training/multiscreen/screendensities
|
|
979
|
-
// for details. This value shoud be in the range [120, ..., 640]
|
|
980
|
-
uint32 dpi = 3;
|
|
981
|
-
|
|
982
|
-
// A combination of virtual display flags. These flags can be constructed
|
|
983
|
-
// by combining the DisplayFlags enum described above.
|
|
984
|
-
//
|
|
985
|
-
// The behavior of the virtual display depends on the flags. By default
|
|
986
|
-
// virtual displays are created to be private, non-presentation and
|
|
987
|
-
// unsecure.
|
|
988
|
-
uint32 flags = 4;
|
|
989
|
-
|
|
990
|
-
// The id of the display.
|
|
991
|
-
// The primary (default) display has the display ID of 0.
|
|
992
|
-
// A secondary display has a display ID not 0.
|
|
993
|
-
//
|
|
994
|
-
// The id can be used to get or stream a screenshot.
|
|
995
|
-
uint32 display = 5;
|
|
1168
|
+
// The width of the display, restricted to:
|
|
1169
|
+
// 320 * (dpi / 160) <= width
|
|
1170
|
+
uint32 width = 1;
|
|
1171
|
+
|
|
1172
|
+
// The heigh of the display, restricted to:
|
|
1173
|
+
// * 320 * (dpi / 160) <= height
|
|
1174
|
+
uint32 height = 2;
|
|
1175
|
+
|
|
1176
|
+
// The pixel density (dpi).
|
|
1177
|
+
// See https://developer.android.com/training/multiscreen/screendensities
|
|
1178
|
+
// for details. This value should be in the range [120, ..., 640]
|
|
1179
|
+
uint32 dpi = 3;
|
|
1180
|
+
|
|
1181
|
+
// A combination of virtual display flags. These flags can be constructed
|
|
1182
|
+
// by combining the DisplayFlags enum described above.
|
|
1183
|
+
//
|
|
1184
|
+
// The behavior of the virtual display depends on the flags. By default
|
|
1185
|
+
// virtual displays are created to be private, non-presentation and
|
|
1186
|
+
// unsecure.
|
|
1187
|
+
uint32 flags = 4;
|
|
1188
|
+
|
|
1189
|
+
// The id of the display.
|
|
1190
|
+
// The primary (default) display has the display ID of 0.
|
|
1191
|
+
// A secondary display has a display ID not 0.
|
|
1192
|
+
//
|
|
1193
|
+
// A display with the id in the range [1, userConfigurable]
|
|
1194
|
+
// can be modified. See DisplayConfigurations below for details.
|
|
1195
|
+
//
|
|
1196
|
+
// The id can be used to get or stream a screenshot.
|
|
1197
|
+
uint32 display = 5;
|
|
996
1198
|
}
|
|
997
|
-
|
|
1199
|
+
// Provides information about all the displays that can be attached
|
|
1200
|
+
// to the emulator. The emulator will always have at least one display.
|
|
1201
|
+
//
|
|
1202
|
+
// The emulator usually has the following display configurations:
|
|
1203
|
+
// 0: The default display.
|
|
1204
|
+
// 1 - 3: User configurable displays. These can be added/removed.
|
|
1205
|
+
// For example the standalone emulator allows you to modify these
|
|
1206
|
+
// in the extended controls.
|
|
1207
|
+
// 6 - 11: Fixed external displays. For example Android Auto uses fixed
|
|
1208
|
+
// displays in this range.
|
|
998
1209
|
message DisplayConfigurations {
|
|
999
|
-
|
|
1210
|
+
repeated DisplayConfiguration displays = 1;
|
|
1211
|
+
|
|
1212
|
+
// Display configurations with id [1, userConfigurable] are
|
|
1213
|
+
// user configurable, that is they can be added, removed or
|
|
1214
|
+
// updated.
|
|
1215
|
+
uint32 userConfigurable = 2;
|
|
1216
|
+
|
|
1217
|
+
// The maximum number of attached displays this emulator supports.
|
|
1218
|
+
// This is the total number of displays that can be attached to
|
|
1219
|
+
// the emulator.
|
|
1220
|
+
//
|
|
1221
|
+
// Note: A display with an id that is larger than userConfigurable cannot
|
|
1222
|
+
// be modified.
|
|
1223
|
+
uint32 maxDisplays = 3;
|
|
1000
1224
|
}
|
|
1001
1225
|
|
|
1002
1226
|
message Notification {
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1227
|
+
enum EventType {
|
|
1228
|
+
VIRTUAL_SCENE_CAMERA_INACTIVE = 0;
|
|
1229
|
+
VIRTUAL_SCENE_CAMERA_ACTIVE = 1;
|
|
1230
|
+
|
|
1231
|
+
// Fired when an update to a display event has been fired through
|
|
1232
|
+
// the extended ui. This does not fire events when the display
|
|
1233
|
+
// is changed through the console or gRPC endpoint.
|
|
1234
|
+
DISPLAY_CONFIGURATIONS_CHANGED_UI = 2;
|
|
1235
|
+
// Keep adding more for other event types
|
|
1236
|
+
}
|
|
1006
1237
|
|
|
1007
|
-
//
|
|
1008
|
-
// the
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1238
|
+
// Deprecated, use the type below to get detailed information
|
|
1239
|
+
// regarding the event.
|
|
1240
|
+
EventType event = 1 [deprecated = true];
|
|
1241
|
+
|
|
1242
|
+
// Detailed notification information.
|
|
1243
|
+
oneof type {
|
|
1244
|
+
CameraNotification cameraNotification = 2;
|
|
1245
|
+
DisplayConfigurationsChangedNotification
|
|
1246
|
+
displayConfigurationsChangedNotification = 3;
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
// Fired when the virtual scene camera is activated or deactivated and also in
|
|
1251
|
+
// response to the streamNotification call.
|
|
1252
|
+
message CameraNotification {
|
|
1253
|
+
// Indicates whether the camera app was activated or deactivated.
|
|
1254
|
+
bool active = 1;
|
|
1255
|
+
// The display the camera app is associated with.
|
|
1256
|
+
int32 display = 2;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
// Fired when an update to a display event has been fired through the extended
|
|
1260
|
+
// ui. This does not fire events when the display is changed through the console
|
|
1261
|
+
// or the gRPC endpoint.
|
|
1262
|
+
message DisplayConfigurationsChangedNotification {
|
|
1263
|
+
DisplayConfigurations displayConfigurations = 1;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
message RotationRadian {
|
|
1267
|
+
float x = 1; // x axis is horizontal and orthogonal to the view direction.
|
|
1268
|
+
float y = 2; // y axis points up and is perpendicular to the floor.
|
|
1269
|
+
float z = 3; // z axis is the view direction and is set to 0.0 in
|
|
1270
|
+
// rotateVirtualSceneCamera call.
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
message Velocity {
|
|
1274
|
+
float x = 1; // x axis is horizontal and orthogonal to the view direction.
|
|
1275
|
+
float y = 2; // y axis points up and is perpendicular to the floor.
|
|
1276
|
+
float z = 3; // z axis is the view direction
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
// must follow the definition in "external/qemu/android/hw-sensors.h"
|
|
1280
|
+
message Posture {
|
|
1281
|
+
enum PostureValue {
|
|
1282
|
+
POSTURE_UNKNOWN = 0;
|
|
1283
|
+
POSTURE_CLOSED = 1;
|
|
1284
|
+
POSTURE_HALF_OPENED = 2;
|
|
1285
|
+
POSTURE_OPENED = 3;
|
|
1286
|
+
POSTURE_FLIPPED = 4;
|
|
1287
|
+
POSTURE_TENT = 5;
|
|
1288
|
+
POSTURE_MAX = 6;
|
|
1289
|
+
}
|
|
1290
|
+
PostureValue value = 3;
|
|
1291
|
+
}
|
|
1012
1292
|
|
|
1013
|
-
|
|
1293
|
+
message PhoneNumber {
|
|
1294
|
+
//
|
|
1295
|
+
// The phone number should be a valid GSM-formatted number as specified by
|
|
1296
|
+
// 3GPP 23.040 Sec 9.1.2.5.
|
|
1297
|
+
//
|
|
1298
|
+
// For example: +3106225412 or (650) 555-1221
|
|
1299
|
+
string number = 1;
|
|
1014
1300
|
}
|