Run/install/debug applications over WiFi

  1. Make sure device is connected to wifi.

  2. Connect your device through usb to your machine.

  3. Then navigate to directory /Android_SDK_HOME/platform-tools/ , Where lies your adb commands.

  4. check your device is connected through usb or not, by using command “./adb devices
    e.g :
    “Deepaks-Mac-mini:platform-tools deepak$
    ./adb devices

    List of devices attached

    c1607d708873b11 device”

  5. Then use command “./adb tcpip portNo”,give any unused port no. prefer 5555,5556 etc
    e.g
    Deepaks-Mac-mini:platform-tools deepak$
    ./adb tcpip 5555

    above command must give following result

    “restarting in TCP mode port: 5555”

  6. Now your are ready to connect your device through wifi, Disconnect device, connected through usb.

  7. Use following command to connect “./adb connect [DeviceIP]:[PortNo]”
    e.g
    “Deepaks-Mac-mini:platform-tools deepak$
    ./adb connect 192.168.10.185:5555
    above command must give following result


    “connected to 192.168.10.185:5555”

  8. Now you are ready toInstall/ Debug / View Logs(logCat) of Android Apps on devices through eclipse over wifi.

  9. Go to Eclipse and install your app.

  10. Device now can be used by any developer from any point in office toinstall Applications and debug, Device will be online for the person who has used “./adb connect deviceIP:portNo” command.

  11. To make it online(used to) for other developer, previous one must disconnect from the device
    with command “./adb disconnect deviceIP:portNo”and other must use “./adb connect deviceIP:portNo” command to connect to device and start using.

    Note :-

  1. When device is in TCPIP Mode with no one is connected to device, and you have connect the device through usb then device will appear offline in Android Device Manager/Chooser.

  2. When device is in TCPIP Mode with someone is connected to device, and you have connect the device through usb then device will not be shown in list of connected devices until the other person disconnects the devices and switched device back to usb mode.


Switch device back to usb mode :-

  1. Use command “./adb usb” , but make sure you are connected to deviceeg:
    Deepaks-Mac-mini:platform-tools deepak$ ./adb usb

    restarting in USB mode

Troubleshooting :-

  1. If you are unable to disconnect from device and get following error message
    eg:
    Deepaks-Mac-mini:platform-tools deepak$./adb disconnect 192.168.10.187:5555

    No such device 192.168.10.187:5555

    or “unable to disconnect device”, then try connect command to device again and on getting connected message use the disconnect command.

  2. If you are still not able to disconnect the device then use following flow of commands:
    eg:
    Deepaks-Mac-mini:platform-tools deepak$ ./adb kill-server

    Deepaks-Mac-mini:platform-tools deepak$ ./adb start-server

    adb server is out of date. killing…

    * daemon started successfully *


    Deepaks-Mac-mini:platform-tools deepak$./adb connect 192.168.10.187:5555

    connected to 192.168.10.187:5555

    Deepaks-Mac-mini:platform-tools deepak$./adb disconnect 192.168.10.187:5555
    after using above commands other’s can connect to device by using connect command.(Note : devices is still in TCPIP MODE).

  3. If you are not able to switch device back to “USB MODE ” to use it through usb cable.

    Follow the following flow of commands:-
    eg:-

    Deepaks-Mac-mini:platform-tools deepak$ ./adb kill-server


    Deepaks-Mac-mini:platform-tools deepak$./adb start-server

    adb server is out of date. killing…

    * daemon started successfully *


    Deepaks-Mac-mini:platform-tools deepak$./adb connect 192.168.10.187:5555

    connected to 192.168.10.187:5555

    Deepaks-Mac-mini:platform-tools deepak$./adb usb

    restarting in USB mode