Android ADB 一些常用命令
2017-11-30 16:20
260 查看
查看目前连接的设备
安装应用
例如:
复制文件到sdcard中
例如:
拉取sdcard中的文件
例如:
查看手机中安装的应用包名
当然,可用通过grep进行过滤
例如:
模拟手机输入
例如:
模拟触摸事件
例如:
例如:
关于source以及相关到其他命令,各位可以自行查阅资料
查看Activity的运行状态
当然,可用通过grep进行过滤
例如:
adb devices
安装应用
adb install [your apk path]
adb install -r [your apk path] //强制安装
例如:
adb install Desktop/test.apk
复制文件到sdcard中
adb push [your file path] [your dest path in sdcard]
例如:
adb push Desktop/test.txt /sdcard/
拉取sdcard中的文件
adb pull [your file path in sdcard] [your dest path]
例如:
adb pull /sdcard/test.txt Desktop/
查看手机中安装的应用包名
adb shell pm list packages
当然,可用通过grep进行过滤
例如:
adb shell pm list packages | grep "ABC" // 包名包含ABC三个字母
模拟手机输入
adb shell input keyevent [keycode]
例如:
adb shell input keyevent 3 // 模拟按下home键(其他按键可以自行搜索)
宁波整形医院http://www.zuanno.com/ 宁波好的整形医院http://www.zuanno.com/
模拟触摸事件
adb shell input [source]
例如:
adb shell input tap 100 100 // 模拟点击(100,100)
例如:
adb shell input touchscreen swipe 5 100 500 100 // 模拟从(5,100)滑动到(500,100)
关于source以及相关到其他命令,各位可以自行查阅资料
查看Activity的运行状态
adb shell dumpsys activity
当然,可用通过grep进行过滤
例如:
adb shell dumpsys activity | grep "ABC" // 过滤ABC关键字
相关文章推荐
- 【Android adb命令】android adb的一些常用命令
- Android开发中常用的一些adb命令
- 总结一些常用Android adb 命令
- Android ADB 一些常用命令
- Android常用的一些ADB命令
- android一些常用的adb命令
- Android常用的一些make命令【转】
- Android常用adb命令
- 在Android中使用adb命令时关于权限方面的一些总结
- window下 android adb常用命令
- android常用adb快捷命令一览表
- Android的常用adb命令
- Android拾遗——adb常用命令
- 你应该知道的一些Android ADB 命令
- Android常用adb命令总结
- 【Android】【Other】Android一些常用命令
- adb的一些常用的命令
- Android常用的一些make命令
- Android 常用 adb 命令总结