[Android development FAQ-3] ADB debugging through WiFi

Source: Internet
Author: User

I. Principle:

1. Let the phone listen to a port of its own.

2. Connect the computer's ADB to this port.

Ii. Method 1:

1. Place your computer and mobile phone on the same wifi.

2. Run the "root" command on your phone. If you do not have the "root" command to download a 360 one-click root command, it is very convenient.

3. Download wifi_adb (My test is successful) or adb_wireless (My test is not successful) on the mobile phone to start running.

4.open the terminal window, enter the directory where adb.exe is located (under the SDK/platform-tools directory), and enter ADB connect. b. c. d.. b. c. D is the IP address of the mobile phone, which is displayed in wifi_adb.

5. Normal operation in eclipseProgramYou can debug it through WiFi.

3. Method 2:

1. Same method 1

2. Same method 1

3. Download a shell. There are many online apps.

 
Su // obtain the root permission setprop service. ADB. TCP. port 5555 // set the listening port, which can be customized. For example, 5554,5555 is the default stop adbd // disable adbdstart adbd // restart adbd

4. same method 1, but note that if you set the port to a port other than 5555 in step 3, you need ADB connect. b. c. d: E, where E is the new port number.

5. Same method 1.

6. If you want to disable it, change 5555 in step 3 to-1 and execute it again.

Iv. Existing Problems

After the above settings, you will find that you can successfully use WiFi for ADB debugging. However, there is still a problem here, that is, WiFi debugging is prone to disconnection, and connection needs to be re-performed for disconnection, which is difficult to use.

The reason is that the system will put WiFi into sleep mode to save time. That is to say, WiFi will not be online after a while, so how can we solve this problem?

1. Download WiFi profile, http://download.csdn.net/detail/shishengshi/5624417

2. decompress the package and copy tiwlan. ini to the/system/etc/WiFi directory of the mobile phone. if it already exists, replace it. The premise is that you still need root.

3. there are many ways to copy, you can use USB copy directly; if there is no USB, you can use the WiFi management function of the Xiaomi folder to copy; if not, you can use the File explorer in ddms in eclipse to copy the file.

4. Close and re-enable wifi.

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.