Windows 10 安装 ADB (Android Debug Bridge,Android 调试桥)

Windows 10 安装 ADB {Android Debug Bridge,Android 调试桥}

Android Debug Bridge (adb) is a command line tool that lets you communicate with an emulator or connected Android device.

Android 开发者网站
https://developer.android.google.cn/

Android Studio
https://developer.android.google.cn/studio

新变化
https://developer.android.google.cn/studio/features

SDK Platform Tools
https://developer.android.google.cn/studio/releases/platform-tools

Android Debug Bridge,Android 调试桥
https://developer.android.com/studio/command-line/adb

1. ADB 历史版本下载

Android SDK Platform Tools are the elements of the Android SDK. It contains tools that alliance with the Android platform, such as ADB, fastboot, and systrace.

Android Debug Bridge,ADB:Android 调试桥

Android SDK Platform Tools for Windows, Linux, Mac (all versions) - 历史版本下载
https://androidmtk.com/download-android-sdk-platform-tools

在这里插入图片描述

2. ADB Download

Download the latest version of ADB and fastboot.
http://adbdownload.com/

在这里插入图片描述

3. D:\Program Files\platform-tools\adb.exe

platform-tools_r30.0.4-windows.zip

D:\Program Files\platform-tools
D:\Program Files\platform-tools\adb.exe

在这里插入图片描述

此电脑 -> 高级系统设置 -> 高级 -> 环境变量

在这里插入图片描述

此电脑 -> 高级系统设置 -> 高级 -> 环境变量 -> 系统变量 -> 变量 Path

在这里插入图片描述

此电脑 -> 高级系统设置 -> 高级 -> 环境变量 -> 系统变量 -> 变量 Path -> 编辑环境变量

在这里插入图片描述

新建 -> 添加 D:\Program Files\platform-tools\

在这里插入图片描述

4. ADB

WIN + R (cmd)

在这里插入图片描述

adb version

在这里插入图片描述

adb help

Microsoft Windows [版本 10.0.19041.450]
(c) 2020 Microsoft Corporation. 保留所有权利。

C:\Users\cheng>adb help
Android Debug Bridge version 1.0.41
Version 30.0.4-6686687
Installed as D:\Program Files\platform-tools\adb.exe

global options:
 -a         listen on all network interfaces, not just localhost
 -d         use USB device (error if multiple devices connected)
 -e         use TCP/IP device (error if multiple TCP/IP devices available)
 -s SERIAL  use device with given serial (overrides $ANDROID_SERIAL)
 -t ID      use device with given transport id
 -H         name of adb server host [default=localhost]
 -P         port of adb server [default=5037]
 -L SOCKET  listen on given socket for adb server [default=tcp:localhost:5037]

general commands:
 devices [-l]             list connected devices (-l for long output)
 help                     show this help message
 version                  show version num

networking:
 connect HOST[:PORT]      connect to a device via TCP/IP [default port=5555]
 disconnect [HOST[:PORT]]
     disconnect from given TCP/IP device [default port=5555], or all
 pair HOST[:PORT] [PAIRING CODE]
     pair with a device for secure TCP/IP communication
 forward --list           list all forward socket connections
 forward [--no-rebind] LOCAL REMOTE
     forward socket connection using:
       tcp:<port> (<local> may be "tcp:0" to pick any open 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)
       acceptfd:<fd> (listen only)
 forward --remove LOCAL   remove specific forward socket connection
 forward --remove-all     remove all forward socket connections
 ppp TTY [PARAMETER...]   run PPP over USB
 reverse --list           list all reverse socket connections from device
 reverse [--no-rebind] REMOTE LOCAL
     reverse socket connection using:
       tcp:<port> (<remote> may be "tcp:0" to pick any open port)
       localabstract:<unix domain socket name>
       localreserved:<unix domain socket name>
       localfilesystem:<unix domain socket name>
 reverse --remove REMOTE  remove specific reverse socket connection
 reverse --remove-all     remove all reverse socket connections from device
 mdns check               check if mdns discovery is available
 mdns services            list all discovered services

