当前位置:网站首页>Connecting mobile phone with ADB

Connecting mobile phone with ADB

2022-07-07 09:17:00 Three thousand lanterns


Preface

ADB Full name Android Debug Bridge, Android debug Bridge ( The purpose is to debug the bridge ).
With this tool, you can directly operate and manage real android Cell phones or android Simulator ;


adb Download address :https://www.onlinedown.net/soft/578131.htm

One 、adb download

1、adb Download address :https://www.onlinedown.net/soft/578131.htm
2、adb download 、 After decompression, you can directly use . No installation required .
 Insert picture description here
3、 Environment configuration ( Any path can be used adb command )
step : Enter... In the search box on the left side of the computer : environment variable -----> Edit system variables ----> Create and add the storage path in the computer ----->cmd---->adb verion-----> Display the specific version number , prove adb The tool was downloaded successfully .
 Insert picture description here
 Insert picture description here

Two 、adb Connect the phone

1. Download mobile assistant (360 Mobile phone assistant 、 Pea pods, etc )

adb When the direct connection fails , You can install the drive first , Make sure your phone and computer can be connected , Try again adb Command connection .
1、 Both computer and mobile terminals need to download 360 Mobile phone assistant
2、 Try after downloading , The connection of computers and mobile phones under the same intranet .
3、 After successful connection , Proceed again adb Control the connection of mobile phones .
 Insert picture description here

2.USB Connect

For the first time to use adb Connect , Generally, you need to use it first usb After connection , Can be used wifi Connect .
USB Connection steps :
1、 mobile phone : Set up ----> More Settings ----> Developer options ---->USB debugging
notes : If the developer option is not found in the settings , Can pass Set up -----> About mobile phone -----> Click on the straight “ Version number ” many times .
2、 There are drivers on both mobile phones and computers (360 Assistant, etc ), And use USB The cable is connected ;
3、 The computer :cmd Enter the command window :adb devices
4、 If the connection is successful, the device number and status will be displayed .
As shown below ( Example ):

C:\Users\yx>adb devices
List of devices attached
9f6777a8        device

3.WiFi Connect

1、Android The device should be connected with the computer WIFI;
2、 Mobile phones and computers for the first time wifi Connect , You need to use it first usb Connection steps ;
3、wifi To connect, you need to know the phone ip, Can pass adb Command query or check on your mobile phone

  • abd Command query (1) Query statement :adb shell ifconfig wlan0(2)IP:inet addr:192.168.100.55

adb Command query ip:

C:\Users\yx>adb devices
List of devices attached
192.168.100.55:5555     device


C:\Users\niuyx>adb shell ifconfig wlan0
wlan0     Link encap:UNSPEC    Driver icnss
          inet addr:192.168.100.55  Bcast:192.168.100.255  Mask:255.255.255.0
          inet6 addr: fe80::9aa3:f1a:5911:28a9/64 Scope: Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:730184 errors:0 dropped:0 overruns:0 frame:0
          TX packets:268237 errors:0 dropped:1 overruns:0 carrier:0
          collisions:0 txqueuelen:3000
          RX bytes:748807840 TX bytes:36050458

  • Mobile inquiry IP Long press wifi, Click to enter ,IP Set to 「 static state 」, You can see IP Address
     Insert picture description here
    4、 adopt ip Connect the phone , And confirm the connection status , As long as it is device Talent .
    command :adb connect ip Address

As shown below ( Example ):

C:\Users\yx>adb connect 192.168.100.55
connected to 192.168.100.55:5555

C:\Users\yx>adb devices
List of devices attached
192.168.100.55:5555     device

notes :adb devices There may be three output states

  • offline The device did not connect successfully or did not respond ;

  • device The device is connected ;

  • no device No equipment / Simulator connection .

summary

First connection , How easy offline. Make sure your phone 、 Computers have drives ;IP The address is correct .

原网站

版权声明
本文为[Three thousand lanterns]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130626428471.html