Wireless debugging mode for Android apps through WiFi

Source: Internet
Author: User

The data cable is lost and I don't want to spend any money to buy it. I checked it online. The Android mobile phone can debug the program through WiFi. That's great. I did it myself. Although the data on the Internet is very detailed, but there are still some problems. Record them and refer to them next time.

1. First, let the Android phone listen to the specified port:
This step requires the use of shell, so there must be a terminal simulator on the mobile phone, but there are a lot of online, just find one, in turn into the following lines:

Su // get root permission

Setprop service. ADB. tcp. port 5555 // set the listening port, which can be customized. For example, 5554,5555 is the default port.

Stop adbd // close

Adbdstart adbd // restart adbd

2. Connect the phone to WiFi and ensure that the phone and the computer are connected to the same network. Write down the IP address of the phone, which is assumed to be a. B. C. D.

3. Open a command prompt on your computer and enter the following command:

ADB connect. b. c. d // if you do not enter the port number, the default value is 5555. The custom port number must be specified, corresponding to the custom port number in step 1, for example:. b. c. d: 5554

4. After the configuration is successful, the command line displays "connected to A. B. C. D", and then you can debug the program, ^ _ ^.

To disable WiFi debugging, you only need to set the port number to-1 and repeat the first step.

 

In this debugging method, the mobile phone end has a dedicated APK program. If you need it, you can download it at http://download.csdn.net/detail/wuzuokun/4648891.

Related Article

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.