1,安装应用
adb install xxx.apk
2.覆盖安装
adb install -r xxx.apk
3.连接手机
adb devices –l
4.安装app
adb install xxx.apk
5.卸载app
adb uninstall 包名
6.获取手机分辨率
#通用方法
adb shell dumpsys window displays|head -n 3
#高通平台
adb shell wm size
7.解锁屏幕
adb shell input keyevent 26
8.从右往左滑屏
adb shell input swipe 600 500(起始位置) 99 800(结束位置) 500(时间)
最后一个数值为操作延时,单位为毫秒
9.点击 触屏
adb shell input tap 500 500
10.输入字符
adb shell input text xxxxx
11.登录Android
adb shell
12.退出Android
exit
13.删除命令
adb shell rm /sdcardx
14.从Android拷贝资料到PC
adb pull /sdcard/DCIM/Camera/文件名 /Users/poptest
15.从PC拷贝资料到设备
adb push /Users/poptest/文件名 /sdcard/DCIM/Camera
16.查看手机上所有应用包
adb shell pm list packages
17.查看当前启动的包
adb shell logcat |grep Activity
18.为了定位当前运行的包名,方便下载
adb shell logcat |grep *E
19.抓取系统崩溃日志
adb logcat *: W > C:/aaa/aa.txt
打印日志级别大于等于警告的日志,并导出到对应的txt文件