📡 WSAPI 接口文档 📡 WSAPI Documentation
WebSocket
HTTP 通用
HTTP General
多语言支持
Multi-Language
地址:Address:
127.0.0.1:22223
✅ 支持 Python / C++ / 易语言 / 按键精灵 / Vue / Node.js 等。
✅ Supports Python / C++ / Epl / JianJing / Vue / Node.js, etc.
DEMO 位于软件安装目录下的
DEMO is located in the installation directory:
androids\Dev samples
📌 通用说明
• 除了
•
• 所有接口均使用 JSON 格式请求。
• 除了
List 和 GetGroup 接口,其他接口需要传 deviceIds(设备id,多个逗号隔开)或 groupIds(分组id,多个逗号隔开)。•
deviceIds 支持传 "all" 表示所有设备。• 所有接口均使用 JSON 格式请求。
📌 General Instructions
• Except for
•
• All APIs use JSON format for requests.
• Except for
List and GetGroup, other APIs require deviceIds (comma-separated) or groupIds (comma-separated).•
deviceIds supports "all" for all devices.• All APIs use JSON format for requests.
🔍 基础查询🔍 Basic Queries 3 个接口3 APIs
List
查询列表Query List
返回所有设备 ID 列表
Returns a list of all device IDs
{
"action": "List"
}
Detail
查询设备详情Device Details
查询某些设备的详细信息,支持
deviceIds 或 groupIdsQuery detailed information of specific devices, supports
deviceIds or groupIds{
"action": "Detail",
"comm": {
"deviceIds": "fa3523ea0510"
}
}
HostDetail
主控信息Host Info
查询当前主控的设备信息
Query the current host device information
{
"action": "HostDetail"
}
📱 应用 & 分组管理📱 App & Group Mgmt 8 个接口8 APIs
GetAppInfoByAppName
通过名称启动AppLaunch App by Name
通过 app 名称直接启动应用
Launch the application directly by app name
{
"action": "GetAppInfoByAppName",
"comm": {
"deviceIds": "all",
"appName": "911"
}
}
CurrentAppInfo
当前页面信息Current Page Info
获取当前设备所在页面的应用包名和类名
Get the package and class name of the current active page on the device
{
"action": "CurrentAppInfo",
"comm": {
"deviceIds": "all"
}
}
GetGroup
查询分组列表Query Groups
获取所有分组信息
Get all groups information
{
"action": "GetGroup"
}
CreateGroup
创建分组Create Group
创建新分组,返回新分组 ID
Create a new group, returns the new group ID
{
"action": "CreateGroup",
"comm": {
"groupName": "新分组2"
}
}
UpdateGroup
修改分组名称Update Group Name
{
"action": "UpdateGroup",
"comm": {
"groupId": "6",
"groupName": "新分组名称"
}
}
DeleteGroup
删除分组Delete Group
{
"action": "DeleteGroup",
"comm": {
"groupId": "6"
}
}
RemoveDeviceGroup
移动设备到分组Move Device
deleteGroupId 原分组ID | newGroupId 目标分组ID | androidIds 设备ID(多个逗号隔开)
deleteGroupId Original group ID | newGroupId Target group ID | androidIds Device IDs (comma-separated)
{
"action": "RemoveDeviceGroup",
"comm": {
"deleteGroupId": "6",
"newGroupId": "7",
"androidIds": "fa3523ea0510"
}
}
EditDeviceName
修改设备名称Edit Device Name
deviceIds 只能传一个;isTemp=1 不保存数据库,仅临时修改deviceIds accepts only one ID; isTemp=1 means temporary change without saving to database{
"action": "EditDeviceName",
"comm": {
"deviceIds": "fa3523ea0510",
"deviceName": "新设备名称",
"isTemp": "1"
}
}
EditDeviceNo
修改设备编号Edit Device No.
deviceIds 只能传一个;deviceNo 为 int 类型字符串;isTemp=1 不保存数据库deviceIds accepts only one ID; deviceNo is string representation of an int; isTemp=1 for temporary change{
"action": "EditDeviceNo",
"comm": {
"deviceIds": "fa3523ea0510",
"deviceNo": "66",
"isTemp": "1"
}
}
🖥️ 屏幕 & 剪贴板🖥️ Screen & Clipboard 3 个接口3 APIs
Screen
截屏Screenshot
支持
groupIds 或 deviceIds,savePath 为保存文件夹目录Supports
groupIds or deviceIds, savePath is the local directory to save images{
"action": "Screen",
"comm": {
"groupIds": "1,2,3",
"savePath": "保存文件夹目录"
}
}
WriteClipboard
设置手机粘贴板Set Phone Clipboard
{
"action": "WriteClipboard",
"comm": {
"deviceIds": "fa3523ea0510",
"content": "复制一段话到手机"
}
}
GetClipboard
获取手机粘贴板Get Phone Clipboard
deviceIds 只能传一个,不能多个deviceIds accepts only one ID, cannot be multiple{
"action": "GetClipboard",
"comm": {
"deviceIds": "fa3523ea0510"
}
}
🎮 设备操作🎮 Device Operations 5 个接口5 APIs
BasisOperate
基础操作Basic Ops
type:1加音量 2减音量 3Back 4Home 6最近任务 14息屏 15开屏
type: 1 Vol Up 2 Vol Down 3 Back 4 Home 6 Recent Apps 14 Screen Off 15 Screen On
{
"action": "BasisOperate",
"comm": {
"deviceIds": "fa3523ea0510",
"type": "1"
}
}
PointerEvent
事件操作Pointer Events
mask:0按下 1移动 2松开 3鼠标右键 4滚轮上 5滚轮下 6上滑 7下滑 8左滑 9右滑 10放大 11缩小x, y 为百分比坐标;上/下/左/右滑需传 endx, endy,其他传 0
mask: 0 Press 1 Move 2 Release 3 Right Click 4 Scroll Up 5 Scroll Down 6 Swipe Up 7 Swipe Down 8 Swipe Left 9 Swipe Right 10 Zoom In 11 Zoom Outx, y are percentage coordinates; Swipe actions require endx, endy, others pass 0
{
"action": "PointerEvent",
"comm": {
"deviceIds": "fa3523ea0510",
"mask": "0",
"x": "0.5",
"y": "0.5",
"endx": "0",
"endy": "0",
"delta": "2"
}
}
KeyBoardkey
键盘事件Keyboard Events
key reference: System.Windows.Input.Keysmodifiers: Shift=4 Control=2 Alt=1isUp: 0 Press down 1 Release
{
"action": "KeyBoardkey",
"comm": {
"deviceIds": "fa3523ea0510",
"key": "15",
"modifiers": "262144",
"isUp": "1"
}
}
InputText
输入中文Input Text
{
"action": "InputText",
"comm": {
"text": "我是啊",
"deviceIds": "fa3523ea0510"
}
}
ADB
ADB 命令ADB Command
{
"action": "ADB",
"comm": {
"command": "ip addr show wlan0",
"deviceIds": "fa3523ea0510"
}
}
📁 文件传输📁 File Transfer 6 个接口6 APIs
BeginFileSend
上传文件Upload File
filePaths 电脑文件路径,多个逗号隔开;isAutoInstall:0上传文件 1自动安装APK
filePaths PC file paths, comma-separated; isAutoInstall: 0 Upload File 1 Auto-install APK
{
"action": "BeginFileSend",
"comm": {
"filePaths": "你要上传的文件路径 多个逗号隔开",
"isAutoInstall": "0",
"deviceIds": "fa3523ea0510"
}
}
StopSendFile
中断上传Stop Upload
{
"action": "StopSendFile",
"comm": {
"deviceIds": "fa3523ea0510"
}
}
ExecuteBat
执行Bat文件Execute Bat Script
filePath bat 文件路径filePath path to the .bat script{
"action": "ExecuteBat",
"comm": {
"deviceIds": "all",
"filePath": "C:\\Program Files\\911\\Scripts\\slide.bat"
}
}
StopBat
停止Bat文件Stop Bat Script
filePath 传空则停止该设备所有 bat 脚本Pass empty
filePath to stop all executing bat scripts on the device{
"action": "StopBat",
"comm": {
"deviceIds": "all",
"filePath": "C:\\Program Files\\911\\Scripts\\slide.bat"
}
}
HttpDown
HTTP下载到手机HTTP Download to Phone
httpurl 下载链接 | savepath 手机保存目录httpurl download link | savepath save path on phone{
"action": "HttpDown",
"comm": {
"deviceIds": "all",
"httpurl": "http://911.cnhack.com/index.1.0.7.8.1694195495.html",
"savepath": "/data/local/tmp/911.html"
}
}
PullText
读取手机文件内容Read Phone File
textpath 手机上的文件路径textpath the path of the file on the phone{
"action": "PullText",
"comm": {
"deviceIds": "all",
"textpath": "/storage/emulated/0/Download/text.txt"
}
}
PullFile
下载手机文件到本机Pull File to PC
deviceIds 只能传一个;phoneFilePath 手机文件路径;savePath 电脑保存路径
deviceIds accepts only one ID; phoneFilePath file path on phone; savePath save path on PC
{
"action": "PullFile",
"comm": {
"deviceIds": "192.168.110.76:5555",
"phoneFilePath": "/storage/emulated/0/Download/911.exe",
"savePath": "C:/188s52.exe"
}
}