An Android Webview/Browser your agent harness can drive.
So7o Webview is an Android app whose only job is to show a page and
publish that WebView’s Chrome DevTools Protocol socket on
127.0.0.1:9334. It is meant to be driven by an agent or a test harness: point one at that port from Termux and you
have a real phone WebView to navigate, type into and screenshot, with no
emulator and no root.
The relay is the part that took the thinking. A WebView’s DevTools
server listens on an abstract unix socket named after its pid, and
SELinux refuses connections from another app, so Termux gets
EACCES and Shizuku does not help; adbd is
allowed, but an adb forward dies with the wireless
debugging session. A process may connect to a socket it created itself,
so the app connects to its own and byte-pumps it to 9334, and after the
install driving needs no adb at all.
The client is cdp.mjs: 385 lines of Node, no
dependencies, the WebSocket that ships with Node 22. Earlier today it
clicked into DuckDuckGo’s search box, typed a query, pressed Enter and
read the results back as JSON; the screenshot came out 1035x1638,
because the phone was folded and the cover display is 459x727 CSS pixels
at device pixel ratio 2.25. The same --click,
--type and --shot calls are what a harness
uses, so a test you write against it does not care which client drives
it.
It builds on the phone with a shell script and no Gradle or Android SDK. It is at github.com/jan5o7o/android-webview-cdp, MIT. Install the APK and start it once; after that an agent or a harness attaches with no adb and no UI to click through.