file transfer:
 push [--sync] [-z ALGORITHM] [-Z] LOCAL... REMOTE
     copy local files/directories to device
     --sync: only push files that are newer on the host than the device
     -n: dry run: push files to device without storing to the filesystem
     -z: enable compression with a specified algorithm (any, none, brotli)
     -Z: disable compression
 pull [-a] [-z ALGORITHM] [-Z] REMOTE... LOCAL
     copy files/dirs from device
     -a: preserve file timestamp and mode
     -z: enable compression with a specified algorithm (any, none, brotli)
     -Z: disable compression
 sync [-l] [-z ALGORITHM] [-Z] [all|data|odm|oem|product|system|system_ext|vendor]
     sync a local build from $ANDROID_PRODUCT_OUT to the device (default all)
     -n: dry run: push files to device without storing to the filesystem
     -l: list files that would be copied, but don't copy them
     -z: enable compression with a specified algorithm (any, none, brotli)
     -Z: disable compression

shell:
 shell [-e ESCAPE] [-n] [-Tt] [-x] [COMMAND...]
     run remote shell command (interactive shell if no command given)
     -e: choose escape character, or "none"; default '~'
     -n: don't read from stdin
     -T: disable pty allocation
     -t: allocate a pty if on a tty (-tt: force pty allocation)
     -x: disable remote exit codes and stdout/stderr separation
 emu COMMAND              run emulator console command

app installation (see also `adb shell cmd package help`):
 install [-lrtsdg] [--instant] PACKAGE
     push a single package to the device and install it
 install-multiple [-lrtsdpg] [--instant] PACKAGE...
     push multiple APKs to the device for a single package and install them
 install-multi-package [-lrtsdpg] [--instant] PACKAGE...
     push one or more packages to the device and install them atomically
     -r: replace existing application
     -t: allow test packages
     -d: allow version code downgrade (debuggable packages only)
     -p: partial application install (install-multiple only)
     -g: grant all runtime permissions
     --abi ABI: override platform's default ABI
     --instant: cause the app to be installed as an ephemeral install app
     --no-streaming: always push APK to device and invoke Package Manager as separate steps
     --streaming: force streaming APK directly into Package Manager
     --fastdeploy: use fast deploy
     --no-fastdeploy: prevent use of fast deploy
     --force-agent: force update of deployment agent when using fast deploy
     --date-check-agent: update deployment agent when local version is newer and using fast deploy
     --version-check-agent: update deployment agent when local version has different version code and using fast deploy
     (See also `adb shell pm help` for more options.)
 uninstall [-k] PACKAGE
     remove this app package from the device
     '-k': keep the data and cache directories

debugging:
 bugreport [PATH]
     write bugreport to given PATH [default=bugreport.zip];
     if PATH is a directory, the bug report is saved in that directory.
     devices that don't support zipped bug reports output to stdout.
 jdwp                     list pids of processes hosting a JDWP transport
 logcat                   show device log (logcat --help for more)

security:
 disable-verity           disable dm-verity checking on userdebug builds
 enable-verity            re-enable dm-verity checking on userdebug builds
 keygen FILE
     generate adb public/private key; private key stored in FILE,

scripting:
 wait-for[-TRANSPORT]-STATE...
     wait for device to be in a given state
     STATE: device, recovery, rescue, sideload, bootloader, or disconnect
     TRANSPORT: usb, local, or any [default=any]
 get-state                print offline | bootloader | device
 get-serialno             print <serial-number>
 get-devpath              print <device-path>
 remount [-R]
      remount partitions read-write. if a reboot is required, -R will
      will automatically reboot the device.
 reboot [bootloader|recovery|sideload|sideload-auto-reboot]
     reboot the device; defaults to booting system image but
     supports bootloader and recovery too. sideload reboots
     into recovery and automatically starts sideload mode,
     sideload-auto-reboot is the same but reboots after sideloading.
 sideload OTAPACKAGE      sideload the given full OTA package
 root                     restart adbd with root permissions
 unroot                   restart adbd without root permissions
 usb                      restart adbd listening on USB
 tcpip PORT               restart adbd listening on TCP on PORT

internal debugging:
 start-server             ensure that there is a server running
 kill-server              kill the server if it is running
 reconnect                kick connection from host side to force reconnect
 reconnect device         kick connection from device side to force reconnect
 reconnect offline        reset offline/unauthorized devices to force reconnect

environment variables:
 $ADB_TRACE
     comma-separated list of debug info to log:
     all,adb,sockets,packets,rwx,usb,sync,sysdeps,transport,jdwp
 $ADB_VENDOR_KEYS         colon-separated list of keys (files or directories)
 $ANDROID_SERIAL          serial number to connect to (see -s)
 $ANDROID_LOG_TAGS        tags to be used by logcat (see logcat --help)
 $ADB_LOCAL_TRANSPORT_MAX_PORT max emulator scan port (default 5585, 16 emus)
 $ADB_MDNS_AUTO_CONNECT   comma-separated list of mdns services to allow auto-connect (default adb-tls-connect)

