我知道有一些方法可以像这样定位辅助屏幕:
adb shell am start com.google.android.calculator --display 1
adb shell screencap -d 1 -p /sdcard/screencapture.png
有没有办法点击辅助屏幕?目前看来只能显示 0:
adb shell input tap x y
看来这样就可以了。我遇到的问题是,转储 XML 中的屏幕坐标考虑了显示器 0 中的 X 轴,但 ADB 不这样做,因此需要减去它们。
adb shell input -d 1 tap x y