You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
4 months ago | |
|---|---|---|
| app | 4 months ago | |
| logs | 4 months ago | |
| README.md | 4 months ago | |
| TermControlAgent.md | 4 months ago | |
| git_workflow.md | 4 months ago | |
| modify.md | 4 months ago | |
| original_adb_client_reference.md | 4 months ago | |
| requirements.txt | 4 months ago | |
| run.py | 4 months ago | |
| test_config_only.py | 4 months ago | |
| test_exception_handling.py | 4 months ago | |
| test_import.py | 4 months ago | |
| test_logging.py | 4 months ago | |
README.md
TermControlAgent - 终端设备控制平台
基于 FastAPI 的统一终端设备控制平台,支持多种协议和设备类型。
功能特性
- 🔌 多协议支持:ADB、ATX、HDC、AT指令、PLNK、SSH
- 📱 设备管理:统一注册、状态监控、协议绑定
- 🌐 RESTful API:标准HTTP接口,支持WebSocket实时推送
- 🎯 模块化设计:易于扩展和维护
支持的协议
- ADB: Android Debug Bridge,支持点击、输入、截图、安装APK
- ATX: 基于uiautomator2的Android自动化控制
- HDC: 华为设备控制命令
- AT指令: 串口通信协议
- PLNK: 自定义TCP/串口通信协议
- SSH: 远程Shell命令执行
快速开始
安装依赖
pip install -r requirements.txt
启动服务
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
API文档
启动后访问:http://localhost:8000/docs
项目结构
control_agent/
├── app/
│ ├── api/ # API路由层
│ ├── core/ # 核心配置和调度
│ ├── schemas/ # 数据模型
│ ├── services/ # 协议服务实现
│ ├── utils/ # 工具函数
│ └── main.py # 应用入口
├── requirements.txt
└── README.md
主要接口
GET /devices- 获取设备列表POST /devices/{id}/click- 执行点击操作POST /devices/{id}/input- 输入文字GET /devices/{id}/screenshot- 获取截图POST /devices/{id}/exec- 执行命令POST /devices/{id}/send-at- 发送AT指令POST /devices/{id}/send-plnk- 发送PLNK协议数据POST /devices/{id}/install- 安装APKGET /devices/{id}/logcat- 获取日志