adb常用命令

触摸事件

adb shell input tap x y

滑动事件

adb shell input swipe x1 y1 x2 y2

长按事件

adb shell input  swipe x1 y1 x2 y2 ms

清除数据

adb shell pm clear 包名

连接

adb wait-for-device
adb remount
adb connect 192.168.1.3

log

// 清除日志
adb logcat -c
// 输出
adb logcat -v time >log.txt

导出Androidlog

adb pull data/log/android_log log

闪退日志

adb pull data/system/dropbox  dropbox

启动页面

adb shell am start -n 包名/页面路径

取消权限或者授权

adb shell pm revoke|grant 包名 权限名称

截图并且导出

adb shell screencap -p /sdcard/test.png
adb pull /sdcard/test.png d:/temp/test.png

参考文章

[adb shell中的am pm命令 – 飘飘雪 – 博客园 ](https://www.cnblogs.com/wangcp-2014/p/6076035.html

    原文作者:流水潺湲
    原文地址: https://www.jianshu.com/p/ca06a4d1447b
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