English first, español después. Normative detail lives in AGENTS.md,
PROTOCOL.md, ARCHITECTURE.md, PLAN.md and docs/specs/.
What is Jav
Jav is a full-control Android MCP runtime without root. An on-device app
(Jav, dev.k4wai1.jav) exposes the screen via AccessibilityService and
privileged actions via Shizuku (started by the user) to a Go MCP server on
the PC (jav, stdio).
|
Jav (this repo) |
Director (external, not part of Jav) |
| What |
Go MCP server (cmd/jav) + Android app dev.k4wai1.jav |
Claude Desktop / Cursor / Windsurf / Cline / OpenCode / Termux / operator |
| Does |
exposes 38 atomic MCP tools, runs no loops and no internal planner |
reads each screen, picks one atomic tool per step, verifies the effect |
| Tactical help |
serves resolve_element (blind S1 Jev resolver) |
decides goals, gates, and approves previews |
Jav never loops, never plans and never invents coordinates. The Director holds
the loop; Jav holds the device.
Architecture
Interactive version: docs/diagrams/jav-architecture.html
As of v2.6.0 the runtime needs no ADB on the host: private IPs serve
WSS (Tailnet 100.64/10 or LAN RFC 1918) and mDNS advertises _jav-mcp._tcp;
multiple phones share one config with automatic failover (Tailnet ↔ LAN ↔ USB);
device_status diagnoses with accessibility off (get_caps + setup_hints);
and an android/arm64 build runs on Termux in the same phone.
The tactical resolver — two interchangeable backends
The Director reads the screen, picks one atomic tool per step and verifies the
effect. When the screen is noisy, resolve_element returns the target as a
closed choice over a numbered table (≤254 candidates + NONE): never
coordinates, never free text.
- Option A — decision models (primary). A discriminative “decisions API”
engine such as Jev (
typesafe/jev-* via OpenRouter) answers in a single
pass: a Choice + calibrated confidence. conf ≥ 0.70 (tau) or the
Sovereign Fallback (top candidates + recovery instruction; the Director
decides). Extensible to other decision engines behind the same contract.
- Option B — any standard LLM with structured output (fallback). Any
OpenAI-compatible endpoint — local (Ollama, vLLM) or remote (OpenRouter,
OpenAI, DeepSeek, …) — is forced to answer exactly
{"choice": <int|"NONE">, "confidence": <float>}. The reply is validated
against the table: off-table → S2_HALLUCINATION; non-finite or below tau →
LOW_CONF; NONE → NO_TARGET. All end in the Sovereign Fallback.
- No key and no local LLM? Everything still works: the resolver degrades
to the Sovereign Fallback and never fabricates options.
Jev stays primary. The fallback is used when there is no OpenRouter key or
JAV_RESOLVE_BACKEND=openai. evidence.backend reports jev-decisions or
openai-compat, plus model. Setup: jav pair asks for the OpenRouter key
(optional), or set openrouter_api_key; for Option B set ai_base_url /
ai_api_key / ai_model in ~/.config/jav/config.json or JAV_AI_*.
Measured on a real TECNO: ~3 s and ~$0.00005 per resolution (Option A).
Quickstart
# 1 · Go server on the PC (installs `jav` into ~/.local/bin)
curl -fsSL https://raw.githubusercontent.com/k4wai1/jav/master/install.sh | sh
# 2 · Companion app from Releases; enable accessibility once; copy the token
# (ADB is only for sideloading the APK; the MCP runtime needs no adb)
adb install -r jav-companion.apk
# 3 · Pair once — interactive prompt for IP + token, Auto-TOFU, no .env
jav pair
Then register jav as an MCP server. This block is the same for Claude
Desktop (claude_desktop_config.json), Cursor (~/.cursor/mcp.json),
Windsurf (mcp_config.json) and Cline:
{
"mcpServers": {
"jav": {
"command": "jav",
"args": []
}
}
}
OpenCode uses the mcp key instead:
{"mcp":{"jav":{"type":"local","command":["jav"],"enabled":true}}}.
Termux: install.sh installs the android/arm64 binary into
$PREFIX/bin, so the same "command": "jav" block works unchanged.
That’s it — no .env, no restart: jav (re)reads
~/.config/jav/config.json (0600) hot. Remote pairing uses
wss://<tailnet-or-lan-ip>:38472/; over USB use jav pair usb <TOKEN> with
adb forward tcp:38472 tcp:38472. Shizuku is started by you — Jav never
starts it.
Several phones, one config — hot-swappable without restarting the MCP:
jav pair auto <TOKEN> # discover on the LAN (mDNS)
jav pair --name pixel 192.168.1.40 <TOKEN>
jav pair --list # * = active device
jav pair --use pixel # hot switch (or JAV_DEVICE=pixel)
jav pair --remove pixel # rm / unpair also work
Pairing the same phone over Tailnet first and then Wi-Fi keeps the previous
route as fallback_urls, so jav fails over automatically when the primary
is down.
From source instead of Releases
make build # dist/jav-linux-amd64
cd android-app && ./gradlew :app:testDebugUnitTest :app:assembleDebug
Every tool returns {ok, verified, evidence, hint}. verified: true only with
real post-verification, never on “command sent”. tools/list carries a compact
1–2 line description per tool; the full 7-section spec loads on demand as
an MCP Resource (android://tool/<name>, android://tools/<group>, index
android://tools/catalog). Startup cost measured with a real tiktoken
tokenizer: ~1.8k tokens of cognitive load (~3.5k total, schema included) —
down from ~8.8k before v1.2.0. See
docs/benchmarks/PERFORMANCE.md §9.
| Group |
Tools |
| state |
device_status, get_foreground, list_packages, get_battery, get_memory, get_storage, get_cpu, get_device_info, get_audit |
| ui |
read_screen, tap_node, tap_text, type_text, scroll, press_back, press_home, wait_for_text, open_app, close_app, screenshot |
| native |
settings_get, settings_put, open_url, send_intent, get_clipboard_device, get_app_usage, list_contacts, add_contact, list_events, create_event, list_notifications, reply_notification, media_state, media_control, get_location, take_photo, adb_shell |
| resolve |
resolve_element (blind S1 resolver: screen_goal_en + tau → idx/node_id/conf/snapshot_id or the Sovereign fallback) |
Lanes: N0 native, no new grants · N1 native with user grants
(advertised in hello.caps and surfaced in device_status.caps) · N2
Shizuku/shell, gated by the irreversible denylist + interactive grant
(1 cmd / 5 min / 30 min).
Sensitive tools (settings_put, send_intent, add_contact, create_event,
reply_notification, media_control, take_photo, adb_shell) never run on
first call: they return {planned:true, preview} with verified:false and
only execute after confirm:true.
Security
- Scopes:
read (dump/screenshot) · ui (tap/type/scroll/back, grantless
open_app) · shell (grant-gated, irreversible denylist + confirm) ·
admin (token/audit/settings). Token mandatory on every bind (loopback
included); lockout 5 fails/60 s → 5 min; 4 MiB frame; 50 req/s (shell 5/s).
Missing shell grant is non-blocking: {planned:true, grant_pending:true}.
- Transport: WS on loopback only; WSS required on any non-loopback
bind — Tailnet
100.64.0.0/10 or LAN RFC 1918, never 0.0.0.0 — with a
self-signed CN=jav.local cert and TOFU pinning; token AES-GCM in
AndroidKeyStore. A new connection evicts the previous slot (4002 EVICTED),
so a dead TCP slot never blocks reconnection.
- Diagnosis:
get_caps works with accessibility off and device_status
returns missing_caps + setup_hints instead of failing; repair_accessibility
(opt-in) and enable_accessibility use Shizuku uid shell, never su, and
preserve the services already enabled.
- Confirm: messaging, paying, deleting, account/permission, photo, media
stop and settings writes are critical: without
confirm:true they are planned
without executing (planned:true + preview).
- Forensics: audit ring of 500 on-device entries (method, scope, 16-hex
arg hash, result, origin — never raw args or token) +
logs/run-<ts>.jsonl.
- Kill switch: Quick Settings tile + notification action (revoke tokens,
stop the server). Push/pull only under
/sdcard/Download/jav-mcp/.
Measured on real hardware
Benchmarks own the numbers:
docs/benchmarks/PERFORMANCE.md (per-tool
latencies, session, token budget, 38/38 live certification) and
docs/benchmarks/TASK_HISTORY.md (closed
tasks with wall/cost/forensics). This table only summarizes.
| Area |
Figure (measured) |
Perception read_screen (dump_ui) |
~2 ms/node (13n/40 ms … 124n/264 ms; worst ~1 s @500) |
| Light tools (persistent session) |
~30–140 ms depending on path; 1 hello per burst |
| 38/38 live certification (WSS/Tailnet) |
40 calls: 29 OK + 11 honest gates, 0 timeouts |
S1 Jev resolve_element |
~3 s · $0.000053 per resolution |
adb_shell grant |
blocks 60 s if not granted → SHELL_DENIED (verified live) |
Roadmap → v3.0 (ideas, not implemented yet)
Proposals only. The current contract is v2.6.0: 38 tools, non-root +
Shizuku, no su. Nothing below exists in cmd/, pkg/ or android-app/
yet; each item needs an explicit AGENTS.md amendment and its own phase.
- Standalone CLI mode + detailed
--help. Use the jav Go binary
directly from a terminal as a conventional CLI (pair, status, screenshot,
etc.) without keeping the MCP stdio server in memory. The MCP server remains
the default mode.
- Assisted APK install/update. Let the agent install or update Android apps
through Shizuku with an explicit, configurable opt-in — and a switch to
disable it entirely on managed devices.
- Opt-in root mode via environment variable. A rooted-device escape hatch
that disables the anti-
su/sudo guard only when the operator enables it
explicitly by env var. Non-root + Shizuku stays the default and the normative
contract.
What changed
v2.6.0 — universal MCP, OpenCode decoupled, Termux builds
- Self-contained compact descriptions.
tools/list now inlines the gate
that would break the call (snapshot_id freshness in tap_node/type_text,
repair_accessibility in device_status, grant_pending in adb_shell),
so clients that never read Resources (Claude Desktop, Cursor, Windsurf,
Cline) work without the on-demand 7-section sheet. The sheet is still served
at android://tool/<name>; startup stays well under budget.
- OpenCode decoupled from the root.
opencode.json, .opencode/agents/
and AGENTS-MULTIAGENT.md moved to docs/dev/opencode/ (see its README for
the optional symlinks). The audit-bundle skill stays in .opencode/skills/.
- Termux / Android builds. A new
android/arm64 target ships as
jav_android_arm64.tar.gz; install.sh detects Termux ($TERMUX_VERSION or
uname -o = Android), installs to $PREFIX/bin, and falls back to
linux/arm64 on older releases without that asset.
- CI actions refreshed to Node-24-compatible majors (
checkout@v7,
setup-java@v6, upload-artifact@v7, download-artifact@v8,
setup-go@v7, goreleaser-action@v7).
- Version 2.6.0 (
versionCode 12); still 38 tools and audit-mcp
12/12.
v2.5.0 — agnostic grounding in resolve_element
- S2 fallback (OpenAI-compatible). Jev stays the primary backend
(
backend: "jev-decisions"). Without an OpenRouter key, or with
JAV_RESOLVE_BACKEND=openai, resolve_element delegates to a local or
OpenAI-compatible endpoint (JAV_AI_BASE_URL / JAV_AI_MODEL /
JAV_AI_API_KEY) using a strict one-object JSON prompt. Hard validation:
S2_HALLUCINATION (off-table), LOW_CONF (below tau), NO_TARGET,
S2_UNAVAILABLE. Success reports backend: "openai-compat" + model.
- Isolation intact.
pkg/jev never reads JAV_AI_* and never accepts a
chat model; an injected ask never reaches the network.
- Audit fixes. Accessibility is enabled in the right order
(
accessibility_enabled 1 before the service list); adb_shell.timeout_ms
is documented as 65000 (500…90000) with a non-blocking grant; the NONE
branch now records its cost in the session tracker.
v2.4.0 — real self-diagnosis and assisted setup
- Diagnosis does not depend on accessibility. New WS method
get_caps
(scope read, no svc()), with currentCaps() as the single source; it
works with accessibility off. device_status degrades honestly
(ok:true, verified:false, foreground:null, foreground_error) and adds
missing_caps[] + setup_hints[] with concrete actions.
repair_accessibility (opt-in) fixes the service via Shizuku (uid
shell, never su) using mergeAccessibilityService, preserving the
services already enabled. Without Shizuku → SHIZUKU_UNAVAILABLE; denied →
SHIZUKU_DENIED. A repair failure is reported in evidence.repair and
does not abort the diagnosis.
- Actionable hints for usage access, notification listener and write
settings open the right panel via
send_intent (it opens, never sends).
v2.3.1 — live fixes from a two-phone run (USB + Tailnet)
- Shell grant unblocked. Two real bugs: the client read the
shell_grant event (no id) as the reply, and the phone blocked the
WebSocket thread for 60 s while connectionLostTimeout = 10 killed the
connection at ~20 s. Now the client skips event frames, and a missing
grant answers {planned:true, grant_pending:true} immediately: approve
the notification and repeat the same command.
- Live caps.
hello.caps is a boot snapshot; get_foreground now
returns current caps and device_status merges them, so shell_grant
flips to true when you approve the notification.
- Honest gesture taps.
dispatchGesture can complete without effect
(launchers ignore injected touches): tap_node reports
verified:true via gesture only if UI activity followed (~700 ms).
open_app without monkey. Resolves the launcher with
cmd package resolve-activity --user 0 and starts
am start --user 0 -n, which also works with Shizuku as root.
Frozen/disabled apps now return APP_DISABLED (e.g. Hail) instead of an
opaque monkey exit 252.
v2.3.0 — multi-device, route failover, LAN + mDNS
- No ADB needed on the host (v2.0.0).
list_packages and screen
dimensions travel over the WebSocket (list_packages native method,
refreshScreenSize/ensureScreenSize); EnsureForward() is a no-op on
Android/Termux and the client uses explicit DNS (1.1.1.1/8.8.8.8) when
the OS has no resolver. Phone clipboard goes through the native path.
- Private LAN + mDNS (v2.1.0).
NetworkDetector finds the tailnet
(100.64/10) and RFC 1918 Wi-Fi/ethernet addresses; one WSS listener is
bound per detected IP (never 0.0.0.0), plus _jav-mcp._tcp mDNS
advertisement (jav pair auto) and WakeLock/WifiLock so deep sleep does not
strangle the server. A new connection now evicts the previous one
(4002 EVICTED) with ping-pong, instead of leaving a dead single-client
slot behind.
- Multi-device (v2.2.0).
ClientRegistry is the single source of truth
across loopback and every WSS listener; config.json stores
devices + active_device (v1.2.x flat configs migrate in memory to
default). Hot switch with jav pair --list/--use, JAV_DEVICE, or
device_status(select_device=…).
- Hardening (v2.3.0).
jav pair --remove|rm|unpair <alias> completes the
lifecycle (the next alias is promoted, or none stays active). An unknown
JAV_DEVICE returns VALIDATION_ERROR before opening a socket and the
in-memory root credentials are cleared (fail-closed, never leaks traffic to
the last phone). Auto aliases no longer collide (pixel-9, pixel-9-2),
and re-pairing the same phone on another route keeps the old URL in
fallback_urls (max 4) for automatic Tailnet ↔ LAN ↔ USB failover.
revokeAll() also closes in-flight candidate connections, and one
CommandDispatcher is shared by all listeners.
v1.2.5 — clipboard UID-shell, __PASTE__, caps, keystore
- Device clipboard works in the background (Shizuku UID-shell, scrcpy
technique).
get_clipboard_device reads it through Shizuku as UID shell
(via: shizuku-iclipboard); when Shizuku runs as root, a tiny app_process
child drops to UID 2000 before opening binder so Android never wipes the
clip. Fallbacks: a11y-overlay (1×1 focus window) → jam-foreground →
CLIPBOARD_EMPTY. The response carries text (≤2048 chars) plus
len/sha256 of the full text.
- Self-contained paste:
type_text accepts the payload token __PASTE__
— pastes the device clipboard into the focused field without overwriting it
(ACTION_PASTE first; last resort input keyevent 279 via Shizuku). No
external adb needed.
device_status exposes caps captured from the handshake — no more
guessing grants.
- Deterministic debug keystore committed (standard AOSP debug key, not a
secret): local and CI builds share one signature, so
adb install -r
updates in place and preserves accessibility/Shizuku/token.
v1.2.4 — element-centric liveness
tap_node/type_text accept any of the last 8 snapshots and re-verify
the target element itself: moved-but-unique → the action proceeds; gone or
duplicated → STALE_SNAPSHOT. A foreground-package gate aborts with a
recovery hint when the app changes mid-action.
get_foreground no longer consumes snapshots (O(1), no tree walk).
Earlier releases: v1.2.3 dialConn security fix + Tailnet Gold test · v1.2.2 icon refresh · v1.2.1 jav pair +
persistent session + Auto-TOFU ·
v1.2.0 compact catalog + audit ring + kill switch.
Troubleshooting
UNAUTHORIZED — token missing/wrong. Run jav pair (interactive). After
5 failed attempts from one origin the phone locks out for 5 min. Base64url
tokens may start with -: on v2.6.0 and earlier jav pair <ip> -- <TOKEN>
reads -- as the token; quote it and drop -- (jav pair <ip> '-abc…').
Fixed in v2.6.1.
CONNECTION_FAILED on loopback — no adb forward tcp:38472 tcp:38472.
SHIZUKU_UNAVAILABLE — start Shizuku yourself; the app never starts it.
Without it N0 still works, open_app/screenshot fallbacks fail honestly.
ACCESSIBILITY_DISABLED — enable Jav in Settings → Accessibility.
BUSY: 4001 / EVICTED: 4002 — v2.1.0+ evicts the stale client and
takes the new one; if a very old client is still connected, restart the app.
- WSS won’t connect — the phone needs a tailnet (
100.64.x.x) or a
private LAN address; otherwise only the loopback listener comes up. Try
jav pair auto <TOKEN> (mDNS _jav-mcp._tcp) or jav pair --list. Check
the pinned fingerprint (CN=jav.local) in ~/.config/jav/config.json.
Developer & License
k4wai1 — if Jav saved you time, consider
buying a coffee. PRs welcome.
GNU General Public License v3.0 — see LICENSE.
ESPAÑOL
Qué es Jav
Jav es un runtime MCP de control integral de Android sin root. Una app en
el dispositivo (Jav, dev.k4wai1.jav) expone la pantalla por
AccessibilityService y las acciones privilegiadas por Shizuku (lo arranca
el usuario) a un servidor MCP Go en el PC (jav, stdio). Jav no loopea, no
planifica y nunca inventa coordenadas: el bucle lo lleva el Director
(OpenCode/Claude/Cursor/operador); el dispositivo lo lleva Jav.
Desde v2.6.0 el runtime no necesita ADB en el host: las IPs privadas
sirven WSS (Tailnet 100.64/10 o LAN RFC 1918) y mDNS anuncia
_jav-mcp._tcp; varios teléfonos comparten una config con failover automático
(Tailnet ↔ LAN ↔ USB); device_status diagnostica con la accesibilidad apagada
(get_caps + setup_hints); y el build android/arm64 corre en Termux en el
mismo teléfono.
El resolver táctico — dos backends intercambiables
Cuando la pantalla es ruidosa, resolve_element devuelve el objetivo como una
elección cerrada sobre una tabla numerada (≤254 candidatos + NONE):
nunca coordenadas, nunca texto libre.
- Opción A — modelos de decisiones (principal). Un motor discriminativo
tipo “decisions API”, como Jev (
typesafe/jev-* vía OpenRouter), responde
en un solo pase: un Choice + confianza calibrada. conf ≥ 0.70 (tau) o el
Fallback Soberano (top candidatos + instrucción de recuperación; decide
el Director). Extensible a otros motores de decisión tras el mismo contrato.
- Opción B — cualquier LLM estándar con salida estructurada (respaldo).
Cualquier endpoint OpenAI-compatible — local (Ollama, vLLM) o remoto
(OpenRouter, OpenAI, DeepSeek, …) — responde obligatoriamente
{"choice": <int|"NONE">, "confidence": <float>}. La respuesta se valida
contra la tabla: fuera de tabla → S2_HALLUCINATION; no finita o bajo tau →
LOW_CONF; NONE → NO_TARGET. Todo termina en el Fallback Soberano.
- ¿Sin key y sin LLM local? Todo sigue funcionando: el resolver degrada al
Fallback Soberano y nunca inventa opciones.
Jev sigue siendo el principal. El respaldo se usa sin key de OpenRouter o con
JAV_RESOLVE_BACKEND=openai. evidence.backend indica jev-decisions u
openai-compat, más model. Configuración: jav pair pide la key de
OpenRouter (opcional) o openrouter_api_key; para la Opción B usa
ai_base_url / ai_api_key / ai_model en ~/.config/jav/config.json o
JAV_AI_*. Medido en un TECNO real: ~3 s y ~$0.00005 por resolución
(Opción A).
Quickstart
# 1 · Servidor Go en el PC (instala `jav` en ~/.local/bin)
curl -fsSL https://raw.githubusercontent.com/k4wai1/jav/master/install.sh | sh
# 2 · APK companion (Releases); activa accesibilidad una vez; copia el token
# (ADB solo para instalar el APK; el runtime MCP no necesita adb)
adb install -r jav-companion.apk
# 3 · Vincula una vez — pide IP + token, Auto-TOFU, sin .env
jav pair
Registra jav como servidor MCP. Este bloque sirve igual para Claude
Desktop (claude_desktop_config.json), Cursor (~/.cursor/mcp.json),
Windsurf (mcp_config.json) y Cline:
{
"mcpServers": {
"jav": {
"command": "jav",
"args": []
}
}
}
OpenCode usa la clave mcp:
{"mcp":{"jav":{"type":"local","command":["jav"],"enabled":true}}}.
Termux: install.sh instala el binario android/arm64 en
$PREFIX/bin, así que el mismo bloque "command": "jav" funciona sin
cambios.
La config ~/.config/jav/config.json (0600) se relee en caliente;
remoto = wss://<ip-tailnet-o-lan>:38472/, USB = jav pair usb <TOKEN>
(+ adb forward). Shizuku lo arrancas tú; Jav nunca lo inicia.
Varios teléfonos en una sola config, con cambio en caliente:
jav pair auto <TOKEN> # descubre en la LAN (mDNS)
jav pair --name pixel 192.168.1.40 <TOKEN>
jav pair --list # * = dispositivo activo
jav pair --use pixel # cambio en caliente (o JAV_DEVICE=pixel)
jav pair --remove pixel # también rm / unpair
Si vinculas el mismo teléfono primero por Tailnet y luego por Wi-Fi, la ruta
anterior queda en fallback_urls y jav hace failover automático si la
primaria no responde.
Herramientas — 38 en 4 grupos
Toda tool devuelve {ok, verified, evidence, hint}; las 38 viven en 4 grupos
(state, ui, native, resolve) y las fichas completas de 7 secciones se
cargan bajo demanda como Resources (android://tool/<name>,
android://tools/<group>, índice android://tools/catalog). Sensibles
(settings_put, send_intent, add_contact, create_event,
reply_notification, media_control, take_photo, adb_shell) devuelven
{planned:true, preview} y solo ejecutan con confirm:true.
| Grupo |
Tools |
| state |
device_status, get_foreground, list_packages, get_battery, get_memory, get_storage, get_cpu, get_device_info, get_audit |
| ui |
read_screen, tap_node, tap_text, type_text, scroll, press_back, press_home, wait_for_text, open_app, close_app, screenshot |
| native |
settings_get, settings_put, open_url, send_intent, get_clipboard_device, get_app_usage, list_contacts, add_contact, list_events, create_event, list_notifications, reply_notification, media_state, media_control, get_location, take_photo, adb_shell |
| resolve |
resolve_element |
Seguridad
Token obligatorio en todos los binds (loopback incluido), WSS con pinning TOFU
en Tailnet 100.64/10 o LAN RFC 1918 (nunca 0.0.0.0), lockout 5 fallos/60 s
→ 5 min, evicción 4002 EVICTED (sin slot muerto), shell con denylist de
irreversibles + grant no bloqueante (grant_pending:true, 1 cmd / 5 min /
30 min), get_caps con la accesibilidad apagada, repair_accessibility vía
Shizuku que preserva los servicios previos (nunca su), audit ring de 500 en
el dispositivo (hashes de 16 hex, nunca args/token en claro) y Kill Switch
(tile QS + notificación). Detalle en Protocol y
Arquitectura.
Roadmap → v3.0 (ideas, no implementadas todavía)
Solo propuestas. El contrato vigente es v2.6.0: 38 tools, non-root +
Shizuku, sin su. Nada de lo siguiente existe aún en cmd/, pkg/ ni
android-app/; cada ítem requiere una enmienda explícita en AGENTS.md y su
propia fase.
- Modo CLI independiente +
--help detallado. Usar el binario Go jav
directamente desde una terminal como CLI convencional (pair, status,
screenshot, etc.) sin mantener el servidor MCP stdio en memoria. El servidor
MCP sigue siendo el modo por defecto.
- Instalación/actualización de APKs asistida. Que el agente pueda instalar
o actualizar apps Android vía Shizuku con un opt-in explícito y configurable,
incluido un interruptor para desactivarlo por completo en equipos gestionados.
- Modo root opt-in por variable de entorno. Una vía de escape para equipos
rooteados que desactive la guarda anti-
su/sudo solo cuando el operador
lo habilite explícitamente por entorno. Non-root + Shizuku sigue siendo el
defecto y el contrato normativo.
Cambios recientes
- v2.6.0 — universalidad MCP:
tools/list autosuficiente (gates inline
de snapshot_id, confirm:true, repair_accessibility, grant_pending)
para Claude Desktop/Cursor/Windsurf/Cline; OpenCode desacoplado a
docs/dev/opencode/; build android/arm64 (Termux) + install.sh
detecta Termux y usa $PREFIX/bin; CI actualizado.
- v2.5.0 — grounding agnóstico en
resolve_element: Jev sigue principal
y, sin key o con JAV_RESOLVE_BACKEND=openai, respaldo OpenAI-compatible
con validación dura (S2_HALLUCINATION/LOW_CONF/NO_TARGET); backend
y model en evidence; fixes de auditoría (orden a11y, schema
adb_shell, coste de NONE).
- v2.4.0 — autodiagnóstico real:
get_caps (scope read, sin
accesibilidad) y device_status degradado honesto con missing_caps y
setup_hints; repair_accessibility opt-in vía Shizuku (preserva
servicios, nunca su).
- v2.3.1 — fixes de la prueba viva con dos teléfonos: el cliente
descarta el evento
shell_grant (ya no mata la llamada) y shell espera
65 s; get_foreground devuelve caps vivos (shell_grant al día);
tap_node por gesto solo se marca verified si hubo actividad de UI;
open_app lanza con am start --user 0 (funciona con Shizuku root) y
distingue APP_DISABLED (Hail) de APP_NOT_LAUNCHABLE.
- v2.3.0 — multidispositivo completo (
--name/--list/--use/--remove,
JAV_DEVICE fail-closed) y failover automático Tailnet ↔ LAN ↔ USB con
fallback_urls; alias sin colisión (pixel-9/pixel-9-2).
- v2.1.0–v2.2.0 — WSS por IP privada detectada (CGNAT y RFC 1918, nunca
0.0.0.0) + mDNS _jav-mcp._tcp (jav pair auto) + WakeLock/WifiLock;
ClientRegistry único y evicción 4002 EVICTED en vez de BUSY.
- v2.0.0 — sin ADB en el host:
list_packages y dimensiones por WS, DNS
explícito en Termux/Android y clipboard por vía nativa.
- v1.2.5 — clipboard en background por UID shell (Shizuku, técnica scrcpy,
sin borrar el clip), paste autocontenido
__PASTE__ en type_text, caps
en device_status y keystore debug determinista (install -r in-place).
- v1.2.4 — liveness centrada en el elemento: 8 snapshots + re-anclaje del
nodo objetivo (el
STALE_SNAPSHOT solo si desaparece/duplica o cambia la
app) y get_foreground O(1).
- Historial completo: Releases.
Troubleshooting
UNAUTHORIZED — token ausente/incorrecto; jav pair (interactivo).
5 fallos del mismo origen → bloqueo 5 min. Los tokens base64url pueden
empezar por -: en v2.6.0 y anteriores jav pair <ip> -- <TOKEN> toma --
como token; entrecomíllalo y omite -- (jav pair <ip> '-abc…'). Corregido
en v2.6.1.
CONNECTION_FAILED en loopback — falta adb forward tcp:38472 tcp:38472.
SHIZUKU_UNAVAILABLE — Shizuku no corre; arráncalo tú (Jav nunca lo
inicia). Sin él, N0 sigue vivo; open_app/screenshot fallan honestos.
ACCESSIBILITY_DISABLED — activa Jav en Ajustes → Accesibilidad.
BUSY: 4001 / EVICTED: 4002 — v2.1.0+ desaloja al cliente anterior y
acepta el nuevo; si es un cliente muy viejo, reinicia la app.
- WSS no conecta — el teléfono necesita IP tailnet (
100.64.x.x) o LAN
privada; si no, solo se levanta el listener loopback. Prueba
jav pair auto <TOKEN> (mDNS _jav-mcp._tcp) o jav pair --list.
Desarrollador y licencia
k4wai1 — si Jav te ahorró tiempo, considera
invitar un café. PRs bienvenidos.
GNU General Public License v3.0 — ver LICENSE.
评论