gmsaas Commands

The --help/-h option is suitable for every gmsaas command. It will provide you with all the supported commands, sub-commands, options, and a quick explanation of what they do.

Hardware Profiles

Create a Hardware Profile

Hardware Profiles define virtual device hardware specifications, such as screen resolution and form factor.

gmsaas hwprofiles create <name> \
[--width INTEGER] \
[--height INTEGER] \
[--density INTEGER] \
[--form-factor PHONE|TABLET] \
[--navigation-bar]

Default output: JSON output.

{
  "hwprofile": {
    "uuid": "3aa57c4c-1372-4d82-8405-2ab668805b3c",
    "name": "test",
    "form_factor": "PHONE",
    "cpu_count": 2,
    "ram_size": 2048,
    "data_disk_size": 16384,
    "source": "a@b.c",
    "display_settings": {
      "hw_navigation_keys": true,
      "displays": [
        {
          "width": 768,
          "height": 1280,
          "density": 320,
          "screen": "768 x 1280 dpi 320"
        }
      ]
    }
  },
  "exit_code": 0,
  "exit_code_desc": "NO_ERROR"
}

Get Hardware Profile details

gmsaas hwprofiles get <hwprofile_uuid>

The Hardware Profile formatted as a table.

UUID                                   NAME   DISPLAY  SOURCE
3aa57c4c-1372-4d82-8405-2ab668805b3c   test   768 x 1280  dpi 320   a@b.c

List Hardware Profiles

gmsaas hwprofiles list

The Hardware Profile list formatted as a table.

UUID                                   NAME       DISPLAY   SOURCE
e104f058-b291-4764-8e0d-d9ff78a41192   Custom     Phone     genymotion
c65db329-511a-4c2a-9761-c7259649e8c7   Custom     Tablet    genymotion

Delete a Hardware Profile

gmsaas hwprofiles delete <hwprofile_uuid>

---

Images

Clone an Image

gmsaas osimages clone <base_osimage_uuid> <name>

Get Image details

gmsaas osimages get <osimage_uuid>

List Images

gmsaas osimages list

Delete an Image

gmsaas osimages delete <osimage_uuid>

---

Recipes

Create a Recipe

gmsaas recipes create <hwprofile_uuid> <osimage_uuid> <name>

Get Recipe details

gmsaas recipes get <recipe_uuid>

List Recipes

gmsaas recipes list

Delete a Recipe

gmsaas recipes delete <recipe_uuid>

---

Instances

Start an Instance

gmsaas instances start <recipe_uuid> <name> \
[--no-wait] \
[--max-run-duration INTEGER]

Get Instance details

gmsaas instances get <instance_uuid>

List Instances

gmsaas instances list

Connect an Instance to ADB

gmsaas instances adbconnect [--adb-serial-port PORT] <instance_uuid>

Save an Instance

gmsaas instances save <instance_uuid>

Save As an Instance

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

Access an Instance display (gmsaas portal)

gmsaas instances display [<instance_uuid>, ...] [--yes]

Setting Up and Tearing Down ADB

The gmsaas tool uses an internal component called ADB Tunnel to enable secure ADB connections to instances. If you encounter frequent failures with the adbconnect command, consider using the adb start and adb stop commands to manage ADB connections more reliably.

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

Start ADB

gmsaas adb start

Stop ADB

gmsaas adb stop

---

Advanced ADB and Portal Features

Access an Instance display (gmsaas portal)

gmsaas instances display [<instance_uuid>, ...] [--yes]

Set Up and Teeing Down ADB

gmsaas adb start
gmsaas adb stop

Save an Instance (Warnings)

gmsaas instances save <instance_uuid>

"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>

Stop an Instance (Warnings)

gmsaas instances stop <instance_uuid>

Access an Instance display (portal) (continued)

gmsaas instances display [<instance_uuid>, ...] [--yes]

Start an ADB

gmsaas adb start

Stop ADB

gmsaas adb stop

Connect an Instance to ADB (continued)

gmsaas instances adbconnect [--adb-serial-port PORT] <instance_uuid>

Save an Instance (continued)

gmsaas instances save <instance_uuid>

Stop an Instance (continued)

gmsaas instances stop <instance_uuid>

---

Portal and Safety

Access an Instance display (portal)

gmsaas instances display [<instance_uuid>, ...] [--yes]

Tips for connecting to ADB

gmsaas instances list -q | xargs -n1 gmsaas instances adbconnect

Start ADB and Start Portal

gmsaas adb start

Stop ADB and Stop Portal

gmsaas adb stop

---

End of Commands

This page provides the core CLI interactions for managing hardware profiles, images, recipes, and instances with Genymotion SaaS.