Friday, August 16, 2019

Emulator 29.1.10 Canary, Android Q Beta 6 System Images - Multi-Display Support

Emulator 29.1.10 Canary is now available in the Canary and Dev channels. This includes support for multiple displays (along with Android Q Beta 6) and the following changes:
  • Improved Android Q Vulkan 1.1 CTS conformance. Full conformance work is done but not yet released and will require a future release of the Android Q system image.
  • Fixed an issue where Android Q Beta 6 would fail to start up when using the WHPX hypervisor.
    • Due to issues using snapshots with WHPX, snapshot save is now always skipped when using WHPX. We recommend deleting ~/.android/avd/avdName.avd/snapshots when on WHPX for now.

Emulator 29.1.10 Canary and Android Q Beta 6 - Multi-Display Support







Emulator 29.1.10+ along with Android Q Beta 6 includes preliminary support for multiple virtual displays. Users can configure multiple displays either through the UI (Extended Controls > Settings) or by modifying the config.ini file in the AVD folder.

Multiple displays can also be configured on startup from the AVD's config.ini (~/.android/avd/avdName.avd/config.ini). The state of the configuration is also saved across snapshot save and load. To configure multiple displays in config.ini, use the newly-introduced hw.displayN properties. For example:

hw.display1.width = 800
hw.display1.height = 1200
hw.display1.density = 320
hw.display1.xOffset = -1
hw.display1.yOffset = -1
hw.display1.flag = 0
hw.display2.width = 800
hw.display2.height = 1200
hw.display2.density = 320
hw.display2.xOffset = -1
hw.display2.yOffset = -1
hw.display2.flag = 0


Width and height refer to the width and height of the additional display in pixels. The pixel density must meet the requirements below, per version 9 of the Android Compatibility Definition Document.

120 <= dpi <= 640
320 * (dpi / 160) <= width
320 * (dpi / 160) <= height


If xOffset and yOffset are both -1, the emulator automatically computes the layout for each display. If setting other values, note that the origin is the top left corner of the main window. The flag field is reserved for future use.

To configure multiple displays through the UI, click right toolbar → (the more items icon) → Settings, and configure the additional displays there. The maximum number of supported displays is ten.