Android Debug Bridge version 1.0.32
Revision cc6ae925e394-android

-a - directs adb to listen on all interfaces for a connection

-d - directs command to the only connected USB device,returns an error if more than one USB device is present.

-e - directs command to the only running emulator.returns an error if more than one emulator is running.

-s <specific device> - directs command to the device or emulator with the given  serial number or qualifier. Overrides ANDROID_SERIAL environment variable.

-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.

-H - Name of adb server host (default: localhost)

-P - Port of adb server (default: 5037)

devices [-l] - list all connected devices ('-l' will also list device qualifiers)

connect <host>[:<port>] - connect to a device via TCP/IP Port 5555 is used by default if no port number is specified.

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.

device commands:

adb push [-p] <local> <remote>- copy file/dir to device('-p' to display the transfer progress)

adb pull [-p] [-a] <remote> [<local>]- copy file/dir from device('-p' to display the transfer progress)('-a' means copy timestamp and mode)

adb sync [ <directory> ] - copy host->device only if changed(-l means list but don't copy)

adb shell - run remote shell interactively

adb shell <command> - run remote shell command

adb emu <command> - run emulator console command

adb logcat [ <filter-spec> ] - View device log

adb forward --list - list all forward socket connections.the format is a list of lines with the following format:

<serial> " " <local> " " <remote> "\n"

adb forward <local> <remote> - forward socket connections 

forward specs are one of:

tcp:<port>

localabstract:<unix domain socket name>

localreserved:<unix domain socket name>

localfilesystem:<unix domain socket name>

dev:<character device name>

jdwp:<process pid> (remote only)

adb forward --no-rebind <local> <remote>- same as 'adb forward <local> <remote>' but fais,if <local> is already forwarded

adb forward --remove <local> - remove a specific forward socket connection

adb forward --remove-all - remove all forward socket connections

adb reverse --list - list all reverse socket connections from device

adb reverse <remote> <local> - reverse socket connections

reverse specs are one of:

tcp:<port>

localabstract:<unix domain socket name>

localreserved:<unix domain socket name>

localfilesystem:<unix domain socket name>

adb reverse --norebind <remote> <local>- same as 'adb reverse <remote> <local>' but fails,if <remote> is already reversed.

adb reverse --remove <remote>- remove a specific reversed socket connection

adb reverse --remove-all - remove all reversed socket connections from device

adb jdwp - list PIDs of processes hosting a JDWP transport

adb install [-lrtsd] <file>

adb install-multiple [-lrtsdp] <file...>- push this package file to the device and install it

(-l: forward lock application)

(-r: replace existing application)

(-t: allow test packages)

(-s: install application on sdcard)

(-d: allow version code downgrade)

(-p: partial application install)

adb uninstall [-k] <package> - remove this app package from the device('-k' means keep the data and cache directories)

adb bugreport - return all information from the device that should be included in a bug report.

adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all][-system|-nosystem] [<packages...>]- write an archive of the device's data to <file>.

If no -f option is supplied then the data is written to "backup.ab" in the current directory.

(-apk|-noapk enable/disable backup of the .apks themselves in the archive; the default is noapk.)

(-obb|-noobb enable/disable backup of any installed apk expansion(aka .obb) files associated with each application; the default is noobb.)

