Skip to content

feat(android): add boot wait and resource-id to code tracing - #3840

Open
FabioLima77 wants to merge 32 commits into
morluto:mainfrom
FabioLima77:feat/android-dynamic-pipeline
Open

FabioLima77 wants to merge 32 commits into
morluto:mainfrom
FabioLima77:feat/android-dynamic-pipeline

Conversation

@FabioLima77

@FabioLima77 FabioLima77 commented Oct 15, 2026 •

Copy link
Copy Markdown

Requested by Fabio Lima

Summary

Adds two Android analysis tools that complement the UI Automator lane in
#3004:

Scope was narrowed after the #3004/#3840 comparison: UI capture and input
actions are left to #3004's UI Automator backend. The removed tools remain on
FabioLima77:backup/android-ui-input-3840 for reference.

Problem and expected behavior

  • Dynamic workflows start an emulator outside REA and need a reliable readiness
    signal before installing or launching apps. wait_adb_boot polls
    sys.boot_completed, dev.bootcomplete and init.svc.bootanim, tolerates a
    device that is still offline or not yet listed, fails fast on unauthorized,
    and probes once more at the deadline instead of stopping a full interval
    early. It returns boot_completed or timed_out with the last observed
    properties.
  • A resource-id seen on screen (com.example:id/login, android:id/title) had
    no static link to code. trace_android_resource_references resolves it
    through the APK resource table (or JADX's bundled framework map for
    android:) and scans every method's raw DEX instructions once for
    const_literal loads (findViewById), switch_case keys (click dispatch on
    getId()) and r_field_read reads of non-final library R fields.

