[Tutorial] How to run tests on real Android device remotely through Wi-Fi

1. Connect device to computer via USB.
2. Make sure device and computer are connected to the same Wi-Fi.
3. Run this command to restart adb and make it work over tcpip:

adb tcpip 5555

4. Disconnect device
5. Get IP address of your phone (“Settings” -> Wifi -> “Your connected network” -> Your IP address")
6. Run this command to connect adb to your device over Wi-Fi using IP address:

adb connect <your phones ip address>

7. Verify, that adb works remotely:

adb devices

8. Run tests over Wi-Fi!

Source: http://qaautomationworld.blogspot.com/2014/06/appium-executing-test-throgh-wi-fi-on-real-devies.html

14 Likes

this is sweet. one small typo though. “adb device” should be “adb devices”

You are right, thanks! Fixed :smile:

Hi Kirill
Thanks for sharing the info :-)

Hi @kirill,Have u ran an appium test wirelessly on iPhone device?

@jonahss Any idea if this can be achieved?As the Xcode doesn’t provide search service

I haven’t seen anything saying it can be done on iOS, but I’m not certain :wink:

1 Like

Yeah, I think the same way as well.

hi @kirill

It is possible to connect an android device from different network ?

I get error when i follow above steps: unable to connect to 172.26.0.127:5555: cannot connect to 172.26.0.127:5555: No
connection could be made because the target machine actively refused it. (10061)
Any idea how can i solve this?

1 Like

I am getting the same error as well.

unable to connect to 192.168.5.95:5555: cannot connect to 192.168.5.95:5555: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (10060).

NEED HELP here!

easy to folow, it works like a charm!

i got the same error

may be your system firewall is blocking the incoming connection from device , please check once the Inbound and outbound rule for the opened port

may be your system firewall is blocking the incoming connection from device , please check once the Inbound and outbound rule for the opened port

Thanks a lot for the info!! It works

Hi
I have tried to connect my android device over wifi
Able to connect using the adb commands but when i run the test script in eclipse the appium server automatically kills my adb server saying adb server out of date
After that the appium server is not able to detect my device.
Can any one help

1 Like

Thanks @kirill for this information. :slight_smile:

Worked so easily. Thanks!

Same problem is happening with me. Any idea how to avoid this ?

There is suppressKillServer capability, which prevents adb server from being killed by Appium