僅限win蕴掏,cmd腳本
@echo off
setlocal EnableDelayedExpansion
REM Copyrights: youngpen
REM version:1.3
title adb截圖
echo.
echo adb連接手機(jī)后扶关,截圖到電腦上搅裙。
echo.—————————————————————————————————
:start
echo 點(diǎn)回車開(kāi)始,將以時(shí)間命名截圖文件
echo 輸入任意文字/字母替代文件名诀黍,請(qǐng)勿輸入空格糜俗,輸入exit退出
echo.
:set
SET time=%date:0,4%%date:5,2%%date:8,2%%time:0,2%%time:3,2%%time:6,2%
SET name=%time%
SET /P name=
IF /I '%name%'=='exit' goto 1
adb shell mkdir /sdcard/dcim/Screenshot 2>nul
adb shell screencap -p /sdcard/dcim/Screenshot/%name%.png
adb pull /sdcard/dcim/Screenshot/%name%.png
adb shell rm /sdcard/dcim/Screenshot/%name%.png
cls
echo.
echo 文件%name%.jpg已復(fù)制到當(dāng)前目錄
echo.—————————————————————————————————
SET time=
goto start
:1
exit