常用adb命令
# 截屏: adb shell screencap -p/sdcard/screen.png # 保存: adb pull /sdcard/screen.png # 点击: adb shell input tap x y # 滑动: adb shell input swipe x1 y1 x2 y2 #获取屏幕分辨率: adb shell wm size #查进程名和包名: adb shell dumpsys window | findstr mCurrentFocus 一个python demo: # 截屏: adb shell screencap -p/sdcard/screen.png # 保存: adb pull /sdcard/screen.png # 点击: adb shell input tap x y # 滑动: adb shell input swipe x1 y1 x2 y2 #获取屏幕分辨率: adb shell wm size #查进程名和包名: adb shell dumpsys window | findstr mCurrentFocus import sys import os pypath = sys.executable print(pypath) #打印python解释器路径 def tap(x,y): cmd = f'adb shell