【基础工具篇使用】ADB 的安装和使用

文章目录

  • ADB的命令安装
  • ADB 命令使用
    • 查看帮助 ——adb help
    • 查看连接设备

ADB的命令安装

ADB 命令的全称为“Android Debug Bridge”,从英文中看出主要是用作安卓的调试工具。ADB 命令在嵌入式开发中越来越常用了
在 Windows 上按“win”+“R”组合件打开运行, 输入 sysdm.cpl
在这里插入图片描述
接着我们可以把 ADB 的路径添加到系统变量里面
在这里插入图片描述
运行 CMD 终端,输入命令进行检验是否安装成功

adb version

在这里插入图片描述

ADB 命令使用

查看帮助 ——adb help

C:\Users\zoe>adb help
Android Debug Bridge version 1.0.41
Version 33.0.3-8952118
Installed as G:\Program Files (x86)\platform-tools_r33.0.3-windows\platform-tools\adb.exeglobal 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]--one-device SERIAL|USB  only allowed with 'start-server' or 'server nodaemon', server will only connect to one USB device, specified by a serial number or USB device address.--exit-on-write-error    exit if stdout is closedgeneral commands:devices [-l]             list connected devices (-l for long output)help                     show this help messageversion                  show version numnetworking: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 allpair HOST[:PORT] [PAIRING CODE]pair with a device for secure TCP/IP communicationforward --list           list all forward socket connectionsforward [--no-rebind] LOCAL REMOTEforward 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)vsock:<CID>:<port> (remote only)acceptfd:<fd> (listen only)forward --remove LOCAL   remove specific forward socket connectionforward --remove-all     remove all forward socket connectionsreverse --list           list all reverse socket connections from devicereverse [--no-rebind] REMOTE LOCALreverse 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 connectionreverse --remove-all     remove all reverse socket connections from devicemdns check               check if mdns discovery is availablemdns services            list all discovered servicesfile transfer:push [--sync] [-z ALGORITHM] [-Z] LOCAL... REMOTEcopy 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/lz4/zstd)-Z: disable compressionpull [-a] [-z ALGORITHM] [-Z] REMOTE... LOCALcopy files/dirs from device-a: preserve file timestamp and mode-z: enable compression with a specified algorithm (any/none/brotli/lz4/zstd)-Z: disable compressionsync [-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/lz4/zstd)-Z: disable compressionshell: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 separationemu COMMAND              run emulator console commandapp installation (see also `adb shell cmd package help`):install [-lrtsdg] [--instant] PACKAGEpush a single package to the device and install itinstall-multiple [-lrtsdpg] [--instant] PACKAGE...push multiple APKs to the device for a single package and install theminstall-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] PACKAGEremove this app package from the device'-k': keep the data and cache directoriesdebugging: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 transportlogcat                   show device log (logcat --help for more)security:disable-verity           disable dm-verity checking on userdebug buildsenable-verity            re-enable dm-verity checking on userdebug buildskeygen FILEgenerate adb public/private key; private key stored in FILE,scripting:wait-for[-TRANSPORT]-STATE...wait for device to be in a given stateSTATE: device, recovery, rescue, sideload, bootloader, or disconnectTRANSPORT: usb, local, or any [default=any]get-state                print offline | bootloader | deviceget-serialno             print <serial-number>get-devpath              print <device-path>remount [-R]remount partitions read-write. if a reboot is required, -R willwill automatically reboot the device.reboot [bootloader|recovery|sideload|sideload-auto-reboot]reboot the device; defaults to booting system image butsupports bootloader and recovery too. sideload rebootsinto recovery and automatically starts sideload mode,sideload-auto-reboot is the same but reboots after sideloading.sideload OTAPACKAGE      sideload the given full OTA packageroot                     restart adbd with root permissionsunroot                   restart adbd without root permissionsusb                      restart adbd listening on USBtcpip PORT               restart adbd listening on TCP on PORTinternal debugging:start-server             ensure that there is a server runningkill-server              kill the server if it is runningreconnect                kick connection from host side to force reconnectreconnect device         kick connection from device side to force reconnectreconnect offline        reset offline/unauthorized devices to force reconnectusb:attach                   attach a detached USB devicedetach                   detach from a USB device to allow use by other processes
environment variables:$ADB_TRACEcomma-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)

