android adb作用和原理,Android ADB和相关命令原理和使用.ppt

Android ADB和相关命令原理和使用.ppt

Android ADB and related Commands

Jacky Cai – 2017/12/27

adb Overview

Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device. It is a client-server program that includes three components:

A client (adb) - which sends commands. The client runs on your development machine. You can invoke a client from a command-line terminal by issuing an adb command.

A daemon (adbd) - which runs commands on a device. The daemon runs as a background process on each device.

A server (adb) - which manages communication between the client and the daemon. The server runs as a background process on your development machine.

How adb work?

Above figure is adb server startup process. Adb server locates emulators by scanning odd-numbered ports in the range 5555 to 5585. each emulator uses a pair of sequential ports, an even-numbered port for console connections and an odd-numbered port for adb connections. For example: console: 5554, adb: 5555

Enable adb on device

To use adb with a device connected over USB, you must enable USB debugging in the device system settings, under Developer options.

On Android 4.2 and higher, the Developer options screen is hidden by default. To make it visible, go to Settings > About phone and tap Build number 7 times and then return to the previous screen to find Developer options at the bottom.

You can now connect your device with USB. You can verify that your device is connected by executing adb devices -l. If connected, you'll see the device name listed as a "device."

In response, adb prints following status information for each device:

Serial number: A string created by adb to uniquely identify the device by its port number. E.g. emulator-5554

State: The connection state of the device can be one of the following:

Offline - The

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值