@tool decorated Android control for Strands Agents & DevDuck.
Drive any adb-connected Android device (phone / tablet / emulator) from an LLM — let your agent text people, read notifications, launch apps, take screenshots, drive the UI, take physical photos, stream logcat events, mutate settings.
📘 Full docs: cagataycali.github.io/strands-adb
pip install strands-adb
brew install android-platform-tools # or apt / pacman / wingetEnable USB debugging on your phone, plug it in, accept the trust dialog.
adb devices
# 59230DLCH0012Z devicefrom strands import Agent
from strands_adb import adb
agent = Agent(tools=[adb])
agent("take a screenshot of my phone and describe what's on screen")export DEVDUCK_TOOLS="strands_adb:adb;strands_tools:shell"
devduck "open whatsapp and read the last message from mom"screenshot returns a proper Converse API image block — the same format as strands_tools.image_reader. The agent doesn't just get a file path, it actually receives the pixels and reasons over them:
agent("take a screenshot and tell me what app is open")
# → adb(action="screenshot") returns PNG bytes in Converse image block
# → vision model reads it → "You're on the WhatsApp chat with Mom..."Disable with include_image=False if you just want the file path.
Non-blocking screen recording — start before the agent acts, stop after. Review the video to see what actually happened.
adb(action="screen_record_start", output_path="/tmp/run.mp4")
agent("open whatsapp and reply to mom") # agent works while recording
result = adb(action="screen_record_stop")
print(result["merged_path"]) # single mp4, auto-stitched past 180s| Domain | Actions |
|---|---|
| Device | list, select, info, battery, wake, unlock |
| UI | tap, swipe, type, key, gestures, smart_tap |
| Screen | screenshot (image block), screen_record, screen_record_start/stop (bg), frames, ui_dump, ui_find |
| Apps | list, launch, kill, install, uninstall, clear_data |
| Files | push, pull, ls |
| Intents | open_url, share_text, start_activity |
| Camera | camera_photo (image block), camera_video |
| Sensors | accelerometer, gyro, light, pressure, step counter |
| Thermals | CPU / skin / battery / GPU / modem temps |
| Settings | brightness, ringer, airplane, bluetooth, any setting_put |
| Logs | logcat one-shot, log_stream → event_bus, notifications_parsed |
| A11y | enable services, captions, magnification, font scale |
| Comms | dial, sms_compose, media_control, volume |
- Installation
- Quickstart
- Connect a Device — USB / wireless / SSH
- Vision — screenshots as image blocks
- Smart Tap — semantic UI automation
- Camera — physical photos
- Logcat Streaming — event bus integration
- DevDuck Integration
- Safety — production hardening
- Examples — WhatsApp, notifications, autonomous
- Architecture
- API Reference
- Dry-run mode for destructive ops
- Allowlist/denylist for package operations
- No plaintext PIN/password storage
- Full audit logging of every adb invocation
MIT