Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Testing and development environment
Stay organized with collections
Save and categorize content based on your preferences.
The fastest and easiest way to test secondary displays is to use a simulated
display, which is owned by the system. Because it shares the system_server
UID, it's trusted and allowed to host all decor windows and activities.
If you have a device that supports a hardware connection (for example, HDMI
or DisplayPort over USB-C), you can use external hardware displays to test.
By default, virtual displays that aren't owned by the system UID are considered
to be not trusted and a number of restrictions are applied to prevent the
leaking of user data.
Use desktop mode to test new windowing features and capabilities added to
the platform in Android 10. It's a developer option
targeted for app developers and enables developers to test apps in
multi-display and freeform windowing mode environments.


Figure 1. Desktop mode on two displays, simulated (top) and
external (bottom)
When device manufacturers want to provide a desktop-like experience, use this
feature to showcase the recommended way to implement some of the windowing features.
- Enable the Force desktop mode developer option.
- Reboot the phone.
- Connect the mouse (via USB or Bluetooth).
- Create a simulated display from the developer options or use a hardware
display.
- Launch activities from the launcher on that display and use the mouse to interact.
MD Launcher (platform/development/samples/MultiDisplay
) is useful
for testing a targeted activity launch and to request a new instance.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-06-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-12 UTC."],[],[],null,["# Testing and development environment\n\nThe fastest and easiest way to test secondary displays is to use a simulated\ndisplay, which is owned by the system. Because it shares the `system_server`\nUID, it's trusted and allowed to host all decor windows and activities.\n\nIf you have a device that supports a hardware connection (for example, HDMI\nor DisplayPort over USB-C), you can use external hardware displays to test.\n\nBy default, virtual displays that aren't owned by the system UID are considered\nto be *not trusted* and a number of restrictions are applied to prevent the\nleaking of user data.\n\nUse desktop mode to test new windowing features and capabilities added to\nthe platform in Android 10. It's a developer option\ntargeted for app developers and enables developers to test apps in\nmulti-display and freeform windowing mode environments.\n\n**Figure 1.** Desktop mode on two displays, simulated (top) and\nexternal (bottom)\n\nWhen device manufacturers want to provide a desktop-like experience, use this\nfeature to showcase the recommended way to implement some of the windowing features.\n\n1. Enable the **Force desktop mode** developer option.\n2. Reboot the phone.\n3. Connect the mouse (via USB or Bluetooth).\n4. Create a simulated display from the developer options or use a hardware display.\n5. Launch activities from the launcher on that display and use the mouse to interact.\n\nMD Launcher (`platform/development/samples/MultiDisplay`) is useful\nfor testing a targeted activity launch and to request a new instance."]]