背景
基于 android 的车机系统有好几个屏幕是很常见的 那么我们怎么对多个屏幕进行截图呢?
第一步:
查看 屏幕设备 id 编号
adb shell dumpsys window displays | grep displayId
第二步:
各个屏幕的截图命令如下
adb exec-out screencap -d 0 -p > ~/screen_0.png
adb exec-out screencap -d 2 -p > ~/screen_2.png
adb exec-out screencap -d 3 -p > ~/screen_3.png
把app显示到对应的 屏幕
adb shell am start --display 1 com.android.settings/.Settings
pm disable-user 包名 停用app
adb shell pm enable 应用包名