Metadata-Version: 2.4
Name: evd-host
Version: 0.2.0
Summary: Computer SDK and CLI for the EVD Android server
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# EVD Host

Python CLI and SDK for the EVD Android instrumentation server. The release wheel includes the Android ARM64 server ELF and creates the `evd` and `evd-client` commands. The host runs Python; JavaScript executes inside the target Android Agent, with native Interceptor backed by the EVD dual-view kernel.

## Install and run

```sh
python3 -m pip install ./evd_host-0.2.0-py3-none-any.whl
evd --version
evd -U -f org.evd.lab -l script.js
evd -U -n org.evd.lab -l script.js --watch
evd -U -f org.evd.lab -l script.js --pause --repl
```

The first USB command selects the online device, verifies the bundled ELF, deploys it, starts the authenticated loopback server and creates an ADB TCP forward. Matching running servers are reused. Use `--serial SERIAL` with multiple devices. A server from another build must first be stopped with `evd -U server stop`, so existing sessions are not silently interrupted.

Requirements: Python 3.9+, adb on PATH, a rooted Android ARM64 phone and a compatible EVD kernel. The bundled payload targets the project's 4 KB kernel baseline. pip installs the client and server payload; kernel installation remains a device prerequisite. macOS, Linux and Windows can use the Python client; current device acceptance is on NE2210.

`-f` is the Android package or exact `package:process` specification; the project demo is `org.evd.lab`. Java/native scripts run in one target context. Messages (`send/recv`), `rpc.exports`, explicit resume and target expression REPL are supported. `--pause` leaves the early main-thread gate held until `:resume`. Ctrl+C or `:quit` detaches; disconnects retire the owning session. The server remains available until `evd -U server stop`.

## SDK

```python
from evd import Device
with Device.usb(serial="SERIAL") as device:
    pid = device.spawn("org.evd.lab")
    session = device.attach(pid)
    script = session.create_script(open("script.js").read())
    script.on("message", lambda message, data: print(message, data))
    script.load()
    device.resume(pid)
    session.detach()
```

Start the server with the CLI before SDK use. Script APIs retain the current implementation's bounded queues, single-script sessions and supported ART/Interceptor semantics; they do not imply complete stock Frida wire/API compatibility.

## Distribution

The wheel can be installed from a local file or its HTTPS download URL. The bare command `pip install evd-host` requires publishing this distribution to PyPI or a configured private index; producing a wheel does not publish it. Authentication tokens and device credentials are generated after installation and are never included in the package.
