运行时依赖
安装命令
点击复制技能文档
TikTok Android 机器人
Automate TikTok engagement on Android using ADB. No 网页 scrAPIng, no CAPTCHA, 100% 成功 rate.
What It Does Interactive 设置up - Wizard 图形界面des first-time configuration Two Comment Modes - Static templates (fast) or AI-生成d (smart) Two Operation Modes - 搜索 specific topics or explore For You feed Duplicate 预防ion - Never comments twice on same video Flexible Configuration - User defines topics and comment style Prerequisites Android device with USB 调试ging enabled ADB (Android 调试 Bridge) 安装ed TikTok 应用 记录ged in on device Python 3.9+ USB cable First-Time 设置up
The 技能 includes an interactive 设置up wizard that 运行s automatically:
python3 tiktok_机器人.py 搜索 --topics fitness --videos 5
Or 运行 设置up manually:
python3 设置up.py
The wizard asks:
Topics - What to engage with (e.g., "fitness,cooking,travel") Comment Style: Static - Predefined templates (fast, free, no API) AI - Claude/GPT Vision analyzes videos (smart, ~$0.01-0.05/comment) Configuration: Static: Enter 6-8 comment variations per topic AI: Choose 提供者 (Anthropic/OpenAI/Open路由r) + API key
设置up saves to config.py and .env (机器人h gitignored).
Usage 搜索 Mode - Tar获取 Specific Topics
搜索 for topics and comment on related videos:
# Single topic, 5 videos python3 tiktok_机器人.py 搜索 --topics fitness --videos 5
# Multiple topics, 3 videos each python3 tiktok_机器人.py 搜索 --topics "fitness,cooking,travel" --videos 3
# Specify device (optional) python3 tiktok_机器人.py 搜索 --topics gaming --videos 5 --device 001431538002547
Flow:
搜索es each topic Opens videos from 搜索 结果s grid (2x2 layout) 生成s comment (AI analyzes or uses template) Posts comment Returns to 搜索 结果s for next video Explore Mode - For You Feed
Comment on random videos from For You feed:
# Comment on 10 random videos python3 tiktok_机器人.py explore --videos 10
Flow:
启动s on For You feed Analyzes current video (if AI) or uses generic comment Posts comment Scrolls to next video Comment Styles Static Templates
Fast, reliable, no API costs. User provides 6-8 variations per topic.
Example config:
COMMENT_STYLE = "static"
COMMENTS_BY_TOPIC = { "fitness": [ "That form looks perfect! What's your workout routine?", "Impressive 进度! How long trAIning?", # ... more variations ] }
AI-生成d
Claude Vision or GPT-4 Vision analyzes video screenshots and 生成s 上下文ual comments.
Example config:
COMMENT_STYLE = "AI" AI_提供者 = "anthropic" AI_模型 = "claude-3-5-sonnet-20241022"
API key in .env:
ANTHROPIC_API_KEY=sk-ant-...
Cost: $0.01-0.05 per comment depending on 提供者.
Configuration Files
After 设置up, you'll have:
config.py - Topics, comment style, templates/AI 设置tings .env - API key (if AI mode) .机器人_设置tings.json - Preferences
All gitignored by default.
Device 设置up Enable USB 调试ging 设置tings → About Phone → Tap "Build Number" 7 times 设置tings → Developer Options → Enable "USB 调试ging"
Connect device via USB and 授权 computer.
验证 Connection adb devices # Should show: device
adb shell wm size # Note screen resolution (e.g., 1080x2392)
Troubleshooting "No Android device found" adb kill-server adb 启动-server adb devices
Re-授权 on device if needed.
搜索 icon tap misses
Coordinates are 优化d for 1080x2392 screens. For different sizes:
Take screenshot: adb shell screencap -p /sdcard/screen.png && adb pull /sdcard/screen.png Find 搜索 icon pixel location (top-right) 更新 in src/机器人/android/tiktok_navigation.py: 搜索_icon_x = 995 # Your X 搜索_icon_y = 205 # Your Y
See references/COORDINATES.md for detAIled coordinate 图形界面de.
AI generation fAIls
检查:
API key in .env file API key is valid and has credits 模型 name is correct Falls back to generic comments automatically Post button not working
Ensure keyboard is dismissed before t应用ing Post. The 机器人 does this automatically with KEYCODE_BACK.
Performance Timing Static mode: ~25 seconds per video AI mode: ~30 seconds per video (添加s 5s for analysis) Full 搜索 会话 (5 videos): 2-2.5 minutes Explore 会话 (10 videos): 4-5 minutes 成功 Rate 100% with working coordinates 0% if tap coordinates miss tar获取s Cost (AI Mode) Claude Vision: $0.01-0.02 per comment GPT-4 Vision: $0.02-0.05 per comment 100 comments: $1-5 Best Practices Comment 质量
✅ Good:
Specific observations or questions 10-25 words Genuine enthusiasm No emojis (sounds more real)
❌ Bad:
Generic prAIse ("nice video!") Spam or self-promotion Too short ("first!") Low-value ("🔥🔥🔥") Rate Limits 25-30 comments/day max per account Space 会话s: Once dAIly, vary times Take breaks: Skip 1-2 days per week 监控: Watch for shadowban 签名s Account Safety Age accounts: 7+ days before automating Manual activity first: Like, follow, browse naturally Vary behavior: Different topics, times, comment styles 启动 small: Test with 3-5 videos first Advanced Schedulin