Change and scope

  • wait_adb_boot is an AdbProvider operation beside the existing adb tools.
  • rea_resource_references in ReaJadxBridge.java, normalized in
    JadxAnalysis.ts. Sites and R declarations share the bridge's 8 MiB
    transport budget; total_sites and total_r_fields stay exact and bounded
    results report coverage: "partial". R declarations carry origin
    (dex | jadx_generated) because JADX synthesizes an app R class when the
    APK has none. Unresolved names stay explicit, not reported as unused.
  • Not included: UI capture or input (see feat(adb): add UI Automator discovery, waits and actions #3004), layout-XML, data-binding or
    reflection (getIdentifier) mapping, emulator lifecycle (REA still never
    starts or manages emulators).

Contract and boundary impact

  • Semantic owner and earliest changed stage: ADB and Android domain schemas.
  • Contribution scope fit and linked maintainer decision: read-only tools; none linked.
  • CLI and MCP/tool-catalog contract: two new tools and CLI commands
    (wait-adb-boot, trace-android-resource-references); existing contracts unchanged.
  • Provider, bridge, target-format, or platform compatibility: JADX bridge gains
    one tool; verified with jadx-headless-mcp 0.7.1.
  • Evidence, artifact, provenance, or reconstruction contract: inline Evidence
    with explicit partial coverage and unresolved states.
  • Target selection, authority, upstream behavior, and cleanup details: no device mutation.
  • Generated metadata: catalog regenerated by docs:check, not committed.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: real-JAR regression
    tests/conformance/android/ReaJadxMetadataRegression.java over the smali
    fixture tests/fixtures/android/resource-references/ (const, packed and sparse
    switch, library R-field read); tests/boundary/android/JadxAnalysis.test.ts;
    src/adb/AdbProvider.test.ts (boot completion, deadline probe, unreachable
    device; POSIX adb stub); tests/boundary/mcp/adbMcp.test.ts.
  • Real workflow (executed, Windows 11, emulator 37.2.12 + WHPX, Android 14
    google_apis x86_64, adb 37.0.1, jadx-headless-mcp 0.7.1):
    • wait-adb-boot → boot_completed after 36–81 s; with a 1000 ms timeout and
      2000 ms interval it probes again at the deadline.
    • SettingsGoogle.apk (16,954 classes, 98,791 methods, ~17 s incl. load):
      com.android.settings:id/search_action_bar → 0x7f0c0523 →
      SettingsHomepageActivity.initSearchBarView, confirmed by
      inspect-android-method (findViewById(R.id.search_action_bar));
      android:id/title → 0x01020016, 37 sites; unknown id → unresolved.
    • Termux v0.118.3 x86_64: com.termux:id/terminal_view → 0x7f080191 →
      TermuxActivity.setTermuxTerminalViewAndClients; R$id origin dex.
  • Remaining proof gaps: AdbProvider.test.ts stub tests run only on
    Linux/macOS CI.

Validation performed

  • Resource regression (verifyResourceReferences via a local driver against
    jadx-headless-mcp 0.7.1) — RESOURCE_REFERENCE_REGRESSION_PASS title_sites=3 switch=packed,sparse r_field=dex.
  • npm run check:fast — pass.
  • npm run docs:check — pass.
  • npx vitest run tests/boundary/mcp/adbMcp.test.ts tests/boundary/android/JadxAnalysis.test.ts tests/acceptance/tools/localToolContracts.test.ts tests/boundary/cli/adbCli.test.ts — 29 passed, 6 skipped.
  • npm run test:local -- src/contracts/toolEffects.test.ts src/adb/AdbProvider.test.ts — passed (provider stub suite skipped on Windows).

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: Windows 11 only; Linux/macOS via CI.
  • Package or release metadata impact: two new tools in the catalog.
  • Security, privacy, process, or containment review: both tools are read-only;
    adb arguments stay positional and shell-quoted at the adb boundary.

Author readiness

Human owner: @FabioLima77

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🤖 Generated with Claude Code

FabioLima77 and others added 2 commits October 14, 2026 22:58
Add three ADB tools for dynamic Android analysis over caller-connected
devices:

- wait_adb_boot polls sys.boot_completed/dev.bootcomplete/init.svc.bootanim
  until boot completes or the deadline passes, tolerating an offline device.
- capture_adb_ui_state dumps the uiautomator hierarchy through a uniquely
  named device temp file removed by the same shell, then captures one
  screenshot; both are written under one timestamped state_id and the
  parsed nodes (resource-id, text, content-desc, bounds, center, flags)
  are returned inline.
- send_adb_input injects tap, tap_element (exact selector over a fresh
  dump), long_press, swipe, ASCII text and key events in order, stopping at
  the first failure and echoing a replayable executed list.

Move the shared adb invocation and output-file primitives into AdbRun.ts so
the provider and the new interaction module use one runner.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Add trace_android_resource_references, which takes resource-id values as
uiautomator and capture_adb_ui_state report them (package:type/name) and
resolves each through the APK resource table, or JADX's bundled framework
map for the android package, to its integer IDs.

The JADX bridge then scans every method's raw DEX instructions once and
reports const literal loads, packed/sparse switch keys, and non-final
R-field reads, with class, top class, method, raw method id, dex entry and
code-unit offset. Totals stay exact when max_sites_per_resource bounds the
returned sites. R$type declarations are listed with their origin, so an R
class JADX synthesized from the resource table is not presented as APK
content. Unresolved names stay explicit rather than reported as unused.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T17:06:24.053363Z 609b342 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; all three numbered findings are addressed.

Summary

Adds Android boot waiting and static resource-ID tracing through CLI and MCP.

  • Android resource IDs now lead to matching declarations and DEX code sites.
  • ADB can wait until a device reports that boot has completed.
  • A few existing imports are grouped without changing tool behavior.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Client[CLI or MCP] --> Wait[wait_adb_boot]
  Wait --> Properties[Read device boot properties]
  Properties --> Outcome[Boot completed or timed out]
  Client --> Trace[trace_android_resource_references]
  Trace --> Resolve[Resolve resource names to IDs]
  Resolve --> Scan[Scan raw DEX instructions]
  Scan --> Result[Bounded sites and exact totals]
Loading

Reviews (24) · Last reviewed commit: "fix(adb): keep abort reason, bound CLI m..." · Reviewed by Greptile

Comment thread src/domain/adb/adbDeviceAnalysis.ts Resolved
Comment thread src/adb/AdbInteraction.ts Resolved
Comment thread bridge/android/ReaJadxBridge.java Resolved
Comment thread src/adb/AdbInteraction.ts Resolved
Comment thread src/cli/adbCommands.ts Resolved
Comment thread src/adb/AdbUiHierarchy.ts Resolved
- send_adb_input returns the completed actions as a replay-ready list and
  keeps argv/resolved-node facts in executed, so a result replays through
  MCP and CLI alike; the CLI reads --actions as inline JSON or a JSON file
  through the shared bounded reader instead of its own unbounded reader.
- wait_adb_boot sleeps for the smaller of the interval and the remaining
  time and probes once more at the deadline instead of stopping early.
- tap_element refuses a truncated hierarchy, which cannot prove a selector
  is unambiguous, and empty bounds no longer produce a tappable center.
- The bridge resource scan shares the 8 MiB transport budget across sites
  and R-field declarations, keeps exact totals, and reports total_r_fields
  so budget-bounded results surface as partial coverage.
- Add a real-JAR regression over a smali fixture covering const loads,
  packed and sparse switch keys, and library R-field reads.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Comment thread src/cli/adbCommands.ts Resolved
@FabioLima77 FabioLima77 changed the title Feat/android dynamic pipeline feat(android): add dynamic UI capture, input, and resource-id mapping Oct 15, 2026
@FabioLima77
FabioLima77 marked this pull request as draft October 15, 2026 05:22
@kaoru0822-kitauji
kaoru0822-kitauji marked this pull request as ready for review October 15, 2026 06:15
send-adb-input parsed --actions before entering the shared CLI execution
boundary, so an unreadable file or malformed inline JSON returned an
error payload without logCliCommand classifying it, and the command
exited 0 although no action ran. Resolve the actions inside the same
logging, exit-code and cancellation boundary as execution.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Comment thread src/cli/adbCommands.ts Resolved
@3QL

3QL commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

PR #3004 vs #3840

Both PRs add Android UI inspection and interaction, with substantial overlap.

Area #3004 #3840
Backend AndroidX UI Automator 2.4.0 through an operator-installed runner uiautomator dump and adb shell input
UI inspection Package/window-scoped hierarchy with snapshot-scoped element IDs Parsed XML hierarchy paired with a screenshot
Element discovery Exact/substring text, descriptions, resource IDs, classes, states and clickable-parent relationships Exact selectors resolved from a fresh hierarchy for element taps
Selection Explicit element ID from a retained snapshot Selector, with match_index for ambiguous matches
Actions Tap, double-tap, long-press, text replacement/clearing, scroll, swipe, drag and key events Coordinate/element taps, long-press, swipe, ASCII text and key events
Text input Unicode Printable ASCII
Execution One explicit action per request Ordered, replayable action batches
Waiting UI elements appearing or disappearing Emulator boot completion
Code correlation Returns resource IDs for further analysis Maps resource IDs to JADX DEX references and R-field declarations
Reported real verification Linux, Android 16/API 36, native Views and Compose Windows 11, Android 14, Settings and Termux

Overlap

Both introduce UI hierarchy parsing, element targeting and input actions through CLI/MCP.

They modify nine common files, including the ADB provider, domain schemas, tool contracts, CLI commands and MCP registration.

Complementary capabilities

Recommendation

Coordinate the overlapping UI contracts before merging. Boot waiting and resource-reference tracing can complement #3004; its discovered resource IDs could feed #3840’s tracing tool.

Backend choice and single-action versus batch semantics need an explicit design decision.

send-adb-input resolved --actions inside the cancellation boundary but
without its signal, so a large actions file kept being read after
SIGINT or SIGTERM. Pass the command signal through the input resolver
to parseCliJsonInput and readJsonInputFile, and rethrow a cancelled read
to the command boundary instead of reporting it as an unreadable file.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@FabioLima77
FabioLima77 marked this pull request as draft October 15, 2026 18:00
Comment thread src/cliJsonInput.ts Resolved
PR morluto#3004 adds UI discovery and actions through AndroidX UI Automator with
snapshot-bound element IDs, Unicode text and UI-condition waits. Remove
this branch's overlapping capture_adb_ui_state and send_adb_input tools,
their uiautomator XML parser, CLI commands and tests, and the adb runner
extraction they needed, so the change keeps only the complementary parts:
wait_adb_boot and trace_android_resource_references. None of the removed
tools was released.

wait_adb_boot now lives in AdbProvider beside the other adb operations and
keeps its deadline behavior: it probes once more at the deadline instead
of stopping a full interval early.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@FabioLima77 FabioLima77 changed the title feat(android): add dynamic UI capture, input, and resource-id mapping feat(android): add boot wait and resource-id to code tracing Oct 15, 2026
@FabioLima77

Copy link
Copy Markdown
Author

Thanks for the comparison. I've narrowed #3840 to the complementary parts — wait_adb_boot and trace_android_resource_references — and dropped UI capture/input in favour of #3004's UI Automator lane. Resource IDs discovered by #3004 can feed the tracing tool directly.

@morluto, does this split work for you?

@FabioLima77
FabioLima77 marked this pull request as ready for review October 16, 2026 18:52
Comment thread docs/android-analysis.md Resolved
capture_adb_ui_state was removed from this PR; the guide and the
trace_android_resource_references description still named it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3a4a0306f8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread bridge/android/ReaJadxBridge.java Resolved
Comment thread src/adb/AdbProvider.ts Resolved
- Leave resource ids qualified with another app's package unresolved
  instead of borrowing this APK's code sites.
- Return non-transient boot-probe failures instead of waiting them out.
- Cover trace_android_resource_references in the all-contracts MCP
  fixture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 752915eadd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread bridge/android/ReaJadxBridge.java Resolved
Comment thread bridge/android/ReaJadxBridge.java Resolved
… class names

- Budget resource sites against 2 MiB so the Evidence frame (raw reply,
  normalized result, structured plus text) stays under the MCP limit.
- Report class_name as JavaClass.getFullName() for inspect_android_method
  and keep the DEX name in raw_class_name.

Not run here: verify:android against the real ApiDemos APK.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

…icit

RootNode.getClasses() already returns every class, inner and anonymous
included; getClassesWithoutInner() is the filtered variant. Call
getClasses(true) so the intent is visible at the call site.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Keep the boot-probe constants and drop UNPARSED_LINES_REPORTED, which
upstream removed and nothing here uses.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

Take upstream's NodeHttpRequestOwner.ts unchanged; an earlier merge
commit had picked up a lint autofix there that is not part of this PR.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

Keep the resource-scan protocol schema next to upstream's new toolResponse
envelope, and give the resource-scan test ports the listClasses member
that JadxToolPort now requires.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 763d8f7426

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

}
Map<String, Object> site = new LinkedHashMap<>();
site.put("kind", kind);
site.put("class_name", className);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Return an exact selector for duplicate class aliases

