Shell / ADB
FreshExecute 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
| Parameter | Required | Type | Description |
|---|---|---|---|
| id | Yes | string | Cloud phone ID |
| cmd | Yes | string | Command 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
| Field | Type | Description |
|---|---|---|
| status | bool | true=success, false=failure |
| output | string | Execution result |
Error Codes
| Code | Description |
|---|---|
| 42001 | Cloud phone does not exist |
| 42002 | Cloud phone is not running |
| 50001 | Device 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
| Parameter | Required | Type | Description |
|---|---|---|---|
| id | Yes | string | Cloud phone ID |
| enable | Yes | boolean | true=enable, false=disable |
Get ADB Information
URL: https://openapi.geelark.com/open/v1/phone/adb/get
| Parameter | Required | Type | Description |
|---|---|---|---|
| ids | Yes | array[string] | Cloud phone IDs |
Returns ADB connection info including host, port, and status for each cloud phone.
Error Codes
| Code | Description |
|---|---|
| 49001 | ADB is not enabled |
| 49002 | Device model does not support ADB |