adb 命令总结
来源:互联网 发布:金山手机办公软件 编辑:程序博客网 时间:2024/05/08 17:11
- 列出现在下在运行的模拟器与真机
adb devices
对于每个实例(真机或模拟器)的输出格式如下
[serialNumber] [state]
$ adb devices
List of devices attached
emulator-5554 device
emulator-5556 device
emulator-5558 device
- 安装软件
adb install <apk-file-path>
- adb -s <serialNumber> <command>
指定结某个实例进行某项操作
例如:
adb -s emulator-5544 install a.apk
- 复制某文件到模拟器
adb push <local path> <remote path>
- 从模拟器中复制某文件到本地
adb pull <remote path> <local path>
- 列出所有支持的命令
adb help
The table below lists all of the supported adb commands and explains their meaning and usage.
-d
Direct an adb command to the only attached USB device.Returns an error if more than one USB device is attached.-e
Direct an adb command to the only running emulator instance.Returns an error if more than one emulator instance is running. -s <serialNumber>
Direct an adb command a specific emulator/device instance, referred to by its adb-assigned serial number (such as "emulator-5556").If not specified, adb generates an error.Generaldevices
Prints a list of all attached emulator/device instances.See Querying for Emulator/Device Instances for more information.help
Prints a list of supported adb commands. version
Prints the adb version number. Debuglogcat [<option>] [<filter-specs>]
Prints log data to the screen. bugreport
Prints dumpsys
, dumpstate
, and logcat
data to the screen, for the purposes of bug reporting. jdwp
Prints a list of available JDWP processes on a given device. You can use the forward jdwp:<pid>
port-forwarding specification to connect to a specific JDWP process. For example: adb forward tcp:8000 jdwp:472
jdb -attach localhost:8000
Data
install <path-to-apk>
Pushes an Android application (specified as a full path to an .apk file) to the data file of an emulator/device. pull <remote> <local>
Copies a specified file from an emulator/device instance to your development computer. push <local> <remote>
Copies a specified file from your development computer to an emulator/device instance. Ports and Networkingforward <local> <remote>
Forwards socket connections from a specified local port to a specified remote port on the emulator/device instance. Port specifications can use these schemes: tcp:<portnum>
local:<UNIX domain socket name>
dev:<character device name>
jdwp:<pid>
ppp <tty> [parm]...
Run PPP over USB.<tty>
— the tty for PPP stream. For exampledev:/dev/omap_csmi_ttyl
.[parm]...
&mdash zero or more PPP/PPPD options, such asdefaultroute
,local
,notty
, etc.
Note that you should not automatically start a PPP connection.
Scriptingget-serialno
Prints the adb instance serial number string.See Querying for Emulator/Device Instances for more information. get-state
Prints the adb state of an emulator/device instance.wait-for-device
Blocks execution until the device is online — that is, until the instance state is device
.You can prepend this command to other adb commands, in which case adb will wait until the emulator/device instance is connected before issuing the other commands. Here's an example:adb wait-for-device shell getpropNote that this command does not cause adb to wait until the entire system is fully booted. For that reason, you should not prepend it to other commands that require a fully booted system. As an example, the
install
requires the Android package manager, which is available only after the system is fully booted. A command such asadb wait-for-device install <app>.apkwould issue the
install
command as soon as the emulator or device instance connected to the adb server, but before the Android system was fully booted, so it would result in an error. Serverstart-server
Checks whether the adb server process is running and starts it, if not. kill-server
Terminates the adb server process. Shellshell
Starts a remote shell in the target emulator/device instance.See Issuing Shell Commands for more information. shell [<shellCommand>]
Issues a shell command in the target emulator/device instance and then exits the remote shell.
- adb 命令总结
- android adb 命令总结
- Android adb命令总结
- adb shell 命令总结
- adb命令 简单总结
- Android adb 命令总结
- adb 命令总结
- adb命令总结
- adb命令使用总结
- adb命令总结
- android-adb 命令总结
- adb命令总结
- adb fastboot 命令总结
- Android adb 命令总结
- Android ADB 命令总结
- adb学习命令总结
- adb命令总结
- adb命令总结
- TX笔
- 如何在visual stdio 2010中建立一个c语言程序
- 解决三国杀Online聊天窗口中文乱码
- windows xp 系统cmd命令大全
- cocos2d学习笔记(一) cocos2d的基本知识和环境配置
- adb 命令总结
- 山景
- 用Eclipse创建简单EJB的过程
- 哈哈哈
- 一个简单的时间显示
- Linux文件系统的设计
- 职场人应懂的22条人际关系建议
- Android开发学习笔记
- 颜色对照表