Android ADB remote debugging, connected through wifi, has similar effect to usb connection, and the app installation is also very fast, and logs can be printed

1. Please make sure that the mobile device and the computer are in the same local area network, and the developer mode of the mobile device is turned on, and the usb debugging is turned on in the developer option of the mobile device, and remote debugging is turned on. And requires root privileges.
Open these two settings in the simulator, please see the content of the red box in the figure below, you need to open these two settings
insert image description here

2. It is necessary to configure the adb environment variable of the computer.
By opening the setting page of android studio, as shown in the figure below, find the path of the sdk. This path will be used later, which is the content of the red box.
insert image description here
Then we go to this path C in the file management: \Users\QHC\AppData\Local\Android\Sdk\platform-tools, which is the content in the picture, please see the picture, the adb program in the red box is the command we need to use in the cmd command line window in the future, put adb Copy the file path where it is located
insert image description here
3. Open the environment variable
insert image description here
as shown in the figure below, select the content in the red box, click Edit
insert image description here
and then it will appear like this, select New,
insert image description here
this is my newly created path, you can paste the adb path you just copied into it up. Then make sure all the way.
insert image description here
4. Then open the cmd command line window and directly enter adb connect 192.168.43.149:5555, and the following figure will be displayed, indicating that the connection is successful. At this time, you can debug the app program in android studio. If you need to disconnect the device, enter adb disconnect
insert image description here
5. The Android adb connection cmd reports an error cannot connect to 192.168.137.137:5555: The connection attempt failed because the connected party did not reply correctly after a period of time or the connected host did not respond. (10060). Please see this article I wrote.

https://blog.csdn.net/qq_36570506/article/details/131256947

Guess you like

Origin blog.csdn.net/qq_36570506/article/details/131257339