Mar 13, 2014

Use ADB over Wi-Fi without extra application or software

Image Source: http://techbeasts.com/wp-content/uploads/2013/08/Android-Developer2.png

Normally developers use USB cable to connect Android device with computer for debug and other purposes.


What are the problems with USB ?
1. You can not move around with device (some app require to move around for testing)
2. Cable damage
3. USB socket of Android device can be damage


What is solution of above problems ?
Normally  developers use ADB over USB but it is also possible to use ADB over Wi-fi. Following steps explain how to use ADB over Wifi


Prerequisites
Android device and computer should be connected in same network.  


Step 1: Connect Android device with USB cable to computer
Step 2: Use following command in terminal to make sure adb is running in USB mode.


$adb usb
restarting in USB mode
Connect to the device over USB.


Step 3: Execute following command in terminal to make sure adb identify/list gets connected with the device.


$adb devices


Step 4: Change adb mode from USB to tcpip using following command.


$adb tcpip 5555
restarting in TCP mode port: 5555


Step 5: Now, adb is running over TCP/IP mode, Let’s find IP address of Android device. Go to Settings in Android device -> About -> Status -> IP address. note down the IP address of connected Android Device.


Step 6: Use following command to connect ADB with IP address


$adb connect #.#.#.#
connected to #.#.#.#:5555


Step 7: Now adb is working over Wi-fi, You can remove USB cable from Android device.


Step 8: To confirm adb is working over Wi-fi and your device is still connect. you can use following command


$adb devices
#.#.#.#:5555 device


You’re now ready to go!, Enjoy ADB over Wi-fi.

Note: Use following command to change ADB mode to USB

$adb usb

7 comments:

  1. Neel patel5:33 PM

    hiii how can i do it in window?? when i write adb usb we got error :"'adb' is not recognized as an internal or external command,
    operable program or batch file." wt can i do?

    ReplyDelete
  2. kpbird9:12 PM

    Hello,

    Please check debug mode status in Setting,

    To access adb command you have two options

    1. open cmd / terminal and go to android sdk -> platform-tools , you will find adb there

    2. set up environment variable, check following post for the same

    http://stackoverflow.com/questions/13285670/how-to-add-android-tools-dir-to-windows-7-path

    ReplyDelete
  3. Priyanka5:53 PM

    Dofo

    ReplyDelete
  4. Ranbir2:24 PM

    Useless post...

    ReplyDelete
  5. Ranbir2:25 PM

    I tried many times...but no output.

    ReplyDelete
  6. kpbird11:07 AM

    here is original source http://developer.android.com/tools/help/adb.html#wireless
    It's working perfect.

    ReplyDelete
  7. This is great happy to know about this.

    Picreel

    ReplyDelete