androidandroid-emulatormulti-userandroid-automotiveandroid-multi-display

How to enable dynamic multi display in android automotive


Android14-qpr2 starts to support multi-display and multi-users. And I found a flag EMULATOR_DYNAMIC_MULTIDISPLAY_CONFIG in the mk file here.

I am trying to create an automotive emulator with multiple displays using this example Android product: sdk_car_md_x86_64.mk. However, when I set the flag EMULATOR_DYNAMIC_MULTIDISPLAY_CONFIG to True, I can only create the emulator with one single display.

Is there any idea what the flag is doing and how to create multi displays when the flag is set to true? Thanks a lot!


When I modify the mk file as follow, I can have multiple displays as the image.

EMULATOR_DYNAMIC_MULTIDISPLAY_CONFIG := false
BUILD_EMULATOR_CLUSTER_DISPLAY := true
# Set up additional displays
# EMULATOR_MULTIDISPLAY_HW_CONFIG := 1,968,792,160,0,2,1408,792,160,0,3,1408,792,160,0
EMULATOR_MULTIDISPLAY_HW_CONFIG := 1,450,1080,220,0,2,1920,1080,220,0
EMULATOR_MULTIDISPLAY_BOOTANIM_CONFIG := 4619827551948147201,4619827124781842690
ENABLE_CLUSTER_OS_DOUBLE := false

Automotive Emulator with three displays

But when I modify the EMULATOR_DYNAMIC_MULTIDISPLAY_CONFIG to true, the emulator only has one display:

EMULATOR_DYNAMIC_MULTIDISPLAY_CONFIG := true
BUILD_EMULATOR_CLUSTER_DISPLAY := true
# Set up additional displays
# EMULATOR_MULTIDISPLAY_HW_CONFIG := 1,968,792,160,0,2,1408,792,160,0,3,1408,792,160,0
EMULATOR_MULTIDISPLAY_HW_CONFIG := 1,450,1080,220,0,2,1920,1080,220,0
EMULATOR_MULTIDISPLAY_BOOTANIM_CONFIG := 4619827551948147201,4619827124781842690

Automotive Emulator with one single display


Solution

  • Dynamic multi-display feature is supported by context menu of emulator. Could you please check emulator menu ("...") has displays item? If yes, you can add displays dynamically using the that menu.