allwright-surface-mobile-android
Android plugin for the allwright mobile surface.
Current design direction:
- Use a native Rust runtime that drives Android through
adband the built-in UI hierarchy dump/input tools. - Support native Android views, hybrid apps, and browser-wrapped/WebView-backed apps as first-class targets.
- Mirror the
websurface contract: clients send aconnectcommand with Android-specific options and receive a session plus initial page handle back. - Resolve
connectthrough ADB device discovery: use the requested device name or serial when provided, otherwise attach to the first available Android device or emulator. - Keep page-scoped commands aligned with
web. The first implemented cut isconnect,launch_app,click_element, andfill_element. - Reuse the same selector transport convention clients already know:
css=...andxpath=..., including chained locator segments. - Bootstrap sessions through connected devices or emulators discovered over ADB.
- Ship a standalone runtime artifact so
allwright plugin install mobile-androidcan download the plugin library from GitHub Releases.
Current local smoke path:
connectdiscovers devices throughadb devices -l, selects the named/serial-matched device when provided, and otherwise uses the first availabledeviceentry.launch_appinstalls the APK withadb install -r, resolves the package from--app-idor best-effort APK metadata parsing, then starts the app witham startormonkey.click_elementandfill_elementresolve selectors from the dumped Android UI hierarchy and drive interaction through nativeadb shell inputcommands.allwright plugin install mobile-androidinstalls the standalone runtime library, but a full engine-routed Android session path still depends on the remaining mobile server integration work.- Run the smoke test with
bash scripts/test-mobile-android.sh /path/to/app.apk 'xpath=//*[@text="Login"]' --app-id your.package.name.