当前位置:网站首页>App移动端测试【3】ADB命令
App移动端测试【3】ADB命令
2022-07-03 15:30:00 【Leo_Eagle】
Adb(android Debug Bridge),它允许真机与模拟器(或手机助手等)进行通信。这样大大提升了设备(真机)的操作便利.
1.ADB的认知
1.1 Adb的认知
Adb(android Debug Bridge),它允许真机与模拟器(或手机助手等)进行通信。这样大大提升了设备(真机)的操作便利
老师的,安卓sdk路径如:D:\Program Files (x86)\Android\android-sdk\platform-tools,在该目录下可以看到adb开头的3个文件,
验证adb是否配置完整。在Cmd中输入adb
Cmd
Adb
1.2 Adb的工作原理
启动adb客户端,客户端会与本地TCP端口(5037)绑定,然后开始侦听adb客户端发出的所有命令,然后使用端口5037与adb服务器通信。
1.3 启用adb调试
必须在手机上启动usb调试,才可以进行adb调试(如不知道如何打开手机的usb调试,请查看前面的文章:uiautomator
++App移动端测试【2】安卓模拟器部署++)。
1.4 Adb的基础命令
在cmd中执行如下
- 查看adb版本
C:\Users\Leo>adb version
- 查看设备信息
C:\Users\Leo>adb devices
List of devices attached
* daemon not running; starting now at tcp:5037
* daemon started successfully
GWY0217306003796 unauthorized
2. ADB的基础命令
2.1 Adb的基础命令
- 查看adb版本
C:\Users\Leo>adb version
- 查看设备信息
C:\Users\Leo>adb devices
List of devices attached
* daemon not running; starting now at tcp:5037
* daemon started successfully
GWY0217306003796 unauthorized
- 连接模拟器
C:\Users\Leo>adb connect 127.0.0.1:62001
注意事项:夜神模拟器的第1台模拟器的端口是62001,第2台是62025,第3台62025+1。
C:\Users\Leo>adb connect 127.0.0.1:62001
adb server version (36) doesn't match this client (40); killing...
原因:出现以上(adb server version (36) doesn’t ….)提示的原因,是因为android sdk中的adb版本与模拟器中adb版本不同造成的。
解决方案:
把android sdk下3个adb开头的文件(如下图),复制到模拟器下面,替换模拟器下(D:\Program Files\Nox\bin)对应的3个文件(如下图)。
- Adb shell
Adb shell
当有多台设备(模拟器链接pc的时候)
C:\Users\Leo>adb -s 127.0.0.1:62001 shell
[email protected]:/ #
格式 adb –s 需要的模拟器的ip与端口 shell
测试精讲视频
如果你觉的文章读的不过瘾,可以查看详细的视频教程。
学习路线如下




边栏推荐
- Using multipleoutputs to output multiple files in MapReduce
- Custom annotation
- Dataframe returns the whole row according to the value
- SQL server installation location cannot be changed
- Popular understanding of gradient descent
- Kubernetes - YAML文件解读
- Halcon与Winform学习第二节
- 从 flask 服务端代码自动生成客户端代码 -- flask-native-stubs 库介绍
- CString getbuffer and releasebuffer instructions
- 需要知道的字符串函数
猜你喜欢

Wechat payment -jsapi: code implementation (payment asynchronous callback, Chinese parameter solution)

详解指针进阶1
![MySQL reports an error: [error] mysqld: file '/ mysql-bin. 010228‘ not found (Errcode: 2 “No such file or directory“)](/img/cd/2e4f5884d034ff704809f476bda288.png)
MySQL reports an error: [error] mysqld: file '/ mysql-bin. 010228‘ not found (Errcode: 2 “No such file or directory“)

Redis lock Optimization Practice issued by gaobingfa

Visual host system design and development (Halcon WinForm)

秒杀系统3-商品列表和商品详情

Baidu AI Cloud helps Shizuishan upgrade the smart health care model of "Internet + elderly care services"

CString的GetBuffer和ReleaseBuffer使用说明

Creation and destruction of function stack frames

Introduction, use and principle of synchronized
随机推荐
Unity功能——Unity离线文档下载及使用
求字符串函数和长度不受限制的字符串函数的详解
阿特拉斯atlas扭矩枪 USB通讯教程基于MTCOM
Halcon与Winform学习第二节
XWiki Installation Tips
Jvm-03-runtime data area PC, stack, local method stack
秒杀系统2-Redis解决分布式Session问题
Didi off the shelf! Data security is national security
The difference between RAR and zip files
The state does not change after the assignment of El switch
Digital image processing -- popular understanding of corrosion and expansion
视觉上位系统设计开发(halcon-winform)-1.流程节点设计
Basic SQL tutorial
Visual upper system design and development (Halcon WinForm) -2 Global variable design
基于SVN分支开发模式流程浅析
win32创建窗口及按钮(轻量级)
Seckill system 2 redis solves the problem of distributed session
北京共有产权房出租新规实施的租赁案例
在MapReduce中利用MultipleOutputs输出多个文件
Halcon and WinForm study section 2