Debug Programs on Android devices through WiFi

Source: Internet
Author: User

Remember that when developing applications on Palm OS in the early days, if you need to debug on a real machine, you have to connect to the computer through a dedicated base. With the popularity of USB, various dedicated cables and interfaces began to decline, and devices seemed to switch to USB overnight. Now wireless is the king, and simple is the best.

Android devices use USB and PC for communication debugging by default (some newer devices use TCP by default), which is obvious, open "Settings-> application-> Development", which also says "USB debugging.

To completely discard USB, please follow me step by step:

  1. Root device first. for developers, permissions are everything!
  2. Install a quicksshd or similar SSH service software, and use SSH to access the shell of the Android device through WiFi
  3. Run the ps command to check whether/sbin/adbd is running. This is the debugging service program responsible for communication with ADB. If this program is already running, run the stop adbd command to stop it first.
  4. Run the setprop service. ADB. tcp. port 5555 command to set system properties so that adbd runs in TCP mode. The listening port is 5555.
  5. Run the start adbd command to start the adbd service.
  6. Run the netstat command to check that port 5555 is already listening.
  7. Now return to the PC end and run the command ADB connect 192.168.1.101: 5555 (assuming the LAN address obtained through WiFi is 192.168.1.101). The successful connection information is: connected to 192.168.1.1011: 5555.
  8. Run the command ADB devices to view the device connected to the ADB. Normally, the device on the connection is displayed under List of devices attached: 192.168.1.101: 5555 device.

Success.

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.