uiautomator dump does not dump when using multi display

98 views Asked by At

I am running "uiautomator dump" on custom Android device running on Multi-display mode with Android 11 OS.

It does not dump the screen. it does not even create window_sump.xml file on /sdcard path.

However it works on single display mode.

1

There are 1 answers

0
Diego Torres Milano On

Using AndroidViewClient/culebra's dump with CulebraTester2-public backend you can get the content of both displays (providing that the focus is on the secondary display, otherwise only the main display is dumped, so you have to interact with the second activity before getting the dump).

For example, using emulator with a secondary display and Phone and Clock running, json format to be able to use jq and filtering unique package names, you get

dump -ah | jq '.. | .package? | select(. != null)' | sort -u
⚠️  CulebraTester2 server should have been started and localport 9987 redirected to remote port 9987.
"com.android.systemui"
"com.google.android.deskclock"
"com.google.android.dialer"

This is filtering the package names but you can take a look at the full dump by yourself.

enter image description here

Not ideal, but works.