🦀 ClawHub
Clawmobile Skill
by @miyan1221
ClawMobile - 完整的 Android 自动化工具包,深度集成 AutoX.js。 提供工作流管理、任务录制、AI 智能干预、会员系统、HTTP API 通信等完整功能。 支持自动化测试、RPA 流程自动化、移动应用交互等场景。 适用场景:自动化测试、批量操作、流程录制和回放、无人值守任务、移动应用 RPA。
📋 Tips & Best Practices
#### 问题 1:连接失败
症状:
ConnectionError: Failed to connect to API server
解决方案:
1. 检查 AutoX.js 是否运行:
adb shell ps | grep autojs
2. 检查服务器端口:
adb shell netstat -an | grep 8765
3. 验证连接:
curl http://localhost:8765/api/v1/health
4. 检查 ADB 连接:
adb devices
5. 重启 AutoX.js HTTP 服务器
#### 问题 2:权限不足
症状:
PermissionError: Feature requires VIP membership
解决方案:
1. 检查当前会员等级:
membership = client.get_membership_status("user_001")
print(f"Current tier: {membership['tier']}")
2. 激活会员或升级:
result = client.activate_membership("VIP-2024-ABCD1234")
3. 检查权限:
permission = client.check_permission("user_001", "can_use_ai_intervention")
print(f"Permission granted: {permission['granted']}")
#### 问题 3:工作流执行失败
症状:
WorkflowExecutionError: Task execution failed
诊断步骤:
1. 查看详细错误信息:
result = client.execute_workflow(
workflow_id="workflow_001",
debug=True
)
print(result.get('error'))
2. 检查工作流状态:
workflow = client.get_workflow("workflow_001")
print(f"Status: {workflow['status']}")
print(f"Success Rate: {workflow['success_rate']}%")
3. 验证参数配置:
validation = client.validate_workflow("workflow_001")
print(f"Valid: {validation['is_valid']}")
print(f"Errors: {validation.get('errors', [])}")
4. 查看日志:
tail -f clawmobile.log
#### 问题 4:兑换码验证失败
症状:
InvalidCodeError: Redeem code format invalid or expired
解决方案:
1. 验证兑换码格式:
# 正确格式:C-VENDORCODE-24-01M-A1B2C3D4
# 5 段:类型-供应商-年份-时长-校验和
from skill.membership import validate_redeem_code_format
is_valid = validate_redeem_code_format("C-VENDORCODE-24-01M-A1B2C3D4")
print(f"Format valid: {is_valid}")
2. 检查兑换码是否已使用:
result = client.validate_redeem_code("C-VENDORCODE-24-01M-A1B2C3D4", "user_001")
print(f"Already used: {result.get('already_used', False)}")
3. 联系管理员获取新的兑换码
支持和帮助
获取帮助:
# 查看文档
cat clawmobile/docs/API-DOCUMENTATION.md
cat clawmobile/README.md查看日志
cat clawmobile/clawmobile.log运行测试
cd clawmobile
python3 -m pytest tests/
联系支持:
TERMINAL
clawhub install clawmobile-skill