C:\Users\cheng>

adb kill-server - adb start-server

Microsoft Windows [版本 10.0.19041.450]
(c) 2020 Microsoft Corporation. 保留所有权利。

C:\Users\cheng>adb kill-server

C:\Users\cheng>adb start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully

C:\Users\cheng>

References

[1] Yongqiang Cheng, https://yongqiang.blog.csdn.net/
[2] Android Debug Bridge, https://adbshell.com/

### 回答1: Android Debug BridgeADB)是一个用于在Android设备和计算机之间建立连接和调试应用程序的命令行工具。ADB的版本号1.0.41是指Android Debug Bridge工具的主要版本号为1,次要版本号为0,修订版本号为41。 ADBAndroid软件开发工具包(SDK)中的一个重要组件,开发人员可以通过ADBAndroid设备进行通信,并对设备上运行的应用程序进行调试安装、卸载以及文件的传输等操作。ADB通过USB连接电脑和设备,也可以通过网络连接进行调试ADB 1.0.41版本可能包含了一些新的功能和改进,或者修复了之前版本中的一些bug。比如,在这个版本中可能会提供更快的文件传输速度、更稳定的设备连接、更友好的用户界面等。 当使用ADB时,开发人员需要先将设备通过USB线缆连接到计算机上,并确保设备已经打开了调试模式。之后,可以在计算机中的命令行界面输入相应的ADB命令,如adb devices来查看连接的设备、adb install来安装应用程序、adb logcat来查看设备日志等。 总之,ADB 1.0.41是一个用于与Android设备进行连接和调试的重要工具,它可以帮助开发人员更方便地进行应用程序的开发、测试和调试工作。 ### 回答2: Android Debug BridgeADB)是一款由谷歌开发的工具,用于在电脑上与连接的Android设备进行通信和调试ADB可以通过USB连接电脑和Android设备,或通过网络连接进行远程调试ADB版本1.0.41是ADB的一个特定版本号。每个版本的ADB都有一些改进和修复,以提供更好的功能和稳定性。对于版本1.0.41来说,可能有以下一些改进或修复: 1. 修复了一些与设备通信的问题,提高了ADB连接的稳定性。 2. 增加了对一些新的Android设备的支持,使得更多设备可以与ADB进行通信和调试。 3. 优化了ADB的性能,提高了数据传输速度。 4. 更新了ADB的一些命令和选项,提供了更多功能和灵活性。 5. 修复了一些已知的bug,提高了ADB的可靠性和安全性。 总之,版本1.0.41的ADB带来了一些改进和修复,使得与Android设备的通信和调试更加稳定、快速和可靠。对于开发人员和用户来说,使用最新版本的ADB可以获得更好的体验和功能。 ### 回答3: Android调试Android Debug Bridge,简称ADB)是一种用于与Android设备进行通信和调试的命令行工具。ADB工具通过USB连接或网络连接与设备建立通信,使开发者可以在计算机上执行各种操作,包括安装应用、发送命令、查看设备日志等。 ADB的版本号1.0.41表明这是ADB的第41个发布版本。每个版本的ADB都可能包含不同的功能和修复之前版本的漏洞。新版本的ADB通常会提供更好的性能、更稳定的连接和更丰富的命令选项。开发者可以从Android SDK中获得ADB的最新版本,并将其与他们的开发环境一起使用。 使用ADB 1.0.41版本,我们可以在开发过程中更方便地调试和测试Android应用程序。它允许我们轻松地安装和卸载应用程序,传输文件到设备,查看设备日志,捕获设备屏幕截图等。同时,ADB还提供了强大的命令行选项,可以帮助我们自动化测试、获取设备信息、进行端口转发等。 与ADB的旧版本相比,1.0.41版本可能提供更好的性能和稳定性。它可能修复了之前版本中发现的一些错误和问题,并引入了一些新的功能和改进。因此,我们应该始终使用最新的ADB版本,以便能够享受最佳的开发体验,并确保应用程序在各种设备上的兼容性和稳定性。
评论 12
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Yongqiang Cheng

梦想不是浮躁,而是沉淀和积累。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值