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.
Create a Hardware Profile¶
1.8.0
Hardware Profiles define virtual device hardware specifications, such as screen resolution, form factor and so on.
gmsaas hwprofiles create <name> \
[--width INTEGER] \
[--height INTEGER] \
[--density INTEGER] \
[--form-factor PHONE|TABLET] \
[--navigation-bar]
<hwprofile_uuid>
is printed.
Example
$ gmsaas hwprofiles create test
3aa57c4c-1372-4d82-8405-2ab668805b3c
{
"hwprofile": {
"uuid": "3aa57c4c-1372-4d82-8405-2ab668805b3c",
"name": "test",
"form_factor": "PHONE",
"cpu_count": 2,
"ram_size": 2048,
"data_disk_size": 16384,
"source": "[email protected]",
"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¶
1.8.0
gmsaas hwprofiles get <hwprofile_uuid>
The Hardware Profile formatted as a table.
Example
$ gmsaas hwprofiles get 3aa57c4c-1372-4d82-8405-2ab668805b3c
UUID NAME DISPLAY SOURCE
------------------------------------ ------ ------------------ --------
3aa57c4c-1372-4d82-8405-2ab668805b3c test 768 x 1280 dpi 320 [email protected]
{
"hwprofile": {
"uuid": "3aa57c4c-1372-4d82-8405-2ab668805b3c",
"name": "test",
"form_factor": "PHONE",
"cpu_count": 2,
"ram_size": 2048,
"data_disk_size": 16384,
"source": "[email protected]",
"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"
}
List Hardware Profiles¶
1.8.0
gmsaas hwprofiles list
The Hardware Profile list formatted as a table.
Example
$ gmsaas hwprofiles list
UUID NAME DISPLAY SOURCE
------------------------------------ ----------------------- ------------------- ----------
...
e104f058-b291-4764-8e0d-d9ff78a41192 Custom Phone 768 x 1280 dpi 320 genymotion
c65db329-511a-4c2a-9761-c7259649e8c7 Custom Tablet 1536 x 2048 dpi 320 genymotion
c6e1222c-993e-4bf2-840f-4795792f2143 Google Nexus 10 2560 x 1600 dpi 320 genymotion
55fddf0b-0e56-4742-8791-106ad93c01ff Google Nexus 4 768 x 1280 dpi 320 genymotion
...
{
"hwprofiles": [
{
"uuid": "e104f058-b291-4764-8e0d-d9ff78a41192",
"name": "Custom Phone",
"form_factor": "PHONE",
"cpu_count": 4,
"ram_size": 2048,
"data_disk_size": 8192,
"source": "genymotion",
"display_settings": {
"hw_navigation_keys": false,
"displays": [
{
"width": 768,
"height": 1280,
"density": 320,
"screen": "768 x 1280 dpi 320"
}
]
}
},
...
],
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
Delete a Hardware Profile¶
1.8.0
gmsaas hwprofiles delete <hwprofile_uuid>
Basic acknowledgement.
Example
$ gmsaas hwprofiles delete a0d9acf6-08e8-400c-93a5-b44cc666506b
HwProfile 'a0d9acf6-08e8-400c-93a5-b44cc666506b' deleted successfully.
{
"hwprofile_uuid": "a0d9acf6-08e8-400c-93a5-b44cc666506b",
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
Clone an Image¶
1.8.0
Images are virtual device Android OS disk images.
gmsaas osimages clone <base_osimage_uuid> <name>
<osimage_uuid>
is printed.
Example
$ gmsaas osimages clone 0c15f956-55a9-4622-a2a0-cfaaedd3a0e9 test
6cb23b1a-f6c6-4c0d-90d7-60e184f7670f
{
"osimage": {
"uuid": "6cb23b1a-f6c6-4c0d-90d7-60e184f7670f",
"name": "test",
"image_version": "3.0.2",
"android_version": "13.0",
"api_version": 33,
"architecture": "x86_64",
"source": "[email protected]"
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
Get Image details¶
1.8.0
gmsaas osimages get <osimage_uuid>
Image is printed as a table.
Example
$ gmsaas osimages get 6cb23b1a-f6c6-4c0d-90d7-60e184f7670f
UUID NAME ANDROID VERSION API VERSION ARCHITECTURE SOURCE
------------------------------------ ------ ----------------- ------------- -------------- --------
6cb23b1a-f6c6-4c0d-90d7-60e184f7670f test 13 33 x86_64 [email protected]
{
"osimage": {
"uuid": "6cb23b1a-f6c6-4c0d-90d7-60e184f7670f",
"name": "test",
"image_version": "3.0.2",
"android_version": "13.0",
"api_version": 33,
"architecture": "x86_64",
"source": "[email protected]"
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
List Images¶
1.8.0
gmsaas osimages list
Image list formatted as a table.
Example
$ gmsaas hwprofiles list
UUID NAME ANDROID VERSION API VERSION ARCHITECTURE SOURCE
------------------------------------ ------------ ----------------- ------------- -------------- ----------
...
76c72a27-b6a0-48e7-864c-1e6806ed1127 Android 12.0 12.0 31 x86_64 genymotion
c4496482-c5e4-466d-8f59-7b1ac6d1600a Android 12.1 12.1 32 x86_64 genymotion
0c15f956-55a9-4622-a2a0-cfaaedd3a0e9 Android 13.0 13.0 33 x86_64 genymotion
...
{
"osimages": [
{
"uuid": "0c15f956-55a9-4622-a2a0-cfaaedd3a0e9",
"name": "Android 13.0",
"image_version": "3.0.2",
"android_version": "13.0",
"api_version": 33,
"architecture": "x86_64",
"source": "genymotion"
},
...
],
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
Delete an Image¶
1.8.0
gmsaas osimages delete <osimage_uuid>
Basic acknowledgement.
Example
$ gmsaas osimages delete 6cb23b1a-f6c6-4c0d-90d7-60e184f7670f
Image '6cb23b1a-f6c6-4c0d-90d7-60e184f7670f' deleted successfully.
{
"osimage_uuid": "6cb23b1a-f6c6-4c0d-90d7-60e184f7670f",
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
Create a Recipe¶
1.8.0
Recipes are a combination of Hardware Profiles and Images.
gmsaas recipes create <hwprofile_uuid> <osimage_uuid> <name>
Example
$ gmsaas recipes create e104f058-b291-4764-8e0d-d9ff78a41192 0c15f956-55a9-4622-a2a0-cfaaedd3a0e9 test
012332c0-ea89-49b3-b0cb-3b6066d046ad
{
"recipe": {
"uuid": "6bc927c9-777e-471c-af5b-6dc737f3aaef",
"name": "test",
"source": "[email protected]",
"hwprofile": {
"uuid": "e104f058-b291-4764-8e0d-d9ff78a41192",
"name": "Custom Phone",
"form_factor": "PHONE",
"source": "genymotion",
},
"osimage": {
"uuid": "0c15f956-55a9-4622-a2a0-cfaaedd3a0e9",
"name": "Android 13.0",
"source": "genymotion"
}
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
Get Recipe details¶
1.8.0
gmsaas recipes get <recipe_uuid>
Recipe is printed as a table.
Example
$ gmsaas recipes get 6bc927c9-777e-471c-af5b-6dc737f3aaef
UUID NAME ANDROID SCREEN SOURCE
------------------------------------ ------ --------- ------------------ --------
6bc927c9-777e-471c-af5b-6dc737f3aaef test 13 768 x 1280 dpi 320 [email protected]
{
"recipe": {
"uuid": "6bc927c9-777e-471c-af5b-6dc737f3aaef",
"name": "test",
"android_version": "13.0",
"screen_width": 768,
"screen_height": 1280,
"screen_density": 320,
"screen": "768 x 1280 dpi 320",
"source": "[email protected]",
"hwprofile": {
"uuid": "e104f058-b291-4764-8e0d-d9ff78a41192",
"name": "Custom Phone",
"form_factor": "PHONE",
"cpu_count": 4,
"ram_size": 2048,
"source": "genymotion",
"display_settings": {
"hw_navigation_keys": false,
"displays": [
{
"width": 768,
"height": 1280,
"density": 320,
"screen": "768 x 1280 dpi 320"
}
]
}
},
"osimage": {
"uuid": "0c15f956-55a9-4622-a2a0-cfaaedd3a0e9",
"name": "Android 13.0",
"android_version": "13.0",
"api_version": 33,
"architecture": "x86_64",
"source": "genymotion"
}
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
List Recipes¶
gmsaas recipes list [--name FILTER_TEXT]
1.8.0
gmsaas recipes list [--name FILTER_TEXT] [--source all|official|custom]
Recipe list formatted as a table.
Example
$ gmsaas recipes list
UUID NAME ANDROID SCREEN SOURCE
------------------------------------ ----------------------------- --------- ------------------- ----------------------------------
...
e104f058-b291-4764-8e0d-d9ff78a41192 Custom Phone 11.0 768 x 1280 dpi 320 genymotion
c65db329-511a-4c2a-9761-c7259649e8c7 Custom Tablet 11.0 1536 x 2048 dpi 320 genymotion
95016679-8f8d-4890-b026-e4ad889aadf1 Google Pixel 3a 11.0 1080 x 2220 dpi 420 genymotion
...
$ gmsaas --format json recipes list
{
"recipes": [
{
"uuid": "e104f058-b291-4764-8e0d-d9ff78a41192",
"name": "Custom Phone",
"android_version": "11.0",
"screen_width": 768,
"screen_height": 1280,
"screen_density": 320,
"screen": "768 x 1280 dpi 320",
"source": "genymotion",
"hwprofile": {
"uuid": "e104f058-b291-4764-8e0d-d9ff78a41192",
"name": "Custom Phone",
"form_factor": "PHONE",
"cpu_count": 4,
"ram_size": 2048,
"source": "genymotion",
"display_settings": {
"hw_navigation_keys": false,
"displays": [
{
"width": 768,
"height": 1280,
"density": 320,
"screen": "768 x 1280 dpi 320"
}
]
}
},
"osimage": {
"uuid": "3e7e013f-a45c-4972-995d-8cdd885059c4",
"name": "Android 11.0",
"image_version": "0.0.0",
"android_version": "11.0",
"api_version": 30,
"architecture": "x86_64",
"source": "genymotion"
},
},
...,
],
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json recipes list
{
"recipes": [
{
"uuid": "e104f058-b291-4764-8e0d-d9ff78a41192",
"name": "Custom Phone",
"android_version": "11.0",
"screen_width": 768,
"screen_height": 1280,
"screen_density": 320,
"screen": "768 x 1280 dpi 320",
"source": "genymotion"
},
...
],
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
Delete a Recipe¶
1.8.0
gmsaas recipes delete <recipe_uuid> [--delete-osimage] [--delete-hwprofile]
Basic acknowledgement.
Example
$ gmsaas recipes delete 6bc927c9-777e-471c-af5b-6dc737f3aaef
Recipe '6bc927c9-777e-471c-af5b-6dc737f3aaef' deleted successfully.
{
"recipe_uuid": "6bc927c9-777e-471c-af5b-6dc737f3aaef",
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
Start an Instance¶
gmsaas instances start <recipe_uuid> <name> [--no-wait] [--max-run-duration INTEGER]
Creates and start an instance based on the specified <recipe_uuid>
recipe (cf. previous commands). <name>
is the name you wish to give to the instance. 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, the instances will automatically stop once 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.
Example
$ gmsaas instances start b9cf7b2c-4d11-4777-97c7-29d3b5c68d59 test
62ec330e-47d2-4a6b-939f-122718505329
$ gmsaas --format json instances start b9cf7b2c-4d11-4777-97c7-29d3b5c68d59 test
{
"instance": {
"uuid": "62ec330e-47d2-4a6b-939f-122718505329",
"name": "test",
"created_at": "2021-05-29T11:54:35.000Z",
"max_run_duration": 1440,
"max_inactivity_duration": 0,
"state": "ONLINE",
"adbtunnel_state": "DISCONNECTED",
"adb_serial": "0.0.0.0",
"adb_serial_port": 0,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion",
"hwprofile": {
"uuid": "f34de94f-1e85-4d61-9b0d-c47968bc156c",
"name": "Samsung Galaxy S8",
"form_factor": "PHONE",
"cpu_count": 4,
"ram_size": 4096,
"data_disk_size": 32768,
"source": "genymotion",
"display_settings": {
"hw_navigation_keys": false,
"displays": [
{
"width": 1440,
"height": 2960,
"density": 480,
"screen": "1440 x 2960 dpi 480"
}
]
}
},
"osimage": {
"uuid": "f29482b4-10ba-4e89-83d3-b5919a34a484",
"name": "Android 8.0 (Oreo)",
"image_version": "2.17.0",
"android_version": "8.0",
"api_version": 26,
"architecture": "x86",
"source": "genymotion"
}
}
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json instances start b9cf7b2c-4d11-4777-97c7-29d3b5c68d59 test
{
"instance": {
"uuid": "62ec330e-47d2-4a6b-939f-122718505329",
"name": "test",
"created_at": "2021-05-29T11:54:35.000Z",
"state": "ONLINE",
"adbtunnel_state": "DISCONNECTED",
"adb_serial": "0.0.0.0",
"adb_serial_port": 0,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion"
}
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json instances start b9cf7b2c-4d11-4777-97c7-29d3b5c68d59 test
{
"instance": {
"uuid": "62ec330e-47d2-4a6b-939f-122718505329",
"name": "test",
"state": "ONLINE",
"adbtunnel_state": "DISCONNECTED",
"adb_serial": "0.0.0.0",
"adb_serial_port": 0,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion"
}
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json instances start b9cf7b2c-4d11-4777-97c7-29d3b5c68d59 test
{
"instance": {
"uuid": "62ec330e-47d2-4a6b-939f-122718505329",
"name": "test",
"state": "ONLINE",
"adbtunnel_state": "DISCONNECTED",
"adb_serial": "0.0.0.0",
"adb_serial_port": 0,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59"
}
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json instances start b9cf7b2c-4d11-4777-97c7-29d3b5c68d59 test
{
"instance": {
"uuid": "62ec330e-47d2-4a6b-939f-122718505329",
"name": "test",
"state": "ONLINE",
"adbtunnel_state": "DISCONNECTED",
"adb_serial": "0.0.0.0",
"adb_serial_port": 0
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
Get Instance details¶
1.6.0
gmsaas instances get <instance_uuid>
Instance information formatted as a table. This also provides the ADB serial used if the instance is connected to ADB.
Example
$ gmsaas instances get e5771dc1-2769-4500-956d-48eae32526f5
UUID NAME ADB SERIAL STATE
------------------------------------ ------------------ ------------ --------
e5771dc1-2769-4500-956d-48eae32526f5 Facebook Messenger 0.0.0.0 CREATING
$ gmsaas --format json instances get 5a4d74e6-e6b2-4dd3-8d6c-1eea275b5ea7
{
"instance": {
"uuid": "5a4d74e6-e6b2-4dd3-8d6c-1eea275b5ea7",
"name": "test1",
"created_at": "2021-05-29T11:54:35.000Z",
"max_run_duration": 1440,
"max_inactivity_duration": 0,
"state": "ONLINE",
"adbtunnel_state": "CONNECTED",
"adb_serial": "localhost:39745",
"adb_serial_port": 39745,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion",
"hwprofile": {
"uuid": "f34de94f-1e85-4d61-9b0d-c47968bc156c",
"name": "Samsung Galaxy S8",
"form_factor": "PHONE",
"cpu_count": 4,
"ram_size": 4096,
"data_disk_size": 32768,
"source": "genymotion",
"display_settings": {
"hw_navigation_keys": false,
"displays": [
{
"width": 1440,
"height": 2960,
"density": 480,
"screen": "1440 x 2960 dpi 480"
}
]
}
},
"osimage": {
"uuid": "f29482b4-10ba-4e89-83d3-b5919a34a484",
"name": "Android 8.0 (Oreo)",
"image_version": "2.17.0",
"android_version": "8.0",
"api_version": 26,
"architecture": "x86",
"source": "genymotion"
}
}
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json instances get 5a4d74e6-e6b2-4dd3-8d6c-1eea275b5ea7
{
"instance": {
"uuid": "5a4d74e6-e6b2-4dd3-8d6c-1eea275b5ea7",
"name": "test1",
"created_at": "2021-05-29T11:54:35.000Z",
"state": "ONLINE",
"adbtunnel_state": "CONNECTED",
"adb_serial": "localhost:39745",
"adb_serial_port": 39745,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion"
}
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json instances get 5a4d74e6-e6b2-4dd3-8d6c-1eea275b5ea7
{
"instance": {
"uuid": "5a4d74e6-e6b2-4dd3-8d6c-1eea275b5ea7",
"name": "test1",
"state": "ONLINE",
"adbtunnel_state": "CONNECTED",
"adb_serial": "localhost:39745",
"adb_serial_port": 39745,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion"
}
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
List Instances¶
gmsaas instances list [--quiet/-q]
Instances list formatted as a table. This also provides the ADB serial used if the instance is connected to ADB.
If --quiet
is set, only instance UUIDs will be displayed.
Example
$ gmsaas instances list
UUID NAME ADB SERIAL STATE
------------------------------------ ------------------ ------------ -------
e5771dc1-2769-4500-956d-48eae32526f5 Facebook Messenger 0.0.0.0 ONLINE
$ gmsaas --format json instances list
{
"instances": [
{
"uuid": "5a4d74e6-e6b2-4dd3-8d6c-1eea275b5ea7",
"name": "test1",
"created_at": "2021-05-29T11:54:35.000Z",
"max_run_duration": 1440,
"max_inactivity_duration": 0,
"state": "ONLINE",
"adbtunnel_state": "CONNECTED",
"adb_serial": "localhost:39745",
"adb_serial_port": 39745,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion",
"hwprofile": {
"uuid": "f34de94f-1e85-4d61-9b0d-c47968bc156c",
"name": "Samsung Galaxy S8",
"form_factor": "PHONE",
"cpu_count": 4,
"ram_size": 4096,
"data_disk_size": 32768,
"source": "genymotion",
"display_settings": {
"hw_navigation_keys": false,
"displays": [
{
"width": 1440,
"height": 2960,
"density": 480,
"screen": "1440 x 2960 dpi 480"
}
]
}
},
"osimage": {
"uuid": "f29482b4-10ba-4e89-83d3-b5919a34a484",
"name": "Android 8.0 (Oreo)",
"image_version": "2.17.0",
"android_version": "8.0",
"api_version": 26,
"architecture": "x86",
"source": "genymotion"
}
}
},
...
],
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json instances list
{
"instances": [
{
"uuid": "5a4d74e6-e6b2-4dd3-8d6c-1eea275b5ea7",
"name": "test1",
"created_at": "2021-05-29T11:54:35.000Z",
"state": "ONLINE",
"adbtunnel_state": "CONNECTED",
"adb_serial": "localhost:39745",
"adb_serial_port": 39745,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion"
}
},
{
"uuid": "ab47b279-05ef-4896-9e45-bc6af0085022",
"name": "test2",
"created_at": "2021-04-29T11:54:35.000Z",
"state": "ONLINE",
"adbtunnel_state": "CONNECTED",
"adb_serial": "localhost:33455",
"adb_serial_port": 33455,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion"
}
},
{
"uuid": "099bd927-a0b9-4ff0-b4bc-d474175945b7",
"name": "test3",
"created_at": "2021-03-29T11:54:35.000Z",
"state": "ONLINE",
"adbtunnel_state": "DISCONNECTED",
"adb_serial": "0.0.0.0",
"adb_serial_port": 0,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion"
}
},
...
],
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json instances list
{
"instances": [
{
"uuid": "5a4d74e6-e6b2-4dd3-8d6c-1eea275b5ea7",
"name": "test1",
"state": "ONLINE",
"adbtunnel_state": "CONNECTED",
"adb_serial": "localhost:39745",
"adb_serial_port": 39745,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion"
}
},
{
"uuid": "ab47b279-05ef-4896-9e45-bc6af0085022",
"name": "test2",
"state": "ONLINE",
"adbtunnel_state": "CONNECTED",
"adb_serial": "localhost:33455",
"adb_serial_port": 33455,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion"
}
},
{
"uuid": "099bd927-a0b9-4ff0-b4bc-d474175945b7",
"name": "test3",
"state": "ONLINE",
"adbtunnel_state": "DISCONNECTED",
"adb_serial": "0.0.0.0",
"adb_serial_port": 0,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion"
}
},
...
],
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json instances list
{
"instances": [
{
"uuid": "5a4d74e6-e6b2-4dd3-8d6c-1eea275b5ea7",
"name": "test1",
"state": "ONLINE",
"adbtunnel_state": "CONNECTED",
"adb_serial": "localhost:39745",
"adb_serial_port": 39745,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59"
}
},
{
"uuid": "ab47b279-05ef-4896-9e45-bc6af0085022",
"name": "test2",
"state": "ONLINE",
"adbtunnel_state": "CONNECTED",
"adb_serial": "localhost:33455",
"adb_serial_port": 33455,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59"
}
},
{
"uuid": "099bd927-a0b9-4ff0-b4bc-d474175945b7",
"name": "test3",
"state": "ONLINE",
"adbtunnel_state": "DISCONNECTED",
"adb_serial": "0.0.0.0",
"adb_serial_port": 0,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59"
}
},
...
],
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json instances list
{
"instances": [
{
"uuid": "5a4d74e6-e6b2-4dd3-8d6c-1eea275b5ea7",
"name": "test1",
"state": "ONLINE",
"adbtunnel_state": "CONNECTED",
"adb_serial": "localhost:39745",
"adb_serial_port": 39745
},
{
"uuid": "ab47b279-05ef-4896-9e45-bc6af0085022",
"name": "test2",
"state": "ONLINE",
"adbtunnel_state": "CONNECTED",
"adb_serial": "localhost:33455",
"adb_serial_port": 33455
},
{
"uuid": "099bd927-a0b9-4ff0-b4bc-d474175945b7",
"name": "test3",
"state": "ONLINE",
"adbtunnel_state": "DISCONNECTED",
"adb_serial": "0.0.0.0",
"adb_serial_port": 0
},
...
],
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
Connect an Instance to ADB¶
gmsaas instances adbconnect [--adb-serial-port PORT] <instance_uuid>
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>
.
Tip
To easily connect all your running instances to ADB, you can combine this command with the --quiet
or -q
option and xargs
. For example:
gmsaas instances list -q | xargs -n1 gmsaas instances adbconnect
1.5.0
<adb_serial>
(URL:port) on which ADB is connected is printed.
Example
$ gmsaas instances adbconnect ab47b279-05ef-4496-9e45-bc6af0085122
localhost:40249
$ gmsaas --format json instances adbconnect 099bd927-a0b9-4ff0-b4bc-d474175945b7
{
"instance": {
"uuid": "099bd927-a0b9-4ff0-b4bc-d474175945b7",
"name": "test3",
"created_at": "2021-03-29T11:54:35.000Z",
"max_run_duration": 1440,
"max_inactivity_duration": 0,
"state": "ONLINE",
"adbtunnel_state": "CONNECTED",
"adb_serial": "localhost:37007",
"adb_serial_port": 37007,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion",
"hwprofile": {
"uuid": "f34de94f-1e85-4d61-9b0d-c47968bc156c",
"name": "Samsung Galaxy S8",
"form_factor": "PHONE",
"cpu_count": 4,
"ram_size": 4096,
"data_disk_size": 32768,
"source": "genymotion",
"display_settings": {
"hw_navigation_keys": false,
"displays": [
{
"width": 1440,
"height": 2960,
"density": 480,
"screen": "1440 x 2960 dpi 480"
}
]
}
},
"osimage": {
"uuid": "f29482b4-10ba-4e89-83d3-b5919a34a484",
"name": "Android 8.0 (Oreo)",
"image_version": "2.17.0",
"android_version": "8.0",
"api_version": 26,
"architecture": "x86",
"source": "genymotion"
}
}
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json instances adbconnect 099bd927-a0b9-4ff0-b4bc-d474175945b7
{
"instance": {
"uuid": "099bd927-a0b9-4ff0-b4bc-d474175945b7",
"name": "test3",
"created_at": "2021-03-29T11:54:35.000Z",
"state": "ONLINE",
"adbtunnel_state": "CONNECTED",
"adb_serial": "localhost:37007",
"adb_serial_port": 37007,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion"
}
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json instances adbconnect 099bd927-a0b9-4ff0-b4bc-d474175945b7
{
"instance": {
"uuid": "099bd927-a0b9-4ff0-b4bc-d474175945b7",
"name": "test3",
"state": "ONLINE",
"adbtunnel_state": "CONNECTED",
"adb_serial": "localhost:37007",
"adb_serial_port": 37007,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion"
}
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json instances adbconnect 099bd927-a0b9-4ff0-b4bc-d474175945b7
{
"instance": {
"uuid": "099bd927-a0b9-4ff0-b4bc-d474175945b7",
"name": "test3",
"state": "ONLINE",
"adbtunnel_state": "CONNECTED",
"adb_serial": "localhost:37007",
"adb_serial_port": 37007,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59"
}
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json instances adbconnect 099bd927-a0b9-4ff0-b4bc-d474175945b7
{
"instance": {
"uuid": "099bd927-a0b9-4ff0-b4bc-d474175945b7",
"name": "test3",
"state": "ONLINE",
"adbtunnel_state": "CONNECTED",
"adb_serial": "localhost:37007",
"adb_serial_port": 37007
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
Save an Instance¶
1.8.0
Changes are not automatically saved. As a result, any modification to a virtual device has to be saved manually through this command.
Information
The instance will be stopped in order to be saved.
Information
Only Instances started from owned Recipes with owned Images can be saved with this command. Use the saveas
command otherwise.
gmsaas instances save <instance_uuid>
Basic acknowledgement.
Example
$ gmsaas instances save 5a4d74e6-e6b2-4dd3-8d6c-1eea275b5ea7
Instance 'test1' has been saved successfully.
$ gmsaas instances save 5a4d74e6-e6b2-4dd3-8d6c-1eea275b5ea7
{
"instance_uuid": "5a4d74e6-e6b2-4dd3-8d6c-1eea275b5ea7",
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
"Save As" an Instance¶
1.8.0
If you started a virtual device from an official recipe, you can save it as a custom recipe and custom image.
gmsaas instances saveas <instance_uuid> --osimage-name <image_name> --recipe-name <recipe_name>
Basic acknowledgement.
Example
$ gmsaas instances saveas 5a4d74e6-e6b2-4dd3-8d6c-1eea275b5ea7 --osimage-name MyImage --recipe-name MyRecipe
Instance 'test1' has been saved successfully. Recipe 'MyRecipe' and Image 'MyImage' have been created.
$ gmsaas instances saveas 5a4d74e6-e6b2-4dd3-8d6c-1eea275b5ea7 --osimage-name MyImage --recipe-name MyRecipe
{
"instance_uuid": "5a4d74e6-e6b2-4dd3-8d6c-1eea275b5ea7 ",
"recipe_name": "MyRecipe",
"osimage_name": "MyImage",
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
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.
gmsaas instances stop [--no-wait] <instance_uuid>
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:
gmsaas instances list -q | xargs -n1 gmsaas instances stop --no-wait
No output.
$ gmsaas --format json instances stop 62ec330e-47d2-4a6b-939f-222318505329
{
"instance": {
"uuid": "62ec330e-47d2-4a6b-939f-222318505329",
"name": "test4",
"created_at": "2021-02-29T11:54:35.000Z",
"max_run_duration": 1440,
"max_inactivity_duration": 0,
"state": "DELETED",
"adbtunnel_state": "DISCONNECTED",
"adb_serial": "0.0.0.0",
"adb_serial_port": 0,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion",
"hwprofile": {
"uuid": "f34de94f-1e85-4d61-9b0d-c47968bc156c",
"name": "Samsung Galaxy S8",
"form_factor": "PHONE",
"cpu_count": 4,
"ram_size": 4096,
"data_disk_size": 32768,
"source": "genymotion",
"display_settings": {
"hw_navigation_keys": false,
"displays": [
{
"width": 1440,
"height": 2960,
"density": 480,
"screen": "1440 x 2960 dpi 480"
}
]
}
},
"osimage": {
"uuid": "f29482b4-10ba-4e89-83d3-b5919a34a484",
"name": "Android 8.0 (Oreo)",
"image_version": "2.17.0",
"android_version": "8.0",
"api_version": 26,
"architecture": "x86",
"source": "genymotion"
}
}
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json instances stop 62ec330e-47d2-4a6b-939f-222318505329
{
"instance": {
"uuid": "62ec330e-47d2-4a6b-939f-222318505329",
"name": "test4",
"created_at": "2021-02-29T11:54:35.000Z",
"state": "DELETED",
"adbtunnel_state": "DISCONNECTED",
"adb_serial": "0.0.0.0",
"adb_serial_port": 0,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion"
}
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json instances stop 62ec330e-47d2-4a6b-939f-222318505329
{
"instance": {
"uuid": "62ec330e-47d2-4a6b-939f-222318505329",
"name": "test4",
"state": "DELETED",
"adbtunnel_state": "DISCONNECTED",
"adb_serial": "0.0.0.0",
"adb_serial_port": 0,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59",
"name": "Samsung Galaxy S8",
"android_version": "8.0",
"screen_width": 1440,
"screen_height": 2960,
"screen_density": 480,
"screen": "1440 x 2960 dpi 480",
"source": "genymotion"
}
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json instances stop 62ec330e-47d2-4a6b-939f-222318505329
{
"instance": {
"uuid": "62ec330e-47d2-4a6b-939f-222318505329",
"name": "test4",
"state": "DELETED",
"adbtunnel_state": "DISCONNECTED",
"adb_serial": "0.0.0.0",
"adb_serial_port": 0,
"recipe": {
"uuid": "b9cf7b2c-4d11-4777-97c7-29d3b5c68d59"
}
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
$ gmsaas --format json instances stop 62ec330e-47d2-4a6b-939f-222318505329
{
"instance": {
"uuid": "62ec330e-47d2-4a6b-939f-222318505329",
"name": "test4",
"state": "DELETED",
"adbtunnel_state": "DISCONNECTED",
"adb_serial": "0.0.0.0",
"adb_serial_port": 0
},
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}
Display Instances (gmsaas portal)¶
1.9.0
gmsaas instances instances display [<instance_uuid>, ...] [--yes]
Copy to the clipboard a generated URL pointing on a local web page (gmsaas portal) able to display 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.
Basic acknowledgement.
Example
$ gmsaas instances display
Sensitive data (authentication token) will be copied in your clipboard, continue? [y/N]: y
Generated URL copied in your clipboard, paste it in your web browser.
$ gmsaas instances display --yes
{
"url": "<hidden>",
"message": "Generated URL copied in your clipboard, paste it in your web browser.",
"exit_code": 0,
"exit_code_desc": "NO_ERROR"
}