-1

我正在尝试在 VB 中编写代码以将屏幕截图从我的 android 设备流式传输到我的 PC,我尝试在计时器内使用以下 adb 命令

adb shell screencap /sdcard/screen.png 
adb pull /sdcard/screen.png C:\screen.png

会发生的情况是 pull 命令会在完成之前拉出屏幕截图 我尝试了一些 sleep 命令,但它会使显示非常慢,最终因为我发送太多 adb 命令,设备会变慢并挂在结尾

有什么想法可以快速截取屏幕截图或视频流并通过 adb 命令将其传输到我的电脑

4

1 回答 1

0

Your problem most likely was not with screencap/pull sequence in the same iteration but with the next screencap overwriting the image before the previous pull was completed. Are you using a semaphore to make sure that the next frame capture would not fire before the previous one finishes?

Also do not use /sdcard folder to store the captured image. Find a tmpfs partition on your device and use that instead.

于 2013-04-29T15:32:20.803 回答