首页 > 数据库技术 > 详细

ADB 常用命令

时间:2017-03-08 17:40:54      阅读:225      评论:0      收藏:0      [点我收藏+]
#查看日志(实时显示)
abd logcat -d
#清除日志
adb logcat -c

 

#截图
adb screencap /sdcard/screencap.png
#录制视频
adb screenrecode /sdcard/demo.p4

 

#启动指定activity
adb shell am start -n packagename/activity #关闭应用程序 adb shell am force-stop packagename

 

#清除应用程序数据
adb shell pm clear packagename

 

adb shell input text "android"

adb shell input keyevent 4

Usage: input [<source>] <command> [<arg>...]

  The sources are:
    trackball
    joystick
    touchnavigation
    mouse
    keyboard
    gamepad
    touchpad
    dpad
    stylus
    touchscreen

  The commands and default sources are:
    text <string> (Default: touchscreen)
    keyevent [--longpress] <key code number or name> ... (Default: keyboard)
    tap <x> <y> (Default: touchscreen)
    swipe <x1> <y1> <x2> <y2> [duration(ms)] (Default: touchscreen)
    press (Default: trackball)
    roll <dx> <dy> (Default: trackball)

 

ADB 常用命令

原文:http://www.cnblogs.com/sao-fox/p/6520349.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!