When an APK produces two ClassNodes with the same JADX full_name, the bridge keeps both under that key and selected() rejects the key as "Ambiguous metadata class identity", but every resource site here still emits only that same key as class_name. Since inspect_android_method does not accept raw_class_name, neither site's documented drill-down can be selected; return an accepted exact identity (including DEX identity if needed) instead of the ambiguous alias.

AGENTS.md reference: AGENTS.md:L33-L33

Useful? React with 👍 / 👎.

Keep both the resource-reference and the root-manifest additions in the
bridge, its verifier and the Java regression; ensureIndex now sits after
upstream's manifest helpers.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e49831c6ad

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/adb/AdbProvider.ts
Comment on lines +3019 to +3022
timeoutMs: Math.max(
1_000,
Math.min(BOOT_PROBE_TIMEOUT_MS, probeBudget),
),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the final boot probe inside timeout_ms

When less than one second remains—especially for the deliberately scheduled final probe while an offline or reconnecting device makes adb shell stall—this floor gives runAdb a fresh 1,000 ms deadline instead of the remaining timeout_ms. The operation can therefore run up to roughly a second past the caller's advertised longest wait (nearly doubling the minimum 1 s timeout) and may be cancelled by an outer MCP deadline rather than return timed_out; cap the probe by the positive remaining budget or account for its runtime before the deadline.

