Connect your phone with an IP address using the ADB command

Source: Internet
Author: User

Prerequisite: The computer has been connected via USB cable and the driver has been successfully installed.

The ADB connects to the phone for debugging in two ways, one using a USB cable and the other using wireless WiFi.

First connection using USB cable

1. Enable USB debugging on the phone

2. Open the DOS command window, enter CD D:\Android\sdk\platform-tools return

3. Re-enter the ADB devices, and you can see your connected device.

PS: When you cannot see your device, check whether USB debugging on your phone is turned on, or if you have a mobile phone driver installed on your PC.

The second use of wireless WiFi connection

First, learn a little bit about the underlying knowledge:

The Android system is running a service (ADBD), which responds to and manages the ADB command connection on the computer side, which listens to one of the USB connections or networks at startup based on the configuration of the phone. The configured properties are: Service.adb.tcp.port, which is the listening network port

    • The value of the above attribute > 0:adbd will listen to the network corresponding port (typically 5555)
    • The value of the above attribute <=-1:ADBD will listen for USB

Next is the connection step:

Command line input: ADB connect (IP): 5555

Tip: Unable to connect to (IP): 5555

Workaround:

1) Connect the phone to the PC and execute the following command: ADB tcpip 5555

Success prompt: Restarting in TCP mode port 5555

Then disconnect the USB

Error tip: Error:device not found

Check whether USB debugging on your phone is on, or if your PC has a phone driver installed.

2) then execute ADB connect (IP): 5555, this time should be able to connect successfully

Success prompt: connected to (IP): 5555

After debugging is complete, enter the following command to disconnect:

ADB disconnect (IP): 5555

Connect your phone with an IP address using the ADB command

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.