赞
踩
Android Debug Bridge(adb)
adb [-d|-e|-s <serialNumber>] <command>
-d 连接到当前真实设备。若当前连接真实设备大于一,则报错
-e 连接到当前虚拟设备。若当前连接虚拟设备大于一,则报错
-s <serialNumber> 连接到特定设备,需指定设备名
例如:adb -s emulator-5556 install helloWorld.apk
通过命令可查询设备名称 adb devices
adb version -- 打印adb版本
adb help -- 列出帮助信息
adb logcat [option] [filter-specs] -- 打印日志信息
adb bugreport -- 打印 dumpsys, dumpstate, and logcat 信息
adb install <path-to-apk> -- 安装指定路径的apk文件
adb pull <remote> <local> -- 从虚拟设备或手机中拷贝文件到本地
adb push <local> <remote> -- 从本地拷贝文件到虚拟设备或手机
例如 adb push foo.txt /sdcard/foo.txt
adb get-serialno -- 获取设备serialno
adb get-state -- 打印设备状态
adb wait-for-device -- 等待设备,设备连接正常后执行后续命令
adb start-server -- 启动adb服务
adb kill-server -- 结束adb服务
adb shell -- 启动远程shell
使用CTRL+D 或者 exit 退出远程shell
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。