Interact with virtual display with adb
#42
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Related to Benjamin_Loison/Voice_assistant/issues/30.
adb shell uiautomator dump
, tap and sending text.Pointer location may help.
Would allow using the device at the same time as app interaction in the background, to send a Signal message while staying on Termux for instance.
It would allow working on multiple apps at the same time, for instance to backup app by app in parallel.
Would help the issue:
and the issue Benjamin-Loison/android/issues/46.
Note that here I assume that there is no ambiguity about an app being on multiple displays.
Bash script:
Source: the Unix Stack answer 529680
On my Debian 12 GNOME laptop Virtual Machine Manager LineageOS 22.2 virtual machine
adb shell uiautomator dump
returns the app content that I clicked last, no matter the last Debian 12 GNOME window clicked.Output:
allows switching the considered app to dump its UI without modifying on which display the app is.
The question is what if during long UI capture, the app changes.
I confirm that both apps are not part of the returned UI.
window_dump.xml
so can also parse the launcher.
go on F-Droid on a virtual display, Termux on another and on the launcher on the actual screen (at the end).
Bash script:
Output:
so it seems to work as wanted.
Like Minecraft screenshot it may post-process after having blocked retrieving the raw data.
works as wanted after using
adb shell monkey
.uses actual display even if manually used last an app on the virtual one.
Output:
Output:
Output:
does not seem helpful (but does not tap anymore on actual display) based on Default: touchscreen for
tap
vs Default: keyboard fortext
.Output:
does not need
adb shell monkey
.Same for
adb shell input -d 4 text test
it may solve possible keyboard display issue.Output:
so there is no workaround to dump UI.