查看连接设备

当使用 adb devices 列出只有一个连接设备的时候,可以不用加-s < serialNumber >指定设备,默认就会使用设备。
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/607317.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

astadmin安装querylist插件Puppeteer

我本来是想在linux服务器上安装&#xff0c;折腾了一天也没安装成功&#xff0c;由于急着用&#xff0c;就先做window10上安装了&#xff0c;以后有时间再研究centos7上安装 一 首先需要安装fastadmin 框架和querylist插件 这个大家可以自行安装&#xff0c;querylist安装地址…

LitJson-Json字符串转对像时:整型与字符串或字符串转:整型进的类型不一致的处理

目录 问题描述上代码测试代码各位看官&#xff0c;打赏个1元吧 Json数据格式是大家在游戏开中常量用的一种数据格式&#xff0c;某种程度上可以说是必备的。对unity开发来说&#xff0c;LitJson这个json库应该是被使用最多的json库了。 问题描述 今天说要的其中的这个api: Jso…

Arcgis像元统计数据

目录 单幅影像统计多幅影像统计 单幅影像统计 现有一幅NDVI影像&#xff0c;如何知道影像中NDVI的分布情况呢&#xff1f; 先栅格转点&#xff0c;然后在属性表中查看汇总情况 还有一种方法就是在ENVI中打开&#xff0c; -0.3-0.338占据了99% 多幅影像统计 现有多幅NDVI影…

用css给宽高不固定的矩形画对角线