(-shared|-noshared enable/disable backup of the device's shared storage / SD card contents; the default is noshared.)

(-all means to back up all installed applications)

(-system|-nosystem toggles whether -all automatically includes  system applications; the default is to include system apps)

(<packages...> is the list of applications to be backed up.

If the -all or -shared flags are passed, then the package list is optional. Applications explicitly given on the command line will be included even if -nosystem would ordinarily cause them to be omitted.)

adb restore <file> - restore device contents from the <file> backup archive

adb disable-verity - disable dm-verity checking on USERDEBUG builds

adb enable-verity - re-enable dm-verity checking on USERDEBUG builds

adb keygen <file> - generate adb public/private key. The private key is stored in <file>,and the public key is stored in <file>.pub. Any existing files are overwritten.

adb help - show this help message

adb version - show version num

scripting:

adb wait-for-device - block until device is online

adb start-server - ensure that there is a server running

adb kill-server - kill the server if it is running

adb get-state - prints: offline | bootloader | device

adb get-serialno - prints: <serial-number>

adb get-devpath - prints: <device-path>

adb remount - remounts the /system, /vendor (if present) and/oem (if present) partitions on the device read-write

adb reboot [bootloader|recovery]- reboots the device, optionally into the bootloader or recovery program.

adb reboot sideload - reboots the device into the sideload mode in recovery program (adb root required).

adb reboot sideload-auto-reboot- reboots into the sideload mode, then reboots automatically after the sideload regardless of the result.

adb sideload <file> - sideloads the given package

adb root - restarts the adbd daemon with root permissions

adb unroot - restarts the adbd daemon without root permissions

adb usb - restarts the adbd daemon listening on USB

adb tcpip <port> - restarts the adbd daemon listening on TCP on the specified port

networking:
adb ppp <tty> [parameters] - Run PPP over USB.Note: you should not automatically start a PPP connection.<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1,[parameters] - Eg. defaultroute debug dump local notty usepeerdns adb sync notes:

adb sync [ <directory> ]<localdir> can be interpreted in several ways:

- If <directory> is not specified, /system, /vendor (if present), /oem (if present) and /data partitions will be updated.

- If it is "system", "vendor", "oem" or "data", only the corresponding partition is updated.

environment variables:

ADB_TRACE - Print debug information. A comma separated list of the following values1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp,ANDROID_SERIAL - The serial number to connect to. -s takes priority over this if given.

ANDROID_LOG_TAGS - When used with the logcat option, only these debug tags are printed.

adb help的更多相关文章

  1. 通过adb方式给安卓手机截图的cmd批处理文件

    @echo off rem  通过adb方式截图rem  需要安装adb ,一般安装了android sdk 默认带了adb ,路径为sdk目录的android-sdk\platform-toolsr ...

  2. Android 工具-adb

    Android 工具-adb 版权声明:本文为博主原创文章,未经博主允许不得转载. Android 开发中, adb 是开发者经常使用的工具,是 Android 开发者必须掌握的. Android D ...

  3. 安卓虚拟机adb shell sqlite3数据库

    adb shell 连接: //http://www.cnblogs.com/xiaobo-Linux/ Android把数据都存放在data/data目录下. 我们使用cd命令转到data/data ...

  4. adb devices 偵測不到 手機

    現象: system 有偵測到 mobile phone, xxx@xxx-ThinkPad-T460p:~/.android$ lsusb Bus Device : ID 1d6b: Linux F ...

  5. Android之什么是Activity和常用的ADB命令以及Android项目结构的认识

    总结一下之前学习Android的一些内容 一:  Android常用的ADB命令(adb android调试桥)      1.adb devices   查看模拟器设备并重新连接. 2.adb ki ...

  6. 四.Android adb命令(持续更新...)

    1.安装:甭管从哪里下载下来的apk,放在指定的目录下,不一定非要是sdk的目录下:adb install "d:\hxcjaz.apk"(指定的一个目录)2.卸载:adb uni ...

  7. linux安装adb

    本文只针对centOS6.8,其他版本未测试 1.下载adb包 下载android sdk for linux(http://tools.android-studio.org/index.php/sd ...

  8. adb工具获取appPackage和appActivity

    1,手机连接电脑,打开手机调试功能,并运行待测试APP,终端执行: adb shell 2,接着,执行: dumpsys window windows | grep -E 'mFocusedApp' ...

  9. 魅族mx4 pro连电脑,adb无法获取devices信息解决

    根据 flyme 的文档: K:\MX4 USB Reference Manual\简体\MX4_ADB_参考说明书.txt 操作如下: 二.Windows XP中文环境1.  建立或修改C:\Doc ...

  10. ADB

    adb logcat 命令详解 log过滤 http://blog.csdn.net/liao277218962/article/details/50129009 如何使用 adb logcat 查看 ...

随机推荐

  1. LeetCode -- 删除链表中值为k的元素

    本题目比較直接,一次遍历遇到匹配的元素直接删除(通过n.next = n.next.next)就能够了,仅仅是须要考虑到:1.首节点的情况2.末节点的情况 下面为实现: public ListNode ...

  2. AngularJs压缩时须要注意的事项

    因为AngularJS是通过控制器构造函数的參数名字来判断依赖服务名称的.所以假设你要压缩控制器的JS代码.它全部的參数也同一时候会被压缩,这时候依赖注入系统就不能正确的识别出服务了. 假如我们的Co ...

  3. 嵌入式project师考试知识点总结 微内核结构

    在操作系统的结构设计中,微内核结构表示的是 A)  总体式结构 B)  层次结构 C)  分布式结构 D)  客户机/server结构    微内核是指把操作系统结构中的内存管理.设备管理.文件系统等 ...

  4. 小强的HTML5移动开发之路(22)—— Adobe DreamWeaver CS6安装与破解

    首先说明一下,这里介绍Adobe DreamWeaver CS6的安装与破解是为了后面的jQuery Mobile框架使用做好准备. 一.首先去Adobe官网下载:http://www.adobe.c ...

  5. 在C++ Builder6上使用Boost正则表达式库

    本文关键词:正则表达式 c++ python 软件 正则表达式是一种模式匹配形式,它通常用在处理的文本程序中.比如我们经常使用的grep工具,还是perl语言都使用了正则表达式. 正则表达式是一种模式 ...

  6. 【38.24%】【codeforces 621E】 Wet Shark and Blocks

    time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...

  7. 动态备份SQL-SERVER数据库——SQLDMO

    转载:http://www.cnblogs.com/liulanglang/archive/2007/12/04/981812.html 上周要写一个SQL-SERVER数据库备份还原的程序,很没有思 ...

  8. R 语言文件读写

    1. working directory:工作目录 > getwd() > setwd("C:/data") # 设定当前工作目录 2. 读取格式化的 table &g ...

  9. 数据集成工具Teiid Designer的环境搭建

    由于实验室项目要求的关系,看了些数据汇聚工具 Teiid 的相关知识.这里总结下 Teiid 的可视化配置工具 Teiid Designer 的部署过程. 背景知识 数据集成是把不同来源.格式.特点性 ...

  10. Stompjs websocket vue

    公司项目要求要有消息提醒机制 , 多方面考虑用了ActiveMQ ,基本上现在主流的后台语言都没啥问题 , php phthon java nodejs , 等等都没问题 , 各位道友可以去查阅相关资 ...