当前位置:网站首页>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
测试精讲视频
如果你觉的文章读的不过瘾,可以查看详细的视频教程。
学习路线如下
边栏推荐
- The markdown file obtains the pictures of the network and stores them locally and modifies the URL
- Using Tengine to solve the session problem of load balancing
- 函数栈帧的创建和销毁
- Popular understanding of decision tree ID3
- Calibre LVL
- Jvm-09 byte code introduction
- Digital image processing -- popular understanding of corrosion and expansion
- Use percent sign in CString
- Second kill system 3 - list of items and item details
- "Seven weapons" in the "treasure chest" of machine learning: Zhou Zhihua leads the publication of the new book "machine learning theory guide"
猜你喜欢
Can‘t connect to MySQL server on ‘localhost‘
What are the composite types of Blackhorse Clickhouse, an OLAP database recognized in the industry
秒杀系统2-Redis解决分布式Session问题
如何使用 @NotNull等注解校验 并全局异常处理
VS2017通过IP调试驱动(双机调试)
Kubernetes vous emmène du début à la fin
视觉上位系统设计开发(halcon-winform)
Kubernetes帶你從頭到尾捋一遍
Popular understanding of gradient descent
Idea does not specify an output path for the module
随机推荐
XWiki安装使用技巧
Find mapping relationship
[probably the most complete in Chinese] pushgateway entry notes
Summary of concurrent full knowledge points
Detailed comments on MapReduce instance code on the official website
Concurrency-01-create thread, sleep, yield, wait, join, interrupt, thread state, synchronized, park, reentrantlock
Tensorflow realizes verification code recognition (II)
Matlab r2011b neural network toolbox precautions
驱动与应用程序通信
Introduction series of software reverse cracking (1) - common configurations and function windows of xdbg32/64
Srs4.0+obs studio+vlc3 (environment construction and basic use demonstration)
整形和浮点型是如何在内存中的存储
[cloud native training camp] module 7 kubernetes control plane component: scheduler and controller
基于SVN分支开发模式流程浅析
找映射关系
使用AUR下载并安装常用程序
QT use qzxing to generate QR code
Kubernetes advanced training camp pod Foundation
VC下Unicode和ANSI互转,CStringW和std::string互转
Seckill system 3- product list and product details