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 cat /proc/meminfo

参考文章

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容