Skip to content

Shell / ADB

Fresh

Execute shell commands on cloud phones. Supports Android 10, 12, 13, 14, and 15.

Execute Shell Command

URL: https://openapi.geelark.com/open/v1/shell/executeMethod: POST

Request Parameters

ParameterRequiredTypeDescription
idYesstringCloud phone ID
cmdYesstringCommand to execute

Request Example

json
{
  "id": "528715748189668352",
  "cmd": "pm list packages"
}

Response Example

json
{
  "traceId": "924A8E4AAC9E0B0B96ABA7B8801B2CBE",
  "code": 0,
  "msg": "success",
  "data": {
    "status": true,
    "output": "com.zhiliaoapp.musically"
  }
}

Response Fields

FieldTypeDescription
statusbooltrue=success, false=failure
outputstringExecution result

Error Codes

CodeDescription
42001Cloud phone does not exist
42002Cloud phone is not running
50001Device does not support shell commands

ADB Setup

To enable ADB on a cloud phone, refer to the GEELark ADB Guide.

Set ADB Status

URL: https://openapi.geelark.com/open/v1/phone/adb/set

ParameterRequiredTypeDescription
idYesstringCloud phone ID
enableYesbooleantrue=enable, false=disable

Get ADB Information

URL: https://openapi.geelark.com/open/v1/phone/adb/get

ParameterRequiredTypeDescription
idsYesarray[string]Cloud phone IDs

Returns ADB connection info including host, port, and status for each cloud phone.

Error Codes

CodeDescription
49001ADB is not enabled
49002Device model does not support ADB

GEELark API Documentation - Built with VitePress