Skip to main content

Using Android Gateway

Android Gateway works with Eggplant Functional to automate tests on mobile devices running Android 5 (API level 21) and later. You can connect to Android devices from a local machine where the devices are connected via USB, or connect remotely to a computer that has connected Android devices. After you establish a connection, you can test against your Android devices using Eggplant Functional.


The information on this page is for Android Gateway 6.0 and later. If you use Android Gateway 5.6 or earlier, see Using Android Gateway 5.6 and Earlier.

Launching Android Gateway

On Windows, open the system tray at the bottom of the screen. Right-click the Android Gateway icon, then select Open Android Gateway.

Launching Android Gateway from the Windows 10 system tray

On Mac, click the Android Gateway icon in the menu bar at the top of the screen, then select Open Android Gateway.

Launching Android Gateway from the Mac menu bar

Android Gateway opens in a new tab in your default web browser at http://localhost:32000/dashboard. Android Gateway launches your default browser if it isn't already open.

Connecting to Devices

Establishing connections to Android devices in Android Gateway works the same way for all operating systems.

  1. Attach an Android device via USB to the machine where Android Gateway is running. When Android Gateway detects the device, the device's serial number and ports in use display in the UI.

  2. The Status displays as Off unless you have Autostart selected. If you don't have Autostart selected, click the play button () to start automation.

  3. In Eggplant Functional, open the Connection List. The Android device appears at the bottom of the list, and is identifiable by its serial number. Select the device and click Connect.

    Alternatively, you can click Add from the Connection List window to create a new connection to the device. If Android Gateway is running on the same computer as Eggplant Functional, enter either localhost or for the IP address, and the port listed under VNC Port in Android Gateway for the port. You also can create WebDriver connectionsto Android devices using the Connection List interface. See Using the Eggplant Functional Connection List for more information.

  4. Use the Connection List in Eggplant Functional to open the connection to your Android device.

When you've established a connection, the Eggplant Functional Viewer window displays the Android device screen. You can now capture images on the device and write scripts in Eggplant Functional, using the Android device as you would any other system under test (SUT).

You can connect to multiple Android devices simultaneously by following the above steps and choosing a different device from the list of detected devices for subsequent connections.

To terminate a connection, click the stop button in the Android Gateway UI.

Other Connection Considerations

You can make connections in Eggplant Functional with Android Gateway both from your local machine to a locally attached device as well as to a remote machine that has devices attached. The instructions above work for making both types of connections. To make a remote connection, you must ensure that Eggplant Functional is able to reach the IP address where Android Gateway is running.

Viewing Logs

From the main Android Gateway UI, click the three vertical dots, then select Console from the context menu to open the log for a connected device.

Open the Android Gateway console from the main UI

Logs are stored in different locations on different operating systems:

Windows: $HOME/AppData/AndroidGateway/Logs/

Mac: $HOME/Library/Logs/AndroidGateway/

Linux: $HOME/.AndroidGateway/Logs/