How to connect your Android device via WiFi

Source: Internet
Author: User

[Transfer from]http://blog.csdn.net/kuanxu/article/details/7444874

Recently, because you want to debug your code on another Android device, check its log on your native PC. Two machines away from the relatively far, can not be directly connected with the USB, so find a lot of information on the Internet, the most find using the ADB Connect method to solve the problem. The resolution process is as follows:

1, verify that the native PC does not have any ADB device connections, including the simulator and USB connection, i.e. using

After the "ADB devices" command, the list is displayed as empty, which is easier to knock the command back

2. Connect the remote Android device to WiFi and view its IP address: Set-〉 wireless or network---〉wlan settings-〉 Press the Menu key and select the Advanced option---〉IP address such as 192.168.2.11

3, Ping 192.168.2.11 is performed under the native Command command, if the ping succeeds, the description can be connected

4, execute ADB connect 192.168.2.11

If the connection appears to be successful, you can continue with the following actions, if unsuccessful, as shown:

Unable to connect to 192.168.2.11:5555

There may be a problem with the device listening port, you can perform the following command on the phone terminal:

Su//Get root permissions

SetProp service.adb.tcp.port 5555//Set the listening port, the port can be customized, such as 5554,5555 is the default

Stop ADBD//off ADBD

Start ADBD//Restart ADBD

The download program of the mobile terminal can be downloaded here: http://as.baidu.com/a/item?docid=437072506&f=web_alad_1

The prerequisite for this is that your phone can be rooted, and if you do not have root permissions, you still cannot perform the SU

There are many ways to get root permissions, different phone models, access methods, there are many ways, there is no longer detailed (for debugging developers, to get root privileges is very necessary)

5, the ADB connect IP can be successfully executed after the original USB connection of all commands, such as adb install, adb logcat.

The following is a common command for ADB

1. Open ADB Service

ADB start-server

2, close the ADB service

ADB kill-server

3. View Device

ADB devices

4, install the software

ADB install xxx.apk

5. Uninstalling the Software

ADB uninstall xxx.apk

6. Enter the device or simulator

ADB Shell DeviceName

If there is currently only one device, devicename can also be empty

7. Send files from the computer to the device

ADB push Pcfilepath DevicePath

8. Copy files from device to PC

ADB pull DevicePath Pcpath

9. View Bug Reports

ADB bugreport

10, get the device sequence ID

ADB get-product

11, view Log

ADB logcat

How to connect your Android device via 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.