Android Development Supplements (a) connect adb with Wi-Fi

Source: Internet
Author: User

You can connect to your Android device with Wi-Fi via a standard TCP/IP connection.

This is especially useful when developing applications that monitor USB-related events, because USB connections can interfere, such as USB connection/disconnection events.

The first thing to do is to connect your Android device and computer with a USB cable as usual.

Also make sure that your computer and device are connected to the same Wi-Fi.

Next go to the IP address of the device, open setting->wi-fi->advanced (Set->wi-fi-> Advanced) page, the bottom of the list will show the current Wi-Fi IP address

Run the following command at the terminal:

$ ADB devices//Verify that the device already belongs to debug mode

List of devices attached

0070015974D30E4B Device

$ adb tcpip 5555//restart ADB daemon in TCP/IP mode and then listen on 5555 ports (default port for ADB)

$ adb Connect 192.168.1.104//Use the ADB service on your computer to connect the IP address on your device (using the default 5555 port)

$ ADB devices//Verify that computers and devices have been successfully connected via TCP/IP

List of devices attached

192.168.1.104:5555 Device

Next you can unplug the USB cable and develop it as usual with the IDE

The ADB daemon will remain in TCP/IP mode until the device restarts, or if the ADB USB is running, the command restarts the USB daemon

Note : Not all devices support Wi-Fi connectivity. Similarly, the communication performance under a Wi-Fi connection can be worse, which can be cumbersome when you need to deploy a larger application.

Excerpt from the "Android programming Combat"

Android Development Supplements (a) connect adb with Wi-Fi

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.