AGENTS.md reference: AGENTS.md:L79-L79

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kept the 1 s floor on purpose: the final probe at the deadline has ~0 ms of budget left, so capping it to the remainder would make that probe always time out and defeat its purpose (it exists so a device that finishes booting during the last interval is still seen). The overshoot is now stated in the result limitations: waited_ms can pass timeout_ms by up to about a second (5837486). Happy to change the contract if you prefer a hard cap.

🤖 Addressed by Claude Code

Comment thread docs/android-analysis.md Resolved
FabioLima77 and others added 2 commits October 23, 2026 14:47
- The scan admits sites against a 2 MiB budget, not the bridge's 8 MiB
  frame, because the MCP result repeats every site.
- wait_adb_boot keeps a 1 s floor on its final probe, so waited_ms can
  pass timeout_ms by about a second; say so in the result limitations.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Keep both appended test groups in AdbProvider.test.ts: the boot-wait
tests and upstream's package-pull failure test.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 29341e46b5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +566 to +570
if (opcode == Opcode.CONST || opcode == Opcode.CONST_WIDE) {
List<Integer> hit = literals.get(insn.getLiteral());
if (hit != null) matched.addAll(hit);
kind = "const_literal";
} else if (opcode == Opcode.PACKED_SWITCH_PAYLOAD || opcode == Opcode.SPARSE_SWITCH_PAYLOAD) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Scan IDs encoded in array-data payloads

