Android Automation
MachinaOs can control Android devices for automation tasks like launching apps, monitoring battery, controlling WiFi, and more.Connection Methods
| Method | Use Case |
|---|---|
| Local ADB | Device connected via USB to your machine |
| Remote Relay | Device connected via WebSocket relay server |
Step 1: Set Up Connection
Option A: Local ADB
- Enable Developer Options on your Android device
- Enable USB Debugging
- Connect device via USB
- Run
adb devicesto verify connection
Option B: Remote Relay
- Click the Android icon in the toolbar
- Enter your relay URL and API key in Credentials
- Click Connect
- Scan the QR code with the companion Android app
Remote relay allows controlling devices anywhere with internet access.
Step 2: Add Android Device Setup
- Drag Android Device Setup from Android category
- Configure connection type:
Available Android Nodes
System Monitoring
| Node | Description |
|---|---|
| Battery Monitor | Battery level, charging status, temperature |
| Network Monitor | WiFi/cellular status, internet connectivity |
| System Info | Device model, Android version, memory |
| Location | GPS coordinates, accuracy, provider |
App Management
| Node | Description |
|---|---|
| App Launcher | Launch apps by package name |
| App List | Get installed applications |
Automation
| Node | Description |
|---|---|
| WiFi Automation | Enable/disable WiFi, scan networks |
| Bluetooth Automation | Toggle Bluetooth, list paired devices |
| Audio Automation | Volume control, mute/unmute |
| Device State | Airplane mode, brightness, screen |
| Screen Control | Wake screen, timeout settings |
Sensors
| Node | Description |
|---|---|
| Motion Detection | Accelerometer, gyroscope, shake detection |
| Environmental Sensors | Temperature, humidity, pressure, light |
Media
| Node | Description |
|---|---|
| Camera Control | Take photos, get camera info |
| Media Control | Playback control, volume |
Example: Battery Alert Workflow
Create a workflow that sends an alert when battery is low.Workflow Design
Step 1: Add Cron Trigger
Step 2: Add Battery Monitor
Step 3: Add Python Executor
Step 4: Add WhatsApp Send (conditional)
Example: App Launcher Workflow
Launch an app when receiving a webhook.Example: WiFi Toggle
Battery Monitor Output
Network Monitor Output
Troubleshooting
Device not showing in dropdown
Device not showing in dropdown
- Run
adb devicesto check connection - Ensure USB debugging is enabled
- Try different USB cable/port
- Restart ADB:
adb kill-server && adb start-server
Remote relay won't connect
Remote relay won't connect
- Verify relay URL is correct
- Check API key is valid
- Ensure companion app is installed on device
- Check firewall settings
Commands fail with permission error
Commands fail with permission error
- Some actions require root access
- Use device automation apps for restricted features
- Check Android version compatibility