adb命令

Microsoft Windows [版本 10.0.10586]
(c) 2015 Microsoft Corporation。保留所有权利。

C:\Users\Fred>adb help
Android Debug Bridge version 1.0.32

-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 - directs command to the device or emulator with the given
serial number or qualifier. Overrides ANDROID_SERIAL
environment variable.
-p - 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 [:] - connect to a device via TCP/IP
Port 5555 is used by default if no port number is specified.
disconnect [[:]] - 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]
- copy file/dir to device
(‘-p’ to display the transfer progress)
adb pull [-p] [-a] []
- copy file/dir from device
(‘-p’ to display the transfer progress)
(‘-a’ means copy timestamp and mode)
adb sync [ ] - copy host->device only if changed
(-l means list but don’t copy)
(see ‘adb help all’)
adb shell - run remote shell interactively
adb shell - run remote shell command
adb emu - run emulator console command
adb logcat [ ] - View device log
adb forward –list - list all forward socket connections.
the format is a list of lines with the following format:
” ” ” ” “\n”
adb forward - forward socket connections
forward specs are one of:
tcp:
localabstract:
localreserved:
localfilesystem:
dev:
jdwp: (remote only)
adb forward –no-rebind
- same as ‘adb forward ’ but fails
if is already forwarded
adb forward –remove - 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 - reverse socket connections
reverse specs are one of:
tcp:
localabstract:
localreserved:
localfilesystem:
adb reverse –norebind
- same as ‘adb reverse ’ but fails
if is already reversed.
adb reverse –remove
- 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]
adb install-multiple [-lrtsdp]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值