When an app initializes an int[] from final R.id constants, D8 can put the ID values only in a fill-array-data payload; this dispatch examines immediate CONST values (then switch payloads and SGETs) but never array payload data. The tool consequently reports total_sites: 0 and coverage: "complete" for that method despite advertising every DEX instruction that loads the resource, so inspect array-data payloads or represent this form as unexamined.

AGENTS.md reference: AGENTS.md:L81-L81

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not implemented in this PR: scanning fill-array-data payloads would add a new payload decoder to the bridge that I cannot exercise against a real APK here, and the repo guidance asks for owner buy-in before adding complexity for edge forms. The guide's limitations now list fill-array-data payloads (an int[] initialized from R.id constants) as unscanned, next to layouts and reflection (c5c4f04). Leaving the thread open in case you want the decoder added.

🤖 Addressed by Claude Code

FabioLima77 and others added 2 commits October 23, 2026 18:54
Take upstream's version of the files an earlier merge commit had picked
up lint autofixes in; they are not part of this PR.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d296dd72cb

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/adb/AdbProvider.ts Resolved
FabioLima77 and others added 5 commits October 23, 2026 19:43
A host clock correction moved Date.now() mid-wait, stretching or cutting
timeout_ms and able to yield a negative waited_ms. Use performance.now().

Not run here: the sh-stub boot tests (skipped on Windows); they run in CI.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
# Conflicts:
#	src/adb/AdbProvider.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8224d97c49

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/adb/AdbProvider.ts Resolved
Comment thread src/domain/android/androidAnalysis.ts Resolved
Comment thread src/adb/AdbProvider.ts Resolved
Comment thread src/cli/androidCommands.ts Resolved
@morluto

morluto commented Nov 24, 2026

Copy link
Copy Markdown
Owner

@FabioLima77 thanks for the PR — there are 4 open review threads here:

Could you address or reply to these? Once they're resolved and CI is green we can take another look.
cc @gensokyo-dev @dandgabr

@morluto

morluto commented Nov 24, 2026

Copy link
Copy Markdown
Owner

@FabioLima77 also, this branch has merge conflicts with main — please resolve those along with the open threads.

@morluto morluto added the area: runtime Process capture and runtime observation label Nov 26, 2026

This branch has not been deployed

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

Labels

area: runtime Process capture and runtime observation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants