当前位置:网站首页>ADB common entry instructions
ADB common entry instructions
2022-07-18 23:08:00 【Software testing】
ADB What is it? ?
ADB, namely Android Debug Bridge It is a kind of simulator or connected Android Command line tool for device communication , It can provide convenience for the operation of various devices , Such as installation and commissioning of applications , And to provide for Unix shell( It can be used to run various commands on simulators or connected devices ) The interview of . Can be in Android SDK/platform-tools Find adb Tools .
ADB What's the role ?
ADB yes Android SDK A tool in the library , With this tool, you can directly operate and manage Android Simulator or real Android equipment . Its main functions are :
Run on the device Shell command ;
Will local APK The software is installed into the simulator or Android equipment ;
Manage scheduled ports on the device or phone emulator ;
Copy or paste files on the device or phone simulator .
ADB It's a client - Server program program , There are three components :
client : This component sends commands . The client runs on the development computer . You can send adb The command calls the client from the command line terminal .
daemon : This component runs commands on the device . The daemon runs as a daemon on each emulator or device instance .
The server : This component manages the communication between the client and the daemon . The server runs as a background process on the development computer .
ADB Command syntax
adb The basic syntax of the command is as follows :
#@ WeChat official account : Software testing tips dao
#@Time:2022/07/16
adb [-d|-e|-s ]
Single device / Simulator connection
If there is only one device / When the simulator is connected , Can be omitted [-d|-e|-s ] This part , Use it directly adb .
Multiple devices / Simulator connection

On multiple devices / When the simulator is connected, it is more commonly used to -s Parameters ,serial-number Refers to the equipment serial number of the equipment , Can pass adb devices Command acquisition .
ADB Common commands
Basic commands
see adb Version information for
#@ WeChat official account : Software testing tips dao
#@Time:2022/07/16
adb version
start-up adb
#@ WeChat official account : Software testing tips dao
#@Time:2022/07/16
adb start-server
stop it ADB
#@ WeChat official account : Software testing tips dao
#@Time:2022/07/16
adb kill-server
With root Permission to run adb
#@ WeChat official account : Software testing tips dao
#@Time:2022/07/16
adb root
Appoint adb server The network port of
#@ WeChat official account : Software testing tips dao
#@Time:2022/07/16
adb -P <port> start-server
Query connected devices / Simulator list
#@ WeChat official account : Software testing tips dao
#@Time:2022/07/16
adb devices
Device connection management
USB Connect
#@ WeChat official account : Software testing tips dao
#@Time:2022/07/16
adopt USB Connect for normal use adb The following steps are required :
1. Confirm that the hardware status is normal ( Include Android The device is in normal power on state ,USB The connecting wires and various interfaces are in good condition ).
2. Android Device developer options and USB Debug mode is on ( Can be in 「 Set up 」-「 Developer options 」-「USB debugging 」 open USB debugging ).
3. Confirm that the driving state of the equipment is normal ( install ADB The driver ).
4. adopt USB After connecting the computer and equipment, confirm the status .
5. adopt adb devices Command to check the device connection .
WLAN Connect ( need USB Line )
#@ WeChat official account : Software testing tips dao
#@Time:2022/07/16
With the help of USB adopt WiFi Connect for normal use adb The following steps are required : Operation steps :
1. take Android Equipment and to run adb Your computer is connected to the same WiFi.
2. Pass the device and computer through USB Wire connection ( It can be done by adb devices Command to check the device connection ).
3. adopt adb tcpip 5555 Command the device to 5555 Port listening TCP/IP Connect .
4. To break off USB Connect .
5. Find the device IP Address ( Can be in 「 Set up 」-「 About mobile phone 」-「 State information 」-「IP Address 」 see IP Address ).
6. adopt adb connect <device-ip-address> Command to use IP The address will be Android The device is connected to the computer .
7. adopt adb devices Command to check the device connection .
8. After use, you can pass adb disconnect <device-ip-address> Command to disconnect the wireless connection .
WLAN Connect ( No need USB Line )
#@ WeChat official account : Software testing tips dao
#@Time:2022/07/16
notes : need root jurisdiction . Don't use USB adopt WiFi Connect for normal use adb The following steps are required :
1. stay Android A terminal simulator is installed on the device ( It can be done by Terminal Emulator for Android Downloads download ).
2. take Android Equipment and to run adb Your computer is connected to the same WiFi.
3. open Android Terminal simulators on devices , Run the command in sequence :
su
setprop service.adb.tcp.port 5555
4. Find the device IP Address ( Can be in 「 Set up 」-「 About mobile phone 」-「 State information 」-「IP Address 」 see IP Address ).
5. adopt adb connect <device-ip-address> Command to use IP The address will be Android The device is connected to the computer .
6. adopt adb devices Command to check the device connection .
WiFi The connection becomes USB Connect
#@ WeChat official account : Software testing tips dao
#@Time:2022/07/16
adb usb
The house needs to be built layer by layer , Knowledge needs to be learned at one point one . We should lay a good foundation in the process of learning , More hands-on practice , Don't talk much , The last dry goods here ! I stayed up late to sort out the stages ( function 、 Interface 、 automation 、 performance 、 Test open ) Skills learning materials + Practical explanation , Very suitable for studying in private , It's much more efficient than self-study , Share with you .
Get off w/x/g/z/h: Software testing tips dao
Typing is not easy , If this article is helpful to you , Click a like, collect a hide and pay attention , Give the author an encouragement . It's also convenient for you to find it quickly next time .
边栏推荐
- mysql忘记密码重置
- Leetcode 49. Alphabetic heterotopic word grouping
- How to deal with time series event data? [doctoral thesis of Munich University of technology] neural time series point process (ntpp): continuous time event data modeling
- 个人做海外社交媒体还有前景吗?有好的建议吗?
- Sklearn linear regression completes the fitting of multiple term function and sine function
- Is there any prospect for individuals to do overseas social media? Any good suggestions?
- Original Rexroth proportional valve 4wrba10w64-2x/g24n9z4/m
- 深入剖析斐波拉契数列
- Program analysis and Optimization - 11 multi branch analysis
- Openstack related blog
猜你喜欢

