Skip to content

fix(observation): helper hierarchy retains old text while screenshots update #200

Open

Description

@coygeek

Summary

In two supplied external-MCP evaluations of one Android device, mobile_get_device_state(view_type="hierarchy") kept returning older Settings text while fresh screenshot reads showed updated values on the same page. The helper was reported installed, enabled and reachable. A consumer relying on the hierarchy could therefore report an outdated value as current. This report concerns the observed freshness mismatch, not all hierarchy reads or devices; its cause is not established.

Steps to reproduce

The following is the known hardware case from the supplied evaluations, not a new hardware rerun or a minimized deterministic reproducer:

  1. Use the helper-backed observation path with the runtime described below and one explicitly selected device. Keep the Android Settings main page visible while the device is charging, so the displayed Battery percentage can change without navigation.
  2. Through an initialized MCP client, call mobile_get_device_state with view_type="hierarchy" and the explicit device_serial.
  3. Call the same tool with view_type="screenshot" and the same serial, and directly inspect the returned image.
  4. After the visible Battery value changes, request hierarchy and screenshot observations again for that device and compare the Battery row. In the supplied case, a second independent evaluator also requested observations of the unchanged page.

The initial condition that made the hierarchy remain old is unknown. The helper has since been removed from the test device, so this investigation did not recreate that hardware condition or reinstall it. A current-source inspection and a synthetic check, if described below, are distinct from a live-device reproduction.

Expected behavior

The tool describes itself as a real-time observer returning a screenshot or the simplified UI element tree used for automation. On the same selected device and visible page, a newly requested hierarchy should reflect changing visible text rather than silently continuing to present an older value as current. A short capture skew does not explain a value that remains unchanged across the supplied later observations.

Actual behavior

The three saved hierarchy responses from the two evaluators contain identical text: the Battery accessibility description reports Battery charging, 69 percent. and the Settings row reports 69% - 36 min left until full. The directly inspected fresh screenshots show the Settings Battery row at 74% - 31 min left until full, then 75% - 31 min left until full, and later 77% - 29 min left until full. The hierarchy also retained an older clock label. These are supplied hardware observations that were rechecked against the saved response files and images during this investigation; no live hierarchy request was executed here.

The saved helper status reports installed version matching the bundled version, enabled, reachable, and supported protocol. These status fields establish availability, not hierarchy freshness or which layer retained old data. No claim is made that the battery reading is a security bug, that every read is stale, or that the helper alone is responsible.

Evidence

  • Expected source: mobile_get_device_state documents real-time screenshots and UI element trees at mcp_server/tools/device_state.py:35-50; both views obtain their data through controller.get_screen_data() at lines 60-62.
  • Failure source: Supplied evaluator A's initial and later MCP hierarchy responses, paired with its two fresh screenshots, and evaluator B's later MCP hierarchy response paired with its fresh screenshot; sanitized meaningful values are transcribed under Actual behavior.
  • Evidence provenance: supplied
  • Local verification: not-run
  • Reproduction completeness: incomplete
  • Missing fact: The helper/device state or event sequence that causes repeated hierarchy observations to retain old text, and a live rerun of that state; the saved helper is no longer installed and was not reinstalled for this report.

The MCP observation entry point establishes the supported interface and shared screen-data entry. The fresh source checkout matches the supplied hardware baseline, but reading unchanged source does not itself reproduce the runtime mismatch. Private original screenshots and raw logs are omitted; the text excerpts above contain the observation needed to compare the two views.

Restoration check

On a device where the reported condition occurs, keep the same visible page and explicit device selection, allow a dynamic text value to change without a navigation action, then request repeated hierarchy and fresh screenshot observations. Passing means the hierarchy updates to the visible value within the observer's intended freshness behavior, rather than repeatedly returning the old value as current. Retain unchanged-page reads as a control: equality when the screen has not changed is valid and must not itself be treated as failure. Verify both the Settings row and an independently changing visible label when available. The choice of cache, event, helper, driver or other implementation change remains open pending diagnosis.

Runtime or environment

Supplied hardware baseline: public main commit 351ca8422f7b5b54e80a9c1ce03a222e02415b6b, Artemis host metadata 1.0, Python 3.12.15, macOS host, Pixel 3 XL running Android 12, helper source version 1.2.0 / installed and bundled version code 6, helper protocol 2, ADB 37.0.1-15733141. The fresh shallow checkout in this investigation has the same commit; the repository releases and tags endpoints returned no entries. These version observations are historical except the current source/intake refresh. No new hardware execution, helper installation, daemon restart or device setting change was performed.

Triage assessment

  • Impact level: P2
  • Assessment status: supported
  • Impact basis: The supplied changing-value observations show a bounded reliability failure: a hierarchy consumer can report old visible state as current. One device and two evaluators were observed; broader reach, trigger frequency and backend cause are unknown.
  • Workaround status: available
  • Workaround basis: Fresh screenshot reads in both supplied evaluations exposed the current visible Battery row, allowing a consumer to cross-check this visible value. This does not establish a workaround for off-screen or nonvisual state.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions