We'd like to make the emulator as versatile as possible, allowing host GPU rendering and interactivity in the widest range of running contexts.CI and remote desktop users have the following long-standing pain points:

Programmatically sending input commands to the emulator involves running adb shell commands which can be high overhead, or using the telnet console, which is faster, but may not work with certain network setups.

CI users often run emulators headless, which can make it difficult to notice issues that require the screen being visible or even interactive.

Remote desktop users often cannot run with host GPU rendering and also interact with the emulator as GPU rendering is often set up to be tied to the non-virtual displays.

-grpc <port>

<port>

<port>

Input commands can be sent to the emulator with low overhead over HTTP which will work across more network setups.

Even if the emulator is running headless, screenshot gRPC requests can be sent to query the current screen. For interactivity, input events can also be sent back to the emulator.

Remote desktop users can then run the emulator headless on the main display with GPU accelerated rendering while using gRPC to get screenshots and send input events in order to interact with the emulator.

To address this, we've added the capability for the Linux emulator to also serve a gRPC service. gRPC is a general framework for RPC that works over HTTP.The emulator gRPC service is disabled by default but can be activated via the command linewhereis the port over which to serve gRPC requests, usually 5556.Once the service is started, gRPC commands can then be issued from clients. The set of commands is captured in the protobuf here . The current set of commands allows both sending input events and receiving screenshots, addressing the pain points: