zoukankan      html  css  js  c++  java
  • 批处理+adb命令实现Android截图小工具

    使用方法:复制代码保存为.bat结尾的文件,修改截图的保存路径,无线连接版需要修改为自己手机的ip地址。

    wifi无线连接版本:

    echo 开始截图...
    taskkill /IM adb.exe -f
    adb tcpip 5555
    adb connect 192.168.80.25:5555
    adb shell /system/bin/screencap -p /sdcard/screenshot.png
    adb pull /sdcard/screenshot.png D:Pictures
    call mspaint.exe D:Picturesscreenshot.png
    echo 截图完成...
    pause

    数据线版本:

    adb shell /system/bin/screencap -p /sdcard/screenshot.png
    adb pull /sdcard/screenshot.png D:Pictures
    call mspaint.exe D:Picturesscreenshot.png

     根据时间戳命名图片名称的版本:

    @echo off
    echo 开始截图...
    taskkill /IM adb.exe -f
    adb tcpip 5555
    adb connect 192.168.80.25:5555
    adb shell screencap -p /sdcard/screenshot.png
    adb pull /sdcard/screenshot.png D:Picturesscreenshot.png
    set d=%date:~0,10%
    set filename=%date:~0,10%_%time:~0,2%-%time:~3,2%-%time:~6,2%.png
    set filename=%filename:/=-%
    echo %filename%
    ren D:Picturesscreenshot.png %filename%
    call mspaint.exe D:Pictures%filename%
    echo 截图完成...
    pause

  • 相关阅读:
    HashMap与ArrayList的相互嵌套
    Mysql与Oracle 的对比
    什么是子查询
    创建存储过程
    cmd 快捷键
    navicat 快捷键
    Mysql的数据类型 6种
    Mysql与Oracle 的使用区别
    怎样修复ie浏览器
    Linux官方内置Bash中新发现一个非常严重安全漏洞
  • 原文地址:https://www.cnblogs.com/xiamaojjie/p/13972165.html
Copyright © 2011-2022 走看看