adb 帮助:adb --help
启动adb 服务:adb start-server
关闭adb 服务:adb kill-server
获取设备号:adb devices
获取系统版本:adb shell getprop ro.build.version.release
发送文件到手机:adb push 电脑端⽂件路径/需要发送的文件,手机端存储的路径
adb push C:\Users\win\Desktop\xx.png /sdcard
从手机拉取文件: adb pull 手机端的路径/拉取文件名 电脑端存储文件路径
adb pull /sdcard/xx.png C:\Users\win\Desktop
查看手机运行日志: adb logcat
进入到手机终端: adb shell
安装app到手机: adb install 路径/xxx.apk
卸载手机app : adb uninstall app
获取app启动包名和启动名(⚠手机需要先打开对应app)
Mac/Linux: adb shell dumpsys window windows | grep mFocusedApp
在 Windows 终端运⾏: adb shell dumpsys window w | findstr mCurrent
获取app启动时间: adb shell am start -W 包名/.启动名
查看设备ip地址:
adb shell ifconfig wlan0
adb shell netcfg
查看设备cpu信息: adb shell cat /proc/cpuinfo
查看设备内存信息: adb shell cat /proc/meminfo
点亮屏幕: adb shell input keyevent 224
熄灭屏幕: adb shell input keyevent 223