SMA AutoUI
智能移动自动化 UI 框架 —— 面向社交媒体平台的 Android 设备自动化,融合 ADB 直达、视觉识别与 LLM 认知自愈能力。
📦 PyPI:https://pypi.org/project/sma-autoui/
🚀 快速开始
# 从 PyPI 安装
pip install sma-autoui
# 或从源码安装
pip install .
🌟 核心特性
| 特性 | 说明 |
|---|---|
| ✅ 多平台适配 | 多个社交平台业务抽象(TikTok / 小红书 / 微博 等) |
| ✅ Session 复用 | 跨任务会话持久化与保活架构 |
| ✅ 视觉匹配 | SIFT 特征 + 模板匹配 + OCR 多模式识别 |
| ✅ ADB 直达 | 困难页面(直播间 / SurfaceView)直接注入事件,绕开 W3C 限制 |
| ✅ AI 驱动 | LLM 接口封装 + 认知工作流(Flow)编排 |
| ✅ 自愈能力 | UI 异常自动诊断与恢复,规则评分反馈闭环 |
完整项目结构与各层模块职责,详见 🏗️ 系统架构。
📖 文档
全部文档位于 docs/ 目录。
| 文档 | 描述 | 目标读者 |
|---|---|---|
| 🛠️ APPIUM_SETUP_GUIDE.md | Appium + ADB 完整环境搭建与验证 | 新成员、运维 |
| 🏗️ ARCHITECTURE.md | 系统架构、模块职责与依赖关系 | 开发者、架构师 |
| 💡 CLICK_MECHANISMS.md | ADB / Appium / W3C Actions 三种点击机制差异与选型 | 开发者 |
| 📋 SCRCPY_SERVER_GUIDE.md | scrcpy-server 服务启动 / 剪贴板获取 / 控制协议中文指南 | 开发者 |
| ⚠️ PITFALLS.md | 项目开发中的常见问题与解决方案 | 开发者 |
| 🛣️ ROADMAP.md | 六层架构实现路径与未来规划 | 管理者、开发者 |
快速导航
- 新入门 → 先 🛠️ 环境搭建,再 🏗️ 架构概览
- 点击机制选型 → 💡 点击机制详解
- scrcpy 剪贴板 / 控制 → 📋 scrcpy-server 指南
- 遇到问题 → ⚠️ 常见坑点
- 未来规划 → 🛣️ 开发路线图
💻 使用示例
from sma_autoui.driver import Driver, Device
# 1. 初始化设备
device = Device(device_name="172.25.2.20:5555", adb_port=5002)
# 2. 创建驱动实例
driver = Driver(
device=device,
appium_url="http://localhost:4723/wd/hub",
task_name="example_task"
)
# 3. 使用高级 API
driver.smart_find(locators=[...], timeout=10)
driver.tap_by_adb(x=500, y=800)
# 4. 任务自动重试与保活由 TaskRunner 处理
🔧 从源码安装
git clone https://github.com/Fun-Fox/sma_autoui.git
cd sma_autoui
pip install -r requirements.txt
pip install -e .
📄 开源协议
MIT License
Built with ❤️ by FunFox
Metadata
Release files for sma-autoui 0.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sma_autoui-0.3.5.tar.gz | 3.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sma_autoui-0.3.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.6 MB
Release files / sma_autoui-0.3.5.tar.gz
| Download URL | sma_autoui-0.3.5.tar.gz |
|---|---|
| Size | 3.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a43f66c4b201ee9fc4906d1875edf6f7718dca6f955c92ffcf9725fedee637c1
|
|
BLAKE2b-256 checksum How to use checksums |
9601452c3a0a18e94a5b8fca7d579fffaeac24118d3eb09348f46c74342311eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.9
|
Release files / sma_autoui-0.3.5-py3-none-any.whl
| Download URL | sma_autoui-0.3.5-py3-none-any.whl |
|---|---|
| Size | 3.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
859a8354bebf54b99219ebfa527dd06458ddc4f7f92dbaee2fb283317859e2d3
|
|
BLAKE2b-256 checksum How to use checksums |
592f0ab270407f7b336e367f217a5f89229d5f8ed3c13019f55855cfab5e32e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.9
|