gmsaas Commands

The --help/-h option is suitable for every gmsaas command. The --help/-h option provides supported commands, sub-commands, options, and quick explanations of what they do.

All commands documented here require gmsaas 1.14.1 or above. Versions prior to 1.14.1 have been yanked from PyPI and are no longer available.

Hardware Profiles

Hardware Profiles define virtual device hardware specifications, such as screen resolution and form factor. CPU and RAM may be limited by your current Genymotion SaaS plan. Hardware Profiles CPU and RAM may be limited by your current Genymotion SaaS plan. Contact us for custom configuration.

Create a Hardware Profile

<hwprofile_uuid> is printed.

Get Hardware Profile details

The Hardware Profile is formatted as a table. The Hardware Profile formatted output is shown as JSON output.

List Hardware Profiles

gmsaas
hwprofiles
list

The Hardware Profile list is formatted as a table. The Hardware Profile list formatted output is shown as JSON output.

Delete a Hardware Profile

Default output is JSON output.

Images

Images are virtual device Android OS disk images.

Clone an Image

<osimage_uuid> is printed.

Get Image details

The image is printed as a table.

List Images

gmsaas
osimages
list

The image list is formatted as a table.

Delete an Image

Default output is JSON output.

Recipes

Recipes are a combination of Hardware Profiles and Images.

Create a Recipe

Default output is JSON output.

Get Recipe details

The Recipe is printed as a table. Default output is JSON output.

List Recipes

Default output is JSON output. Recipe list is formatted as a table.

Delete a Recipe

Default output is JSON output.

Instances

Start an Instance

Creates and starts an instance based on the specified <recipe_uuid> recipe. The <name> parameter is the name you wish to give to the instance.

The command returns to shell once the instance is started. The command returns to shell once the instance is started unless the --no-wait option has been set.

--max-run-duration is the global timeout in minutes. Instances automatically stop once --max-run-duration is reached.

> Warning: Please note that you need to use the <instance_uuid> to refer to an instance when issuing commands via gmsaas. > <name> is only use as a tag for convenience.

<instance_uuid> is printed. Default output is JSON output.

Get Instance details

Instance information is formatted as a table. Instance information provides the ADB serial used if the instance is connected to ADB.

Default output is JSON output.

List Instances

Instances list is formatted as a table. Instances list provides the ADB serial used if the instance is connected to ADB.

If --quiet is set, only instance UUIDs will be displayed. Default output is JSON output.

Connect an Instance to ADB

Connects a running instance to ADB. The command returns to shell once ADB is connected.

If the --adb-serial-port <PORT> option is set, the instance will be connected to ADB on localhost:<PORT>. New in 1.16.0

The <instance_uuid> argument is now optional. If <instance_uuid> is omitted, the command connects the single ONLINE instance.

An error is raised if zero or more than one instance is ONLINE. Default output is JSON output.

<adb_serial> (URL:port) on which ADB is connected is printed.

Disconnect an Instance from ADB

Disconnects a running instance from ADB. If no <instance_uuid> is given, all currently connected instances are disconnected.

New in 1.16.0 The <instance_uuid> argument is optional since version 1.16.0.

When <instance_uuid> is omitted, all connected instances are disconnected. Default output is JSON output.

Save an Instance

Changes are not automatically saved. Any modification to a virtual device has to be saved manually through this command.

> Warning: The instance will be stopped in order to be saved.

Only Instances started from owned Recipes with owned Images can be saved with this command. Use the saveas command otherwise.

Default output is JSON output.

"Save As" an Instance

You can save an instance as a new custom recipe.

gmsaas
instances
saveas
<instance_uuid>
--osimage-name
<image_name>
--recipe-name
<recipe_name>

> Warning: The instance will be stopped in order to be saved.

Default output is JSON output.

Stop an Instance

> Warning: Instances launched with gmsaas will not stop until this command is issued, or it is stopped from the Web user interface. > If you forget to do so, your credit will be deducted as long as the instance is running and you may get extra charges.

Stops the specified instance. The command returns to shell once the instance is fully stopped unless the --no-wait option is set.

> Tip: To easily stop all your running instances, you can combine this command with --quiet or -q option and xargs. > For example:

Default output is JSON output.

No output.

Access an Instance display (gmsaas portal)

Copy to the clipboard a generated URL pointing on a local web page (gmsaas portal). The gmsaas portal displays the instances passed as parameters or all running instances.

Only running instances are displayed. gmsaas prompts you to confirm copying sensitive data, such as the token, to the clipboard unless --yes option is set.

The number of instances displayed in the portal is limited to 30. Paste the generated URL into your favorite web browser address bar to open the gmsaas portal.

Default output is JSON output.

Setting Up and Tearing Down ADB

The gmsaas tool uses an internal component called ADB Tunnel. ADB Tunnel enables secure ADB connections to instances.

If you encounter frequent failures with the gmsaas instances adbconnect command usually during intensive, parallel use of multiple instances, consider using the gmsaas adb start and gmsaas adb stop commands. These commands manage ADB connections more reliably instead.

Recommended flow for test runs

1. Install gmsaas 2. Configure the SDK path: gmsaas config set android-sdk-path <path> 3. Authenticate using your API token: gmsaas auth token <token> 4. Start the ADB stack before running your tests: gmsaas adb start 5. Run your test suite. 6. Stop the ADB stack after tests complete: gmsaas adb stop 7. Unauthenticate when finished: gmsaas auth reset

This workflow can help prevent connectivity issues by ensuring proper ADB environment during intensive usage.

Start ADB

This will start both ADB server and ADB Tunnel server. Default output is JSON output.

Stop ADB

This will stop both ADB server and ADB Tunnel server. Default output is JSON output.

Admin

Get Usage Report

Returns the usage report for the current organization. The report is broken down per user for the specified time period.

Default output is JSON output.