Android Devices
The Eggplant Gateway for Android runs on Windows, Linux and macOS machines and supports testing on real, physical Android devices over Wi-Fi and USB.
Enabling automation on your Android device
- Enable developer mode on your Android device.
- Go to Settings and search for Build Number (or MIUI Version on XIAOMI devices) in the search pannel.
- Tap the Build Number text at least 6 times, until the You are now a developer message appears.
- Configure USB Debugging.
- Go to Settings > Developer Options and turn on USB Debugging in the Debugging section. When asked to confirm, tap OK.
- Connect your Android device to your PC using a USB cable.
- A popup Allow USB Debugging will appear on your device, tap Always allow from this computer and tap OK.
- In order to allow the
SetDeviceLocation
command to work when necessary, you will need to enable Mock Location on your Android device.- Go to Settings > Developer Options and turn on Mock Locations.
Creating a connection
To create an Eggplant Gateway for Android connection, run the following command:
epgw add android
--name <name> (REQUIRED)
--serial <serial>
--adbPath <path>
--maxFps <maxFps>
--bitRate <bitRate>
--maxSize <maxSize>
--stayAwake <false>
For example, epgw add android --name android
The available options are:
Key | Description |
---|---|
name | The connection name |
serial | The Android device serial. You can omit this parameter if exactly one Android device is connected to your computer. |
adbPath | The ADB executable path. |
maxFps | The max fps set for scrcpy. [default: 60] |
bitRate | The bit rate set for scrcpy. [default: 8000000] |
maxSize | The max size set for scrcpy. [default: 0] |
stayAwake | The stay awake option set for scrcpy. [default: False] |
help | Show help and usage information |
Connecting to Eggplant Functional
Follow these steps to start an emulator through Eggplant Functional:
- Run
epgw vnc <name>
, where name is the name of your Gateway connection. For example,epgw vnc android
.- The Eggplant Gateway will start:
- A VNC server at port 5900
- A WebDriver server at port 5000
- The Eggplant Gateway will start:
- Start Eggplant Functional and manually add your device to the connection list.