当前位置:网站首页>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
测试精讲视频
如果你觉的文章读的不过瘾,可以查看详细的视频教程。
学习路线如下




边栏推荐
- 详解指针进阶2
- Srs4.0+obs studio+vlc3 (environment construction and basic use demonstration)
- Reentrantlock usage and source code analysis
- socket.io搭建分布式Web推送服务器
- CString在多线程中的问题
- Detailed pointer advanced 1
- 视觉上位系统设计开发(halcon-winform)
- 驱动与应用程序通信
- 整形和浮点型是如何在内存中的存储
- C language brush questions ~leetcode and simple questions of niuke.com
猜你喜欢

Visual upper system design and development (Halcon WinForm) -4 Communication management

CString getbuffer and releasebuffer instructions
![[probably the most complete in Chinese] pushgateway entry notes](/img/5a/6dcb75f5d713ff513ad6842ff53cc3.png)
[probably the most complete in Chinese] pushgateway entry notes

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

Popular understanding of ovo and ovr

Kubernetes advanced training camp pod Foundation

Introduction, use and principle of synchronized

Popular understanding of decision tree ID3

Popular understanding of linear regression (I)

Detailed explanation of string function and string function with unlimited length
随机推荐
找映射关系
Subclass hides the function with the same name of the parent class
阿特拉斯atlas扭矩枪 USB通讯教程基于MTCOM
Visual upper system design and development (Halcon WinForm) -3 Image control
Reentrantlock usage and source code analysis
Idea does not specify an output path for the module
Atlas atlas torque gun USB communication tutorial based on mtcom
Didi off the shelf! Data security is national security
Detailed pointer advanced 1
Jvm-06-execution engine
Driver and application communication
Halcon与Winform学习第二节
Jvm-04-runtime data area heap, method area
Unityshader - materialcapture material capture effect (Emerald axe)
秒杀系统3-商品列表和商品详情
Kubernetes will show you from beginning to end
Problems of CString in multithreading
MySQL reports an error: [error] mysqld: file '/ mysql-bin. 010228‘ not found (Errcode: 2 “No such file or directory“)
Detailed pointer advanced 2
XWiki安装使用技巧