Live Testing¶
Phase 6 validates TouchPilot on a real Android runtime. The current target is
the local Android emulator AVD named TouchPilot_API_35.
Emulator Setup¶
Start the emulator from GNOME with the TouchPilot Emulator launcher, or run:
bash
/home/ubuntu/Android/Sdk/emulator/emulator -avd TouchPilot_API_35 -gpu swiftshader_indirect -accel on
Install the debug APK:
bash
cd /home/ubuntu/codes/tmimmanuel/touchpilot
ANDROID_HOME=/home/ubuntu/Android/Sdk ./gradlew installDebug
Enable the accessibility service for test runs:
bash
/home/ubuntu/Android/Sdk/platform-tools/adb shell settings put secure enabled_accessibility_services dev.touchpilot.app/dev.touchpilot.app.androidcontrol.TouchPilotAccessibilityService
/home/ubuntu/Android/Sdk/platform-tools/adb shell settings put secure accessibility_enabled 1
Launch TouchPilot:
bash
/home/ubuntu/Android/Sdk/platform-tools/adb shell monkey -p dev.touchpilot.app 1
Checklist¶
- Emulator boots and appears in
adb devices. - TouchPilot installs with
./gradlew installDebug. - TouchPilot launches.
- Accessibility status shows connected.
-
Observe Current Screenreturns a non-empty UI tree. -
Open Appopens Settings by label. -
open_settings_panel({panel=wifi})opens Wi-Fi Settings directly. -
open_settings_panel({panel=bluetooth})opens Bluetooth Settings directly. -
open_settings_panel({panel=accessibility})opens Accessibility Settings directly. -
open_settings_panel({panel=app_info})opens TouchPilot app details. -
open_settings_panel({panel=notifications})opens TouchPilot notification settings. -
open_settings_panel({panel=system_settings})opens top-level Android Settings. -
open_settings_panelrejects unsupported panel names before launching an intent. -
Open Appfollowed bywait_for_idlesettles after launch. -
Open Appfollowed bywait_for_app({label=Settings})confirms Settings is foreground before follow-up actions. -
Tap Texttaps a visible target. -
Tap Textfollowed bywait_for_idlesettles after the tap transition. -
long_press({text=...})opens a target context menu or selection state. -
long_pressreturns clear failures for missing or ambiguous targets. -
Type Into Focused Fieldenters text into a focused field. -
Scroll DownandScroll Upwork on a scrollable screen. -
Swipe LeftandSwipe Rightadvance a horizontal pager/carousel (e.g. the launcher home screens or a photo viewer). Added in Milestone 4 (issue #86); pending a live emulator pass. -
Swipe UpandSwipe Downmove a vertical gesture surface (e.g. the notification shade or a bottom sheet). Added in Milestone 4 (issue #86); pending a live emulator pass. -
Scroll DownorScroll Upfollowed bywait_for_idlesettles after movement. - Keyboard dismissal followed by
wait_for_idlesettles after IME changes. -
BackandHomework. -
dismiss_keyboardhides the soft keyboard when it is visible. -
dismiss_keyboardis a no-op when the keyboard is not visible and does not navigate the foreground app. -
dismiss_keyboardreportswas_visible_beforeandstill_visible_afterin the tool log. - Medium-risk model-selected tools show inline approval prompts.
- Denied approvals stop execution and log the denial.
- Active skill allowlists deny disallowed tools.
- Local router mode handles simple commands such as
open settings,back,home, andscroll. - MCP client UI is reachable and exposes endpoint, list, call, tool, and argument controls.
-
Export Debug Tracewrites a trace file.
Phase 6 Result¶
Completed on commit 470c7e1 using TouchPilot_API_35 on Android 15.
Validated live:
installDebuginstalled the debug APK on the emulator.dev.touchpilot.app/.MainActivitylaunched successfully.- Accessibility status showed connected after enabling
dev.touchpilot.app/dev.touchpilot.app.androidcontrol.TouchPilotAccessibilityService. Open Appopened Android Settings by launcher label.- The Agent, local-router, MCP, tool-log, and export-trace sections were reachable by scrolling.
Type Into Focused Fieldloggedtype_text(...) -> ok: typeIntoFocusedField.Wait For Textloggedwait_for_ui(...) -> ok: waitForText.Export Debug Tracewrote a file under/sdcard/Android/data/dev.touchpilot.app/files/debug-traces/.
Fixes made from live testing:
- Core debug controls now have stable Android resource IDs for ADB/UIAutomator checks.
- Debug action buttons hide the soft keyboard before executing, so live tests can reliably tap actions after entering text.
- The type-text debug path restores focus to the text input before invoking the
accessibility
type_texttool.
Evidence¶
For each test pass, capture:
- emulator/device name,
- Android version,
- TouchPilot commit,
- failing checklist items,
- screenshots or trace paths when useful.
Take a screenshot:
bash
/home/ubuntu/Android/Sdk/platform-tools/adb exec-out screencap -p > tmp/live-test.png
Dump visible UI text:
bash
/home/ubuntu/Android/Sdk/platform-tools/adb shell uiautomator dump /sdcard/window.xml
/home/ubuntu/Android/Sdk/platform-tools/adb shell cat /sdcard/window.xml
Known Post-Milestone Follow-Up Areas¶
- Manual accessibility enablement should be tested, not only adb settings.
- MCP needs a local test server fixture.
- Approval UI should gain automated instrumentation coverage.
- Product UI should continue to receive emulator screenshots or recordings for material UX changes.