Android Control API Documentation
Updated: Jan 22, 2026
Version Support
Android Control API requires specific image version support. Please ensure your cloud machine image version is not lower than:
- Android 10:
vcloud_android10_edge_20260110or above - Android 13:
vcloud_android13_edge_20260110or above - Android 15:
vcloud_android15_edge_20260110or above - CBS:
1.1.1.10or above
Introduction
Android Control API provides a set of control and management capabilities for the Android system, covering application management, input control, system settings, file operations, and more.
Usage
1. HTTP Call from Outside
When calling from the host machine or other devices in the network, you need to forward through the container management API:
- URL Format:
http://{Host_IP}:18182/android_api/v2/{Machine_ID}/{Interface_Path} - Example:
http://192.168.1.100:18182/android_api/v2/EDGE12345678/activity/processes
2. HTTP Call from Inside
Direct call inside the Android instance (e.g., via terminal or internal script):
- URL Format:
http://127.0.0.1:18185/api/{Interface_Path} - Example:
http://127.0.0.1:18185/api/activity/processes
3. Socket Call
Not yet open, coming soon.
4. Command Line (CLI) Call
Not yet open, coming soon.
5. MCP Call (AI Agent Integration)
Requires API version 1.0.7 or above
Expose Android control capabilities directly to AI agents via MCP (Model Context Protocol).
Compatible clients: Claude Code, Cursor, Codex, Gemini, Tongyi Qianwen, Kimi, and any client that supports the MCP SSE protocol.
SSE Endpoints (choose one):
| Mode | Endpoint |
|---|---|
| LAN Mode (LAN IP enabled) | http://{Device_IP}:18185/mcp/sse |
| Non-LAN Mode (LAN IP disabled) | http://{Host_IP}:18182/android_api/v2/{Machine_ID}/mcp/sse |
The examples below use LAN Mode. For Non-LAN Mode, replace the URL with the external HTTP call address.
# Project-level (current project only, default)
claude mcp add --transport sse vmos-edge-control-api http://{Device_IP}:18185/mcp/sse
# Global (all projects)
claude mcp add -s user --transport sse vmos-edge-control-api http://{Device_IP}:18185/mcp/sse
# Remove
claude mcp remove vmos-edge-control-api
# Disable (keep config but don't load)
claude mcp disable vmos-edge-control-api
# Enable
claude mcp enable vmos-edge-control-api
# List
claude mcp list# ~/.codex/config.yaml
mcp_servers:
vmos-edge-control-api:
type: sse
url: "http://{Device_IP}:18185/mcp/sse"// ~/.gemini/settings.json
{
"mcpServers": {
"vmos-edge-control-api": {
"httpUrl": "http://{Device_IP}:18185/mcp/sse"
}
}
}// .cursor/mcp.json in project root or ~/.cursor/mcp.json
{
"mcpServers": {
"vmos-edge-control-api": {
"url": "http://{Device_IP}:18185/mcp/sse"
}
}
}// Add in "MCP Services" settings
{
"mcpServers": {
"vmos-edge-control-api": {
"type": "sse",
"url": "http://{Device_IP}:18185/mcp/sse"
}
}
}Once connected, AI can directly call tools like screenshot, click, text input, and UI hierarchy inspection without manually constructing HTTP requests.
Parameter Formats
All POST interfaces support application/json by default, and also accept application/yaml.
JSON (Default)
- Content-Type:
application/json
YAML
- Content-Type:
application/yamlortext/yaml - Example:yaml
package_name: com.android.settings
Common Response Structure
All interfaces return a standard JSON format with the following structure:
{
"code": 200, // Status code, 200 for success
"data": { ... }, // Specific business data
"msg": "OK", // Status description
"request_id": "..." // Unique request identifier
}Base Capabilities (Base)
Get API Version
Get current control service version information and all supported interface paths. Image version 20260113 or above is required.
- URL:
/base/version_info - Method:
GET - Response Example:json
{ "code": 200, "data": { "version_name": "1.0.0", "version_code": 100, "supported_list": [ "base/sleep", "workflow", "base/version_info", "..." ] }, "msg": "OK", "request_id": "si123456" }
Sleep
Pause the interface response for a period of time. Commonly used for waiting during script execution. Image version 20260113 or above is required.
- URL:
/base/sleep - Method:
POST - Parameters:
Parameter Type Required Description duration long Yes Sleep duration (ms) - Response Example:json
{ "code": 200, "data": true, "msg": "OK", "request_id": "sl123456" }
Workflow (Workflow)
Execute Workflow
Execute multiple interface actions sequentially in a single request. Image version 20260113 or above is required.
- URL:
/workflow - Method:
POST - Parameters:
Parameter Type Required Description actions array Yes List of actions. Each object contains path(interface path) andparams(parameter object) - Request Example:json
{ "actions": [ { "path": "activity/start", "params": { "package_name": "com.android.settings" } }, { "path": "base/sleep", "params": { "duration": 2000 } }, { "path": "input/click", "params": { "x": 300, "y": 300 } } ] } - Response Example:json
{ "code": 200, "data": [ { "request_id": "8aca36b28c444ca09d07fb2690d03a3d", "response_data": { "package_name": "com.android.settings", "class_name": "com.android.settings.Settings" } }, { "request_id": "9bca36b28c444ca09d07fb2690d03a3e", "response_data": true }, { "request_id": "0cca36b28c444ca09d07fb2690d03a3f", "response_data": { "x": 300, "y": 300 } } ], "msg": "OK", "request_id": "wf123456" }
Activity Management (Activity)
Start Application
- URL:
/activity/start - Method:
POST - Parameters:
Parameter Type Required Description package_name string Yes Application package name - Request Example:json
{ "package_name": "com.android.settings" } - Response Example:json
{ "code": 200, "data": { "package_name": "com.android.settings", "class_name": "com.android.settings.Settings" }, "msg": "OK", "request_id": "8aca36b28c444ca09d07fb2690d03a3d" }
Start Specific Activity
- URL:
/activity/start_activity - Method:
POST - Parameters:
Parameter Type Required Description package_name string No Package name (optional if action is specified) class_name string No Activity class name action string No Intent action data string No Intent data extras object No Intent extras (Key-Value pairs) - Request Example:json
{ "package_name": "com.android.settings", "class_name": "com.android.settings.Settings", "extras": { "extra_key": "extra_value", "is_test": true } } - Response Example:json
{ "code": 200, "data": true, "msg": "OK", "request_id": "sa123456" }
Stop Application
- URL:
/activity/stop - Method:
POST - Parameters:
Parameter Type Required Description package_name string Yes Application package name - Request Example:json
{ "package_name": "com.android.settings" } - Response Example:json
{ "code": 200, "data": true, "msg": "OK", "request_id": "a1b2c3d4e5f6g7h8i9j0" }
Get Running Processes
- URL:
/activity/processes - Method:
GET - Response Example:json
{ "code": 200, "data": [ { "process_name": "com.android.settings", "pid": 1234, "uid": 1000, "package_names": ["com.android.settings"], "importance": 100 } ], "msg": "OK", "request_id": "c3d4e5f6g7h8i9j0a1b2" }
Get Top Activity Information
- URL:
/activity/top_activity - Method:
GET - Response Example:json
{ "code": 200, "data": { "package_name": "com.android.settings", "class_name": "com.android.settings.Settings" }, "msg": "OK", "request_id": "ta123456" }
Get Recent Tasks
- URL:
/activity/recent_tasks - Method:
GET - Parameters:
Parameter Type Required Description max_num int No Maximum number, default is 20 - Response Example:json
{ "code": 200, "data": [ { "task_id": 123, "base_package_name": "com.android.settings", "base_class_name": "com.android.settings.Settings", "top_package_name": "com.android.settings", "top_class_name": "com.android.settings.Settings", "num_activities": 1, "last_active_time": 1736412345000 } ], "msg": "OK", "request_id": "rt123456" }
Clear Task Stack
Removes all recent tasks (similar to clearing recent apps in the background).
- URL:
/activity/clear_tasks - Method:
POST - Response Example:json
{ "code": 200, "data": [ { "task_id": 123, "base_package_name": "com.android.settings", "base_class_name": "com.android.settings.Settings", "top_package_name": "com.android.settings", "top_class_name": "com.android.settings.Settings" } ], "msg": "OK", "request_id": "ct123456" }
Move Task to Front
- URL:
/activity/move_to_front - Method:
POST - Parameters:
Parameter Type Required Description task_id int Yes Task ID - Request Example:json
{ "task_id": 123 } - Response Example:json
{ "code": 200, "data": true, "msg": "OK", "request_id": "mtf123456" }
Package Management (Package)
Install Application
Supports standard APK as well as APKS, APKM, XAPK, OBB and other split formats. Install via file upload (multipart).
- URL:
/package/install_sync - Method:
POST - Parameters:
Parameter Type Required Description file file Yes APK/XAPK file (multipart/form-data) installer_package_name string No Specify the installer package name
File upload note: When uploading via
file(multipart), text parameters such asinstaller_package_namemust appear before thefilefield in the multipart body, or be passed as Query parameters (recommended). Example:POST /package/install_sync?installer_package_name=com.android.vending Content-Type: multipart/form-data file=@app.xapk
- Response Example:json
{ "code": 200, "cost": 2723, "data": { "android.content.pm.extra.STATUS": 0, "android.content.pm.extra.PACKAGE_NAME": "com.apkmirror.helper.prod", "android.content.pm.extra.PRE_APPROVAL": false, "android.content.pm.extra.SESSION_ID": 1513445030, "android.content.pm.extra.LEGACY_STATUS": 1, "android.content.pm.extra.STATUS_MESSAGE": "INSTALL_SUCCEEDED: Session installed" }, "msg": "OK", "request_id": "84d5716b8d374006b4cba9caaef794b6" }
Install Application via URI
Requires API version 1.0.7 or above
URI-only installation — does not support file upload. Ideal when you already have a download URL or local path for the APK. Waits synchronously for the installation to complete before returning. Supports standard APK as well as APKS, APKM, XAPK, OBB and other split formats.
URL:
/package/install_uri_syncMethod:
POSTParameters:
Parameter Type Required Description uri string Yes APK URI — supports http://,https://(auto-download),file://,content://, or local pathinstaller_package_name string No Specify the installer package name Request Example:
json{ "uri": "https://example.com/app.apk" }Response Example:
json{ "code": 200, "cost": 2723, "data": { "android.content.pm.extra.STATUS": 0, "android.content.pm.extra.PACKAGE_NAME": "com.example.app", "android.content.pm.extra.PRE_APPROVAL": false, "android.content.pm.extra.SESSION_ID": 1513445030, "android.content.pm.extra.LEGACY_STATUS": 1, "android.content.pm.extra.STATUS_MESSAGE": "INSTALL_SUCCEEDED: Session installed" }, "msg": "OK", "request_id": "84d5716b8d374006b4cba9caaef794b6" }
Uninstall Application
- URL:
/package/uninstall - Method:
POST - Parameters:
Parameter Type Required Description package_name string Yes Application package name - Response Example:json
{ "code": 200, "data": true, "msg": "OK", "request_id": "n4o5p6q7r8s9t0u1v2w3" }
Set Package Enabled State
- URL:
/package/enabled - Method:
POST - Parameters:
Parameter Type Required Description package_name string Yes Application package name enabled boolean Yes Whether to enable - Response Example:json
{ "code": 200, "data": true, "msg": "OK", "request_id": "se123456" }
Get Installed Packages
- URL:
/package/list - Method:
GET - Parameters:
Parameter Type Required Description type string No all=All,system=System apps,user=User apps (Default isuser) - Response Example:json
{ "code": 200, "data": { "type": "user", "count": 1, "packages": [ { "package_name": "com.example.app", "app_name": "Example App", "version_name": "1.0.0", "version_code": 1, "is_system": false, "enabled": true, "uid": 10123, "source_dir": "/data/app/...", "data_dir": "/data/user/0/..." } ] }, "msg": "OK", "request_id": "l2m3n4o5p6q7r8s9t0u1" }
Export App APK
If the application is a single APK, returns the raw APK binary stream. If the application is split (Split APKs), automatically packages into a ZIP format and returns the binary stream.
- URL:
/package/export - Method:
GET - Parameters:
Parameter Type Required Description package_name string Yes Application package name - Returns: APK or ZIP binary stream.
Clear Application Data
- URL:
/package/clear_data - Method:
POST - Parameters:
Parameter Type Required Description package_name string Yes Application package name - Request Example:json
{ "package_name": "com.android.settings" } - Response Example:json
{ "code": 200, "data": true, "msg": "OK", "request_id": "b2c3d4e5f6g7h8i9j0a1" }
Input Control (Input)
Click
- URL:
/input/click - Method:
POST - Parameters:
Parameter Type Required Description x int Yes X coordinate y int Yes Y coordinate - Request Example:json
{ "x": 100, "y": 200 } - Response Example:json
{ "code": 200, "data": { "x": 100, "y": 200 }, "msg": "OK", "request_id": "d4e5f6g7h8i9j0a1b2c3" }
Multi-Click
- URL:
/input/multi_click - Method:
POST - Parameters:
Parameter Type Required Description x int Yes X coordinate y int Yes Y coordinate times int No Number of clicks, default 2 interval long No Click interval (ms), default 100 - Request Example:json
{ "x": 100, "y": 200, "times": 3, "interval": 200 } - Response Example:json
{ "code": 200, "data": { "x": 100, "y": 200, "times": 3, "interval": 200 }, "msg": "OK", "request_id": "mc12345678" }
Input Text
- URL:
/input/text - Method:
POST - Parameters:
Parameter Type Required Description text string Yes Text content to input - Request Example:json
{ "text": "Hello World" } - Response Example:json
{ "code": 200, "data": { "text": "Hello World", "length": 11 }, "msg": "OK", "request_id": "e5f6g7h8i9j0a1b2c3d4" }
Key Event
- URL:
/input/keyevent - Method:
POST - Parameters:
Parameter Type Required Description key_code int No Single KeyCode (e.g., 4=Back, 3=Home) key_codes array No Combination key list (e.g., [113, 29] for CTRL + A) - Request Example (Single Key):json
{ "key_code": 4 } - Response Example:json
{ "code": 200, "data": [4], "msg": "OK", "request_id": "f6g7h8i9j0a1b2c3d4e5" }
Swipe
- URL:
/input/swipe - Method:
POST - Parameters:
Parameter Type Required Description start_x int Yes Start X start_y int Yes Start Y end_x int Yes End X end_y int Yes End Y duration int No Duration (ms), default 300 up_delay long No Release delay (ms), null for immediate, -1 for no release - Request Example:json
{ "start_x": 100, "start_y": 800, "end_x": 100, "end_y": 200, "duration": 500 } - Response Example:json
{ "code": 200, "data": { "start_x": 100, "start_y": 800, "end_x": 100, "end_y": 200, "duration": 500, "up_delay": null }, "msg": "OK", "request_id": "g7h8i9j0a1b2c3d4e5f6" }
Bezier Scroll
- URL:
/input/scroll_bezier - Method:
POST - Parameters:
Parameter Type Required Description start_x int Yes Start X start_y int Yes Start Y end_x int Yes End X end_y int Yes End Y duration int No Duration (ms), default 500 up_delay long No Release delay (ms), null for immediate, -1 for no release clear_fling string No Fling elimination strategy: "repeat_last"=repeat the last point - Request Example:json
{ "start_x": 200, "start_y": 1600, "end_x": 200, "end_y": 200, "duration": 500 } - Response Example:json
{ "code": 200, "data": { "start_x": 200, "start_y": 1600, "end_x": 200, "end_y": 200, "duration": 500 }, "msg": "OK", "request_id": "8aca36b28c444ca09d07fb2690d03a3d" }
Send Raw MotionEvent
- URL:
/input/motion_event - Method:
POST - Parameters:
Parameter Type Required Description events array Yes MotionEvent list, see description below - Event Object Description:
Parameter Type Required Description action int Yes Action type: 0=DOWN, 1=UP, 2=MOVE, 3=CANCEL... x float Yes X coordinate y float Yes Y coordinate delay long No Delay before sending this event (ms) pressure float No Pressure value (default 1.0) down_time long No Press time (default uses first event time) - Request Example:json
{ "events": [ { "action": 0, "x": 100, "y": 200, "delay": 0 }, { "action": 2, "x": 150, "y": 250, "delay": 50 }, { "action": 1, "x": 200, "y": 300, "delay": 50 } ] } - Response Example:json
{ "code": 200, "data": { "sent_count": 3, "events": [ ... ] }, "msg": "OK", "request_id": "mot1234567890" }
Permission Management (Permission)
Get Application Permissions
- URL:
/permission/get - Method:
GET - Parameters:
Parameter Type Required Description package_name string Yes Application package name - Response Example:json
{ "code": 200, "data": { "package_name": "com.example.app", "count": 2, "permissions": [ { "permission": "android.permission.CAMERA", "granted": true }, { "permission": "android.permission.RECORD_AUDIO", "granted": false } ] }, "msg": "OK", "request_id": "per1234567890" }
Set Application Permissions
- URL:
/permission/set - Method:
POST - Parameters:
Parameter Type Required Description package_name string Yes Application package name grant boolean Yes true=Grant, false=Revoke permissions array No Permission list (e.g., ["android.permission.CAMERA"]) grant_all boolean No Whether to grant all requested permissions special_permission boolean No Whether to grant special system permissions (including float window, file management, screen recording, etc.) - Special Permission Description: When
special_permissionistrue, the following special permissions will be automatically granted:- Float Window: Allows the application to display on top of other applications.
- File Management: Allows the application to access all external storage files (Android 11+).
- Screen Recording: Automatically allows screen recording requests, skipping system security confirmation.
- Response Example:json
{ "code": 200, "data": { "package_name": "com.example.app", "grant": true, "success_count": 1 }, "msg": "OK", "request_id": "per0987654321" }
File Management (File)
Import File
- URL:
/file/import - Method:
POST - Content-Type:
multipart/form-data - Parameters:
Parameter Type Required Description dir_path string Yes Target directory (e.g., /sdcard/Download/)file file Yes File field, supports multiple files scan boolean No Whether to scan media library, default true, only scans media files - Response Example:json
{ "code": 200, "data": { "files": [ { "file_path": "/sdcard/Download/image.jpg", "file_size": 123456, "scanned": true, "mime_type": "image/jpeg" } ] }, "msg": "OK", "request_id": "t0u1v2w3x4y5z6a7b8c9" }
Export File
- URL:
/file/export - Method:
GET - Parameters:
Parameter Type Required Description path string Yes File path - Returns: File binary stream.
Scan Media Files
Scan specified media files into the system media library. Only images, videos, and audio files are scanned. Requires API version 1.0.4 or higher.
- URL:
/file/media_scan - Method:
POST - Content-Type:
application/json - Parameters:
Parameter Type Required Description paths array Yes List of file paths mime_types array Yes List of MIME types, corresponding to paths one-to-one - Request Example:json
{ "paths": [ "/sdcard/Download/image.jpg", "/sdcard/Download/video.mp4" ], "mime_types": [ "image/jpeg", "video/mp4" ] } - Response Example:json
{ "code": 200, "data": true, "msg": "OK", "request_id": "sm123456" } - Notes:
pathsandmime_typesmust correspond one-to-one and have the same length- Only media files (images, videos, audio) are scanned; other file types are automatically filtered
- If a path does not exist or is not a file, it will be skipped
- Returns
trueon success,falseon failure
HTTP Download File
Requires API version 1.0.7 or above
- URL:
/file/download - Method:
POST - Parameters:
Parameter Type Required Description url string Yes Download URL (http/https) path string Yes Save path (e.g., /sdcard/Download/file.zip)overwrite boolean No Whether to overwrite existing file, default true - Response Example:json
{ "code": 200, "data": { "path": "/sdcard/Download/file.zip", "size": 1048576 }, "msg": "OK", "request_id": "a1b2c3d4e5f6g7h8i9j0" }
List Directory Content
- URL:
/file/list - Method:
GET - Parameters:
Parameter Type Required Description path string Yes Directory path show_hidden boolean No Whether to show hidden files (default false) - Request Example:json
{ "path": "/sdcard" } - Response Example:json
{ "code": 200, "data": { "path": "/sdcard", "count": 2, "files": [ { "name": "Download", "absolute_path": "/sdcard/Download", "is_directory": true, "is_file": false, "size": 4096, "last_modified": 1736412345000, "can_read": true, "can_write": true, "can_execute": true } ] }, "msg": "OK", "request_id": "u1v2w3x4y5z6a7b8c9d0" }
System Settings (System)
Execute Shell Command
- URL:
/system/shell - Method:
POST - Parameters:
Parameter Type Required Description command string Yes Shell command to execute is_root boolean No Whether to execute as root (default true) - Request Example:json
{ "command": "ls -l /sdcard", "is_root": true } - Response Example:json
{ "code": 200, "data": { "command": "ls -l /sdcard", "is_root": true, "exit_code": 0, "output": "total 0\ndrwxrwx--- 2 root ...", "error": "" }, "msg": "OK", "request_id": "q7r8s9t0u1v2w3x4y5z6" }
Set Wallpaper
- URL:
/system/wallpaper - Method:
POST - Parameters:
Parameter Type Required Description path string Yes Image path (internal path or Assets path) type string No file(Default) orasset - Response Example:json
{ "code": 200, "data": true, "msg": "OK", "request_id": "wal1234567890" }
Update System Settings
Update system timezone, language, and region. Requires image version 20260113 or higher.
- URL:
/system/update_settings - Method:
POST - Parameters:
Parameter Type Required Description timezone string No Timezone ID (e.g., Asia/Shanghai)language string No Language code (e.g., zh)region string No Country/Region code (e.g., CN) - Request Example:json
{ "timezone": "Asia/Shanghai", "language": "zh", "region": "CN" } - Response Example:json
{ "code": 200, "data": { "timezone": "Asia/Shanghai", "language": "zh", "region": "CN" }, "msg": "OK", "request_id": "us123456" }
Set System Properties
Set Android system properties. Requires image version 20260113 or higher.
- URL:
/system/set_prop - Method:
POST - Parameters:
Parameter Type Required Description properties object No Property Key-Value pairs, keys are used as-is persist_properties object No Property Key-Value pairs, keys are automatically prefixed with system prefix - Request Example:json
{ "properties": { "persist.sys.test": "value1", "debug.test": "value2" }, "persist_properties": { "test": "value1", "key2": "value2" } } - Description:
- Keys in
propertiesare used directly, e.g.,persist.sys.testwill be set aspersist.sys.test - Keys in
persist_propertiesare automatically prefixed with system prefix - At least one of
propertiesorpersist_propertiesmust be provided
- Keys in
- Response Example:json
{ "code": 200, "data": { "persist.sys.test": true, "debug.test": true, "test": true, "key2": true }, "msg": "OK", "request_id": "sp123456" }
Set System Setting
Requires API version 1.0.7 or above
- URL:
/system/settings_put - Method:
POST - Description: Equivalent to
settings put <namespace> <key> <value>. Supports three namespaces:secure,global,system. - Parameters:
Parameter Type Required Description namespace string Yes Namespace, options: secure,global,systemkey string Yes Settings key, e.g. default_input_methodvalue string Yes Value to set - Request Example:json
{ "namespace": "secure", "key": "default_input_method", "value": "com.example.ime/.InputMethodService" } - Response Example:json
{ "code": 200, "data": { "namespace": "secure", "key": "default_input_method", "value": "com.example.ime/.InputMethodService" }, "msg": "OK", "request_id": "sp123456" }
Get System Setting
Requires API version 1.0.7 or above
- URL:
/system/settings_get - Method:
POST - Description: Equivalent to
settings get <namespace> <key>. Supports three namespaces:secure,global,system. - Parameters:
Parameter Type Required Description namespace string Yes Namespace, options: secure,global,systemkey string Yes Settings key, e.g. default_input_method - Request Example:json
{ "namespace": "secure", "key": "default_input_method" } - Response Example:json
{ "code": 200, "data": { "namespace": "secure", "key": "default_input_method", "value": "com.example.ime/.InputMethodService" }, "msg": "OK", "request_id": "sg123456" }
Power Management (Power)
Screen On / Off
- URL:
/power/set_screen - Method:
POST - Parameters:
Parameter Type Required Description on boolean Yes trueto turn on,falseto turn off - Request Example:json
{ "on": true } - Response Example:json
{ "code": 200, "data": { "on": true }, "msg": "OK", "request_id": "ps123456" }
Lock / Unlock Screen
- URL:
/power/locked - Method:
POST - Parameters:
Parameter Type Required Description locked boolean Yes trueto lock,falseto unlock - Request Example:json
{ "locked": true } - Response Example:json
{ "code": 200, "data": { "locked": true }, "msg": "OK", "request_id": "pl123456" }
Get Screen and Lock Status
- URL:
/power/status - Method:
GET - Response Example:json
{ "code": 200, "data": { "is_screen_on": true, "is_locked": false }, "msg": "OK", "request_id": "pst123456" }
Battery Management (Battery)
Get Battery Info
Get current device battery status information. Returns raw extras data from Android BatteryManager Intent.
- URL:
/battery/get - Method:
GET - Response Example:json
{ "code": 200, "data": { "technology": "Li-ion", "icon-small": 17303583, "max_charging_voltage": 4400000, "health": 2, "max_charging_current": 3250000, "status": 3, "plugged": 0, "present": true, "seq": 1941, "charge_counter": 5000, "level": 47, "scale": 100, "temperature": 338, "voltage": 3036, "invalid_charger": 0, "battery_low": false }, "msg": "OK", "request_id": "bg123456" } - Response Fields:
Field Type Description level int Current battery level (0-scale), -1 means unknown scale int Maximum battery level, usually 100 status int Battery status, see table below plugged int Charger connection type, see table below health int Battery health, see table below voltage int Battery voltage (mV), -1 means unknown temperature int Battery temperature (0.1°C, divide by 10 to get Celsius), -1 means unknown technology string Battery technology type (e.g., Li-ion), may be nullpresent boolean Whether battery is present icon-small int Battery icon resource ID max_charging_voltage int Maximum charging voltage (microvolts, divide by 1000000 to get volts) max_charging_current int Maximum charging current (microamps, divide by 1000000 to get amps) seq int Battery status sequence number charge_counter int Battery charge counter invalid_charger int Invalid charger flag: 0=Valid,1=Invalidbattery_low boolean Whether battery is low - status (Battery Status):
Value Constant Description 1 BATTERY_STATUS_UNKNOWN Unknown 2 BATTERY_STATUS_CHARGING Charging 3 BATTERY_STATUS_DISCHARGING Discharging 4 BATTERY_STATUS_NOT_CHARGING Not Charging 5 BATTERY_STATUS_FULL Full - health (Battery Health):
Value Constant Description 1 BATTERY_HEALTH_UNKNOWN Unknown 2 BATTERY_HEALTH_GOOD Good 3 BATTERY_HEALTH_OVERHEAT Overheat 4 BATTERY_HEALTH_DEAD Dead 5 BATTERY_HEALTH_OVER_VOLTAGE Over Voltage 6 BATTERY_HEALTH_UNSPECIFIED_FAILURE Unspecified Failure 7 BATTERY_HEALTH_COLD Cold - plugged (Charging Type):
Value Constant Description 0 - Not Connected 1 BATTERY_PLUGGED_AC AC Charging 2 BATTERY_PLUGGED_USB USB Charging 4 BATTERY_PLUGGED_WIRELESS Wireless Charging
Set Battery Information
Set device battery information, supporting parameters such as level, status, health, etc. Requires API version 1.0.4 or higher.
- URL:
/battery/set - Method:
POST - Parameters:
Parameter Type Required Description level int No Battery level (0-100) status int No Battery status, see /battery/gethealth int No Battery health, see /battery/getplugged int No Charging type, see /battery/get - Request Example:json
{ "level": 85, "status": 2, "health": 2, "plugged": 2 } - Response Example:json
{ "code": 200, "data": { "technology": "Li-ion", "icon-small": 17303583, "max_charging_voltage": 4400000, "health": 2, "max_charging_current": 3250000, "status": 2, "plugged": 2, "present": true, "seq": 1941, "charge_counter": 5000, "level": 85, "scale": 100, "temperature": 300, "voltage": 4200, "invalid_charger": 0, "battery_low": false }, "msg": "OK", "request_id": "bs123456" } - Note:
- Returns the latest battery information after setting, with the same format as the
/battery/getendpoint - At least one parameter must be provided, otherwise an error will be returned
- The
levelparameter must be in the range 0-100, otherwise the setting will fail - For field descriptions, please refer to the
/battery/getendpoint
- Returns the latest battery information after setting, with the same format as the
Localization (Locale)
Get Localization Info
Get a list of all supported languages, countries/regions, and time zones.
- URL:
/locale/list - Method:
GET - Parameters:
Parameter Type Required Description display_languages array No List of language codes for display names, default ["zh", "en"] - Response Example:json
{ "code": 200, "data": { "languages": [ { "code": "zh", "names": { "zh": "中文", "en": "Chinese" } }, { "code": "en", "names": { "zh": "英语", "en": "English" } } ], "regions": [ { "code": "CN", "names": { "zh": "中国", "en": "China" } }, { "code": "US", "names": { "zh": "美国", "en": "United States" } } ], "time_zones": [ { "id": "Asia/Shanghai", "names": { "zh": "中国标准时间 (上海)", "en": "China Standard Time (Shanghai)" }, "offset": 28800000, "raw_offset": 28800000 } ] }, "msg": "OK", "request_id": "li123456" }
Clipboard (Clipboard)
Set Clipboard
- URL:
/clipboard/set - Method:
POST - Parameters:
Parameter Type Required Description text string Yes Text content - Request Example:json
{ "text": "Hello World" } - Response Example:json
{ "code": 200, "data": { "text": "Hello World", "length": 11 }, "msg": "OK", "request_id": "h8i9j0a1b2c3d4e5f6g7" }
Get Current Clipboard
- URL:
/clipboard/get - Method:
GET - Response Example:json
{ "code": 200, "data": { "text": "Hello World", "length": 11 }, "msg": "OK", "request_id": "i9j0a1b2c3d4e5f6g7h8" }
Get Clipboard History
- URL:
/clipboard/list - Method:
GET - Response Example:json
{ "code": 200, "data": { "count": 2, "mime_type": "text/plain", "items": ["Hello", "World"] }, "msg": "OK", "request_id": "j0a1b2c3d4e5f6g7h8i9" }
Clear Clipboard
- URL:
/clipboard/clear - Method:
POST - Response Example:json
{ "code": 200, "data": true, "msg": "OK", "request_id": "k1l2m3n4o5p6q7r8s9t0" }
Display (Display)
Get Screen Information
- URL:
/display/info - Method:
GET - Response Example:json
{ "code": 200, "data": { "width": 1080, "height": 1920, "rotation": 0, "orientation": 1 }, "msg": "OK", "request_id": "o5p6q7r8s9t0u1v2w3x4" }
Screen Rotation
- URL:
/display/rotate - Method:
POST - Parameters:
Parameter Type Required Description rotation int Yes Rotation angle: 0=0°, 1=90°, 2=180°, 3=270° - Request Example:json
{ "rotation": 1 } - Response Example:json
{ "code": 200, "data": { "width": 1920, "height": 1080, "rotation": 1, "orientation": 0 }, "msg": "OK", "request_id": "p6q7r8s9t0u1v2w3x4y5" }
Screen Screenshot (Compressed)
- URL:
/screenshot/format - Method:
GET - Parameters:
Parameter Type Required Description format string No webp,png,jpeg(Default isjpg)quality int No Quality (1-100), default 100 - Returns: Raw image binary stream (Content-Type: image/jpeg, etc.).
Get Screenshot (Raw)
- URL:
/screenshot/raw - Method:
GET - Returns: Raw RGBA pixel data stream (ARGB_8888). Each pixel occupies 4 bytes.
Call Log Management (CallLog)
Add Call Log
Requires API version 1.0.4 or higher.
- URL:
/calllog/add - Method:
POST - Parameters:
Parameter Type Required Description number string Yes Phone number type int No Type: 1=Incoming, 2=Outgoing, 3=Missed (Default 1) date long No Timestamp, default current time duration long No Duration (seconds), default 0 - Request Example:json
{ "number": "13800001234", "type": 1, "duration": 60 } - Response Example:json
{ "code": 200, "data": [ { "_id": 1, "number": "13800001234", "type": 1, "type_name": "INCOMING_TYPE", "date": 1678888888000, "duration": 60, "new": 0, "cached_name": null, "contact": { "_id": 3, "display_name": "John" } } ], "msg": "OK", "request_id": "cla123456" }
Batch Add Call Logs
Requires API version 1.0.4 or higher.
- URL:
/calllog/add_list - Method:
POST - Parameters:
Parameter Type Required Description calllog_list array Yes Call log list, each item contains number,type,date,duration - Request Example:json
{ "list": [ { "number": "13800001234", "type": 1, "duration": 60 }, { "number": "13900005678", "type": 2, "duration": 120 } ] } - Response Example:json
{ "code": 200, "data": [ { "_id": 1, "number": "13800001234", "type": 1, "type_name": "INCOMING_TYPE", "date": 1678888888000, "duration": 60, "new": 0, "cached_name": null, "contact": { "_id": 3, "display_name": "John" } }, { "_id": 2, "number": "13900005678", "type": 2, "type_name": "OUTGOING_TYPE", "date": 1678888889000, "duration": 120, "new": 0, "cached_name": null } ], "msg": "OK", "request_id": "clal123456" }
Delete Call Log
Requires API version 1.0.4 or higher.
- URL:
/calllog/delete - Method:
POST - Parameters:
Parameter Type Required Description id long Yes Call log ID - Response Example:json
{ "code": 200, "data": true, "msg": "OK", "request_id": "cld123456" }
Batch Delete Call Logs
Requires API version 1.0.4 or higher.
- URL:
/calllog/delete_list - Method:
POST - Parameters:
Parameter Type Required Description ids array Yes Array of call log IDs - Request Example:json
{ "ids": [1, 2, 3] } - Response Example:json
{ "code": 200, "data": 3, "msg": "OK", "request_id": "cldl123456" } - Note: Returns the number of records successfully deleted.
Clear Call Log
Requires API version 1.0.4 or higher.
- URL:
/calllog/clear - Method:
POST - Response Example:json
{ "code": 200, "data": 15, "msg": "OK", "request_id": "clc123456" } - Note: Returns the number of deleted records.
Get Call Log List
Requires API version 1.0.4 or higher.
- URL:
/calllog/list - Method:
GET - Parameters:
Parameter Type Required Description limit int No Limit count, default 100 offset int No Offset, default 0 - Response Example:json
{ "code": 200, "data": { "offset": 0, "limit": 100, "count": 1, "list": [ { "_id": 1, "number": "13800001234", "type": 1, "type_name": "INCOMING_TYPE", "date": 1678888888000, "duration": 60, "new": 0, "cached_name": "John", "contact": { "_id": 3, "display_name": "John" } } ] }, "msg": "OK", "request_id": "cll123456" } - Response Fields:
Field Type Description _id long Unique call log ID number string Phone number type int Call type: 1=Incoming, 2=Outgoing, 3=Missed, 4=Voicemail, 5=Rejected, 6=Blocked type_name string Call type constant name (e.g., INCOMING_TYPE)date long Call timestamp (ms) duration long Call duration (seconds) new int Whether it's a new record: 1=Yes, 0=No cached_name string Cached contact name (may be null) contact object Contact info (returned when number matches, contains _idanddisplay_name)
Contact Management (Contact)
Add Contact
Requires API version 1.0.4 or higher.
- URL:
/contact/add - Method:
POST - Parameters:
Parameter Type Required Description name string Yes Name phone string Yes Phone number email string No Email organization string No Company/Organization title string No Job title note string No Remark - Request Example:json
{ "name": "Zhang San", "phone": "13800138000" } - Response Example:json
{ "code": 200, "data": [ { "_id": 1, "display_name": "Zhang San", "has_phone_number": 1, "phones": ["13800138000"] } ], "msg": "OK", "request_id": "con1234567890" }
Batch Add Contacts
Requires API version 1.0.4 or higher.
- URL:
/contact/add_list - Method:
POST - Parameters:
Parameter Type Required Description contact_list array Yes Contact list, each item contains name,phone,email,organization,title,note - Request Example:json
{ "contact_list": [ { "name": "Zhang San", "phone": "13800138000" }, { "name": "Li Si", "phone": "13900139000", "email": "lisi@example.com" } ] } - Response Example:json
{ "code": 200, "data": [ { "_id": 1, "display_name": "Zhang San", "has_phone_number": 1, "phones": ["13800138000"] }, { "_id": 2, "display_name": "Li Si", "has_phone_number": 1, "phones": ["13900139000"] } ], "msg": "OK", "request_id": "cal123456" }
Delete Contact
Requires API version 1.0.4 or higher.
- URL:
/contact/delete - Method:
POST - Parameters:
Parameter Type Required Description id long Yes Contact ID - Request Example:json
{ "id": 1 } - Response Example:json
{ "code": 200, "data": true, "msg": "OK", "request_id": "cd123456" }
Batch Delete Contacts
Requires API version 1.0.4 or higher.
- URL:
/contact/delete_list - Method:
POST - Parameters:
Parameter Type Required Description ids array Yes Array of contact IDs - Request Example:json
{ "ids": [1, 2, 3] } - Response Example:json
{ "code": 200, "data": 3, "msg": "OK", "request_id": "cdl123456" } - Note: Returns the number of records successfully deleted.
Get Contact List
- URL:
/contact/list - Method:
GET - Parameters:
Parameter Type Required Description offset int No Offset, default 0 limit int No Limit count, default 100 - Response Example:json
{ "code": 200, "data": { "offset": 0, "limit": 100, "count": 1, "list": [ { "_id": 1, "display_name": "Zhang San", "has_phone_number": 1, "phones": ["13800138000"] } ] }, "msg": "OK", "request_id": "cl123456" } - Response Fields:
Field Type Description _id long Unique contact ID display_name string Contact display name has_phone_number int Has phone number: 1=Yes, 0=No phones array List of phone numbers
Query Contacts
Requires API version 1.0.4 or higher.
- URL:
/contact/query - Method:
POST - Parameters:
Parameter Type Required Description id long No Contact ID name string No Contact name (fuzzy match) phone string No Phone number offset int No Offset, default 0 limit int No Limit count, default 100 - Request Example:json
{ "name": "John" } - Response Example:json
{ "code": 200, "data": { "offset": 0, "limit": 100, "count": 1, "list": [ { "_id": 1, "display_name": "John Doe", "has_phone_number": 1, "phones": ["13800001234"] } ] }, "msg": "OK", "request_id": "cq123456" } - Note: Supports querying contacts by ID, name (fuzzy match), or phone number. Parameters can be combined. If no parameters are provided, returns all contacts.
Clear Contacts
Requires API version 1.0.4 or higher.
- URL:
/contact/clear - Method:
POST - Response Example:json
{ "code": 200, "data": 5, "msg": "OK", "request_id": "cc123456" } - Note: Returns the number of deleted records.
SMS Management (SMS)
Get SMS List
- URL:
/sms/list - Method:
GET - Parameters:
Parameter Type Required Description type int No SMS type (0: All, 1: Inbox, 2: Sent, 3: Draft, 4: Outbox, 5: Failed, 6: Queued), default 0 offset int No Offset, default 0 limit int No Limit count, default 100 - Response Example:json
{ "code": 200, "data": { "type": 0, "offset": 0, "limit": 100, "count": 1, "list": [ { "_id": 1, "address": "13800001234", "body": "Hello, this is a test message.", "date": 1736412345000, "type": 1, "type_name": "MESSAGE_TYPE_INBOX", "read": 1, "seen": 1, "creator": "com.android.messaging", "contact": { "_id": 3, "display_name": "John" } } ] }, "msg": "OK", "request_id": "sl123456" } - Response Fields:
Field Type Description _id long Unique SMS ID address string Recipient/Sender number body string SMS content date long Timestamp (ms) type int SMS type: 1=Inbox, 2=Sent, 3=Draft, 4=Outbox, 5=Failed, 6=Queued type_name string SMS type constant name (e.g., MESSAGE_TYPE_INBOX)read int Whether read: 1=Yes, 0=No seen int Whether displayed: 1=Yes, 0=No creator string Creator package name contact object Contact info (returned when number matches, contains _idanddisplay_name)
Add SMS
Requires API version 1.0.4 or higher.
- URL:
/sms/add - Method:
POST - Parameters:
Parameter Type Required Description address string Yes Recipient/Sender number body string Yes SMS content type int No SMS type (1: Inbox, 2: Sent, 3: Draft, 4: Outbox, 5: Failed, 6: Queued), default 1 date long No Timestamp, default current time read boolean No Whether read, default trueseen boolean No Whether displayed, default true - Request Example:json
{ "address": "13800001234", "body": "Hello, this is a test message.", "type": 1, "read": true, "seen": true } - Response Example:json
{ "code": 200, "data": [ { "_id": 1, "address": "13800001234", "body": "Hello, this is a test message.", "date": 1736412345000, "type": 1, "type_name": "MESSAGE_TYPE_INBOX", "read": 1, "seen": 1, "creator": "com.android.messaging", "contact": { "_id": 3, "display_name": "John" } } ], "msg": "OK", "request_id": "sa123456" }
Batch Add SMS
Requires API version 1.0.4 or higher.
- URL:
/sms/add_list - Method:
POST - Parameters:
Parameter Type Required Description sms_list array Yes SMS list, each item contains address,body,type,date,read,seen - Request Example:json
{ "list": [ { "address": "13800001234", "body": "test msg1", "type": 1 }, { "address": "13900005678", "body": "test msg2", "type": 1 } ] } - Response Example:json
{ "code": 200, "data": [ { "_id": 1, "address": "13800001234", "body": "test msg1", "date": 1736412345000, "type": 1, "type_name": "MESSAGE_TYPE_INBOX", "read": 1, "seen": 1, "creator": "com.android.messaging", "contact": { "_id": 3, "display_name": "John" } }, { "_id": 2, "address": "13900005678", "body": "test msg2", "date": 1736412346000, "type": 1, "type_name": "MESSAGE_TYPE_INBOX", "read": 1, "seen": 1, "creator": "com.android.messaging" } ], "msg": "OK", "request_id": "sal123456" }
Receive SMS (Simulate Incoming SMS)
Simulate receiving an SMS, which triggers the complete SMS reception flow. Requires API version 1.0.4 or higher, currently supports Android 13 / 14.
- URL:
/sms/receive - Method:
POST - Parameters:
Parameter Type Required Description sender string Yes Sender number body string Yes SMS content - Request Example:json
{ "sender": "13800001234", "body": "Your verification code is 123456." } - Response Example:json
{ "code": 200, "data": true, "msg": "OK", "request_id": "sr123456" } - Note: The difference from
/sms/addis that this endpoint triggers the complete SMS reception flow including system notifications and broadcasts, while/sms/addonly adds a record to the database.
Delete SMS
- URL:
/sms/delete - Method:
POST - Parameters:
Parameter Type Required Description id long Yes SMS ID - Response Example:json
{ "code": 200, "data": true, "msg": "OK", "request_id": "sd123456" }
Batch Delete SMS
Requires API version 1.0.4 or higher.
- URL:
/sms/delete_list - Method:
POST - Parameters:
Parameter Type Required Description ids array Yes Array of SMS IDs - Request Example:json
{ "ids": [1, 2, 3] } - Response Example:json
{ "code": 200, "data": 3, "msg": "OK", "request_id": "sdl123456" } - Note: Returns the number of records successfully deleted.
Clear SMS
Requires API version 1.0.4 or higher.
- URL:
/sms/clear - Method:
POST - Response Example:json
{ "code": 200, "data": 20, "msg": "OK", "request_id": "sc123456" } - Note: Returns the number of deleted records.
Location Management (Location)
Get Location Info
Get current device GPS location information using standard Android API. Requires API version 1.0.4 or higher.
- URL:
/location/get_data - Method:
GET - Response Example:json
{ "code": 200, "data": { "latitude": 39.9042, "longitude": 116.4074, "altitude": 0.0, "speed": 0.0, "bearing": 0.0, "accuracy": 50.0, "vertical_accuracy_meters": 50.0, "speed_accuracy_meters_per_second": 1.0, "bearing_accuracy_degrees": 30.0, "enabled": true, "time": 1673641234567, "provider": "gps" }, "msg": "OK", "request_id": "lg123456" } - Response Fields:
Field Type Description latitude double Latitude longitude double Longitude altitude double Altitude (meters) speed double Speed (m/s) bearing double Bearing (degrees) accuracy float Horizontal accuracy (meters) vertical_accuracy_meters float Vertical accuracy (meters) speed_accuracy_meters_per_second float Speed accuracy (m/s) bearing_accuracy_degrees float Bearing accuracy (degrees) enabled boolean Whether mock location is enabled time long Timestamp of location fix (ms) provider string Location provider (e.g., gps,network,properties)
Set Location Information
Simulate device GPS location information. Requires API version 1.0.4 or higher.
- URL:
/location/set_data - Method:
POST - Parameters:
Parameter Type Required Description enabled boolean No Whether to enable mock location persist boolean No Whether to persist (effective after reboot), default falselatitude double No Latitude longitude double No Longitude altitude double No Altitude (meters), default 0.0speed double No Speed (m/s), default 0.0bearing double No Bearing (degrees), default 0.0accuracy double No Horizontal accuracy (meters), default 50.0vertical_accuracy_meters double No Vertical accuracy (meters), default 50.0speed_accuracy_meters_per_second double No Speed accuracy (m/s), default 1.0bearing_accuracy_degrees double No Bearing accuracy (degrees), default 30.0 - Request Example:json
{ "latitude": 39.9042, "longitude": 116.4074, "vertical_accuracy_meters": 50.0, "enabled": true, "persist": true } - Response Example:json
{ "code": 200, "data": true, "msg": "OK", "request_id": "ls123456" }
Sensor Management (Sensor)
Get Sensor List
Get information about all sensors supported by the system. Requires API version 1.0.4 or higher.
- URL:
/sensor/list - Method:
GET - Parameters:
Parameter Type Required Description type int No Sensor type ID, returns all if not passed - Response Example:json
{ "code": 200, "data": [ { "name": "Goldfish 3-axis Accelerometer", "type": 1, "type_name": "TYPE_ACCELEROMETER", "vendor": "The Android Open Source Project", "version": 1, "resolution": 0.0, "power": 0.0, "min_delay": 0, "string_type": "android.sensor.accelerometer" } ], "msg": "OK", "request_id": "sl123456" } - Response Fields:
Field Type Description name string Sensor name type int Sensor type ID type_name string Sensor type constant name vendor string Sensor vendor version int Sensor version resolution float Sensor resolution power float Power consumption (mA) min_delay int Minimum sampling interval (microseconds) string_type string Sensor type string
Get Sensor Data
Get real-time data of the current sensor. Requires API version 1.0.4 or higher.
- URL:
/sensor/get_data - Method:
GET - Parameters:
Parameter Type Required Description type int No Sensor type ID (e.g., 1 for accelerometer), returns all sensor data if not passed timeout long No Timeout for getting data (ms), default 500 - Response Example (Single Sensor):json
{ "code": 200, "data": { "type": 1, "type_name": "TYPE_ACCELEROMETER", "name": "Goldfish 3-axis Accelerometer", "values": [0.0, 9.8, 0.0], "timestamp": 1673641234567 }, "msg": "OK", "request_id": "sg123456" } - Response Example (All Sensors):json
{ "code": 200, "data": { "sensors": [ { "type": 1, "type_name": "TYPE_ACCELEROMETER", "name": "Goldfish 3-axis Accelerometer", "values": [0.0, 9.8, 0.0] } ], "timestamp": 1673641234567 }, "msg": "OK", "request_id": "sg123456" }
Set Sensor Data
Set simulation data for virtual sensors. Requires API version 1.0.4 or higher.
- URL:
/sensor/set_data - Method:
POST - Parameters:
Parameter Type Required Description sensors array Yes List of sensor data entries - Sensor Object Description:
Parameter Type Required Description type int Yes Sensor type, see table below value double No Value for single-axis sensors (e.g., light, pressure, proximity, humidity, temperature, step count) x double No X-axis value for three-axis sensors (e.g., accelerometer, magnetic field, gyroscope) y double No Y-axis value z double No Z-axis value - Sensor Types:
type Constant Description 1 TYPE_ACCELEROMETER Accelerometer Sensor 2 TYPE_MAGNETIC_FIELD Magnetic Field Sensor 3 TYPE_ORIENTATION Orientation Sensor 4 TYPE_GYROSCOPE Gyroscope Sensor 5 TYPE_LIGHT Light Sensor 6 TYPE_PRESSURE Pressure Sensor 8 TYPE_PROXIMITY Proximity Sensor 9 TYPE_GRAVITY Gravity Sensor 10 TYPE_LINEAR_ACCELERATION Linear Acceleration Sensor 11 TYPE_ROTATION_VECTOR Rotation Vector Sensor 12 TYPE_RELATIVE_HUMIDITY Humidity Sensor 13 TYPE_AMBIENT_TEMPERATURE Temperature Sensor 14 TYPE_MAGNETIC_FIELD_UNCALIBRATED Uncalibrated Magnetic Field Sensor 15 TYPE_GAME_ROTATION_VECTOR Game Rotation Vector Sensor 16 TYPE_GYROSCOPE_UNCALIBRATED Uncalibrated Gyroscope Sensor 17 TYPE_SIGNIFICANT_MOTION Significant Motion Sensor 18 TYPE_STEP_DETECTOR Step Detector Sensor 19 TYPE_STEP_COUNTER Step Counter Sensor 20 TYPE_GEOMAGNETIC_ROTATION_VECTOR Geomagnetic Rotation Vector Sensor 21 TYPE_HEART_RATE Heart Rate Sensor 22 TYPE_TILT_DETECTOR Tilt Detector Sensor 25 TYPE_PICK_UP_GESTURE Pick Up Gesture Sensor 26 TYPE_WRIST_TILT_GESTURE Wrist Tilt Sensor 27 TYPE_DEVICE_ORIENTATION Device Orientation Sensor 30 TYPE_MOTION_DETECT Motion Detect Sensor 35 TYPE_ACCELEROMETER_UNCALIBRATED Uncalibrated Accelerometer Sensor 36 TYPE_HINGE_ANGLE Hinge Angle Sensor - Request Example:json
{ "sensors": [ { "type": 5, "value": 100.0 }, { "type": 2, "x": 1.0, "y": 2.0, "z": 3.0 } ] } - Response Example:json
{ "code": 200, "data": true, "msg": "OK", "request_id": "ss123456" }
Account Management (Account)
Add Account
- URL:
/account/add - Method:
POST - Parameters:
Parameter Type Required Description name string Yes Account name (e.g., example@gmail.com)type string Yes Account type (e.g., com.google)password string No Password user_data object No Custom user data (Key-Value) - Request Example:json
{ "name": "test_user", "type": "com.example.account", "password": "password123", "user_data": { "key1": "value1" } } - Response Example:json
{ "code": 200, "data": { "name": "test_user", "type": "com.example.account" }, "msg": "OK", "request_id": "aa123456" }
Get Account List
- URL:
/account/list - Method:
GET - Parameters:
Parameter Type Required Description type string No Filter by account type - Response Example:json
{ "code": 200, "data": { "count": 1, "accounts": [ { "name": "test_user", "type": "com.example.account" } ] }, "msg": "OK", "request_id": "al123456" }
Delete Account
- URL:
/account/delete - Method:
POST - Parameters:
Parameter Type Required Description name string Yes Account name type string Yes Account type - Response Example:json
{ "code": 200, "data": { "name": "test_user", "type": "com.example.account" }, "msg": "OK", "request_id": "ad123456" }
Media & Audio (Media)
Set Volume
- URL:
/media/set_volume - Method:
POST - Parameters:
Parameter Type Required Description stream_type string Yes Volume type: music,voice_call,ring,alarm,notificationvolume int Yes Volume value (0 to Max) show_ui boolean No Whether to show system volume UI (Default true) - Request Example:json
{ "stream_type": "music", "volume": 8 } - Response Example:json
{ "code": 200, "data": { "stream_type": "music", "volume": 8 }, "msg": "OK", "request_id": "sv123456" }
Mute / Unmute
- URL:
/media/mute - Method:
POST - Parameters:
Parameter Type Required Description mute boolean Yes trueto mute,falseto unmute - Response Example:json
{ "code": 200, "data": { "mute": true }, "msg": "OK", "request_id": "mu123456" }
Get Volume Info
- URL:
/media/get_volume - Method:
GET - Response Example:json
{ "code": 200, "data": { "music": { "current": 8, "max": 15 }, "voice_call": { "current": 5, "max": 10 }, "ring": { "current": 10, "max": 15 }, "is_mute": false }, "msg": "OK", "request_id": "vi123456" }
Accessibility (Accessibility)
Export UI Hierarchy
- URL:
/accessibility/dump - Method:
GET - Response Example:json
{ "code": 200, "data": "<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><hierarchy ...", "msg": "OK", "request_id": "r8s9t0u1v2w3x4y5z6a7" }
UI Node Operations
Unified interface for node finding and operations, supporting finding, waiting, and performing actions. Requires image version 20260201 or above.
URL:
/accessibility/nodeMethod:
POSTParameters:
Parameter Type Required Description selector object Yes Node selector containing search criteria wait_timeout long No Wait timeout (ms), default 0 means no wait wait_interval long No Wait interval (ms), default 500 action string No Action name to execute (e.g., click,set_text)action_params object No Action parameters (e.g., text)action_index int No Index of the node to act on, default 0 Selector Parameters:
Parameter Type Required Description xpath string No XPath expression, highest priority text string No Node text. Supports regex (e.g., .*Settings.*)content_desc string No Node content description. Supports regex name string No Node text or content description. Supports regex class string No Node class name (class) resource_id string No Node resource ID (resource-id) package string No Application package name index int No Index of the node within its parent clickable boolean No Whether clickable enabled boolean No Whether enabled scrollable boolean No Whether scrollable focusable boolean No Whether focusable focused boolean No Whether focused selected boolean No Whether selected checkable boolean No Whether checkable checked boolean No Whether checked center_x int No Node center X coordinate center_y int No Node center Y coordinate Supported Actions:
click: Clicklong_click: Long clickset_text: Set text (requires parametertext)clear_text: Clear textscroll_forward/scroll_backward: Scroll forward/backwardscroll_up/scroll_down/scroll_left/scroll_right: Directional scrollfocus/clear_focus: Get/Clear focusselect/clear_selection: Select/Deselectcopy/paste/cut: Clipboard operationsexpand/collapse: Expand/Collapseime_enter: IME Enter
Request Example (Exact Match):
json{ "selector": { "text": "Settings" }, "action": "click" }Request Example (XPath Match):
json{ "selector": { "xpath": "//node[@text='Settings' and @clickable='true']" }, "action": "click" }Request Example (Wait and Set Text):
json{ "selector": { "resource_id": "com.example:id/input" }, "wait_timeout": 5000, "action": "set_text", "action_params": { "text": "Hello" } }Response Example:
json{ "code": 200, "data": { "count": 1, "nodes": [ ... ], "action": "click", "action_index": 0, "action_node": { ... } }, "msg": "OK", "request_id": "an123456" }
Set Accessibility Service Hidden State
Set whether a specified application is hidden from the accessibility service list. Image version 20260113 or above is required.
- URL:
/accessibility/set_hidden - Method:
POST - Parameters:
Parameter Type Required Description package_names array Yes List of accessibility service package names hidden boolean No Whether to hide, default true - Response Example:json
{ "code": 200, "data": ["com.example.service1", "com.example.service2"], "msg": "OK", "request_id": "sh123456" }
Get Accessibility Service Hidden State
Get the list of accessibility service package names that are currently hidden. Image version 20260113 or above is required.
- URL:
/accessibility/get_hidden - Method:
GET - Response Example:json
{ "code": 200, "data": ["com.example.service1", "com.example.service2"], "msg": "OK", "request_id": "gh123456" }
Notification Management (Notification)
Get Active Notifications
- URL:
/notification/list - Method:
GET - Parameters:
Parameter Type Required Description package_name string No Filter notifications by application package name - Response Example:json
{ "code": 200, "data": { "count": 1, "notifications": [ { "package_name": "com.android.settings", "id": 1, "key": "0|com.android.settings|1|null|1000", "title": "Notification Title", "text": "Notification Content", "post_time": 1736412345000, "is_ongoing": false, "is_clearable": true, "priority": 0 } ] }, "msg": "OK", "request_id": "v2w3x4y5z6a7b8c9d0e1" }
Get Application Notification Channels
- URL:
/notification/channels - Method:
GET - Parameters:
Parameter Type Required Description package_name string Yes Application package name - Response Example:json
{ "code": 200, "data": { "package_name": "com.example.app", "count": 1, "channels": [ { "id": "channel_id", "name": "Channel Name", "importance": 3, "description": "Channel description" } ] }, "msg": "OK", "request_id": "nc123456" }
Device Information (Device)
Random Model Info
Randomly generate and set the model info of the cloud machine. Note: This interface is only supported for virtual machine type cloud machines.
- URL:
/device/random_model - Method:
POST - Parameters:
Parameter Type Required Description is_china boolean No Whether to only randomize Chinese models, default false - Response Example:json
{ "code": 200, "data": { "manufacturer": "Xiaomi", "model": "MI 11", "brand": "Xiaomi", "device": "cetus", "product": "cetus", "hardware": "qcom" }, "msg": "OK", "request_id": "s9t0u1v2w3x4y5z6a7b8" }
Google Services (Google)
Enable/Disable Google Suite
Enable or disable the complete Google service suite (including GMS Core, Play Store, Service Framework, etc.).
- URL:
/google/set_enabled - Method:
POST - Parameters:
Parameter Type Required Description enabled boolean Yes trueto enable,falseto disable - Response Example:json
{ "code": 200, "data": true, "msg": "OK", "request_id": "gs123456" }
Reset GAID
Reset Google Advertising ID (GAID).
- URL:
/google/reset_gaid - Method:
POST - Parameters:
Parameter Type Required Description gaid string No Specify GAID, if not passed, a random one will be generated - Response Example:json
{ "code": 200, "data": "550e8400-e29b-41d4-a716-446655440000", "msg": "OK", "request_id": "gr123456" }
Get Google Suite Enablement State
Get the current enablement state of the Google service suite. Returns true only if all components in the suite are enabled.
- URL:
/google/get_enabled - Method:
GET - Response Example:json
{ "code": 200, "data": true, "msg": "OK", "request_id": "gst123456" }
