adb常用命令:
1.导出日志:adb pull 需导出的文件的路径 + 存放路径(例:C:\Users\Desktop\testlog)
2.使用adb命令连接设备:adb kill-server
adb tcpip 5555
adb connect padip地址:5555
3.查看设备app的包名:adb shell am monitor
获取app的当前activity:adb shell dumpsys window | findstr mCurrentFocus
获取设备中的输入法:adb shell ime list -s
切换输入法:adb shell settings put secure default_input_method
4.获取实时日志:adb logcat -v time > 路径(例:C:\Users\Desktop\testlog\a.txt)
5.查看当前设备名称:adb devices
6.查看系统版本:adb shell getprop ro.build.version.release
7.查看包详细信息:adb shell dumpsys package 包名 | findstr versionName
adb shell dumpsys package 包名
安装卸载相关:
1.直接安装:adb install +包位置+包名
2.覆盖安装:adb install -r +包位置+包名
3.强制卸载覆盖安装:adb install -r -d -t +包位置+包名
4.卸载ÿ