从Windows CMD以编程方式停止屏幕录像

时间:2018-11-22 15:03:28

标签: windows shell batch-file cmd adb

我试图停止Windows CMD的屏幕录制,并获得我正在使用的结果:

adb shell killall -HUP screenrecord

但是killall不适用于所有较旧的Android设备的问题。 因此,我尝试使用kill(PID)代替killall。查看以下命令:

adb shell 'kill -2 $(ps | grep screenrecord | cut -c 10-16)'

该命令在adb shell内完美运行:

shell@device:/ $ kill -2 $(ps | grep screenrecord | cut -c 10-16)

但不适用于带有adb shell的Windows CMD

adb shell 'kill -2 $(ps | grep screenrecord | cut -c 10-16)'

能否帮助我使用Windows CMD而不使用grep或Cygwin工具使此命令正常工作。

0 个答案:

没有答案
相关问题