码迷,mamicode.com
首页 > 数据库 > 详细

ADB 有用的命令

时间:2016-05-29 01:02:11      阅读:561      评论:0      收藏:0      [点我收藏+]

标签:android adb


adb shell

adb wait-for-device 设备未连接时一直处于阻塞状态


adb shell input keyevent keyCode 模拟按键

adb shell input text "xx" 输入文字xx

adb shell input tap x y 模拟屏幕点击(x,y)

adb shell input swipe x1 y1 x2 y2 屏幕滑动从(x1,y1)到(x2,y2)


adb shell pm list package 列举系统所有应用包名

adb shell dumpsys package 列举系统所有应用包名(包含应用详细情形,如activity和servie等)

adb shell dumpsys acitvity top 显示前台应用信息


adb shell am start -n pkName/activityName 启动应用(n=name)

adb shell am stratservice -n pkName/serviceName 启动服务

adb shell am startservice -a action 通过action启动服务

adb shell am broadcast -a action 发送广播



本文出自 “whatever957” 博客,请务必保留此出处http://whatever957.blog.51cto.com/6835003/1784157

ADB 有用的命令

标签:android adb

原文地址:http://whatever957.blog.51cto.com/6835003/1784157

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!