Skip to main content

List of devices attached

adb shell input keyevent 3

SJE5T17518007351 device
192.168.0.102:5555 device

  PC端 命令行执行  adb disconnect  <设备的IP地址>:5555 即可断开
C:\Users\86134>adb -s 192.168.0.102:5555 shell input tap 140 238

C:\Users\86134>adb -s 192.168.0.102:5555 shell input tap 303 689

C:\Users\86134>adb -s 192.168.0.102:5555 shell input tap 282 732

C:\Users\86134>adb -s 192.168.0.102:5555 shell input tap 408 625


C:\Users\86134>adb -s 192.168.0.102:5555 shell input swipe 870 1600 200 1600

Android如何实现自动截图脚本

https://www.yisu.com/zixun/209270.html

@echo off
set HOUR=%time:~0,2%
set MINUTE=%time:~3,2%
set SECOND=%time:~6,2%
:: 设置时间参数
set TMP_HOUR=%time:~1,1%
set NINE=9
set ZERO=0
:: 小时数不满2位进行补位操作
if %HOUR% LEQ %NINE% set HOUR=%ZERO%%TMP_HOUR%
set CURRENT_TIME=%HOUR%%MINUTE%%SECOND%
:: 以 Android20170109_101920.png 形式的格式命名
set name=Android%date:~0,4%%date:~5,2%%date:~8,2%_%CURRENT_TIME%.png
:: 获取桌面文件夹路径
set desktop_dir=C:\Users\Wallent\Desktop\AndroidScreen\
:: adb指令截图
adb shell /system/bin/screencap -p /sdcard/%name%
:: 将截图指令拉到指定文件夹
adb pull /sdcard/%name% %desktop_dir%/%name%

link :

https://developer.huawei.com/consumer/cn/forum/topic/41597933

https://gist.github.com/Pulimet/5013acf2cd5b28e55036c82c91bd56d8

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.