Home Assistant integration for managing USB and wireless ADB connections to Android devices.
- 🔌 USB ADB Connection - Detect and connect to USB-attached Android devices
- 📡 WiFi ADB Management - Enable wireless ADB with one click
- 📊 Status Sensors - Monitor connection status, device IP, and ADB port
- 🎮 Remote Control - Run shell commands and install APKs remotely
- Open HACS in Home Assistant
- Go to "Integrations"
- Click the three dots menu (⋮) → "Custom repositories"
- Add repository:
https://github.com/phurth/hacs-adb-connector - Category: "Integration"
- Click "Install"
- Restart Home Assistant
- Download the
custom_components/adb_bridgefolder - Copy to your Home Assistant
config/custom_components/directory - Restart Home Assistant
- Connect device via USB to your Home Assistant host
- Go to Settings → Devices & Services
- Click "+ Add Integration"
- Search for "ADB Bridge"
- Select your device from the list
- Watch your device screen for the "Allow USB debugging?" prompt
- Check "Always allow from this computer" and tap "OK"
- USB debugging enabled on Android device
- USB cable connected to Home Assistant host
- Device appears in
/dev/bus/usb/(automatic with Proxmox USB passthrough or bare metal)
Once configured, you'll get the following entities:
| Entity | Description |
|---|---|
sensor.<device>_connection_status |
Shows "Connected" or "Disconnected" |
sensor.<device>_wifi_ip_address |
Device's WiFi IP address |
sensor.<device>_adb_port |
ADB port number (shown when WiFi ADB is enabled) |
button.<device>_enable_wifi_adb |
One-click enable wireless ADB |
button.<device>_reconnect |
Force reconnection to device |
- Connect device via USB initially
- Press the "Enable WiFi ADB" button
- Device becomes accessible wirelessly at
<ip>:5555 - USB cable can now be disconnected
The device will remain in wireless mode until rebooted.
Once wireless ADB is enabled, connect from any computer on your network:
adb connect <device_ip>:5555
adb devices
adb install myapp.apkUse scrcpy for remote screen access:
scrcpy -s <device_ip>:5555Automatically enable WiFi ADB when device connects:
automation:
- alias: "Enable WiFi ADB on connect"
trigger:
- platform: state
entity_id: sensor.adb_device_connection_status
to: "Connected"
condition:
- condition: state
entity_id: sensor.adb_device_wifi_ip_address
state: "unknown"
action:
- service: button.press
target:
entity_id: button.adb_device_enable_wifi_adb- Ensure USB debugging is enabled on Android device
- Check USB cable supports data transfer (not charge-only)
- Try a different USB port
- Verify device appears in
ls -la /dev/bus/usb/from HA terminal
- Check HA logs: Settings → System → Logs → Search "adb_bridge"
- Ensure no other ADB server is connected to the device
- On device, revoke USB debugging authorizations and try again: Settings → Developer Options → Revoke USB debugging authorizations
- Verify device is on same network as Home Assistant
- Check firewall isn't blocking port 5555
- Some devices require WiFi to be enabled first (not Ethernet)
- After pressing "Enable WiFi ADB", wait 2–5 seconds; the USB session will restart while
adbdswitches to TCP/IP - Confirm the
Wireless ADBsensor showsEnabledandADB Portshows5555 - Try connecting from HA host:
adb connect <ip>:5555and checkadb devices - If your device blocks
ctl.restartcommands, unplug/replug USB and retry; alternatively reboot the device and press the button again - Certain OEM builds only honor
service.adb.tcp.portafter a restart; if so, reboot the device once after enabling
This integration uses the adb-shell library for ADB communication.
- Home Assistant 2024.1.0 or newer
- Python 3.11+
- Android device with USB debugging enabled
MIT License - see LICENSE file for details
- Built for managing headless Android devices in Home Assistant
- Uses adb-shell for ADB protocol implementation
- Inspired by the Home Assistant Android TV integration