Hello World
Here are four ways to get started with DroidBot. Each takes under 5 minutes.
Option A: Python Script
Section titled “Option A: Python Script”The most direct way — import the Device class and send commands.
from marketing_system.bots.common.adb import Device
# Connect to device (auto-detects if only one connected)dev = Device()
# Wake screen and go homedev.adb("shell", "input", "keyevent", "KEYCODE_WAKEUP")dev.adb("shell", "input", "keyevent", "KEYCODE_HOME")
# Open the Settings appdev.adb("shell", "am", "start", "-n", "com.android.settings/.Settings")import time; time.sleep(2)
# Read the screen's UI hierarchyxml = dev.dump_xml()print(f"Found {len(dev.nodes(xml))} UI elements")
# Find and tap an element by textnodes = dev.find_nodes(xml, text="Network")if nodes: dev.tap_node(nodes[0]) print("Tapped!")Save this as hello.py and run:
python3 hello.pyYou should see the Settings app open on your phone and the “Network” item get tapped.
Option B: Record and Replay a Macro
Section titled “Option B: Record and Replay a Macro”Record actions as you go, save to JSON, and replay later at any speed.
from marketing_system.skills.macro_recorder import MacroRecorder, Macrofrom marketing_system.bots.common.adb import Device
dev = Device()recorder = MacroRecorder(dev)
# Start recording -- each method both records AND executesrecorder.start()recorder.tap(540, 1200) # tap center-bottomrecorder.wait(1.0) # pause 1 secondrecorder.swipe(540, 1800, 540, 600) # swipe uprecorder.type_text("hello world") # type textrecorder.back() # press backmacro = recorder.stop() # stop recording
# Save to filemacro.name = "my_first_macro"macro.save("data/macros/my_first_macro.json")print(f"Recorded {len(macro.steps)} steps in {macro.duration_s:.1f}s")
# Replay at 2x speedloaded = Macro.load("data/macros/my_first_macro.json")recorder.replay(loaded, speed=2.0)The JSON format is human-readable and editable:
{ "name": "my_first_macro", "duration_s": 8.5, "step_count": 5, "steps": [ {"action": "tap", "timestamp": 0.0, "params": {"x": 540, "y": 1200}}, {"action": "wait", "timestamp": 0.5, "params": {"seconds": 1.0}}, {"action": "swipe", "timestamp": 1.8, "params": {"x1": 540, "y1": 1800, "x2": 540, "y2": 600}}, {"action": "type", "timestamp": 3.2, "params": {"text": "hello world"}}, {"action": "back", "timestamp": 4.1, "params": {}} ]}Option C: Run an Existing Skill
Section titled “Option C: Run an Existing Skill”The TikTok skill ships pre-built with 13 actions and 9 workflows.
from marketing_system.skills.tiktok import loadfrom marketing_system.bots.common.adb import Device
dev = Device()skill = load()
# See what's availableprint(skill.list_actions())# ['open_app', 'navigate_to_profile', 'tap_search', 'type_and_search',# 'dismiss_popup', 'like_post', 'comment_on_post', 'follow_user',# 'scroll_feed', 'tap_user', 'tap_message_button', 'type_message', 'tap_send']
print(skill.list_workflows())# ['upload_video', 'crawl_hashtag', 'crawl_users', 'send_dm',# 'engage_fyp', 'scan_inbox', 'scrape_analytics', 'continuous_scrape', 'publish_draft']
# Run a single action (opens TikTok)action = skill.get_action("open_app", dev)result = action.run()print(f"Success: {result.success}, took {result.duration_ms:.0f}ms")
# Run a workflow (engage with FYP for 60 seconds)wf = skill.get_workflow("engage_fyp", dev, duration=60)result = wf.run()print(result.data) # {'completed_steps': 5}Or run via the REST API:
# Start the server firstpython3 run.py &
# Execute a workflow via curlcurl -X POST http://localhost:5055/api/skills/tiktok/run \ -H "Content-Type: application/json" \ -d '{"workflow": "engage_fyp", "params": {"duration": 60}, "device": "L9AIB7603188953"}'Option D: Use the Dashboard
Section titled “Option D: Use the Dashboard”The visual way — no code required.
-
Start the server:
Terminal window python3 run.py -
Open http://localhost:5055 in your browser
-
Navigate to the Phone Admin tab to verify your device shows up and the live stream works
-
Go to the Skill Hub tab to browse installed skills, pick a workflow, select your device, and click Run
-
Check the Scheduler tab to see the job running on the 24-hour timeline
Dashboard Tabs Overview
Section titled “Dashboard Tabs Overview”| Tab | What You Can Do |
|---|---|
| Influencers | Browse 10K+ crawled profiles, filter by followers/labels |
| Bot | Quick-launch crawl, outreach, and post jobs |
| Scheduler | View 24h timeline, create scheduled jobs |
| Phone Admin | Live device stream, tap/type controls |
| Skill Hub | Browse and run skills |
| Skill Creator | Build new skills with LLM assistance |
| Explorer | Discover app UI states automatically |
What’s Next?
Section titled “What’s Next?”Now that you have automation running, dive deeper:
- TikTok Upload Guide — the full 43-step video upload pipeline
- Scrape Profiles — crawl thousands of influencers by hashtag
- Send DMs — automated outreach with templated messages
- Macros Guide — advanced macro recording and editing
- Stealth Mode — avoid bot detection