当前位置:操作系统 > 安卓/Android >>

Android adb命令~图解

 做了这么长时间的开发与管理,在命令上总是自见则过,往往却忽视了在其命令上的分享过程,所以现在稍微有点时间就把
其命令的相关操作来简单的扫盲一番吧,也系统通过这种方式去授之以渔而不是鱼,好了,我以图解的方式来展示,当然我的习惯就是任何东西先看帮助文档或者命令,就今天我们这里要讲解的ADB命令在命令行中可以通过命令帮助来进行详细了解,废话不多说,先上图吧:




以上为使用help来显示其相关的命令使用说明,当然那个如果你的英文足够好的话,其实这些都很简单,当然,如你不太习惯去看这些英文描述的话,那接下来就由我来帮助处理这样的问题吧,好了,我就以最初始的理解方式来进行翻译与讲解吧,OK:
Android Debug Bridge version 1.0.29
这是关于Android调试牌的1.0.29版本

 -d                            - directs command to the only connected USB device
通过这个直接的命令仅仅是去连接USB设备
                                 returns an error if more than one USB device is present.
如果有多个USB设备同时出现的时候就会返回一个错误信息
 -e                            - directs command to the only running emulator.
直接使用这个命令符号来运行模拟器
                                 returns an error if more than one emulator is running.
如果存在多个模拟器同时运行时会在当前返回一个错误信息
 -s <serial number>            - directs command to the USB device or emulator with
                                 the given serial number. Overrides ANDROID_SERIAL
                                 environment variable.
通过这个直接的命令去展示其USB设备或者模拟器的序列号,彼此覆盖时会使其环境变量是可变的
 -p <product name or path>     - simple product name like 'sooner', or
                                 a relative/absolute path to a product
                                 out directory like 'out/target/product/sooner'.
                                 If -p is not specified, the ANDROID_PRODUCT_OUT
                                 environment variable is used, which must
                                 be an absolute path.
通过此命令显示其产品的名称,如"sooner",或者是相对与绝对的产品输出路径像"out/target/product/sooner",如果-p没有指定的话,就会使用ANDROID_PRODUCT_OUT的环境变量,但必须是一个绝对路径.
 devices                       - list all connected devices
通过此命令可以列出所有已经连接的设备
 connect <host>[:<port>]       - connect to a device via TCP/IP
                                 Port 5555 is used by default if no port number is specified.
通过TCP/IP的默认端口5555来连接设备
 disconnect [<host>[:<port>]]  - disconnect from a TCP/IP device.
                                 Port 5555 is used by default if no port number is specified.
                                 Using this command with no additional arguments
                                 will disconnect from all connected TCP/IP devices.
使用此命令可以去断开来自TCP/IP的设备连接,其在没有指定端口号时默认指定为5555,使用这个命令不需要去增加参数将会断开来自TCP/IP的所有连接设备
device commands:
设备命令:
  adb push <local> <remote>    - copy file/dir to device
PUSH命令:即复制一个文件或者目录进设备中
  adb pull <remote> [<local>]  - copy file/dir from device
PULL命令:即复制一个文件或者目录进设备中
  adb sync [ <directory> ]     - copy host->device only if changed
                                 (-l means list but don't copy)
                                 (see 'adb help all')
SYNC:复制主机内容进设备,仅仅是设备进行改变时对其内容进行同步处理的操作,括号里有说明:我的意思是列出但是不需要复制,可参考帮助ALL
  adb shell                    - run remote shell interactively
SHELL:运行远程SHELL与之交互
  adb shell <command>          - run remote shell command
SHELL:直接运行远程SHELL命令
  adb emu <command>            - run emulator console command
EMU:运行模拟器监控信息面板命令
  adb logcat [ <filter-spec> ] - View device log
阅览设备日志
  adb forward <local> <remote> - forward socket connections
远期套接字连接 www.zzzyk.com
                                 forward specs are one of:
远期规格显示的一个标准是:
                                   tcp:<port>
TCP端口号
                                   localabstract:<unix domain socket name>
本地抽象:UNIX域名的SOCKET名称
                                   localreserved:<unix domain socket name>
本地服务:UNIX域名/SOCKET名称
                                   localfilesystem:<unix domain socket name>
本地文件系统:UNIX域名/SOCKET名称
                                   dev:<character device name>
设备:字符设备名称
                                   jdwp:<process pid> (remote only)
远程进程ID
  adb jdwp                     - list PIDs of processes hosting a JDWP transport
列出相关的进程ID为主机进程的一个JAVA调试的无线协议的传输
说道JDWP,我简单对其说明下,说明是JDWP呢,JDWP的全写是:Java Debug Wire Protocol:即JAVA调试器无线协议,它定义了调试器(Debugger)和被调试的JAVA虚拟机(target vm)
补充:移动开发 , Android ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,