.kong{width: 200rpx;height: 76rpx;background: linear-gradient(to bottom right, #E5E5E5 0%, rgba(0, 0, 0, 0.1) calc(50% - 1px),#175CFF 50%, rgba(0, 0, 0, 0.1) calc(50% 1px),rgba(0, 0, 0, 0.1) 100%);}参考&#xff1a; https://blog.csdn.net/weixin_38779534/a…

Qt实现简单的分割窗口

最近在学习一些关于Qt的新知识&#xff0c;今天来讲述下我学习到的窗口分割&#xff0c;如果有不正确的&#xff0c;大家可以指正哦~ 首先&#xff0c;先看一下实现之后的简单效果吧&#xff01;省的说的天花乱坠&#xff0c;大家却不知道说的是哪个部分。 功能实现 整体demo…

【算法与数据结构】70、LeetCode爬楼梯

文章目录 一、题目二、解法三、完整代码 所有的LeetCode题解索引&#xff0c;可以看这篇文章——【算法和数据结构】LeetCode题解。 一、题目 二、解法 思路分析&#xff1a;   程序如下&#xff1a; 复杂度分析&#xff1a; 时间复杂度&#xff1a; O ( ) O() O()。空间复…

第四站:C/C++基础-指针

目录 为什么使用指针 函数的值传递&#xff0c;无法通过调用函数&#xff0c;来修改函数的实参 被调用函数需要提供更多的“返回值”给调用函数 减少值传递时带来的额外开销&#xff0c;提高代码执行效率 使用指针前: 使用指针后: 指针的定义: 指针的含义(进阶): 空指针…

Android 正圆

<?xml version"1.0" encoding"utf-8"?> <RelativeLayout xmlns:android"http://schemas.android.com/apk/res/android"android:layout_width"wrap_content"android:layout_height"wrap_content"android:padding&…

x-cmd pkg | gh - GitHub 官方 CLI

目录 简介首次用户功能特点与 x-cmd gh 模块的关系相关作品进一步探索 简介 gh&#xff0c;是由 GitHub 官方使用 Go 语言开发和维护的命令行工具&#xff0c;旨在脚本或是命令行中便捷管理和操作 GitHub 的工作流程。 注意: 由于 x-cmd 提供了同名模块&#xff0c;因此使用官…

Java版商城:Spring Cloud+SpringBoot b2b2c实现多商家入驻直播带货及 免 费 小程序商城搭建的完整指南

随着互联网的快速发展&#xff0c;越来越多的企业开始注重数字化转型&#xff0c;以提升自身的竞争力和运营效率。在这个背景下&#xff0c;鸿鹄云商SAAS云产品应运而生&#xff0c;为企业提供了一种简单、高效、安全的数字化解决方案。 鸿鹄云商SAAS云产品是一种基于云计算的软…

OpenFeign服务调用

一、Feign Feign 是一个声明式webservice客户端,使用Feign 能让编写Web Service客户端更简单 &#xff0c;它的使用方法是 定义一个服务接口然后在上面添加注解。Spring Cloud对Feign 进行了封装&#xff0c;使其支持了Spring Mvc 标准注解和HttpMessageConverters ,Fegin可以…

【Python】 python简介开发环境

1. python简介 Python是由荷兰人吉多范罗苏姆 (Guido von Rossum&#xff0c;后面称呼为Guido,"龟叔“)发明的一种编程语言&#xff0c;是目前世界上最受欢迎和拥有最多用户群体的编程语言。 (1).Python的历史 1.1989年圣诞节:Guido开始写Python语言的编译器。 2.1991年…

大创项目推荐 深度学习图像风格迁移

文章目录 0 前言1 VGG网络2 风格迁移3 内容损失4 风格损失5 主代码实现6 迁移模型实现7 效果展示8 最后 0 前言 &#x1f525; 优质竞赛项目系列&#xff0c;今天要分享的是 &#x1f6a9; 深度学习图像风格迁移 - opencv python 该项目较为新颖&#xff0c;适合作为竞赛课题…

【Spring】17 @Component 注解

文章目录 1. 定义2. 好处3. 示例代码4. 组件命名总结 在 Spring 框架中&#xff0c; Component 注解是一个 通用的注解&#xff0c;用于标识一个类为 Spring 容器管理的 组件。它就可以让这个类成为 Spring IoC 容器中的一个 Bean&#xff0c;并允许 通过扫描机制自动发现和…

玩转Mysql 五(MySQL索引)

一路走来&#xff0c;所有遇到的人&#xff0c;帮助过我的、伤害过我的都是朋友&#xff0c;没有一个是敌人。如有侵权&#xff0c;请留言&#xff0c;我及时删除&#xff01; 一、索引的数据结构 1、MySQL官方对索引的定义为&#xff1a;索引&#xff08;Index&#xff09;是…

Python2048小游戏核心算法(python系列26)

前言&#xff1a;做核心算法之前我们可以玩一玩这个小游戏来了解一下规则。2048在线试玩 运行效果&#xff1a; 代码案例&#xff1a; # 2048小游戏# 1.将列表中零移动到列表的末尾 def move_zeroes():x 0for i in range(len(list_nums)):if list_nums[i] ! 0:list_nums[x],…

“单项突出”的赢双科技IPO加速,比亚迪是最强助力?

近日&#xff0c;新能源汽车核心部件供应商赢双科技首次递表科创板&#xff0c;其凭借旋转变压器产品就坐稳了新能源车企主要供应商的地位&#xff0c;从核心业务及业绩情况来看&#xff0c;赢双科技不愧为“单项冠军”。 据悉&#xff0c;赢双科技本次IPO拟募资8.47亿元&…

两种MinIO分布式集群部署方式

转载说明&#xff1a;如果您喜欢这篇文章并打算转载它&#xff0c;请私信作者取得授权。感谢您喜爱本文&#xff0c;请文明转载&#xff0c;谢谢。 相关文章推荐&#xff1a; 对象存储MinIO的简介与部署 记录一次跨越16个月的minio版本升级与数据迁移 MinIO集群怎么接入Prometh…

文字识别与光学字符识别有什么区别?

随着科技的不断发展&#xff0c;文字识别和光学字符识别技术已经成为我们日常生活和工作中不可或缺的一部分。然而&#xff0c;许多人对于这两者之间的区别并不十分清楚。本文将详细探讨文字识别与光学字符识别之间的差异&#xff0c;以帮助读者更好地理解这两种技术。 文字识…

Unity组件开发--相机跟随角色和旋转

1.相机跟随组件&#xff0c;节点&#xff1a; 2.相机跟随组件脚本&#xff1a; using System; using System.Collections; using System.Collections.Generic; using Unity.Burst.Intrinsics; using UnityEngine; using UnityEngine.UI;public class CameraFollow : Singleton&…