Small PHP web app for finding Android/ADB devices on a trusted LAN and sending remote-control commands from a browser.
| assets | ||
| data | ||
| lib | ||
| .gitignore | ||
| Agents.md | ||
| api.php | ||
| index.php | ||
| notes.php | ||
| README.md | ||
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–254and192.168.2.1–254for reachable ADB endpoints (port5555) 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 thePATHof the machine running the PHP app- Devices must allow ADB debugging / be discoverable on port
5555as configured for your setup - Web server/PHP process must be able to execute
adbcommands
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
- Open the web UI and click Scan Network to discover devices.
- Pick a device and use Connect only when you want to control it.
- Use the remote buttons or send text commands.
Project layout (high level)
index.php— main UIapi.php— JSON API for scanning/ADB actionslib/adb.php— ADB helpersassets/— CSS/JSdata/— local data storage (if used)notes.php— notes-related pageAgents.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
adband 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.