MORP Box
dev.morpbox.scaffoldAndroid / GrapheneOS local Nostr relay and transmission-mode switchboard
MORP Box is a local Nostr relay and event cache for separate same-device Nostr clients. It provides MORP, PIPE and Standard transmission controls, with Standard as the default active mode. With all three controls off, local loopback/cache stays available and external network/radio participation stops. MORP Box is not a built-in social Nostr client.
First release: Nov 23, 2026, 5 total releases.
Most recent release: Nov 23, 2026.
Appears in 0 app stacks.
0 sats / 0 zaps received in the past year.
Sats Received
Underlying data available via MCP: app_zaps, app_releases.
Zap Count
Underlying data available via MCP: app_zaps, app_releases.
Releases
- Nov 23, 2026 0.0.7 beta# MORP Box v0.0.7 prerelease beta **Status: assembled and signed.** Implements and wires Android OS hardware radio & LAN drivers (`BLE` GATT mesh + invite, `MeshCore` USB-CDC + BLE NUS companion, and `RNS` LAN UDP multicast + TCP KISS), the RF transmit/receive/onion-peel/cache engine (`MorpMeshEngine`), regional radio profile persistence (`RfSettingsStore`), and runtime RF permissions & controls (`ModeControlsActivity`). | Identity | Value | |---|---| | APK | `MORP-Box-v0.0.7-prerelease.apk` |
More…
| Package | `dev.morpbox.scaffold` | | Version | **0.0.7 / versionCode 7** | | Size | **23,999,905 bytes** | | APK SHA-256 | `5bf286585a717a0ce19bcb4f6171074a58a96e03cce8f9610d96e0aeb810c447` | | Minimum / target Android API | **26 / 35** | | Certificate SHA-256 | `8bbe02bd22cf6798d2b7ea8da297c75f7c8ea3b00c9cd9467d33061179c7caf5` | | Native ABIs | arm64-v8a, armeabi-v7a, x86, x86_64 | **Upgrade note:** Signed with the same beta certificate (`8bbe02bd...`) as `v0.0.5` and `v0.0.6`, so existing installs upgrade in-place. ## New in v0.0.7 ### 1. Android OS RF & LAN Drivers (`dev.morp.box.radio.*`) - **`AndroidBleInviteRadioPort`**: Android `BluetoothLeAdvertiser` + `BluetoothLeScanner` driver for short-range BLE invite discovery beacons, enforcing runtime `BLUETOOTH_SCAN`/`ADVERTISE` permissions on API 31+ and `BLUETOOTH`/`BLUETOOTH_ADMIN`/`ACCESS_FINE_LOCATION` on API 26–30. - **`AndroidBleMeshLinkPort`**: Android `BluetoothGattServer` + `BluetoothGatt` central/peripheral mesh link implementing `BleRadioLinkPort`, negotiating ATT MTU (`23..517`, writing `mtu-3` chunks), subscribing to CCCD notifications, and deriving deterministic service/characteristic UUIDs per `networkId8`. - **`AndroidMeshCorePort`**: MeshCore `companion-v1.18.0` binary framing (`0x3C`/`0x3E`) driver supporting both USB-CDC OTG serial (`UsbManager`, CP210x/CH340/FTDI/PL2303/CDC-ACM) and BLE Nordic UART Service (`6e400001-b5a3-f393-e0a9-e50e24dcca9e`), bridged through `MeshCoreCompanionDriver` and `MeshCoreProtocol`. - **`AndroidRnsLinkPort`**: Reticulum LAN UDP multicast (`WifiManager.MulticastLock`, KISS `0x10`/`0x11`/`0x12`) plus optional TCP KISS peer bridge (`RnsLinkPort`). - **`AndroidRfRuntime` & `RfRuntimeBridge`**: Reflection bridge into `MorpBoxApplication` / `BoxService` wiring `BleMeshAdapter`, `MeshCoreAdapter`, `RnsAdapter`, and `AndroidBleInviteRadioPort` into `TransportAdapterRegistry`, while keeping the pure-Java host test suite dependency-free. ### 2. RF Dispatch & Hop-Peel Engine (`MorpMeshEngine`) - **`MorpMeshEngine`**: Subscribes to `BoxService` durable outbox/cache changes and drains outbound `PENDING` events through `MorpDispatchCoordinator` over `BleMeshAdapter` (512 B encrypted frames), `MeshCoreAdapter` (165 B `MorpFragmentCodec` fragments with `MORP` beacons and regional `RadioProfile`), and `RnsAdapter` (relay-only `NERD-7c` attestations / `PIPE` carriage). - **Inbound RF handling**: Reassembles incoming fragments, peels onion layers via `HopBox` (`>= 2` blind forwarders before exit or `PIPE` designation), forwards sealed next hops, and atomically commits terminal Nostr events as `RecordState.CACHED` via `BoxService.submitInbound`. ### 3. RF Controls, Permissions & Profile Persistence - **`RfSettingsStore`**: Persists regional MeshCore profile (`au915` fail-closed default, `us915`, `eu868_g3` with `<= 10%` duty-cycle enforcement) and optional RNS TCP peer host/port in `filesDir/rf_settings.properties`. - **`ModeControlsActivity`**: Surfaces live RF port & driver status (`BLE`, `MeshCore`, `RNS`), explicit runtime BLE permission grant trigger (`BlePermissions`), MeshCore USB/BLE scan trigger, and MeshCore region profile cycle button, while enforcing Android 13+ notification card grants. ## Verification - **HOST-BUILD / HOST-SIM / HOST-STATIC:** **1,374 checks, zero failures** (`sh tests/host/run.sh` with `javac -Xlint:all -Werror`), including `RfDriverTests` covering BLE GATT chunking, `MeshCoreProtocol` / `MeshCoreCompanionDriver` framing & TX/RX/beacon lifecycle, `RnsLinkPort` KISS dispatch, and end-to-end `MorpMeshEngine` TX/RX. - **HOST-BUILD:** Gradle `:app:assembleRelease` (including `lintVitalRelease` and Kotlin `allWarningsAsErrors = true`), **BUILD SUCCESSFUL**. - **Artifact verification:** v2/v3 APK signature verified (`apksigner`), 16-KiB alignment verified (`zipalign -c -P 16 -v 4`), badging checked (`aapt dump badging`), and DEX symbols checked (`verify_v004_apk.py` + `v0.0.7` RF DEX symbol audit). ## Explicit sandbox boundaries - **Physical radio & device testing:** Hardware BLE GATT transfers, USB-OTG / BLE-NUS MeshCore radios (Heltec/RAK/T-Deck), multi-device Reticulum LAN multicast/TCP interop, and Android runtime permission / foreground notification UX require physical Android hardware (`DEVICE` / `RF` / `INTEROP` scope outside sandbox emulation). - Nov 23, 2026 0.0.6 beta# MORP Box v0.0.6 prerelease beta **Status: assembled and signed.** Closes all sandbox-provable `MORP Foundation Master Intent` (`BOX-INTENT`) gaps discovered in `v0.0.5` while keeping explicit proof boundaries where hardware radio/OS drivers are absent from the repository. | Identity | Value | |---|---| | APK | `MORP-Box-v0.0.6-prerelease.apk` | | Package | `dev.morpbox.scaffold` |
More…
| Version | **0.0.6 / versionCode 6** | | Size | **23,954,849 bytes** | | APK SHA-256 | `b7c6696952f3b1899412e6ab718064df1e3c8bb6fe5e8919d4275fc828b15564` | | Minimum / target Android API | **26 / 35** | | Certificate SHA-256 | `8bbe02bd22cf6798d2b7ea8da297c75f7c8ea3b00c9cd9467d33061179c7caf5` | | Native ABIs | arm64-v8a, armeabi-v7a, x86, x86_64 | **Upgrade note:** Signed with the same beta certificate (`8bbe02bd...`) as `v0.0.5`, so `v0.0.5` installs upgrade in-place (note that `InviteFeature` now uses `BoxService`'s unified `morp-box/` identity and bonded-peer stores rather than a second `invite/` identity). ## Corrections included ### 1. Unified Box Identity, Invitation Ledger & Bonded-Peer Store (`BOX-INTENT §5.13`) - **Closed the dual-identity / dual-peer-journal split between `BoxService` and `InviteFeature`.** `InviteFeature.openShared(...)` binds `MorpBoxApplication.inviteFeature()` directly to the live `BoxService`'s `BoxNodeIdentity`, `InviteLedger`, and `BondedPeerList` (`morp-box/`), while keeping `ProtectedListStore`, `AttestationHistoryStore`, `InviteExchange`, and local peer labels in `invite/`. `SettingsActivity` ("Copy Box Node ID"), `InvitationsActivity` ("This device"), `InviteIssueActivity`, `BondedPeersActivity`, and `BoxService` (`MorpDispatchCoordinator` / `pipePublishFromPeer` / `gossipRelaysForPeer`) now observe **one single `npub` and one `BondedPeerList`**. ### 2. Encrypted Protected-List Export & Import UI (`BOX-INTENT §5.13.4`) - **Wired `ProtectedListStore.exportBundle` / `importBundle` (`Argon2id` + `AES-256-GCM`) to the UI.** `InvitationsActivity` now exposes **Export lists** and **Import lists** via Android SAF (`ACTION_CREATE_DOCUMENT` / `ACTION_OPEN_DOCUMENT`) with masked passphrase dialogs enforcing the 8-code-point NFC floor and fail-closed `VaultRefused` diagnostics, plus Keystore recovery via `ProtectedListStore.recoverFromExport` if the destination store was unavailable. ### 3. Per-Peer Editable Local Labels (`BOX-INTENT §5.11`) - **Added Keystore-sealed device-local peer labels (`PeerLabelStore`, `peer_labels.blob`).** `BondedPeersActivity` displays each peer's custom local label (if set) and provides **Edit label** alongside **Revoke**. Labels stay strictly local, never cross the wire, and are cleaned up on peer revocation or list deletion. ### 4. Read-Only 1.5-D Diagnostics View & Live Permission Status (`BOX-INTENT §9`) - **Updated `MorpBoxApplication.BETA_CANDIDATE_VERSION` to `"0.0.6"`**, wired a read-only `PermissionStatusProvider` checking `POST_NOTIFICATIONS` grant state without requesting permissions, and added **Read-only diagnostics (1.5-D)** in `AboutActivity` showing the live `DiagnosticsService` snapshot and recent bounded history. ## Verification - **HOST-BUILD / HOST-SIM / HOST-STATIC:** **1,365 checks, zero failures** (`sh tests/host/run.sh` with `javac -Xlint:all -Werror`), including new tests for unified `BoxService`/`InviteFeature` identity & admission, persistent local peer labels, Argon2id/AES-GCM export/import round-trip and passphrase refusal, and Kotlin UI wiring invariants `1.8-24`..`1.8-27`. - **HOST-BUILD:** Gradle `:app:assembleRelease -x lintVitalRelease -x lintRelease`, **BUILD SUCCESSFUL** with Kotlin `allWarningsAsErrors = true`. - **Artifact verification:** v2/v3 APK signature verified (`apksigner`), 16-KiB alignment verified (`zipalign -c -P 16 -v 4`), badging checked (`aapt dump badging`), and DEX symbols checked (`verify_v004_apk.py` + `v0.0.6` symbols). ## Explicit repository & sandbox boundaries - **Not present in `MORP-Box` repository:** Android OS hardware radio implementations for `BleRadioPort`, `BleRadioLinkPort`, and `MeshCorePort` (`BluetoothAdapter`/`BluetoothGatt`/ `UsbManager`), plus Android RNS socket runner wiring, do not exist on any branch or tag in `MORP-Box`; `BoxService` remains wired with `TransportAdapterRegistry.unwired(...)`. - Real-device Keystore, Camera2, SAF picker, notification card, and physical RF/BLE/MeshCore/RNS interoperability tests remain outside sandbox proof (`DEVICE` / `RF` / `INTEROP`). - Nov 23, 2026 0.0.5 beta# MORP Box v0.0.5 prerelease beta **Status: assembled and signed.** This APK fixes the copy/paste PIPE bonding blockers diagnosed in v0.0.3/v0.0.4 and the Camera2 QR scanner crash. | Identity | Value | |---|---| | APK | `MORP-Box-v0.0.5-prerelease.apk` | | Package | `dev.morpbox.scaffold` | | Version | **0.0.5 / versionCode 5** |
More…
| Size | **23,946,657 bytes** | | APK SHA-256 | `029b8339594798f29d88bc56624e42682f4cac789e9209b25e0d41b31d4b73ab` | | Minimum / target Android API | **26 / 35** | | Certificate SHA-256 | `8bbe02bd22cf6798d2b7ea8da297c75f7c8ea3b00c9cd9467d33061179c7caf5` | | Native ABIs | arm64-v8a, armeabi-v7a, x86, x86_64 | **Important install note:** v0.0.5 is signed with a new beta certificate (`8bbe02bd...`) because the prior prerelease keystore was unavailable. **Uninstall v0.0.4 (or earlier) before installing v0.0.5**, as Android blocks in-place updates across different signing certificates. ## Corrections included ### PIPE copy/paste exchange timing & expiry - **Removed the 120-second idle timeout trap for manual copy/paste exchanges.** `InviteExchange` now configures restored `InvitationSession`s via `openForCopyPaste()`, disabling the 120-second live-channel `IDLE_SESSION_TIMEOUT_S` check while still enforcing the strict 24-hour invitation validity window (`created_at <= now < expires`), monotonic clock regression checks, and attestation active/expiry checks on both issuer and claimant. Live `InvitationSession` instances (non-copy/paste) retain `IDLE_SESSION_TIMEOUT_S = 120L`. - **Cleanly retire expired/terminal exchanges instead of leaving zombie states.** Terminal time/ledger/session failures (`invite_outside_local_window`, `session_idle_timeout`, `expired`, `already_consumed`, `unavailable`, `session_closed`, `session_state_corrupt`, `exchange_session_unavailable`) now transition the stored exchange to `Stage.ABANDONED`, clear its sealed session, record `lastError`, and drop `pendingApprovalCount()` cleanly to zero instead of leaving the exchange stuck in `AWAITING_HELLO` or `AWAITING_CONSENT`. ### Async consent/denial dialogs & claimant UI - **Fixed synchronous `AlertDialog` return bug in `InviteExchangeActivity`.** `grant()` and `deny()` now obtain and verify the engine's `LocalInvitationPrompt` via `InviteFeature.pendingConsentPrompt(id)`, display the non-cancelable confirmation dialog, and invoke `current.grantConsent(id)` / `current.denyInvitation(id)` inside the affirmative click callback after verifying exact prompt equality (`confirmed == prompt`). Cancelling leaves the exchange untouched at `AWAITING_CONSENT`. - **Fixed peer label on claimant consent dialog.** The dialog now formats `prompt.inviterNpub` (the inviter requesting to bond) rather than `prompt.claimantNpub` (this device's own identity). - Once a local decision frame (`RECEIPT` or `DENIAL`) is produced, `Grant`/`Deny` buttons hide so the operator sees the generated frame to copy into chat without duplicate-decision errors. ### QR frame guard & Camera2 scanner fix - **Fixed Camera2 direct-`ByteBuffer` crash in `QrScannerActivity`.** `decode(image)` now checks `buffer.hasArray()`, reads direct buffers safely via `buffer.duplicate()` and `buffer.get(data, row * width, width)`, checks exact row bounds `(height - 1) * rowStride + width`, and guards `onFrame` against unexpected `RuntimeException`s on the `morp-qr-scan` thread. - **Guarded oversized frames (>362 bytes) in `InviteExchangeActivity`.** Tapping **Show my frame as a QR code** on frames larger than `QrEncoder.MAX_BYTES` (362 bytes, such as attestation frames) now hides the QR view and explains to use **Copy frame** instead of throwing a raw `IllegalArgumentException`. Producing a new frame clears any stale QR from the previous step. ## Verification - **HOST-BUILD / HOST-SIM / HOST-STATIC:** **1,356 checks, zero failures** (`sh tests/host/run.sh` with `javac -Xlint:all -Werror`), including new tests for multi-step >120s delayed copy/paste admission across restarts, >24h expiry retirement out of `AWAITING_HELLO` and `AWAITING_CONSENT`, `pendingConsentPrompt`/`localDecisionSent`, and the 362-byte frame QR guard. - **HOST-BUILD:** full Gradle `:app:assembleRelease -x lintVitalRelease -x lintRelease`, **BUILD SUCCESSFUL**, all **43 tasks executed** (2m 43s) with Kotlin `allWarningsAsErrors = true`. - **Artifact verification:** v2/v3 APK signature verified (`apksigner`), 16-KiB alignment verified (`zipalign -c -P 16 -v 4`), package/version/permissions checked (`aapt dump badging`), and DEX symbol inspection passed (`verify_v004_apk.py` + v0.0.5 symbols). - Raw logs and manifest: `docs/evidence/v0.0.5-prerelease/`. ## Explicit limits No device/emulator run is claimed. Real-device two-phone bonding, Camera2 scanning, and dialog/card interaction still require physical device testing. Lint tasks were excluded from Gradle release assembly. - Nov 23, 2026 0.0.4 beta# MORP Box v0.0.4 prerelease beta **Status: assembled and signed.** This is a new APK containing the card and corrections below, not the unchanged v0.0.3 binary or a source-only overlay. | Identity | Value | |---|---| | APK | `MORP-Box-v0.0.4-prerelease.apk` | | Package | `dev.morpbox.scaffold` | | Version | **0.0.4 / versionCode 4** |
More…
| Size | **23,942,561 bytes** | | APK SHA-256 | `ac1690a09788940edcd1421bb107b10b815a264827794371253968a34b5a847f` | | Minimum / target Android API | **26 / 35** | | Certificate SHA-256 | `45c5088da2367e824e7d6a282f540bfafd1d29974c3995ea60217a0ab3e03237` | | Native ABIs | arm64-v8a, armeabi-v7a, x86, x86_64 | The certificate is unchanged from v0.0.2 and v0.0.3: install this APK as an update. **Do not uninstall merely to update**, since uninstalling can erase the invitation, list and identity data. ## Corrections included ### Relay card and background service - One ongoing, low-importance relay card with **MORP / PIPE / Standard** actions; the existing launch-screen switches remain. Both surfaces drive the same mode state machine. - The card shows the number of **incoming PIPE invitations awaiting your local approval**. It does not count issued invitations waiting for the peer. Grant, denial and abandonment clear that count; dismissing a consent dialog does not. A sent decision still waiting for a peer is not falsely shown as needing approval. - **No separate acceptance/invitation event notifications.** The count updates the existing card in place. Only a count is shown: no peer, list name, invitation frame, stamp or secret material. - The launcher now actually starts `MorpBoxService` via Android's foreground-service API. Earlier source opened the Java relay without connecting the launcher to that Android service. - Foreground promotion happens before invitation-store setup and is retried on an explicit launcher command. `specialUse` foreground service permissions and justification are declared. ### Notification permission - Android 13+ requests notification permission on first launch. Allow it to show the relay card. - If denied or notification settings are disabled, **Enable relay notification card** appears on the launch screen and provides the permission/settings recovery path. Denying permission does not approve an invitation or change mode controls. - The Settings preference now means **show pending approvals on the card**, not post separate acceptance notifications. Disabling it leaves the card and mode buttons available. ### Invitation restart / consent - Reopening the app reuses the exact, verified active local attestation already recorded in history, rather than issuing different signed bytes at each wall-clock second. - Session restoration retains its sealed original local attestation after checking all six identity bindings against the current node. Signature, expiry and known-history checks remain enforced; no freshness or identity check was removed. - The previously observed `attestation_not_active_in_known_set` restart-then-consent path now passes regression tests with a changed wall-clock second, including receipt registration and the denial/acknowledgement path. Corrupt, revoked, expired or mismatched identity history still fails closed; this is not an automatic key/attestation renewal implementation. ### Scanner and Android compatibility - Scanner controls now consume system-bar insets instead of sitting under navigation/status bars. - The shared inset helper no longer references API-29-only `android.graphics.Insets` on minSdk 26. - Optional API-28-only notification semantic-action calls were removed from the minSdk-26 path. - All v0.0.3 invitation/camera functionality remains. Operational exchange frames are drawable as QR: the INV-5 waiver remains applicable. Raw invitation envelopes are still refused by the QR content guard. A stamp alone does not bond a peer; scanning adds no trust to the protocol. ## Verification - **HOST-BUILD:** full Gradle `:app:assembleRelease`, **BUILD SUCCESSFUL**, all **43 tasks executed**, 11m 15s on this constrained builder. Java and all Kotlin sources compiled against Android SDK 35, including the kmp-tor adapter. One worker, bounded JVM and two active processors avoided the earlier unbounded/parallel memory pressure. - **HOST-BUILD / HOST-SIM / HOST-STATIC:** **1,348 checks, zero failures**, including real facade reopen across a different clock second, receipt registration, denial acknowledgement, local approval counts, preference gating, service/permission wiring and minSdk API pins. - **Artifact verification:** version/package inspected from the APK, v2 and v3 signatures verified, expected certificate verified, 16-KiB native/page alignment verified, APK DEX contents inspected for the packaged fixes and absence of the removed event-notification path. - Full source/build/test/tool manifest and raw outputs: `docs/evidence/v0.0.4-prerelease/`. Category register: `CODE-REGISTER.md`. ## Explicit limits No device/emulator run is claimed. Camera capture, exact lock-screen appearance, OEM permission UI, action wrapping and OS process-recovery behaviour still require hardware testing. Android controls lock-screen redaction/dismissibility and can restrict or stop a foreground service. No boot receiver or battery-exemption request was added: **open the app after reboot**. Invitations remain manual text/QR exchanges, not unsolicited background push delivery. Lint tasks were excluded from this assembly; a successful assemble is not a lint or independent security-audit verdict. This prerelease is published by confirmed repository maintainer builder2 through the repository-linked `dev.morpbox.scaffold` application. Source-review branch: `builder/beta-source-and-card-review`; release tag: `v0.0.4-prerelease`. No merge into main or independent acceptance is implied. - Nov 23, 2026 0.0.3 beta# MORP Box v0.0.3 prerelease — PIPE invitations, end to end **APK:** `releases/MORP-Box-v0.0.3-prerelease.apk` **Size:** 23,934,201 bytes **SHA-256:** `a238a1c212977f6027120f3ef169712b28278bebe551f39f6ced2fc941d4c9f0` **Package:** `dev.morpbox.scaffold` · versionCode 3 · versionName 0.0.3 · minSdk 26 · targetSdk 35 **Signer:** `CN=MORP Box Prerelease` — cert SHA-256 `45c5088d…03237`, SHA-1 `83e1e700…d1e84a` (v2 + v3 signatures verify; v1 off; `.idsig` beside the APK) Replaces `MORP-Box-v0.0.2-prerelease.apk`. The signing key is unchanged, so an in-place update
More…
is supported. Do not uninstall merely to update: uninstalling can erase application data. ## Publication and source-review correction This is the **existing v0.0.3 binary**, published unchanged (hash above), not a newly rebuilt APK. The accompanying review branch `builder/beta-source-and-card-review` records all recovered local source changes relative to repository main `fbf16b39b3d72c5e228d858df340a2a31c5b3e1c`, including **later, unreleased v0.0.4 card changes**. The source-review tag is `v0.0.3-beta-review`; it identifies this review package, **not an exact original v0.0.3 build-source attestation**. No original build commit was recorded; do not claim a bit-reproducible APK from that tag. **Not in this APK:** the ongoing MORP / PIPE / Standard notification card and pending local PIPE approval count. Those are source-only in the v0.0.4 overlay, have 1,340 passing host checks, and have not been Android-built or device-rendered. Android 13+ runtime permission prompting remains unimplemented. An exploratory real-clock facade restart followed by consent also failed closed with `attestation_not_active_in_known_set`; the notification change does not fix that issue. Review records: `docs/evidence/v0.0.3-code-register/README.md`, categories 01–12, the raw host log, and the per-file SHA-256 manifests. These expose the evidence limitations rather than treating host simulation as camera, lock-screen, radio, or interoperability verification. This prerelease is published by confirmed repository maintainer **builder2** through application `dev.morpbox.scaffold`. It does not replace the separate `MORP Box` catalog entry owned by the repository lead, whose signing key builder2 does not possess. Repository main is not merged or force-pushed by this publication. Other agents should review the named branch. --- ## What is now reachable in the app Everything below is on a real button path from the launch screen. No adb, no test harness. ``` MORP / PIPE / Standard launch screen └── "PIPE invitations" InvitationsActivity ├── this device's npub + live counters ├── create / rename / delete sealed lists ├── "Issue an invitation for …" InviteIssueActivity │ ├── invitation text (selectable + Copy) │ ├── QR code of the stamp (drawn on screen) │ └── "Open the exchange" ├── "Accept pasted text" / "Scan QR with camera" ├── open exchanges list ─────────────────► InviteExchangeActivity │ ├── Produce next frame → Copy / Show my frame as a QR code │ ├── Paste the other side's frame → Take pasted frame │ ├── Scan frame QR QrScannerActivity │ ├── Grant consent (dialog) → signed receipt frame │ ├── Deny → signed denial frame, issuer acknowledges │ └── Abandon └── "Bonded peers for …" BondedPeersActivity └── Revoke (immediate, durable) ``` The Settings notice and the PIPE mode description that said invitations do not exist are corrected; the string and source pins that enforced the old "no invitation UI" state were replaced with pins that require the new screens (see *Test evidence*). ### The transfer paths, stated exactly * **Copy/paste is the protocol carrier.** Frames are `MORP-PIPE-FRAME-1|<step>|<base64url>` text. Wrapping and `>` quote markers from a chat client are tolerated; anything else malformed is refused by reason, not guessed at. * **QR is a second carrier for the same text.** The issue screen draws a *stamp* (`npub` + list name + expiry), which `QrInviteDisplay` refuses to widen into invitation text. The exchange screen can also draw any frame as a QR, and the scanner feeds text back into the exact same paste path, so scanning adds no trust and no second protocol. * **A stamp alone does not bond anyone.** The invitation text is what confers the ability to bond, and the issue screen says so next to the QR rather than letting a beta tester discover it after a failed paste. The INV-5 waiver (Owner, 2026-11-23) permits real invitation material in a QR; this exchange-frame QR path uses that waiver. The raw invitation envelope is still refused by the QR content guard. The earlier assertion that this build did not need INV-5 was incorrect. * **Nothing is transmitted by the app.** No relay, no socket, no background send on any invitation screen. The operator moves text. --- ## Engine work this build required (all found by test, not by inspection) Four real defects in the previously host-tested invitation engine, each blocking an end-to-end exchange that pauses between frames — which is the only way a copy/paste handshake ever runs: 1. **`NoiseXX.snapshot()`/`restore()` dropped the peer's static key for `XX`.** The remote static was written into the snapshot and only re-applied for `IK`, so every restart lost `remoteStatic()` and the counterpart's attestation failed `binding_dev_pub_mismatch`. Now restored for both patterns and both roles, with a mismatch check. 2. **The driver lied about whose turn it was.** `AWAITING_HELLO` claimed a handshake frame was due on the *issuer* side; in `XX` the claimant is the initiator. `stepToSend()` now reports the real obligation (`Snapshot.owedNow`), persisted across restarts, and `produceNextFrame` refuses with `frame_not_due` instead of writing out of turn. 3. **One stage could not express "I owe the answer" vs "I owe the challenge".** The stage is now derived from the session's own state (`hasStoredChallenge`, `challengeIssued`, `mutualProofComplete`, `peerAttested`), with `AWAITING_ANSWER_SEND` and `AWAITING_ANSWER` separated. A resumed exchange can therefore say what it owes with only the sealed session. 4. **`denialWaitingAck` was not persisted**, so an acknowledgement arriving after a restart was refused `denial_ack_out_of_order` and the claimant could never close a denial cleanly. Also fixed: the hop-key plaintext lifetime in `InviteExchange` (`finally { wipe }`), and `NoiseXX.advance()` was left alone after an attempt to "fix" it broke the pinned `XX` vectors — the vectors are the authority. --- ## Test evidence | Gate | Result | Class | |---|---|---| | Host suite `tests/host/run.sh` (`-Xlint:all -Werror`) | **1297 checks, 0 failures — PASS** | HOST-BUILD | | `InviteCopyPasteTests` (5 scenarios: full exchange, denial, chat mangling, restart, QR) | pass | HOST-SIM | | QR encoder vs `segno` oracle | 112/112 matrices | HOST-STATIC | | ZXing decode round-trips | 24/24 | HOST-STATIC | | `InvitationUiRegressionTest` (7) + `UiDefectRegressionTest` (4) | **11/11 pass** (JUnit runner on the harness's compiled classes) | HOST-STATIC | | `:app:compileReleaseKotlin` with `allWarningsAsErrors` | **BUILD SUCCESSFUL** | HOST-BUILD | | `:app:assembleRelease` → zipalign → apksigner → verify | BUILD SUCCESSFUL, v2+v3 true | HOST-BUILD | | APK contents: 5 new activities, `CAMERA`, `MultiFormatReader`, `InviteExchange` in dex | verified with `aapt2`/`strings` | HOST-STATIC | ### What is NOT claimed * **No DEVICE evidence.** The invitation screens, the QR renderer, and the camera scanner have never been run on a handset by this build. Camera capture in particular is unproven on real hardware. * **No RF, no interop, no network evidence.** Untouched: the transfer is operator-mediated text. * **The Robolectric *runtime* suite did not execute here.** This sandbox has `noexec` on `/tmp` and no `CAP_SYS_ADMIN` (cannot bind-mount a writable exec directory), so Robolectric cannot extract its native runtime; and the Gradle test worker cannot fork reliably under the memory guard (worker connect timeout after 120 s). The harness's non-Robolectric source-text tests were run directly on the JUnit runner instead, which is why 11/11 is reported as HOST-STATIC. The Android instrumentation paths those Robolectric classes cover are unchanged by this pass. * Owner waivers INV-5 (QR content) and the earlier P3/O1 waivers remain **waivers, not passes**. --- ## Files added or changed **New product code** * `android/app/src/main/java/dev/morp/box/app/InviteFeature.java` — the single facade the screens bind to (lists, invitations, exchanges, peers, identity, counters, `stampMatrix`, `stampQrSvg`). * `android/app/src/main/java/dev/morp/box/app/NodeIdentityStore.java` — durable Keystore-sealed device identity, atomic temp+rename, no export path by design. * `android/app/src/main/kotlin/dev/morp/box/ui/` — `InvitationsActivity.kt`, `InviteIssueActivity.kt`, `InviteExchangeActivity.kt`, `BondedPeersActivity.kt`, `QrScannerActivity.kt`, `QrRender.kt`, `InviteTheme.kt`. * `android/app/src/main/res/layout/` — five new layouts; `activity_modes.xml` gains the entry button. * `res/values/strings.xml` — ~70 operator strings, including the refusal sentences. * `AndroidManifest.xml` — `CAMERA`; five non-exported activities. **Changed** * `InvitationSession.java`, `InviteExchange.java`, `NoiseXX.java`, `InviteTransfer.java`, `MorpBoxApplication.java`, `ModeControlsActivity.kt`, `build.gradle.kts` (version 0.0.3). * `tests/host/java/dev/morp/box/HostTests.java` — permission set, activity set, and eight new `1.8-*` pins; the `1.6-5` pins moved from "no invitation UI may exist" to "these properties must hold". * `tests/host/java/dev/morp/box/invite/InviteCopyPasteTests.java` — drivers rewritten to restart the app between every frame (the real copy/paste use case) instead of holding a live session. --- ## Reproduce ```sh # host gate (≈85 s) cd /home/user/MORP-Box && OUT_DIR=/var/tmp/host-rNN sh tests/host/run.sh # release build + sign cd android JAVA_HOME=/var/tmp/morp-sdk/jdk17 GRADLE_USER_HOME=/var/tmp/morp-sdk/gradle-home \ ANDROID_HOME=/var/tmp/morp-sdk/android-sdk ./gradlew --offline --no-daemon \ -x lintVitalAnalyzeRelease -x lintVitalReportRelease -x lintVitalRelease \ :app:assembleRelease BT=/var/tmp/morp-sdk/android-sdk/build-tools/35.0.0 $BT/zipalign -f -p 4 app/build/outputs/apk/release/app-release-unsigned.apk /tmp/al.apk $BT/apksigner sign --ks /home/user/.keys/morp-box-prerelease.jks --ks-key-alias morpbox \ --ks-pass pass:morpbox-prerelease --key-pass pass:morpbox-prerelease \ --v1-signing-enabled false --v2-signing-enabled true --v3-signing-enabled true \ --out /home/user/releases/MORP-Box-v0.0.3-prerelease.apk /tmp/al.apk ``` ## Suggested first beta run (two devices, one chat window) 1. Install on both. Open the launch screen → **PIPE invitations** on each; note both npubs. 2. Device A: create list `friends` → **Issue an invitation for "friends"** → **Copy invitation text** → send it in the chat. Also try pointing B's camera at A's QR (it shows a stamp, and the app will tell you a stamp is not enough — that is the designed answer). 3. Device B: paste the text → **Accept pasted text** → the exchange opens. 4. Alternate **Produce next frame / Copy** and **Paste → Take pasted frame** through the chat until B reaches the consent step. Each screen names the step and whose turn it is. 5. B: **Grant consent** → copy the receipt frame → A pastes it. Both screens say *Bonded*. 6. A or B: **Bonded peers for "friends"** → the peer is listed → **Revoke**. 7. Repeat once denying instead of granting, and once abandoning mid-handshake. Also kill the app between two frames on purpose: the exchange must survive and continue from the same step.