10 minutes to customize the pedestrian analysis system, detection and tracking, behavior recognition, human attributes all in one

Leetcode 47. Full arrangement II

Servo valve moogd634-374c

Private domain operation is very popular. Is private domain operation suitable for all enterprises?

基于多数据源零代码同时生成多个数据库CRUD增删改查RESTful API接口——MySql,PostgreSql,Oracle,Microsoft SQL Server多数据源

C # network application programming, experiment 7: asynchronous programming practice

关于产品 | 要怎么进行产品规划?

20220714 adapt openharmony-v3.1-beta to aio-3568j (compile builderoot)

时序事件数据怎么处理?【慕尼黑工业大学博士论文】神经时序点过程(NTPP): 连续时间事件数据建模

单元测试界的高富帅,Pytest框架 (完) 测试报告篇
随机推荐
微信小程序--》小程序简介与工具安装配置
2022.7.15-----leetcode. five hundred and fifty-eight
Overview of multimodal processing technology under data constraints
Deepmind's latest 114 page report "emerging barter trade behavior in Multi-Agent Reinforcement Learning"
Leetcode -- intersection of two arrays 2
【百度飞桨】手写数字识别模型部署Paddle Inference
开发到底要不要转行软件测试?一篇足以 最全方位分析
What if the work of product evaluators is repetitive and cumbersome? Can it be automated?
3D point cloud course (II) -- nearest neighbor problem
Cloud native: docker's practical experience (IV) deploying redis three master and three slave clusters on docker
(post game supplement) (great DFS) k - counting time
10分钟自定义搭建行人分析系统,检测跟踪、行为识别、人体属性All-in-One
Problem solving -- > online OJ (16)
10 minutes to customize the pedestrian analysis system, detection and tracking, behavior recognition, human attributes all in one
多线程应用
Can't go on, mend the foundation -- C thread develops output string program
面试官:说一下你工作中发现的最有价值的bug
Bigdata 作业 第14&15周
NASA首次拍到宇宙大爆炸后一瞬间的清晰照片
【无标题】