Skip to content
Taku Docs
Using Taku OSSystem tools

Version 1.4.0 (current)

Independent background display

Real VirtualDisplay, dynamic IDs, targeted operations, and mirroring on the main screen.

A VirtualDisplay is a logical display created by Android. In an authorized system environment, create a background display, launch an app, inspect actual frames and release the display when finished. It shares the system and app data with the main screen.

Main display, independent background display and mirror viewer
Explanatory flow; this article states the actual verified scope.

Choose the entry point

Use Background workspaces to inspect, pause, or take over an allocated task screen. Managed takeover confirms agent execution has stopped before granting input control. The low-level developer experiment below remains separate: direct shell input does not perform that handoff or imply the agent is paused.

Prerequisites

Taku OS integrates phone-display and the independent-display JAR. Current root/system privileges satisfy display creation and input requirements. MediaProjection (the screen-capture API) in an ordinary app is not equivalent to this trusted system-display implementation.

Run the steps in one device root shell so agent_display_id remains available. The example opens the development image’s Clock activity, com.android.deskclock/.DeskClock. For another image or app, resolve its actual launcher first; see App integration checks.

Run the experiment

Create a display and obtain its dynamic ID

In a device root shell:

phone-display start
agent_display_id=$(phone-display id)
phone-display status

Success returns JSON, and Android's display list includes a new logical display. The ID may change on each creation, so do not hardcode it.

Launch an existing app on that display

am start --display "$agent_display_id" -n com.android.deskclock/.DeskClock
phone-display capture

capture returns a frame record and the path /data/local/agentos/virtual-display/screen.png. The main and background displays share the same Android system and app data; it is not another VM.

Targeted input and native mirroring

input -d "$agent_display_id" keyevent KEYCODE_BACK

For coordinate operations, inspect the current actual screenshot before choosing coordinates. Fixed coordinates from another screen size are not a UI-automation guarantee. The main screen's native mirror viewer receives frames through the taku-mirror Unix socket and maps touch with FIT_CENTER letterboxing. Collapsing the viewer does not stop the background app.

End this display session

phone-display stop

The stop command waits for display cleanup and host exit; run start again to obtain a new ID. Automatic start at boot, staying stopped after an explicit stop, and starting again are verified on a fresh emulator. App content and physical hardware each need separate verification.

Verify the result

Clock renders on the independent display, Home remains usable on the main screen, actual frames are captured, and input targets only the selected display. Logical display IDs differ from SurfaceFlinger screencap IDs.

Limits and troubleshooting

Apps can reject multiple displays or use single-instance tasks. The same app is not guaranteed to maintain independent main/background data. Douyin video abnormalities remain unresolved. Manual input in this low-level mirror/shell path does not automatically pause the agent. Use workspace management for control handoff, and avoid concurrent writers.

Next steps

Tasks and sessions and app compatibility.

Research preview · Current availability

Documentation retrieval

Search the published documentation for excerpts and citations. This uses full-text retrieval, not LLM-generated answers.

Every result links to the original article. Read research ideas separately from verified capabilities.

Help and troubleshooting →
Was this article helpful?
Report an issue or give feedback

Delivery to the maintenance queue does not mean it has been handled. Feedback is retained for 90 days.

Built with Fumadocs

On this page