Android 11 newly discovered wireless debugging

For a person who loves programs but has poor learning ability, spend a whole morning ~wireless debugging~. In the end, I successfully lost the usb data cable and connected to the device, hahaha. Well, without further ado, please check the following wireless debugging steps:

first step:  

  •   The Android phone system must be ≥11 (Phone-->Settings->About Phone-->Android Version 11)

  • Android SDK Tools for Android Development Tools requires ≥ 30.0.0  

       Confirmation method 1: Enter adb --version on the command line 

       Confirmation method 2: Android studio development tool view

                     

Step 2: Android phone and computer must be connected to the same WiFi network;

           Connection steps: ① Start the developer mode (phone --> settings --> about phone --> click the version number continuously until prompted to enter the developer mode);

                              ② Enable the wireless debugging option (phone --> settings --> system --> advanced --> developer options --> wireless debugging)

                            ③ Asking to allow wireless debugging on this network? dialog box, click Allow

                            ④ Select to pair the device with a pairing code . Note down the pairing code, IP address and port number displayed on the device (see picture). ( A new one will be generated every time you click to pair the device with the pairing code )


                               ⑤On the computer, open a terminal and enter android_sdk/platform-tools(注:这个输入自己sdk的路劲)

 cd /Users/admin/Library/Android/sdk/platform-tools 

                               ⑥Run ip  adb pair ipaddr:port (adb pair ip地址:端口)(and port Click Wireless Debugging --> Click Use the pairing code to pair the device to get it (a new one will be generated every time you click)

When the system prompts Enter pairing code:, enter the pairing code you obtained in step ④. You'll see a message (Successfully paired to 192.168.101.3:43041 [guid=adb-8B9X164JX-RGJzeN]) that your devices have been successfully paired.

adb pair 192.168.101.3:37827

Enter pairing code: 041081

Successfully paired to 192.168.101.3:37827 [guid=adb-8B9X164JX-RGJzeN]

                          ⑦Run adb connect 192.168.101.3:40377 (note: use the IP address and port under wireless debugging here) refer to the figure below

1 adb connect 192.168.101.3:40377
2 connected to 192.168.101.3:40377

After the connection is successful, it will prompt that it has been connected to the wireless debugging in the notification bar

The development tool Logcat will also display connected device information

Feel free to point out any questions and suggestions! ! !

Guess you like

Origin blog.csdn.net/u010207898/article/details/118381969