5.8k★by mladjan
tiktok-android-bot – OpenClaw Skill
tiktok-android-bot is an OpenClaw Skills integration for coding workflows. Automate TikTok engagement on Android using ADB. Search topics, comment with AI or templates, includes setup wizard. Use for TikTok automation campaigns and building social presence through strategic commenting.
Skill Snapshot
| name | tiktok-android-bot |
| description | Automate TikTok engagement on Android using ADB. Search topics, comment with AI or templates, includes setup wizard. Use for TikTok automation campaigns and building social presence through strategic commenting. OpenClaw Skills integration. |
| owner | mladjan |
| repository | mladjan/tiktok-android |
| language | Markdown |
| license | MIT |
| topics | |
| security | L1 |
| install | openclaw add @mladjan/tiktok-android |
| last updated | Feb 7, 2026 |
Maintainer

name: tiktok-android-bot description: Automate TikTok engagement on Android using ADB. Search topics, comment with AI or templates, includes setup wizard. Use for TikTok automation campaigns and building social presence through strategic commenting.
TikTok Android Bot
Automate TikTok engagement on Android using ADB. No web scraping, no CAPTCHA, 100% success rate.
What It Does
- Interactive Setup - Wizard guides first-time configuration
- Two Comment Modes - Static templates (fast) or AI-generated (smart)
- Two Operation Modes - Search specific topics or explore For You feed
- Duplicate Prevention - Never comments twice on same video
- Flexible Configuration - User defines topics and comment style
Prerequisites
- Android device with USB debugging enabled
- ADB (Android Debug Bridge) installed
- TikTok app logged in on device
- Python 3.9+
- USB cable
First-Time Setup
The skill includes an interactive setup wizard that runs automatically:
python3 tiktok_bot.py search --topics fitness --videos 5
Or run setup manually:
python3 setup.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 provider (Anthropic/OpenAI/OpenRouter) + API key
Setup saves to config.py and .env (both gitignored).
Usage
Search Mode - Target Specific Topics
Search for topics and comment on related videos:
# Single topic, 5 videos
python3 tiktok_bot.py search --topics fitness --videos 5
# Multiple topics, 3 videos each
python3 tiktok_bot.py search --topics "fitness,cooking,travel" --videos 3
# Specify device (optional)
python3 tiktok_bot.py search --topics gaming --videos 5 --device 001431538002547
Flow:
- Searches each topic
- Opens videos from search results grid (2x2 layout)
- Generates comment (AI analyzes or uses template)
- Posts comment
- Returns to search results for next video
Explore Mode - For You Feed
Comment on random videos from For You feed:
# Comment on 10 random videos
python3 tiktok_bot.py explore --videos 10
Flow:
- Starts 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 progress! How long training?",
# ... more variations
]
}
AI-Generated
Claude Vision or GPT-4 Vision analyzes video screenshots and generates contextual comments.
Example config:
COMMENT_STYLE = "ai"
AI_PROVIDER = "anthropic"
AI_MODEL = "claude-3-5-sonnet-20241022"
API key in .env:
ANTHROPIC_API_KEY=sk-ant-...
Cost: $0.01-0.05 per comment depending on provider.
Configuration Files
After setup, you'll have:
config.py- Topics, comment style, templates/AI settings.env- API key (if AI mode).bot_settings.json- Preferences
All gitignored by default.
Device Setup
Enable USB Debugging
Settings → About Phone → Tap "Build Number" 7 times
Settings → Developer Options → Enable "USB Debugging"
Connect device via USB and authorize computer.
Verify Connection
adb devices
# Should show: <device_id> device
adb shell wm size
# Note screen resolution (e.g., 1080x2392)
Troubleshooting
"No Android device found"
adb kill-server
adb start-server
adb devices
Re-authorize on device if needed.
Search icon tap misses
Coordinates are optimized for 1080x2392 screens. For different sizes:
- Take screenshot:
adb shell screencap -p /sdcard/screen.png && adb pull /sdcard/screen.png - Find search icon pixel location (top-right)
- Update in
src/bot/android/tiktok_navigation.py:search_icon_x = 995 # Your X search_icon_y = 205 # Your Y
See references/COORDINATES.md for detailed coordinate guide.
AI generation fails
Check:
- API key in
.envfile - API key is valid and has credits
- Model name is correct
- Falls back to generic comments automatically
Post button not working
Ensure keyboard is dismissed before tapping Post. The bot does this automatically with KEYCODE_BACK.
Performance
Timing
- Static mode: ~25 seconds per video
- AI mode: ~30 seconds per video (adds 5s for analysis)
- Full search session (5 videos): 2-2.5 minutes
- Explore session (10 videos): 4-5 minutes
Success Rate
- 100% with working coordinates
- 0% if tap coordinates miss targets
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 Quality
✅ 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 sessions: Once daily, vary times
- Take breaks: Skip 1-2 days per week
- Monitor: Watch for shadowban signs
Account Safety
- Age accounts: 7+ days before automating
- Manual activity first: Like, follow, browse naturally
- Vary behavior: Different topics, times, comment styles
- Start small: Test with 3-5 videos first
Advanced
Scheduling with OpenClaw Cron
openclaw cron add \
--name "Daily TikTok" \
--schedule "0 10 * * *" \
--tz "Your/Timezone" \
--payload '{"kind":"agentTurn","message":"cd /path/to/skill && python3 tiktok_bot.py search --topics fitness,gaming --videos 5"}'
Custom AI Prompt
Edit config.py:
AI_COMMENT_PROMPT = """
Analyze this video and generate a comment.
Topic: {topic}
Your custom guidelines here...
- Be enthusiastic
- Ask specific questions
- Reference visible elements
"""
Multiple Devices
Set ANDROID_DEVICE_ID environment variable:
ANDROID_DEVICE_ID=device1 python3 tiktok_bot.py search --topics fitness --videos 5
Or use --device flag:
python3 tiktok_bot.py search --topics fitness --videos 5 --device device1
Files Included
tiktok-android-bot/
├── SKILL.md # This file
├── README.md # Comprehensive docs
├── setup.py # Interactive setup wizard
├── tiktok_bot.py # Main script (CLI)
├── config.example.py # Example configuration
├── requirements.txt # Python dependencies
├── scripts/
│ ├── run_full_campaign.py # Legacy: 25-video campaign
│ └── run_complete_session.py # Legacy: 3-video session
├── src/
│ ├── bot/android/
│ │ ├── tiktok_android_bot.py # Core automation
│ │ └── tiktok_navigation.py # Navigation flows
│ ├── ai_comments.py # AI comment generation
│ └── logger.py # Logging utility
└── references/
└── COORDINATES.md # Tap coordinate guide
Requirements
loguru>=0.7.0
anthropic>=0.18.0 # If using AI mode
openai>=1.12.0 # If using AI mode
ADB must be installed and in PATH.
License
MIT - Use responsibly. Automated commenting may violate TikTok's ToS.
See Also
README.md- Full documentationreferences/COORDINATES.md- Coordinate customization guide- Main repository: https://github.com/mladjan/androidSkill
TikTok Android Bot
Automate TikTok engagement on Android using ADB (Android Debug Bridge). Search topics, analyze videos, post AI-generated comments, and visit profiles—all without web scraping or browser automation.
Why Android + ADB?
100% success rate vs 0% with web automation:
- ✅ No bot detection
- ✅ No CAPTCHA
- ✅ No rate limiting (within reason)
- ✅ Uses real TikTok app
- ✅ Authentic mobile behavior
Features
✅ Search & Navigate
- Search any topic via top-right search icon
- Navigate 2x2 video grids
- Auto-scroll for more videos
- Precise tap coordinates
✅ Smart Commenting
- 8 unique comment variations per topic
- Duplicate video prevention
- Question-based engagement style
- Natural car enthusiast tone
✅ Session Management
- Single-topic sessions (3-5 videos)
- Multi-topic campaigns (25 videos)
- Detailed reporting
- Error recovery
✅ Automation Ready
- Schedule with OpenClaw cron
- Daily campaigns at specific times
- Telegram reporting
- Isolated session execution
Quick Start
1. Prerequisites
- Android device with USB debugging enabled
- ADB installed (
brew install android-platform-toolson macOS) - TikTok app installed and logged in
- Python 3.9+
2. Setup Android Device
Enable USB debugging:
Settings → About Phone → Tap "Build Number" 7 times
Settings → Developer Options → Enable "USB Debugging"
Connect via USB and authorize your computer.
3. Verify Connection
adb devices
# Should show: 001431538002547 device
Get screen size:
adb shell wm size
# Example: Physical size: 1080x2392
4. Install Dependencies
pip install loguru
5. Run Test Session
python3 run_complete_session.py
Watches the bot:
- Launch TikTok
- Search random car topic
- Open 3 videos
- Post unique comments
- Generate report
First-Time Setup
Interactive Setup Wizard
On first run, the bot will automatically launch an interactive setup wizard:
python3 tiktok_bot.py search --topics fitness --videos 5
Or run setup manually:
python3 setup.py
The wizard will ask you:
- Topics - What topics to engage with (e.g., fitness, cooking, travel)
- Comment Style - Choose between:
- Static templates - Fast, predefined comments (no API needed)
- AI-generated - Smart comments analyzing videos (requires API key)
- Templates or AI config - Depending on your choice:
- Static: Enter 6-8 comment variations per topic
- AI: Provide API key (Anthropic/OpenAI/OpenRouter) and choose model
Manual Configuration
Alternatively, copy and edit the config:
cp config.example.py config.py
# Edit config.py
Comment Styles
Static Templates (Fast, No API)
Predefined comment templates for each topic. Fast and reliable.
Pros:
- No API costs
- Instant comments
- Full control over content
- Works offline
Example config.py:
COMMENT_STYLE = "static"
COMMENTS_BY_TOPIC = {
"fitness": [
"That form looks perfect! What's your workout routine?",
"Impressive progress! How long have you been training?",
# 6-8 variations...
]
}
AI-Generated (Smart, Contextual)
Uses Claude Vision or GPT-4 Vision to analyze videos and generate contextual comments.
Pros:
- Smart, contextual comments
- Analyzes actual video content
- More natural and varied
- Better engagement
Cons:
- Requires API key
- ~$0.01-0.05 per comment
- Slightly slower
Example config.py:
COMMENT_STYLE = "ai"
AI_PROVIDER = "anthropic" # or "openai" or "openrouter"
AI_MODEL = "claude-3-5-sonnet-20241022"
AI_COMMENT_PROMPT = """
Analyze this video screenshot and generate a natural comment.
Topic: {topic}
Guidelines: 10-25 words, ask a question, no emojis.
"""
API key goes in .env:
ANTHROPIC_API_KEY=sk-ant-...
# or
OPENAI_API_KEY=sk-...
# or
OPENROUTER_API_KEY=sk-or-v1-...
Usage
The bot has two modes:
Search Mode - Target Specific Topics
Search for specific topics and comment on related videos:
# Single topic, 5 videos
python3 tiktok_bot.py search --topics fitness --videos 5
# Multiple topics, 3 videos each
python3 tiktok_bot.py search --topics "fitness,cooking,travel" --videos 3
# With specific device
python3 tiktok_bot.py search --topics gaming --videos 5 --device 001431538002547
What it does:
- Searches each topic
- Opens videos from search results grid
- Posts contextual comments from your templates
- Prevents duplicate comments on same video
Explore Mode - For You Feed
Scroll through For You feed and comment on random videos:
# Comment on 10 random videos
python3 tiktok_bot.py explore --videos 10
# With specific device
python3 tiktok_bot.py explore --videos 5 --device 001431538002547
What it does:
- Starts on For You feed
- Comments on current video
- Scrolls to next video
- Uses generic comments (not topic-specific)
Legacy Scripts
For backwards compatibility, old scripts still work:
# Full campaign (uses hardcoded car topics)
python3 run_full_campaign.py
# Single session (uses hardcoded car topics)
python3 run_complete_session.py
Schedule Daily
Use OpenClaw cron:
openclaw cron add \
--name "Daily TikTok" \
--schedule "0 10 * * *" \
--tz "Europe/Madrid" \
--payload '{"kind":"agentTurn","message":"cd /path/to/androidSkill && python3 tiktok_bot.py search --topics fitness,gaming --videos 5"}'
Project Structure
androidSkill/
├── README.md # This file
├── run_full_campaign.py # 25-video campaign
├── run_complete_session.py # 3-video session
├── src/
│ └── bot/
│ └── android/
│ ├── tiktok_android_bot.py # Core automation
│ └── tiktok_navigation.py # Navigation flows
└── data/ # Screenshots & logs (gitignored)
Advanced Configuration
Device Coordinates
Optimized for 1080x2392 screens. If your device differs, adjust:
Search icon (src/bot/android/tiktok_navigation.py):
search_icon_x = 995 # Fixed X coordinate
search_icon_y = 205 # Fixed Y coordinate
Post button (src/bot/android/tiktok_android_bot.py):
post_button_x = int(width * 0.92) # 92% from left
post_button_y = height - 130 # 130px from bottom (after keyboard dismiss)
Number of Videos
# In run_full_campaign.py
num_videos = 5 # Videos per topic
# In run_complete_session.py
num_videos = 3 # Total videos
How It Works
Search Flow
- Launch TikTok → Wait for For You feed
- Go to Home → Tap Home tab
- Open search → Tap search icon (995, 205)
- Type query → Clear field, type topic (e.g., "dragy")
- Execute search → Tap first suggestion
- Results page → 2x2 grid with tabs (Top/Users/Videos/Photos)
Comment Flow
- Select video → Tap from grid (positions 1-4)
- Wait for load → Video opens full-screen
- Open comments → Tap comment icon (right side)
- Focus input → Tap comment field
- Type comment → ADB input text
- Dismiss keyboard → Press KEYCODE_BACK
- Post → Tap Post button (height - 130px)
- Go back → Return to search results
Duplicate Prevention
Each video gets unique ID:
s{scroll}_p{position}
Examples:
s0_p1- First video, top-left, no scrollings1_p3- Bottom-left after one scroll
Tracked in commented_videos set per session.
Performance
Timing
-
Single video: ~20-25 seconds
- Open: 3s
- Comment flow: 15-18s
- Back: 2s
-
3-video session: ~1.5-2 minutes
-
25-video campaign: ~13-15 minutes
Success Rate
- 100% with working coordinates
- 0% if coordinates miss targets
Troubleshooting
"Device not found"
adb kill-server
adb start-server
adb devices
Re-authorize on device if needed.
Search icon tap misses
- Take screenshot:
adb shell screencap -p /sdcard/screen.png && adb pull /sdcard/screen.png - Open in image viewer with pixel coordinates
- Find search icon center (usually ~995, 205)
- Update
src/bot/android/tiktok_navigation.py:search_icon_x = 995 # Your X search_icon_y = 205 # Your Y
Post button not working
Check keyboard is dismissed before tapping:
bot._press_key("KEYCODE_BACK") # Dismiss keyboard
time.sleep(2) # Wait for button to appear
bot._tap(post_x, post_y) # Now tap Post
Duplicate comments
Ensure commented_videos set is tracked:
commented_videos = set()
video_id = f"s{scroll}_p{position}"
if video_id in commented_videos:
print("Already commented, skipping")
continue
commented_videos.add(video_id)
Best Practices
Comment Quality
✅ Good:
- "That 60ft time is insane! What mods are you running?"
- "Sub-2-minute lap! What's your setup?"
- "Circuit looks fast! Which track is this?"
❌ Bad:
- "Nice video! 🔥" (generic, emoji)
- "Check out my channel" (spam)
- "First!" (low-value)
Rate Limits
- 25-30 comments/day max per account
- Space sessions: Once daily, vary time
- Take breaks: Skip 1-2 days/week
- Monitor: Check for shadowban
Account Safety
- Age accounts: 7+ days before automating
- Manual activity first: Like, follow, browse
- Vary behavior: Different topics, times, comment styles
- Start small: Test with 3-5 videos first
Examples
Custom Topic Session
from src.bot.android.tiktok_android_bot import TikTokAndroidBot
from src.bot.android.tiktok_navigation import TikTokNavigation
bot = TikTokAndroidBot(device_id="001431538002547")
nav = TikTokNavigation(bot)
# Launch and search
bot.launch_tiktok()
bot.wait_for_feed()
nav.go_to_home()
nav.tap_search_icon()
nav.search_query("porsche")
# Open first video
nav.tap_video_from_grid(1)
bot.take_screenshot("data/video.png")
# Post comment
bot.post_comment("That Porsche sounds incredible! Stock exhaust?")
# Back to results
bot.go_back()
API Reference
TikTokAndroidBot
Main automation engine.
Methods:
launch_tiktok()- Opens TikTok appwait_for_feed()- Waits for For You feedpost_comment(text)- Posts comment on current videotake_screenshot(path)- Captures screengo_back()- Navigate backscroll_down()- Scroll for more content_tap(x, y)- Tap at coordinates_type_text(text)- Type text via ADB_press_key(keycode)- Press Android key
TikTokNavigation
High-level navigation flows.
Methods:
go_to_home()- Navigate to Home tabtap_search_icon()- Open searchsearch_query(query)- Execute searchtap_video_from_grid(position)- Open video (1-4)
Grid positions:
- 1: top-left
- 2: top-right
- 3: bottom-left
- 4: bottom-right
Limitations
- Screen size dependent: Optimized for 1080x2392
- TikTok UI changes: May break if TikTok updates UI
- No video analysis yet: Comments use topic templates
- Single device: One device at a time
- Manual login: Account must be logged in beforehand
Future Enhancements
- Claude Vision integration for smart comments
- Profile visits after commenting
- Multi-device support
- Dynamic coordinate detection
- Shadowban detection
- Analytics dashboard
Requirements
loguru>=0.7.0
ADB must be installed and in PATH.
License
MIT - Use responsibly. Automated commenting may violate TikTok's ToS.
Credits
Built with:
- Python 3.9+
- ADB (Android Debug Bridge)
- Loguru (logging)
- OpenClaw (scheduling & automation)
Status: Production-ready, 100% success rate with proper configuration. ✅
Last campaign: 25/25 videos commented successfully (Feb 3, 2026)
Permissions & Security
Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.
Requirements
``` loguru>=0.7.0 anthropic>=0.18.0 # If using AI mode openai>=1.12.0 # If using AI mode ``` ADB must be installed and in PATH.
Configuration
After setup, you'll have: - `config.py` - Topics, comment style, templates/AI settings - `.env` - API key (if AI mode) - `.bot_settings.json` - Preferences All gitignored by default.
FAQ
How do I install tiktok-android-bot?
Run openclaw add @mladjan/tiktok-android in your terminal. This installs tiktok-android-bot into your OpenClaw Skills catalog.
Does this skill run locally or in the cloud?
OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.
Where can I verify the source code?
The source repository is available at https://github.com/openclaw/skills/tree/main/skills/mladjan/tiktok-android. Review commits and README documentation before installing.
