当前位置:网站首页>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 method of parameter estimation of user-defined function in MATLAB
- Custom annotation
- The wonderful use of do{}while()
- Unity功能——Unity离线文档下载及使用
- 【日常训练】395. 至少有 K 个重复字符的最长子串
- 视觉上位系统设计开发(halcon-winform)-6.节点与宫格
- Introduction series of software reverse cracking (1) - common configurations and function windows of xdbg32/64
- CString的GetBuffer和ReleaseBuffer使用说明
- Baidu AI Cloud helps Shizuishan upgrade the smart health care model of "Internet + elderly care services"
- Puppet自动化运维排错案例
猜你喜欢

Redis lock Optimization Practice issued by gaobingfa

视觉上位系统设计开发(halcon-winform)-5.相机

How are integer and floating-point types stored in memory

【云原生训练营】模块七 Kubernetes 控制平面组件:调度器与控制器

Srs4.0+obs studio+vlc3 (environment construction and basic use demonstration)

Popular understanding of ovo and ovr

子类隐藏父类的同名函数

Kubernetes带你从头到尾捋一遍

WinDbg analysis dump file

Seckill system 3- product list and product details
随机推荐
Using multipleoutputs to output multiple files in MapReduce
Redis主从、哨兵、集群模式介绍
Enable multi-threaded download of chrome and edge browsers
Summary of concurrent full knowledge points
视觉上位系统设计开发(halcon-winform)
Driver and application communication
Jvm-05-object, direct memory, string constant pool
Introduction to redis master-slave, sentinel and cluster mode
《微服务设计》读书笔记(下)
C language brush questions ~leetcode and simple questions of niuke.com
《微服务设计》读书笔记(上)
[cloud native training camp] module 7 kubernetes control plane component: scheduler and controller
UnityShader——MaterialCapture材质捕捉效果 (翡翠斧头)
QT use qzxing to generate QR code
Popular understanding of random forest
Atlas atlas torque gun USB communication tutorial based on mtcom
Jvm-04-runtime data area heap, method area
Didi off the shelf! Data security is national security
redis缓存穿透,缓存击穿,缓存雪崩解决方案
Get the executable path through the process PID (queryfullprocessimagename)