Small PHP web app for finding Android/ADB devices on a trusted LAN and sending remote-control commands from a browser.
Find a file
2026-12-03 21:18:19 -05:00
assets Mark not-found devices red; add remove button and delete_device API 2026-12-03 21:02:33 -05:00
data Initial php-adb: LAN Android TV scanner and ADB controller 2026-12-03 20:05:28 -05:00
lib Auto-scan on page load; prune/rotate devices.json 2026-12-03 20:40:16 -05:00
.gitignore Add simple notes/commands section (separate notes.php, JSON storage) 2026-12-03 20:28:42 -05:00
Agents.md Initial php-adb: LAN Android TV scanner and ADB controller 2026-12-03 20:05:28 -05:00
api.php Mark not-found devices red; add remove button and delete_device API 2026-12-03 21:02:33 -05:00
index.php Improve discovery: scan 5555 and 8008/eureka_info across both subnets 2026-12-03 20:51:49 -05:00
notes.php Add simple notes/commands section (separate notes.php, JSON storage) 2026-12-03 20:28:42 -05:00
README.md Add README 2026-12-03 21:18:19 -05:00

php-adb

A small PHP web app for controlling Android TV / ADB devices on your LAN. It scans common home subnets, discovers devices with ADB access, and lets you send remote-style commands from a browser — connecting to devices only when you choose.

LAN only. This tool is intended for trusted local networks (e.g. 192.168.1.x / 192.168.2.x). It is not hardened for exposure to the internet.

Features

  • Scan 192.168.1.1–254 and 192.168.2.1–254 for reachable ADB endpoints (port 5555) and attempt to identify device names where possible.
  • Device list UI with connect/disconnect controls (no automatic connections).
  • Send common TV remote key events (navigation, home/back/menu/apps/settings/info, playback, volume).
  • Send text input to the focused field on the device (best results with basic ASCII).
  • Simple JSON API (api.php) used by the frontend.
  • Notes page (notes.php) for local notes/data helpers (see repo files).

Requirements

  • PHP (run via a local web server / PHP built-in server is fine for LAN use)
  • adb (Android Platform Tools) installed and available on the PATH of the machine running the PHP app
  • Devices must allow ADB debugging / be discoverable on port 5555 as configured for your setup
  • Web server/PHP process must be able to execute adb commands

Running locally (example)

From the repo root:

php -S 0.0.0.0:8000

Then open http://<your-lan-ip>:8000/ in a browser on the same network.

Usage

  1. Open the web UI and click Scan Network to discover devices.
  2. Pick a device and use Connect only when you want to control it.
  3. Use the remote buttons or send text commands.

Project layout (high level)

  • index.php — main UI
  • api.php — JSON API for scanning/ADB actions
  • lib/adb.php — ADB helpers
  • assets/ — CSS/JS
  • data/ — local data storage (if used)
  • notes.php — notes-related page
  • Agents.md — notes for agents/contributors (historical context)

Git remote

This repo is commonly pushed to:

https://git.claytonia.net/Clarth/php-adb.git

(If your remote differs, update with git remote set-url origin ....)

Security notes

  • Do not expose this app to the public internet.
  • Anyone with access to the UI can attempt to control discovered devices on the LAN.
  • Keep adb and device debugging settings appropriate for your environment.

License

No license file is currently specified in this repository. Add a LICENSE if you want to clarify reuse terms.