* feat(jeb): add JEB engine provider over its MCP interface
Add a bring-your-own JEB provider that serves project, unit, and
decompilation inspection from a caller-started JEB client speaking MCP
(streamable HTTP, selected with REA_JEB_MCP_URL). Expose four provider-neutral
operations through shared CLI/MCP workflows: inspect_jeb_client,
open_jeb_project, list_jeb_units, and decompile_jeb_item, each returning
Evidence with engine identity, endpoint, and preserved refusal reasons.
The adapter keeps JEB's envelope semantics: success fields are parsed
format-aware at the boundary, message-only refusals become unsupported-target
errors with the engine's own reason, transport failures become availability
failures with recovery guidance, and unit pagination derives coverage from the
engine's 100-item page cap. Explicit unknowns (implicitly selected unit,
omitted filters) are reported instead of guessed.
Verified against a real JEB 5.48.0 licensed build serving jeb-mcp-server 1.3.0
headless: client inspection, unit listing, and method decompilation were
exercised through the CLI, MCP boundary, and scripts/verify-jeb.mjs.
JEB 5.48.0 headless instances do not advertise open_project; the refusal is
preserved and documented.
* fix(jeb): verify against a real signed APK and fix CLI option surface
Verify the provider against a locally built, v1/v2/v3-signed probe APK
(binary manifest, classes.dex with a launcher activity) on JEB 5.48.0: the
full unit tree (apk, manifest, three certificate units, dex bytecode,
decompiler), wildcard-filtered and paginated unit listing with derived
coverage, parent-restricted listing, and launcher-activity method
decompilation through both CLI and MCP, including dexdec's inline
constant folding of the probe's obfuscated tag.
Move list-jeb-units filter/pagination and decompile-jeb-item unit selection
from positional arguments to options; the MCP schemas are unchanged.
* fix(jeb): preserve engine refusals through the real MCP boundary
Testing against the published Signal 8.30.3 universal APK exposed a boundary
bug the scripted provider tests missed: decodeJebToolResult raised a protocol
error for isError results before the provider could map JEB's
{success:false, message} envelope, so real engine refusals surfaced as
unreadable output instead of the engine's own reason. Decode refusal
envelopes like any structured result and let the provider preserve the
reason; cover the decoder directly, including contentless and unparseable
results.
Signal verification: full 109 MB R8/Kotlin/Compose APK with four signature
schemes and native arm64 ELF units parsed; MainActivity.onCreate and R8
synthetic lambdas decompiled through CLI and MCP; paginated, filtered, and
parent-restricted unit listing; refusal path confirmed on the live engine.
* docs(jeb): record Flutter Gallery verification on the real-engine lane
Verify the provider against the official Flutter Gallery 2.9.2 release APK
(112 MB): per-ABI libapp.so Dart AOT snapshot images analyzed as native code
with 75k methods on arm64, snapshot internals and wrapper methods decompiled
through both CLI and MCP with explicit unit selection, decoded manifest, and
filtered native-library unit discovery. Note that JEB 5.48.0 headless does
not expose the dedicated Dart snapshot processor or run_script; both remain
GUI-only engine surfaces.
* docs(jeb): translate the README JEB row for every supported language
The JEB row was inserted in English across all translated READMEs; each now
carries its own label, capability summary, requirements, and guide link
following that language's Android-row conventions.
* fix(jeb): enforce local endpoints and preserve cancellation
* fix(jeb): refuse redirects across the local MCP boundary
---------
Co-authored-by: REA Contributor <[email protected]>
Co-authored-by: morluto <[email protected]>
3.8 KiB
JEB instrumentation and analysis
REA exposes JEB-backed project, unit, and decompilation inspection through the CLI and MCP, served by JEB's own MCP interface. JEB is a bring-your-own engine: REA never installs it, launches it, or opens its project databases itself.
Bring-your-own engine
Start a JEB client that serves MCP and point REA at it:
- Default endpoint:
http://127.0.0.1:8425/mcp. Override withREA_JEB_MCP_URL(absolutehttp/httpsURL with literal host127.0.0.1or[::1]; redirects, remote hosts, credentials, query strings, and fragments are rejected rather than silently dropped). - In the JEB GUI client, start the MCP server from the File menu (or via the VIBRE assistant).
- Headless, use JEB's documented programmatic route (
JebMcpServerInstancefrom the JEB API) with the JEB client on your classpath; JEB 5.48's-cheadless mode does not accept--mcpdirectly.
Verified against JEB 5.48.0 (Linux x64, licensed build) serving jeb-mcp-server 1.3.0 over streamable HTTP.
Operations
| MCP tool / CLI command | Purpose |
|---|---|
inspect_jeb_client / inspect-jeb-client |
Engine version, GUI or headless mode, startup time |
open_jeb_project / open-jeb-project |
Open or create a project from an artifact or .jdb2 on the engine host; returns input-file SHA-256 digests and top-level units |
list_jeb_units / list-jeb-units |
Page units by stable path and type (filter, parent-unit-path, index, count) |
decompile_jeb_item / decompile-jeb-item |
Decompile one type or method to engine pseudo-code |
All four are read-only with respect to the target file; only open_jeb_project changes engine-side project state, and Evidence records the endpoint, the caller-selected parameters, and the engine-reported digests. Mutation workflows the engine also offers (renames, comments, save_project, close_project) are intentionally not exposed yet.
Engine coverage note (verified): JEB 5.48.0 headless MCP instances do not advertise open_project — the target must be selected when the engine client starts (--infile on the programmatic launcher, or the GUI's file opening). REA preserves that refusal with the engine's reason instead of failing silently; open_jeb_project completes only against engine builds that advertise the tool, such as GUI clients.
Semantics
- Paths in
open_jeb_projectare resolved by the JEB process, not by REA; REA does not require the artifact to exist locally. - The engine caps
list_unitspages at 100; a full page is reported ascoverage: "partial"because more units may exist. An empty remainder iscompleteonly when fewer units than requested were returned. - When
decompile_jeb_itemomitsunit_path, the engine implicitly selects the project's first code unit; REA reportsunit_path: nulland a limitation instead of guessing the effective unit. - Engine refusals (
success: falseenvelopes) are preserved as unsupported-target errors carrying the engine's own message, for example a nonexistent item address. - An unreachable endpoint is a provider-availability failure with recovery guidance; REA does not retry or spawn the engine.
Real-engine verification lives in the JEB lane described in testing.md; mock transport tests do not establish real-engine compatibility.