提供在windows、linux、mac进行命令行的录屏
GitHub - Genymobile/scrcpy: Display and control your Android device
要求安卓5.0以上版本,使能ADB debug
It focuses on:
Its features include:
常见命令行 scrcpy --help
scrcpy -r localfile.mp4? 录屏到指定文件
scrcpy -Nr localfile.mp4? 在本地不现实安卓屏幕内容
import subprocess
import os
import time
p=subprocess.Popen("scrcpy -Nr tmp.mp4", shell=True)
time.sleep(5)
os.kill(p.pid, signal.CTRL_C_EVENT)