The WebUSB claim-interface friction, and a quiet Direct Sockets week

Chrome 159 crossed into Early Stable on November 18 at 159.0.8154.13, and the more interesting movement this week was not in a release note at all — it was in the Chromium bug tracker, where two separate Windows and macOS WebUSB defects landed on the exact API call that webadb’s connection path depends on. claimInterface() — the single call that decides whether a web page gets to talk to a phone at all — has now produced two shipping-blocker-shaped regressions in two months. Meanwhile the weekly Direct Sockets sweep came back with nothing: the WICG repository has not moved in a month, the ChromeStatus entry has not been touched since January 2025, and the API remains IWA-only, ChromeOS-only, and outside any public origin trial.

Taken together this is a week about friction at the permission boundary. The transport story is stalled where it has been stalled; what changed is how much sharp edges sit between “the user plugged in a phone” and “the page can send an ADB packet”.

Chrome 159’s Early Stable, and two WebTransport entries we hadn’t counted

Chrome 159 branched from main on November 9, went to Beta on November 11 as 159.0.8154.6, hit Early Stable on November 18, and reaches full Stable on December 8, 2026 — a three-week window, because the release train now straddles the year-end holidays. Chrome 160 branched November 30 and lands in Beta on December 2, Stable January 5, 2027. If you are testing webadb against a browser channel, the version you want is 159.0.8154.13 on Stable, not 159.0.8154.6.

Yesterday’s post covered the six WebTransport features that shipped in Chrome 159. Pulling the full release-notes page again this week surfaced two more that I had under-counted, and both are worth having in the mental model for a relay-based ADB-over-network transport.

WebTransport connection statistics (feature 5120203192139776) — WebTransport.getStats() now returns round-trip time measurements when available, an estimated sending rate when available, and counts of expired, lost, and dropped datagrams. The note is specific about the limits: Chromium does not currently expose connection byte or packet totals. So the statistic you get is a latency-and-loss view, not a throughput view. For an ADB relay that is arguably the more useful half — an interactive shell: session cares about RTT and about datagram loss, and does not care how many bytes moved.

WebTransport Datagram readable stream type (feature 5148774971342848) — datagramsReadableType: "bytes" opts into a BYOB readable byte stream instead of the default ReadableStream. Combined with the WebTransportReceiveStream interface from yesterday (getStats() distinguishing bytesReceived from bytesRead), the browser now offers both directions of a proper flow-control accounting for a byte-oriented protocol. AdbPacketSerializeStream is a byte-oriented protocol with a hard 24-byte header and a payload length field, which is exactly the shape that BYOB reading serves well.

And the other half of Chrome 160’s Dev channel is not device-peripheral either: Canvas2D tone mapping, SVG Path Data API (getPathData() / setPathData() / getPathSegmentAtLength()), Capability Elements icon-only mode, case-sensitive anchor matching in quirks mode, and the Regular Expression Buffer Boundaries proposal (\A, \z, \Z) still pending review. That last one would be a genuine ergonomics win for a logcat parser that currently has to hand-roll end-of-line anchors.

The WebUSB active-configuration bug on Windows

The significant find this week is Chromium bug #574558283, filed October 16, 2026 by a third-party reporter, assigned to Chromium’s own USB team on October 29, and still Assigned rather than Fixed as of this writing. It is tagged BugBountyCandidate-Small, which means Chromium is still deciding whether it has security weight.

The bug, in the reporter’s words: on Windows, USBDevice.configuration is always the device’s first configuration, even when Windows has put the device in a different one. Blink validates claimInterface() against the configuration Blink believes is active. So if the real active configuration contains interfaces that the first configuration does not, those interfaces cannot be claimed — and claimInterface() throws:

1
The interface number provided is not supported by the device in its current configuration.

And there is no escape hatch, because selectConfiguration() is unsupported on Windows and throws NetworkError: Unable to set device configuration.

The root cause analysis in the bug is precise and worth reading in full, because it is a three-step data-loss bug:

  1. UsbDeviceWin::ReadDescriptors() opens hub_path_ and calls ReadUsbDescriptors() via a UsbDeviceHandleWin on the hub handle.
  2. The device-descriptor request is served by IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX, which calls device_->ActiveConfigurationChanged(CurrentConfigurationValue) — storing the real value (4, in the reporter’s case) in device_info_->active_configuration.
  3. UsbDeviceWin::OnReadDescriptors() then replaces device_info_ with descriptor->device_info, copying only guid, bus_number and port_number from the old object. The new object, built by ReadUsbDescriptors(), never has active_configuration set — usb_descriptors.cc does not touch it.
  4. GetActiveConfiguration() now finds nothing, and the existing fallback kicks in: configurations()[0].

The fallback’s own comment says it plainly:

The active configuration was set after reading the node connection info from the hub driver. If it wasn’t valid, assume the first configuration.

The intent was for the hub’s value to survive. Step 3 throws it away. The suggested fix is a single assignment:

1
2
descriptor->device_info->active_configuration =
device_info_->active_configuration;

with the existing fallback left in place to cover the case where the hub genuinely reported nothing valid. A patch exists at chromium-review 8604626.

Why does this matter to webadb specifically? Because of the target the bug’s own impact statement names:

Any multi-configuration device whose WebUSB interface is not in configuration 1 is unusable from WebUSB on Windows, even when Windows is set up to select the right configuration: a page can neither see that configuration as active nor select it.

A phone in ADB mode is not a multi-configuration device — the ADB interface lives in configuration 1 — so the common path is unaffected. But this is not true of every Android configuration. Devices that expose a composite USB interface set (some OEM accessory modes, some phones that present a camera or mass-storage interface alongside ADB) can end up in a non-default configuration, and in that case the failure mode is not “your phone is not supported” but claimInterface() throwing a message that reads like the user did something wrong.

Note also the adjacent bug the reporter explicitly distinguishes from this one: #437728196, WebUSB control transfers with recipient: ‘endpoint’ only work for the first interface. Same Windows backend, different symptom — that one is about endpoint-recipient control transfers reaching later interfaces, this one is about the claim being rejected before any transfer happens. Two separate Windows WebUSB defects in the same backend, and both are invisible to anyone testing with a single-configuration device.

The macOS reset() regression and the WebHID blocklist going live

The second Chromium item is #579833799, an M157 regression on macOS: after USBDevice.reset(), the device is permanently unusable from WebUSB. claimInterface() fails with “Unable to claim interface”, and device-recipient control transfers fail too. Blink keeps reporting the old configuration.

The root cause is the same shape of bug as the Windows one, inverted: Chromium shipped a change to USBDevice.reset() that invalidates the configuration, and Blink was not taught to drop its cached view of it. The fix — “usb: Default-disable reset config invalidation” — was landed on main at services/device/public/cpp/device_features.cc (0b21cec08cb8eb08357def94f6cb102d07a13883) with the feature flag off by default, a Finch kill switch, and cherry-picks merged to both M157 and M158. The reporter’s verification comment is a nice piece of engineering practice:

Verified that issue does not reproduce on 159.0.8138.0 (Official Build) canary (arm64).

So the mitigation is in place on the branches that matter. But the shape of the bug is worth naming, because it is the shape that webadb has to survive against: a WebUSB call that mutates device state without the page being able to observe the change. reset() is the obvious one, but claimInterface() / releaseInterface() / selectConfiguration() are the same category. The WebUSB spec’s own model is that the page holds a USBDevice handle and can query device.configuration, device.opened, and the claimed-interface set at any time — and Chromium’s reset() implementation broke that contract for a full release cycle.

Meanwhile, in the spec repositories, a quieter but structurally important thing happened on November 14: whatwg/hid@3c85c59 deploys blocklist.txt to hid.spec.whatwg.org, updating the blocklist URL in index.bs and wiring it through the Makefile’s EXTRA_FILES. It follows up on whatwg/spec-factory#93.

This is the WebHID spec reaching the same structural maturity that WebUSB reached when it moved to whatwg/usb: a published, fetchable blocklist of device identifiers that a user agent is expected to consult. WebUSB has had blocklist.txt in the spec repo for years; WebHID now has a deployed one. For a project whose entire premise is “a browser talks to a physical device over a USB-shaped protocol”, the blocklist is not an abstraction — it is the list of devices the browser has decided it will not talk to, and it is now published rather than implicit.

The rest of the HID spec’s recent history is the editorial kind of work that only happens on a spec with a permanent home: HIDDeviceFilter.vendorId becoming an unsigned short (19ec1aa), the polarity of HIDReportItem.hasPreferredState being corrected (25e6e56), and the report-descriptor parse appending to report["items"] correctly (42294fa). The WebUSB spec, for its part, has been quiet since 3dcc3c2 — “Restrict control transfers to standard requests and protected classes” — landed in June.

The protected-class bypass, and why it matters that it was a bypass

While we are in the WebUSB security area, it is worth recording the shape of the bugs Chromium has been fixing here, because they are not “the browser let a page do something dangerous” bugs — they are “the browser’s own protection mechanism could be talked out of doing its job” bugs.

#520743499 was a crafted-wIndex bypass: for CLASS requests targeting DEVICE or OTHER recipients, if the target interface could not be identified from wIndex (because it specified an invalid interface number like 0xFF), and the device had at least one protected interface in its active configuration, the request was not blocked. The fix — “usb: Fix protected class bypass via crafted wIndex in CLASS requests” — landed on main at services/device/usb/mojo/device_impl.cc (872fabf8796f3be9f54534158bf40a23732cfd7e). The original protection traces back to CVE-2018-6125 (blocked_interface_classes_); the incomplete-fix follow-up was #524520965, fixed by “usb: Block device-level CLASS requests if any interface is protected” (b334f9d5a8d0a54b39b0f17aa2149cdb3fd7e), and registered as CVE-2026-79211.

That CVE number is the operative detail. It says that for a period, the mechanism designed to stop a page from reaching a protected USB interface class — the mechanism that keeps ADB’s own interface class (0xFF/0x42/0x01) out of reach of generic pages — could be bypassed by a page that knew the trick. HasControlTransferPermission() in the device service was the enforcement point, and it had a fall-through path that returned true.

The 2026 series of these bugs — the standard-request direction check (#517453128, kWebUsbEnforceStandardRequestAllowlist permitting OUTBOUND control transfers with arbitrary payload for IN-only GET_* requests), the crafted-wIndex bypass, the device-level CLASS gap — is a coherent hardening campaign, not a set of coincidences. Chromium has been tightening the WebUSB control-transfer surface against a spec that has itself been tightening (3dcc3c2 restricting control transfers to standard requests and protected classes). For webadb the practical consequence is a good one, stated plainly: the ADB interface class remains protected, the enforcement point is being defended against bypass, and claimInterface() — the thing webadb actually calls — is the supported path. The interesting thing is that the bugs are not in claimInterface()‘s permission model; they are in the adjacent control-transfer surface that a page is not supposed to need.

The weekly Direct Sockets check: nothing moved

This is the Monday sweep, so it gets a full section rather than a footnote.

Spec / WICG. WICG/direct-sockets has not received a commit in the last seven days. The most recent is a75fe71 — “sending udp to multicast address requires permission policy” (#85). Before that, add094c replaced direct-sockets-private with the LNA-based local-network / loopback-network policies (#84), and the multicast work landed in a run of five commits (81e35c3, d3daa91, f3b6a21, 0fcfd27, a75fe71). The repository has no tags at all.

ChromeStatus. The canonical entry 6398297361088512 still reads “Last updated on 2025-01-14” — two years and ten months ago. Its stage is still Prepare to ship, its rollout plan still reads “Will ship enabled for all users / Chrome for desktop 131”, and there is still no Android milestone, no origin trial, and no dev trial.

The platform support note is the load-bearing sentence and it has not changed:

This feature is implemented on desktop platforms, although it will only be available to the end users on platforms that support Isolated Web Apps, which is currently only ChromeOS. Android is excluded for historical reasons, although there are no apparent interoperability blockers here.

And, unchanged from the entry’s WebView risk field: “Feature not compiled in Android.”

The docs. developer.chrome.com/docs/iwa/direct-sockets still carries “Last updated 2025-12-17 UTC”. The permission-policy requirement is still the same two keys:

1
2
3
4
5
6
{
"permissions_policy": {
"direct-sockets": ["self"],
"cross-origin-isolated": ["self"]
}
}

with the note that without the direct-sockets key, new TCPSocket(...), new TCPServerSocket(...) and new UDPSocket(...) reject immediately with NotAllowedError.

Vendor signals. Firefox’s position on the Raw Sockets API (mozilla/standards-positions#431) is still Negative — last updated November 16, 2024. WebKit: No signal. The W3C TAG design review (w3ctag/design-reviews#548) remains Timed Out from April 2022. Web Developers: Positive.

What is genuinely new since the last sweep is one line in the docs: the DevTools integration. From Chrome 138, you can debug Direct Sockets traffic directly within the Network panel, with a Messages tab and a Hex Viewer, so TCPSocket and UDPSocket traffic can be inspected alongside HTTP requests. That is a real quality-of-life change for anyone actually developing against the API, and it is the only substantive difference in the documentation since the previous sweep.

Verdict for this week: no movement. No origin trial, no Android, no ChromeOS expansion, no new spec commits, no vendor signal changes. The API is exactly where it was: implemented in Blink for desktop, exposed only to Isolated Web Apps, which as of September 2026 run only on ChromeOS. For an ADB client this means the wireless-debugging path in ya-webadb issue #784 — “Support Android 11+ Wireless debugging (TLS + pairing code/QR)”, opened by CurseStaff, still effort: high — remains blocked on a browser API that ordinary web pages cannot reach. The TLS pairing flow needs a raw TCP client certificate against the phone’s pairing port; navigator.openTCPSocket() would do it, and navigator.openTCPSocket() is IWA-only.

ya-webadb, and the shape of an unusually quiet month

ya-webadb’s main has not moved since a62aacc2 — “feat(scrcpy): add UHID manager”, November 20 — which is three days old and which we covered on November 20. The newest tag remains v3.0.0-beta.5 from d22e9dc3, November 6.

There are zero open pull requests. The four open issues are all long-haul and unchanged: #784 (wireless debugging), #640 (use Symbol.dispose instead of a custom Disposable), #487 (record and replay user input, domain: scrcpy, effort: medium), and #343 (fastboot mode).

One branch is worth noting because it is visible in the remote refs and not in the mainline: origin/feat/scrcpy-control at 6bb9151c (November 18, “chore: fix review comments”). That is the scrcpy input-control work — the UHID keyboard and mouse injection path — and it is the natural continuation of the UHID manager that merged on November 20. A UHID manager without UHID control is half a feature: you can enumerate virtual HID devices but not yet drive them.

This is worth pausing on, because it explains the quiet. ya-webadb is three weeks from a beta.5 → beta.6 cycle and the project is in the part of the scrcpy port that is genuinely hard: the server side of scrcpy exposes a control socket for injecting keyboard and mouse events, and driving those events on the device means writing to the UHID kernel interface — which requires root, or at minimum a device with a permissive uhid policy. The WebHID angle is the interesting workaround, because WebHID is now on Android (Chrome 158) and HID is exactly the protocol UHID speaks. A phone in developer mode with persist.vendor.usb.hid enabled exposes its UHID nodes over USB as HID devices — and Chrome on that same phone can now reach them over WebHID, since WebHID shipped on Android in Chrome 158.

That is a genuinely surprising convergence: the browser API that shipped on Android last week is the same protocol that ya-webadb’s next major scrcpy feature needs, on the same class of device, and the two halves are on different teams. Chromium’s WebHID-on-Android work is crbug 40628009 (marked Fixed, default-enabled in M157 via crbug 573155176, “Enable the WebHID API on Android by setting the runtime enabled features flag to ‘stable’ on all platforms”), with the Android chooser and Site Settings gated on HidManager availability by chromium-review 8560300 — “hid: Gate Android chooser and Site Settings on HidManager availability”, committed 85f9a1d31eff754be3d430499088f5d8989e6040 on October 14, 2026.

Where this leaves webadb.online

Four things, in descending order of how much they should change what we do.

One — the claimInterface() path is where our users’ failures will live, and we should instrument our own error surface accordingly. Two shipping Chromium bugs in two months, both in claimInterface() validation, both with error messages that blame the user for a platform defect. Our connect flow calls open(), selectConfiguration(), claimInterface() in sequence and surfaces the raw DOMException. The honest thing to do — and the pattern we already use for OEM-restricted shell failures — is to recognise the specific Chromium messages and translate them:

  • “The interface number provided is not supported by the device in its current configuration.” → this is Chromium bug #574558283 on Windows. It is a platform defect, not a user error, and the workaround is to use a device in configuration 1.
  • “Unable to claim interface” immediately after a reset() → this is Chromium bug #579833799 on macOS, mitigated on M157/M158, and the workaround is to reconnect the device rather than reset it.

Both of these should produce a verdict-plus-workaround message, not a raw exception string.

Two — a WebHID-over-ADB path is now conceivable, and it is the only transport story that moved. Direct Sockets did not move; WebTransport moved in Chrome 159 and its feature set is now genuinely sufficient for a relay. But the thing that actually changed this week is that WebHID is on Android — Chromium bug #40628009 went Fixed and default-enabled — and WebHID speaks HID, and UHID speaks HID, and ya-webadb’s next scrcpy milestone is UHID control. A phone exposing UHID over USB for HID purposes is simultaneously (a) a device whose UHID nodes a desktop scrcpy client could inject into, and (b) a device whose own Chrome could reach those same nodes via WebHID. That is a topic worth a dedicated experiment, not a shipping plan.

Three — the Direct Sockets answer did not change, and we should stop treating it as pending. The API is IWA-only, ChromeOS-only, has no origin trial, has a two-year-stale ChromeStatus entry, and its vendor signals are negative (Firefox), silent (WebKit), and timed out (TAG). Our lib/adb-daemon-tcp.ts already implements the Direct Sockets transport contract; it should be documented as an experimental, IWA-only path, and the wireless-debugging feature that users actually want should be scoped as a relay-server project, because the browser-side constraint is not going to relax on its own.

Four — the WebUSB control-transfer hardening campaign is good news, and it validates the interface-scoped design. CVE-2026-79211 and the two preceding bugs were all in the control-transfer surface — the thing a page is not supposed to need for ADB. Chromium has been defending that boundary since May. It is a reasonable bet that the boundary keeps tightening, which means our design constraint stands: talk to the ADB interface via claimInterface() and bulk transfers, and never reach for device-recipient control transfers. We do not. The open() → selectConfiguration() → claimInterface() → transferIn/transferOut sequence in our WebUSB path is the supported path, and the bugs being fixed are elsewhere.

No code changes shipped from any of this. But the shape of the ecosystem moved in a way that is directly actionable: two of the three platform bugs we found this week are in the exact call our connect flow makes, and we now know the specific error strings to translate.


This week’s Direct Sockets sweep was run in full (Monday cadence): spec repository, ChromeStatus entry, developer documentation, and vendor signals — all checked, all unchanged. The prior sweep was 2026-10-12.

The WebTransportWriter lands, and the spec catches up in the same hour

At 16:10 UTC yesterday, ten spec fixes landed in w3c/webtransport in a single 38-minute window, all authored by one engineer — Jin Dongxun (金東勳) of Apple, merged by Will Law of Mozilla — and then, roughly forty minutes later, Chrome’s WebTransport feature owner rewrote six ChromeStatus entries to match. WebTransportWriter with its all-or-nothing atomicWrite() is now the centre of that effort: the one WebTransport API that exists to make a framed protocol survive QUIC flow control, which is precisely the problem an ADB packet stream has.

Ten spec fixes in thirty-eight minutes

The w3c/webtransport repository has been moving quickly all month, but yesterday was a burst. Here is the full list, in merge order, with the commit that carried it:

PR Merge commit Title
#820 fe2509a1 Restore the WebTransport stream error code during deserialization
#822 6e65ae9d Forward the write chunk to writeDatagrams
#823 4c9c6496 Use the transport argument in the fetch response assertion
#824 832386c3 Return the rejected promise from getStats() for failed transports
#825 c0fb41d5 Preserve the pending atomic writes when clearing the slot
#826 37650aca Use the same WebTransport object for construction and Fetch
#827 a6c43a47 Use the BufferSource byte length for the datagram size check
#828 af16a1ec Compare the reserved WebTransport header as bytes
#830 478e56f2 Bind the datagram duplex stream in receiveDatagrams
#831 bde68eb0 Pass send group and send order through bidirectional stream creation
#832 51e7fdb4 Read the attached stream in WebTransportWriter.commit()

Every one of these is a one-to-five line change to index.bs. That is the important structural detail: the WebTransport specification has reached the phase where its remaining defects are textual, not conceptual. There is no longer a design question about whether datagrams are writable, whether send groups exist, or whether a stream writer can commit a prefix. There are only missing tos, unbound variables, and header comparisons done with the wrong case-folding rule.

Two of the fixes are outright bugs that would have bitten anyone implementing the API today.

#824 — getStats() on a failed transport returned undefined instead of a rejected promise. The spec read:

1
1. If transport.[[State]] is "failed", reject p with an InvalidStateError and abort these steps.

abort these steps in a promise-returning algorithm means the function falls off the end and returns undefined instead of the promise p. The fix is a one-word change:

1
2
3
4
-1. If |transport|.{{[[State]]}} is `"failed"`, [=reject=] |p| with an
- {{InvalidStateError}} and abort these steps.
+1. If |transport|.{{[[State]]}} is `"failed"`, [=reject=] |p| with an
+ {{InvalidStateError}} and return |p|.

The same abort these steps idiom appears in dozens of places in the Fetch and Streams specs, where it is correct, because the caller has already captured the promise. Here the promise was created locally and never returned. An implementation that followed the letter of the old spec would throw TypeError: Cannot read properties of undefined on a caller doing await transport.getStats() — which is exactly what a developer sees when a WebTransport connection drops.

#828 — the reserved-header check used ASCII lowercase where the protocol required byte-case-insensitive matching. The WT-Available-Protocols header is a reserved HTTP/3 header that an application may not set:

1
2
3
4
-1. If [=ascii lowercase=] |header|'s [=header/name=] is "`wt-available-protocols`",
- then throw a {{TypeError}}.
+1. If |header|'s [=header/name=] is a [=byte-case-insensitive=] match for
+ `WT-Available-Protocols`, then throw a {{TypeError}}.

This one has teeth beyond correctness. ASCII lowercasing only folds A–Z; HTTP/2 and HTTP/3 header names are restricted to lowercase ASCII on the wire, but the WHATWG Headers object normalises names on append, and the difference between the two rules bites when a non-ASCII byte appears in the name. The spec now uses the correct primitive. For an ADB-over-WebTransport relay this matters directly: a relay that negotiates subprotocols needs to know the reserved header check is exact, because WT-Available-Protocols is how the server advertises which subprotocols it will accept, and an application that accidentally shadows it would get a TypeError at construction time.

#825 preserved the pending atomic-write requests when the slot was cleared. The original text used [=list/Empty=] |stream|.{{WebTransportSendStream/[[AtomicWriteRequests]]}}, which emptied the list that the slot pointed at, rather than replacing the slot’s contents:

1
2
-1. [=list/Empty=] [=stream|].{{WebTransportSendStream/[[AtomicWriteRequests]]}}.
+1. Set |stream|.{{WebTransportSendStream/[[AtomicWriteRequests]]}} to an empty [=ordered set=].

This is the kind of difference that only shows up in an implementation that models the slot as a separate ordered set rather than aliasing the list. WebKit and Chromium model them separately. The old spec text let you clear a list in place; the new text says replace the slot. One implementation clears the list the slot points at and the other replaces the slot, and only one of them can satisfy the new text.

WebTransportWriter: the API that exists to defeat flow-control deadlock

The centre of yesterday’s burst is WebTransportWriter, and it is the first WebTransport API whose motivation is a specific named protocol problem rather than a general capability. The ChromeStatus summary for feature 5073738176528384 states it plainly:

Applications commonly implement framed protocols over WebTransport streams. A normal stream write can be accepted only partially at the transport layer, which can cause a flow-control deadlock when the peer needs the complete frame before it can process data and release more credit.

The spec references RFC 9308 §4.4 directly — that is, HTTP/3’s own guidance on the deadlock that arises when a stream’s flow-control window is smaller than a frame the peer must receive in full before it can act. The API is:

1
2
3
4
5
[Exposed=*, SecureContext]
interface WebTransportWriter : WritableStreamDefaultWriter {
Promise<undefined> atomicWrite(optional any chunk);
undefined commit();
};

atomicWrite(chunk) rejects the promise if the chunk could not be sent in its entirety within the flow-control window current at the time of sending. If the complete chunk does not fit, none of it is admitted and the stream remains usable. commit() marks the bytes written so far as a reliable prefix: if the stream is subsequently aborted, the committed bytes are still transmitted to the peer, provided the connection is still alive.

The spec is careful about what this does not promise, and the caveats are the interesting part:

Note: atomicWrite can still reject after sending some data. Though it provides atomicity with respect to flow control, other network errors could cause the write to fail. Furthermore, atomicWrite does not prevent data from being split between packets or being interleaved with other data.

and

Note: Atomic writes can still block if queued behind non-atomic writes. If the atomic write is rejected, everything queued behind it at that moment will be rejected as well. Any non-atomic writes rejected in this way will error the stream. Applications are therefore encouraged to always await an atomic write before attempting subsequent writes to the same stream.

That last note is a design constraint that a transport implementation has to respect at the application level, not the browser level: you must not pipeline atomic writes. One outstanding atomic write, awaited, at a time.

#832 fixed the commit() algorithm, which previously took the stream as a parameter that the caller was supposed to supply:

1
2
3
4
5
6
7
-   When {{commit}} is called for |stream|, the user agent MUST run the following steps:
+ When {{commit}} is called, the user agent MUST run these steps:
+ 1. Let |stream| be
+ [=this=].<a href="https://streams.spec.whatwg.org/#writablestreamdefaultwriter-stream">stream</a>.
+ 1. If |stream| is undefined, [=throw=] a {{TypeError}}.
1. Set |stream|.{{WebTransportSendStream/[[CommittedOffset]]}}
to the value of |stream|.{{WebTransportSendStream/[[BytesWritten]]}}."

The old text was un-callable — commit() takes no arguments, so “called for stream“ referenced a variable that did not exist in scope. The fix derives the stream from the writer’s own stream slot, and adds the TypeError for a writer whose stream has already been released. It also removed the trailing stray quote character from the last step.

The ChromeStatus entry for this feature is unusually honest about adoption:

Adoption is expected to be focused rather than universal because the API addresses advanced WebTransport use cases. It is likely to be adopted by real-time media, gaming, remote-access, and application-protocol libraries that need to avoid framing-related flow-control deadlocks or reliably deliver an important prefix when aborting an obsolete stream suffix.

Remote-access and application-protocol libraries are the two categories that describe an ADB transport. And notice: this feature has no shipping milestone. Its stages list an Intent to Experiment thread but no milestone assignment at all, while its nine sibling WebTransport features have shipped or are staged at 156 through 160.

The ChromeStatus sweep that followed

At 17:07–17:28 UTC yesterday — between forty minutes and an hour after the last spec merge — Monica Chakraborty (monicach@microsoft.com), the Chrome WebTransport owner, updated six ChromeStatus entries in a twenty-minute run:

Time (UTC) Feature Milestone
17:07:19 WebTransport Datagram writable streams and prioritization 159
17:07:35 WebTransport congestion control 159
17:07:58 WebTransport Datagram readable stream type 159
17:18:21 WebTransport keying material export 159
17:26:57 WebTransportError API alignment and serialization 160
17:28:10 WebTransport reliability attributes 158

Every one of these six is web_feature: webtransport, blink_component: Blink>Network>WebTransport, origintrial: false, and — this is the pattern — all six list Firefox and Safari as Shipped/Shipping. ChromeStatus’s Firefox/Safari columns are community-maintained signals, but six entries converging on “the other two engines already have this” in one batch is a strong hint that this is a cross-engine alignment push rather than a Chrome-only workstream.

Let the whole table, because it is the clearest picture yet of how much of the WebTransport specification surface exists in Chromium:

Feature Chrome desktop / android / webview Firefox Safari
WebTransport headers and responseHeaders 156 No signal In development
WebTransport draining 158 Shipped/Shipping Shipped/Shipping
WebTransport anticipated concurrent incoming streams 158 Positive Shipped/Shipping
WebTransport reliability attributes 158 Shipped/Shipping Shipped/Shipping
WebTransport Datagram writable streams and prioritization 159 Shipped/Shipping Shipped/Shipping
WebTransport congestion control 159 Neutral Neutral
WebTransport Datagram readable stream type 159 Positive In development
WebTransport keying material export 159 Positive In development
WebTransport receive stream 159 Under consideration Shipped/Shipping
WebTransport send groups and send-stream prioritization 159 Shipped/Shipping Shipped/Shipping
WebTransport connection statistics 160 Shipped/Shipping Shipped/Shipping
WebTransportError API alignment and serialization 160 Shipped/Shipping Shipped/Shipping
WebTransportWriter: atomic writes and reliable stream reset — No signal No signal

Read that last row against the others. Thirteen features, twelve with milestones from 156 to 160, and the one that is specifically about framed protocols over flow control is the one with no milestone and no vendor signal from either of the other engines.

The congestionControl row deserves a second look too, because it is the one place where Chrome and the spec are pointed in opposite directions. ChromeStatus records Chrome’s implementation as supporting "default", "throughput" and "low-latency", while Firefox and Safari are both Neutral — the explicit “we have not decided” signal. A hint-based API ("default" / "throughput" / "low-latency") is the kind of thing engines can implement without agreeing on behaviour, because the contract is “pick something reasonable”. The spec’s own wording is careful to say the application is requesting a behaviour, not selecting an algorithm.

Why this is exactly the ADB problem

Here is the connection, and it is specific enough to be worth stating precisely.

An ADB packet over a stream transport is framed. Every AdbPacketSerializeStream packet is a 24-byte header — a 4-byte command, a 4-byte argument, a 4-byte payload length, a 4-byte checksum — followed by exactly payload_length bytes of payload. The header is not optional, the length is authoritative, and the checksum covers the payload. A receiver must therefore have the complete frame before it can validate it, and before it can decide how many bytes to consume from the byte stream.

That is the framing discipline RFC 9308 §4.4 warns about, and it is the discipline atomicWrite() was designed for.

Without it, you get this: you write a 4096-byte packet to a QUIC stream whose flow-control window currently has 900 bytes. The transport accepts 900 bytes and buffers the rest. The peer is waiting for the full 4096-byte frame before it can parse the header, before it can release the remaining 3196 bytes of window, and therefore before you can ever write the rest. Deadlock. Not a slow path — a permanent one, until the connection times out.

The workaround every current WebTransport user applies is: keep every write smaller than the current flow-control window, and never let a frame straddle the window. That means either fragmenting frames across writes (destroying the frame boundary the ADB protocol needs) or capping the frame size to the smallest window the connection will ever have (which on a lossy mobile link is a very small number).

atomicWrite() removes the workaround:

1
2
// One outstanding atomic write, awaited. Never pipelined.
await writer.atomicWrite(adbPacketBytes);

If the window cannot hold the frame, the promise rejects with an error and the stream stays usable. The application can then wait for the window to open (the peer’s getStats()-driven view of its own consumption, or simply a retry) and try again. No fragmentation, no deadlock, no frame boundary loss.

The commit() half is for the other failure direction. An ADB session is long-lived: you open a shell, you stream logcat, you type commands. If the stream is aborted — the user closed the window, the connection dropped, the device yanked — you want the last thing you sent to have reached the phone, because a half-delivered exec: command is a command that might or might not have run. commit() gives you that guarantee on abort: bytes written up to the commit() call are transmitted even if the stream is aborted immediately after.

The spec’s caveat applies here and should be stated plainly: commit() guarantees delivery on stream abort, not on connection failure. If the connection dies, committed bytes may still be lost. That is the difference between the two failure modes, and it is the same distinction the commit() note draws.

So the two APIs map onto the two ADB failure modes that matter: atomicWrite() for “the frame must arrive whole”, commit() for “the last command must arrive at all”.

Where the timeline actually stands

Pulling the channel data from ChromeStatus’s own API today, rather than from a release-notes page:

Channel Milestone Branch point Earliest beta Stable
Stable 159 2026-11-09 2026-11-11 2026-12-08
Beta 160 2026-11-30 2026-12-02 2027-01-05
Dev 161 2026-12-14 2026-12-16 2027-01-19

Chrome 159 went to Early Stable on November 18 and reaches full Stable on December 8. Chrome 160 branched from main on November 30 — six days from now — enters Beta on December 2, and reaches Stable on January 5, 2027.

That gives a precise answer to the question that matters for a relay-based ADB transport: Chrome 160 is the milestone that carries getStats(), the WebTransportError alignment, and the WebTransportReceiveStream interface. Chrome 159 carries the datagram writables, the congestion-control hint, the datagram readable type, the keying-material export, the receive stream, and the send groups.

And WebTransportWriter is not on that schedule at all.

What this means for webadb.online

Four things, in the order they should change what we do.

One — the ADB-over-WebTransport transport should be re-scoped around frame atomicity, and that changes the API shape. We had been assuming a straightforward WritableStream write loop over a QUIC stream. That design has a known deadlock and the only correct workaround is to fragment ADB frames, which the protocol does not tolerate. atomicWrite() removes the reason for the workaround. When we prototype the relay, the write path should be writer.atomicWrite(frame) with one outstanding write awaited at a time — not writer.write(frame) — and the relay server should advertise a maximum frame size that fits a conservative flow-control window. If the atomicWrite() promise rejects, the relay should not tear down the session; it should back off and retry. This is a change to the transport’s write loop that we should make before we write the relay, because retrofitting it after the framing layer is built is painful.

Two — the commit() semantics are a better fit for our session model than we assumed, and they should shape the close path. Our current mental model of closing an ADB session is “close the stream, done”. With commit(), the correct model is “commit the last write, then close” — and the difference is visible to the user as the difference between a command that ran and a command that might have run. For a shell: session where the user typed rm -rf /tmp/build and then hit close, that distinction is the whole point.

Three — we should not plan around WebTransportWriter shipping in Chrome 160, because it has no milestone. Thirteen of the thirteen WebTransport features Chrome has shipped or staged between 156 and 160 are the general capabilities: streams, datagrams, stats, errors, headers. The one feature that is specifically about framed protocols is the one still at Intent to Experiment with no vendor signal from Firefox or Safari. A relay design that depends on atomicWrite() is a relay design that will not work in Chrome 160. The right posture is to write the transport against a feature-detected writer — if (typeof writer.atomicWrite === 'function') — with the fragmented-write fallback as the always-available path, and to flip the default when the API is broadly available. Designing for the milestone-160 feature set alone means designing for the API that does not exist yet.

Four — exportKeyingMaterial() is a genuine protocol-security upgrade for a relay, and it is shipping in Chrome 159. The ChromeStatus summary is precise about the mechanism: Chromium includes the WebTransport CONNECT stream ID in the TLS exporter context. This ensures that separate WebTransport sessions derive different keying material even when they share the same underlying HTTP/3 connection. That is the exact property an ADB relay wants — session-bound key material that a second session on the same connection cannot derive. The API takes a binary label and context (up to 255 bytes each) and an output length of 1 to 4096 bytes, and returns a Promise<Uint8Array>. For a relay that carries ADB auth tokens, deriving per-session keys from a relay-side secret plus the exporter output is strictly better than a shared bearer token. Chrome 159 is Stable on December 8, so this is a near-term option, not a speculative one.

And the unchanged part of the picture deserves its usual mention: Direct Sockets did not move this week. The weekly Chrome Direct Sockets sweep is a Monday cadence and today is Tuesday, so it was skipped by design rather than by oversight — but the answer from last Monday still holds. The API remains IWA-only, ChromeOS-only, outside any public origin trial, with a ChromeStatus entry untouched since January 2025. The wireless-debugging path in ya-webadb#784 — Support Android 11+ Wireless debugging (TLS + pairing code/QR) — is still blocked on a raw TCP client certificate against the phone’s pairing port, and navigator.openTCPSocket() is the only browser API that could do it.

Which leaves the relay as the only viable shape for wireless debugging, and makes the framing correctness of that relay — the thing atomicWrite() was invented to solve — load-bearing rather than academic.


Direct Sockets weekly sweep skipped — today is Tuesday and the sweep runs on Mondays. The last full sweep was 2026-11-23. Upstream ya-webadb main has not moved since a62aacc2 (November 20); the newest tag is still v3.0.0-beta.5 from d22e9dc3 (November 6).

The close promise that never resolves, and the DevTools fix for throttled WebTransport

Yesterday was a thin day for the WebTransport specification — no merges in w3c/webtransport since November 23, no commits in yume-chan/ya-webadb since the 20th, and no ChromeStatus edits. But two things landed in Chromium’s tree and one open pull request sat in the spec repository accumulating technical debt, and together they tell a story about what happens to an ADB-style framed protocol when the underlying QUIC connection dies mid-write. The story has a specific bug in it, a specific piece of Chromium source that documents the bug in a comment, and a specific pull request that fixes it in the spec but has sat unreviewed for two weeks.

The bug is this: WebTransportSendStream.close() removes the stream from the transport’s send-stream set before the FIN it just sent has committed. If the connection dies in that window, the promise returned by close() never settles — not rejected, never resolved, just pending forever. Chromium’s own implementation has a comment admitting exactly this.

The Chromium commit that landed on November 24

At 13:06 UTC yesterday, Danil Somsikov landed 08ae4ae97ffa, “[DevTools] Resolve WebTransport throttling_profile_id in browser process”, into refs/heads/main at position {#1753195}. It fixed bug 584139245, and the reviewer list includes Kinuko Yasuda, Ben Kelly (Meta), and Charlie Reis.

The commit is small in scope but the mechanism it moves is instructive. Previously, Blink computed a throttling_profile_id for a WebTransport connection and passed it down through probe::WillCreateWebTransport — a renderer-to-browser probe call — so that the browser process could tag the connection for DevTools network-condition emulation. The new code computes the id in the browser process instead, deriving it from the local root RenderFrameHostImpl‘s DevTools frame token, or the worker’s DevTools token for SharedWorker / ServiceWorker:

1
2
// content/browser/renderer_host/render_frame_host_impl.cc
// Resolve WebTransport throttling_profile_id in browser process

The core_probes.pidl and core_probes.json5 files each lose a field, and web_transport_connector.mojom loses two lines — the probe is gone entirely, replaced by a direct call from WebTransportConnectorImpl. The commit touches 18 files.

The functional consequence, straight from the commit message:

This allows Network.emulateNetworkConditionsByRule to restrict WebTransport without requiring Network.enable.

That is a DevTools-only capability, and on its own it would not be worth a post. But the structural change is the interesting part: the browser process now derives the WebTransport connection’s identity from the DevTools frame token of the frame that created it, rather than receiving it from the renderer. That is the same shape of identity resolution that the close() bug below gets wrong — where the stream’s membership in the transport’s bookkeeping is what determines whether the connection’s death is reported to the code that is waiting on it.

Worth noting for context: this is the only WebTransport-related commit in Chromium in the last 24 hours. The third_party/blink/renderer/modules/webtransport, webusb, webhid, direct_sockets, and websockets module directories are all completely quiet. The services/network tree has ten commits, none of them WebTransport-related. This is what a quiet week looks like in a large repository, and it is worth being explicit about that rather than manufacturing urgency.

The spec’s close() algorithm removes the stream too early

Here is the current text of the close() algorithm in w3c/webtransport, at commit 51e7fdb452d9 (November 23, the commit() fix this blog covered yesterday):

1
2
3
4
5
6
7
8
9
10
11
12
13
To close a WebTransportSendStream stream, run these steps:

1. Let transport be stream.[[Transport]].
1. Let promise be a new promise.
1. Remove stream from transport.[[SendStreams]]. ← here
1. Set stream.[[PendingOperation]] to promise.
1. Run the following steps in parallel:
1. Send FIN on stream.[[InternalStream]] and wait for the operation to complete.
1. Wait for stream.[[InternalStream]] to enter the "all data committed" state.
1. Queue a network task with transport to run these steps:
1. Set stream.[[PendingOperation]] to null.
1. Resolve promise with undefined.
1. Return promise.

Now look at what the transport’s cleanup procedure does with that same set. From the cleanup a WebTransport algorithm:

1
2
3
4
5
1. Let sendStreams be a copy of transport.[[SendStreams]].
...
1. For each stream in sendStreams, run the following steps:
1. If stream.[[PendingOperation]] is not null, reject stream.[[PendingOperation]] with error.
1. WritableStream/error stream with error.

The cleanup path — the thing that runs when the QUIC connection fails — only rejects the pending operation of streams that are still in transport.[[SendStreams]]. But close() removed the stream from that set in its third step, before the FIN was sent, before “all data committed” was reached, and before the network task that resolves the promise was queued.

The consequence is precise: if the connection fails between step 3 and the network task, the cleanup procedure copies a [[SendStreams]] set that no longer contains this stream. The [[PendingOperation]] promise is never rejected. The WritableStream is never errored. And the promise returned by close() stays pending for the lifetime of the page.

This is not a theoretical concern for a framed protocol. An ADB-over-WebTransport relay closes its send stream when the session ends. If the network drops first, the relay’s await stream.close() never returns, and the relay’s session teardown hangs on a promise that can never settle. There is no AbortSignal on close(). The only escape is to observe transport.closed separately and race against it — which is exactly the sort of workaround an application should not have to write.

Chromium’s implementation documents the same bug in a comment

The Chromium implementation does not follow the spec’s algorithm literally — Blink’s WebTransportSendStream is a WritableStream subclass with no per-stream [[PendingOperation]] slot of its own — but it arrives at the same failure mode, and it says so out loud.

In third_party/blink/renderer/modules/webtransport/outgoing_stream.cc, the UnderlyingSink::close() method:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
ScriptPromise<IDLUndefined> close(ScriptState* script_state,
ExceptionState&) override {
...
outgoing_stream_->close_promise_resolver_ =
MakeGarbageCollected<ScriptPromiseResolver<IDLUndefined>>(script_state);
outgoing_stream_->pending_operation_ =
outgoing_stream_->close_promise_resolver_;

// In some cases (when the stream is aborted by a network error for
// example), there may not be a call to OnOutgoingStreamClose. In that case
// we will not be able to resolve the promise, but that will be taken care
// by streams so we don't care.
outgoing_stream_->close_promise_resolver_->SuppressDetachCheck();

DCHECK_EQ(outgoing_stream_->state_, State::kOpen);
outgoing_stream_->state_ = State::kSentFin;
outgoing_stream_->client_->SendFin();

// Close the data pipe to signal to the network service that no more data
// will be sent.
outgoing_stream_->ResetPipe();

return outgoing_stream_->close_promise_resolver_->Promise();
}

The comment is the whole story: “In some cases (when the stream is aborted by a network error for example), there may not be a call to OnOutgoingStreamClose. In that case we will not be able to resolve the promise.” Chromium’s mitigation is SuppressDetachCheck() plus the assumption that the Streams machinery will handle it — but the close() promise returned to the application is still the one that will not resolve.

Chromium does have an error path that rejects the pending operation, in OutgoingStream::ErrorStreamAbortAndReset():

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
void OutgoingStream::ErrorStreamAbortAndReset(ScriptValue reason) {
if (write_promise_resolver_) {
write_promise_resolver_->Reject(reason);
...
} else if (controller_) {
controller_->error(script_state_, reason);
...
}
if (close_promise_resolver_) {
pending_operation_ = nullptr;
close_promise_resolver_->Reject(reason);
close_promise_resolver_ = nullptr;
}
AbortAndReset();
}

The rejection does exist — but it depends on ErrorStreamAbortAndReset being reached, which depends on the abort signal arriving through a path that Chromium’s own comment admits may not fire. And the spec text, which is the contract an implementation is supposed to satisfy, does not specify this rejection at all for the close() case.

The fix that has been sitting unreviewed since November 11

Pull request #829, “Track closing send streams until their data is committed”, was opened by JinDX on November 11 at 01:07 UTC. It is a one-line move — literally one added line, one deleted line — and it is exactly the right fix:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 To close a WebTransportSendStream stream, run these steps:

1. Let transport be stream.[[Transport]].
1. Let promise be a new promise.
- 1. Remove stream from transport.[[SendStreams]].
1. Set stream.[[PendingOperation]] to promise.
1. Run the following steps in parallel:
1. Send FIN on stream.[[InternalStream]] and wait for the operation to
complete.
1. Wait for stream.[[InternalStream]] to enter the "all data committed" state.
1. Queue a network task with transport to run these steps:
1. Set stream.[[PendingOperation]] to null.
+ 1. Remove stream from transport.[[SendStreams]].
1. Resolve promise with undefined.
1. Return promise.

The removal from [[SendStreams]] moves from before the FIN is sent to after the FIN has committed. The stream therefore stays in the transport’s bookkeeping for exactly as long as the operation is outstanding, which means the cleanup procedure’s For each stream in sendStreams loop will find it and reject its [[PendingOperation]] when the connection dies.

The PR body says the same thing:

Keep the send stream in the transport’s send-stream set until the close operation completes. This lets transport cleanup reject the pending close if the connection fails while waiting for the FIN to commit.

Its current state is the part worth reporting. As of this writing:

Field Value
State open
Created 2026-11-11T01:07:21Z
Last updated 2026-11-11T01:07:36Z — fifteen seconds after creation
Reviews 0
Review comments 0
Commits 1
Additions / deletions 1 / 1
mergeable_state unstable

unstable is GitHub’s signal that the PR’s head commit has a merge conflict with the base branch. The base has moved from 91b5a73168 to the current 51e7fdb452d9 — eleven merges later — and the PR has never been rebased. It has been untouched for fourteen days.

This is the second time this blog has had to report on a w3c/webtransport PR that has gone stale, and the pattern is worth naming precisely. The November 24 post described fourteen normative changes sitting unreviewed in the repository queue. This one is different in kind: it is not a proposal for new behaviour, it is a correction to an existing normative algorithm that Chromium’s own implementation comment shows is already broken in practice. The unstable merge state means that even if the spec editor wanted to merge it today, they would have to rebase it first — and a rebase on a spec repo that changes the context lines of a normative algorithm requires re-reading the patch, which is exactly the kind of work an unreviewed, stale PR is least likely to attract.

Note also the asymmetry of the repository’s review queue. The three PRs that JinDX opened on November 11 in that same burst — #829, #819, #821 — have all sat without a single review. But JinDX’s later batch of ten fixes, opened the same day and merged between November 18 and November 23, went straight through. The difference is not quality; it is that the November 18-23 batch was a set of one-to-five-line textual corrections to obvious defects, each independently verifiable, while #829 is a one-line change that requires understanding the interaction between the close() algorithm and the transport cleanup algorithm to see why it matters. Review effort concentrates on changes that are easy to spot, not changes that are important.

commit() needs a QUIC frame that does not exist yet

Yesterday’s post covered WebTransportWriter.commit() and its [[CommittedOffset]] slot. The deeper reason that slot exists is worth following, because it terminates in an IETF document rather than a browser.

The spec’s own bibliography entry for RELIABLE-RESET points at:

Marten Seemann, 奥一穂, “QUIC Stream Resets with Partial Delivery”, draft-ietf-quic-reliable-stream-reset, Internet-Draft

That draft defines a new QUIC frame, RESET_STREAM_AT, registered at value 0x24, which allows a sender to reset a stream while guaranteeing delivery of stream data up to a specified byte offset. The motivation section explains why WebTransport needs it:

Some applications running on top of QUIC use bytes at the beginning of the stream to communicate critical information related to that stream. For example, WebTransport uses a variable-length encoded integer to associate a stream with a particular WebTransport session.

Since QUIC does not provide guaranteed delivery of stream data for reset streams, it is possible that a receiver is unable to read critical information. In the example above, a reset stream can cause the receiver to fail to associate incoming streams with their respective subcomponent of the application.

This is the mechanism commit() is built on. commit() sets [[CommittedOffset]] to [[BytesWritten]], and abort() reads [[CommittedOffset]] and passes it to stream/abort sending — which is what tells the QUIC layer “reset this stream, but the peer is guaranteed to receive everything up to offset N.” For ADB, where the first bytes of a stream carry the command identifier and payload length, that guarantee is the difference between a recoverable error and a desynchronized protocol.

The draft’s current revision is dated June 2025 and expired on 17 December 2025. The quicwg/reliable-stream-reset repository shows the last commit on September 6, 2026 — 4342ea610451, “reference RFC 9000 for frame format notation”, along with a same-day burst addressing Mike Bishop’s review comments. No activity since. The draft is past its expiry date with no new revision filed, which in IETF process means it has been dropped from the working-group agenda until someone resubmits it.

The layering of this is worth spelling out, because it is three separate standards at three different maturities:

  • RESET_STREAM_AT (QUIC layer) — an Internet-Draft that has expired. No browser ships it.
  • commit() / atomicWrite() (WebTransport layer) — normative in the spec since before this blog started tracking it, with a ChromeStatus entry (5073738176528384) that has no shipping milestone and no vendor signal from either Firefox or Safari.
  • The Chromium implementation — absent. A grep of third_party/blink/renderer/modules/webtransport/web_transport_send_stream.cc and outgoing_stream.cc for atomicWrite, commit, CommittedOffset, and committed returns zero matches. There is no WebTransportWriter interface in Blink, no [[CommittedOffset]] slot, and no RESET_STREAM_AT plumbing.

So the API that was supposed to make a framed protocol survive QUIC flow control cannot be implemented by any browser today, and the QUIC frame it depends on has an expired Internet-Draft behind it. That is not a criticism of anyone’s work — it is the natural consequence of a feature that has been “Intent to Experiment” since September with nobody funded to implement it. But it is the reason an ADB-over-WebTransport relay should not plan around atomicWrite().

The release channel moved

Chrome 159 went to Early Stable on November 18 and reaches full Stable on December 8. Yesterday the Stable channel picked up an incremental update to 159.0.8154.33.

More usefully for anyone tracking what is actually in the milestone: Chrome 159’s release notes are now published as a page on ChromeStatus itself, at chromestatus.com/release-notes/159, rather than only as a Chrome Releases blog post. The Network / Connectivity section carries the six WebTransport features this blog has been tracking since the Nov 22 post — datagram writable streams and prioritization, congestion control, keying material export, the receive stream interface, send groups and send-stream prioritization, and the WebTransportError alignment. Chrome 160’s notes are already up too, headed “Scheduled Stable Release January 5, 2027 (Currently on Dev channel, reaches Beta on December 2, 2026)”.

Two things from the Chrome 159 notes are worth repeating because they constrain what a relay can actually do today.

First, on keying material export:

For WebTransport over HTTP/3, Chromium includes the WebTransport CONNECT stream ID in the TLS exporter context. This ensures that separate WebTransport sessions derive different keying material even when they share the same underlying HTTP/3 connection.

Two ADB sessions multiplexed over one HTTP/3 connection derive different keys. If a relay ever pools sessions, the key derivation has to account for that.

Second, on the receive stream:

Its getStats() method returns per-stream byte counters: bytesReceived reports bytes received from the network, while bytesRead reports bytes delivered to the application.

The distinction between “the socket is fine” and “the application is not draining” is exactly the diagnostic an ADB relay needs when a session appears hung.

WPT gave the offline-disconnect test a timeout

One more item, from the test suite rather than the implementation. Commit 094016c999a3, landed November 24 at 17:31 UTC by Maksim Sadym, “[wdspec] Bound WebTransport offline disconnect wait timeout”, fixed bug 570122801.

The commit message is unusually precise about the failure mode:

Browsers that do not yet abort WebTransport sessions under emulated offline conditions leave window.webTransport.closed pending until the harness kills the entire test file with a timeout.

So the WebDriver BiDi conformance test for offline conditions was hanging — not failing, hanging — because a browser under emulated offline conditions left the closed promise pending. The fix bounds the closed and ready promise evaluations with a timeout_multiplier-scaled timeout, and adds a cleanup step that shields the in-flight script evaluation tasks on timeout and drains them after closing the WebTransport instances in finally, so late BiDi responses do not hit cancelled client futures.

This is the same class of defect as the close() bug above, one layer up. WebTransport.closed is the promise an application awaits when the connection dies; if it never settles, every application-level cleanup path hangs. The test harness only noticed because it had no timeout. Production code has no such protection.

Also landed on November 24 in WPT: c17a3477a34c, “Add Available-Dictionary and Dictionary-ID to list of forbidden fetch headers”, by Alex Christensen, adding a new header-forbidden-compression-dictionary.tentative.any.js test ahead of whatwg/fetch#1854. Not WebTransport-specific, but it is the kind of change that eventually constrains what a fetch-based transport may send as a header.

What this means for webadb.online

Direct impact on webadb this week: none. There were no commits in yume-chan/ya-webadb (the last was a62aacc, “feat(scrcpy): add UHID manager”, on November 20, five days ago), no changes to the webadb.online codebase, and no WebTransport implementation work in Chromium that would change what a browser can do today.

But the close() defect is worth recording for a specific reason. webadb’s architecture is USB-first — navigator.usb — and its transport layer treats the ADB connection as a bidirectional byte stream with a length-prefixed packet format. If that stream is ever carried over WebTransport (which is the obvious path to ADB-over-network without a native bridge), then the failure mode described above is not hypothetical: a relay that does await stream.close() during session teardown will hang if the network drops first, and it will hang silently, because a pending promise produces no error.

The correct shape for a relay is to race the close against transport.closed and to treat a connection failure as an error rather than waiting on the close promise. The spec fix in PR #829 would make that unnecessary — but the fix is unreviewed and conflicted, the WebTransportWriter API it lives beside is unimplemented in every browser, and the QUIC frame underneath it has an expired Internet-Draft. So the defensive pattern is the correct engineering choice for now, and it should be written into the transport layer from the beginning rather than retrofitted after the first hung teardown.

The one thing genuinely worth doing today is filing a review on w3c/webtransport#829 or pinging the spec editor about the conflict. It is a one-line diff, it is already written, and it has been sitting for fourteen days while an implementation bug it describes is live in Chromium’s shipping code path.

Cross-origin isolation for webadb.online — COEP, COOP, and the GA4 fix

webadb.online’s screencast stream uses MediaSource to feed the
video element. MediaSource requires the page to be cross-origin
isolated. So does SharedArrayBuffer. So does OffscreenCanvas
with a worker. So do most of the high-performance browser APIs
that turn the browser into a real runtime rather than a document
viewer.

Cross-origin isolation is gated by two HTTP response headers:

1
2
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp

The browser will set window.crossOriginIsolated === true only
when both are present, and the COEP policy is recursive — every
resource you load has to opt in. If you forget one script tag, one
iframe, one stylesheet, one image, the whole page goes into a
half-isolated state where MediaSource mysteriously throws
.

This post is the writeup of how we get isolation on without
breaking Google Analytics, which is a same-origin script but
originates cross-origin assets.

What “isolated” actually means

crossOriginIsolated is the property. When it’s true:

  • SharedArrayBuffer works (otherwise throws on construction).
  • Atomics.wait() / Atomics.notify() work.
  • High-resolution timers (performance.now() ≥ 5μs instead of
    100μs).
  • MediaSource and WebCodecs work without throwing
    Cannot use MediaSource on this document.
  • performance.measureUserAgentSpecificMemory() works.

The screencast panel needs MediaSource. The logcat panel needs
high-res timers to estimate line rates without drifting. The file
manager’s progress UI wants SharedArrayBuffer to share state
across the worker that streams uploads and the React thread that
paints. So we want isolation on, by default.

The headers, where they live

next.config.mjs:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
headers: [
{
source: "/:path*",
headers: [
{ key: "Cross-Origin-Opener-Policy", value: "same-origin" },
{ key: "Cross-Origin-Embedder-Policy", value: "require-corp" },
],
},
{
// GA4's analytics.js is loaded with crossorigin="anonymous" in
// <script> tags, but the static analytics endpoint serves a
// different set of resources that don't send CORP headers
// we can rely on. Pre-validate them via the Credentialless
// tier.
source: "/_next/static/:path*",
headers: [
{ key: "Cross-Origin-Resource-Policy", value: "same-origin" },
],
},
],

Two policies in play:

  • COOP (same-origin): my page may only share a browsing
    context with same-origin pages. If a popup opened by my page
    navigates elsewhere, the popup gets a fresh context. This is
    fine for webadb — no popups at all.
  • COEP (require-corp): every resource my page loads must
    send Cross-Origin-Resource-Policy: same-origin / same-site
    / cross-origin, or be a same-origin load. There is no
    default-deny in older browsers but Chromium enforces it.

The GA4 problem

GA4 is loaded with this snippet:

1
2
3
4
5
6
7
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>

Two cross-origin requests happen:

  1. The script tag loads gtag/js. Google does send
    Cross-Origin-Resource-Policy: cross-origin on this, so it
    passes.
  2. The script itself then loads measurement resources from
    *.analytics.google.com, *.googletagmanager.com, and
    sometimes a third-party endpoint. Some of those don’t
    send a CORP header that passes the require-corp check.

The cleanest fix that doesn’t break GA4 is to flip the script
to crossorigin="anonymous" and rely on the GA endpoints that
do send CORP. That gets us 95% of cases.

The remaining 5% is the times GA loads a tag-manager config from
a third-party endpoint that hasn’t been CORP’d yet. When that
happens, the page still loads (the request succeeds), but the
response is opaque — GA can’t read the body. We don’t get
analytics for that request. The page still works, MediaSource
still works, the user doesn’t see anything.

The CDO (Cross-Origin-Opener-Policy-Report-Only) endpoint
pattern lets us collect reports on which subresources fail CORP
without breaking the page. We don’t have it set up yet — adding
it is on the list.

Why not credentialless

COEP has a credentialless mode that relaxes the CORP
requirement: any cross-origin resource is allowed as long as it
doesn’t carry credentials (no cookies, no client certs). This is
a strict relaxation — Google Analytics works because it doesn’t
need credentials for measurement requests.

1
<meta http-equiv="Cross-Origin-Embedder-Policy" content="credentialless" />

We tried this in staging and saw two regressions:

  1. WebUSB device picker stops working. The picker is itself
    a Chrome-internal page (chrome://device-internals/) that
    runs with credentials in some configurations. Credentialless
    pages can’t talk to it.
  2. Some WebUSB drivers’ WebUSB backend pages also start
    requiring credentials for the device-init handshake.

So require-corp is what we ship. The tradeoff is that GA4’s
fan-in endpoints sometimes go opaque; we accept that.

The dev-server gotcha

next dev doesn’t apply headers from next.config.mjs to its
dev server. They only get applied on next build + the static
export. This bites everyone the first time: dev server
isolation looks fine, prod doesn’t. Fix is in
scripts/dev-server-headers.mjs if you need it during local
development.

Verifying isolation is on

Three things to check after any change:

1
2
3
4
// From the browser console on webadb.online
window.crossOriginIsolated // → true
typeof SharedArrayBuffer // → 'function'
new MediaSource() instanceof MediaSource // → true (no throw)

If any of these fails, the headers didn’t reach the page. The
usual causes are:

  • The headers were added to next.config.mjs but next build
    wasn’t run, so they’re still in the dev server (which
    ignores them).
  • A new external resource was added (analytics endpoint,
    third-party widget) and it doesn’t send CORP.
  • A service-worker script (which has its own origin handling)
    is interfering.

We have a Playwright test in tests/isolation.spec.ts that hits
the production URL and asserts all three of the above, plus
that the screencast panel can actually open a MediaSource
without throwing. It runs on every deploy.

What isolation enables on webadb

Just to enumerate the things that depend on it, since the list
is non-obvious:

API Used by
MediaSource screencast video element
SharedArrayBuffer logcat ring buffer shared with a worker
Atomics.wait logcat worker’s backpressure signal
High-res performance.now() screencast frame-rate estimation, logcat QPS
WebCodecs (queued) future video encoder for screencast recording

If you’re building on the codebase, run the test before you
merge anything that adds an external resource — every new
external host has to play ball with COEP, and the failure mode
is “everything looks fine locally, prod mysteriously breaks”.

Hello, webadb

This is the first post on the new webadb.online blog — release notes,
deep dives, and field reports from running webadb.online
in production.

What’s here

  • Release notes when we ship a meaningful change to the
    desktop-style UI, the WebUSB session layer, or the device bridge.
  • Deep dives into the trickier parts of the stack — unzip -p
    on the device, the ya-webadb
    shell protocol, how we get crossOriginIsolated === true over
    Cloudflare Pages, etc.
  • Field reports from real-device testing (currently a Xiaomi 13
    on HyperOS, plus whatever loaner lands on the desk).

How it’s built

The site itself is a Next.js static export served by Cloudflare Pages,
and the blog is a plain Hexo instance living in
blog/ whose output (hexo generate → public/blog/) gets folded into
the Next.js export on the next npm run build. One repo, one
project, two static-site generators.

The blog ships inside webadb.online/blog/, so the COOP/COEP headers
that gate SharedArrayBuffer on the main app don’t leak into the
blog’s HTML (we override them in public/_headers).

More soon.

The stream that was never created, and what GOAWAY does to a WebTransport ADB session

Yesterday Chromium replaced a DCHECK with a real null check in WebTransport::CreateStream(), because QUIC’s GOAWAY frame can make a stream-creation call return null even after the session said yes. That is a one-line-looking change in services/network/web_transport.cc, and on its own it would be a note rather than a post. But it is the third commit in eleven days that touches the same underlying question — what happens to an application that opens a stream on a connection the server is already tearing down — and the three commits together draw a line directly through the layer that webadb’s network transport would sit on.

The question is not abstract. ADB over TCP is a long-lived, request/response-framed protocol: the client opens a stream, writes a command packet, reads a response. If the phone’s adbd restarts, or the Wi-Fi link renegotiates, or an intermediary sends a GOAWAY, the connection is not “closed” in the orderly sense — it is draining. The transport stays alive long enough for the application to notice, and every stream opened during that window is a stream that may never exist.

The commit: DCHECK(stream) becomes if (!stream)

At 03:11 UTC on November 25, Nadun Kanakaratne landed c0314b99894d, “WebTransport: Guard against null stream in WebTransport::CreateStream”, into refs/heads/main at position {#1754108}. It fixed bug 588512371 and was reviewed by Nidhi Jaju, with Patrick Meenan in the commit queue.

The change itself is small — two files, 14 lines of production code and 106 lines of unit test:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// services/network/web_transport.cc — WebTransport::CreateStream()
if (writable) {
// Bidirectional
if (!session->CanOpenNextOutgoingBidirectionalStream()) {
// TODO(crbug.com/40114825): Instead of rejecting the creation request, we
// should wait in this case.
std::move(callback).Run(false, 0);
return;
}
quic::WebTransportStream* const stream =
session->OpenOutgoingBidirectionalStream();
- DCHECK(stream);
+ if (!stream) {
+ // `OpenOutgoingBidirectionalStream()` can still return nullptr even when
+ // `CanOpenNextOutgoingBidirectionalStream()` is true (for example, after
+ // receiving an HTTP/3 GOAWAY frame).
+ std::move(callback).Run(false, 0);
+ return;
+ }

and the matching defensive check on the unidirectional path, because webtransport::Session is allowed to return null there even though the current QUICHE implementation does not:

1
2
3
4
5
6
7
8
9
10
  quic::WebTransportStream* const stream =
session->OpenOutgoingUnidirectionalStream();
- DCHECK(stream);
+ if (!stream) {
+ // `webtransport::Session::OpenOutgoingUnidirectionalStream()` is allowed to
+ // return nullptr even when `CanOpenNextOutgoingUnidirectionalStream()` is
+ // true.
+ std::move(callback).Run(false, 0);
+ return;
+ }

Two things are worth pausing on. First, the DCHECK was not an oversight — it was an assertion that the invariant held. The commit message says exactly why it no longer does:

In WebTransport::CreateStream(), OpenOutgoingBidirectionalStream() can return nullptr even when CanOpenNextOutgoingBidirectionalStream() returns true (for example, after receiving an HTTP/3 GOAWAY frame, where QuicSpdyClientSession refuses new bidirectional streams while CanOpenNextOutgoingBidirectionalStream() does not check GOAWAY).

Second — and this is the part that matters for a client like webadb — the failure mode is not a crash. A DCHECK is a debug-only assertion: in a release build it compiles to nothing, and the null pointer flows straight into the next line of code. The fix replaces an invisible corruption with a visible rejection: callback.Run(false, 0) propagates a failure to the Blink layer, which surfaces it to JavaScript as a rejected promise.

The two-stage contract: CanOpen… and Open… disagreeing

The bug lives in a gap between two QUICHE calls that look like they should agree:

Call Question it answers Source of truth
CanOpenNextOutgoingBidirectionalStream() “May I open another stream?” Stream ID space / flow control limits
OpenOutgoingBidirectionalStream() “Open it.” The HTTP/3 session state, including GOAWAY

CanOpenNextOutgoingBidirectionalStream() checks the stream ID space — whether QUIC has budget for another stream ID given the peer’s MAX_STREAMS limit. OpenOutgoingBidirectionalStream() additionally consults the HTTP/3 session, which refuses to create new bidirectional streams after a GOAWAY has been received, because a GOAWAY means “I am going away; do not send me new requests on this connection.”

Those two constraints are different, and there is a window where one permits and the other forbids. When that window is hit, the “may I?” check says yes and the “do it” call returns null.

This is precisely the shape of a class of bug that is invisible until it isn’t. The DCHECK fired in debug builds — which is why Chromium’s own CI caught it — but a release browser would have proceeded with a null WebTransportStream*. For a page doing new WebTransport(...).createBidirectionalStream(), the difference between “rejects with an error” and “crashes the renderer” is the difference between a caught exception and a lost tab.

Note also the TODO that the commit left in place, untouched:

1
2
// TODO(crbug.com/40114825): Instead of rejecting the creation request, we
// should wait in this case.

That TODO sits on the other branch — the case where CanOpenNextOutgoingBidirectionalStream() returns false. Chromium’s current behaviour there is to reject the stream-creation request immediately, but the intended behaviour is to wait for the stream ID space to open up. That is a meaningfully different semantic, and it is the semantic an ADB client would want: when the peer’s MAX_STREAMS limit is temporarily exhausted, wait; when the connection is draining, fail.

The spec has nothing to say about any of this. Grepping the current w3c/webtransport index.bs for GOAWAY returns nothing at all — the specification has no concept of a graceful QUIC-level shutdown in the WebTransport API surface. The closest thing is the transport’s [[State]] machine, which has "connecting", "connected", "draining", "closed", and "failed" states, but the transition into "draining" is not specified in terms of HTTP/3 GOAWAY semantics. Everything about what the user agent does with a GOAWAY is implementation-defined at the spec level.

The commit eleven days earlier: GOAWAY becomes a retryable error

On November 14 — eleven days before the null-check fix — Chromium landed 873a1c2e47f9, “Return retryable error on HTTP/3 GOAWAY before stream creation”. It fixed bug 584808449 and touched ten files including net/quic/quic_chromium_client_session.cc (+65/−22) and net/quic/quic_http_stream.cc.

The commit message describes the problem exactly:

Requests bound to a pooled QUIC session that received an HTTP/3 GOAWAY before opening a stream (or while waiting for stream creation or handshake confirmation, including when followed immediately by CONNECTION_CLOSE) previously failed with ERR_CONNECTION_CLOSED instead of ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED. Surface the GOAWAY retry error for these pre-stream requests so HttpNetworkTransaction can reliably retry them on a new connection.

And then the crucial caveat, which is the reason these two commits are siblings rather than strangers:

Callers without retry logic (QUIC proxy tunnel setup and BidirectionalStream) continue to see ERR_CONNECTION_CLOSED.

So Chromium already had the right error taxonomy — ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED is a distinct, retryable error distinct from ERR_CONNECTION_CLOSED. But the WebTransport layer was not among the callers that got the improvement, because WebTransport does not have a “retry on a new connection” path. A WebTransport object is bound to the connection it was constructed on; it cannot transparently re-dial.

That is the structural difference between the two commits:

  • 873a1c2e47f9 improves the HTTP fetch stack, where a pooled QUIC connection can be abandoned and a fresh one negotiated transparently.
  • c0314b99894d hardens the WebTransport stack, where no such fallback exists, so the only correct answer is to fail the request cleanly.

Read together, they describe a browser that has learned to distinguish “this connection is draining, try again elsewhere” from “this connection is dead.” WebTransport just cannot act on the first distinction.

What an ADB-over-WebTransport client would actually see

Now let us get concrete about webadb, because this is the part that matters.

Today, webadb’s browser-side ADB transport is WebUSB, with an alternative path through the Chrome Direct Sockets API for raw TCP to the device’s wireless-debugging port (lib/adb-daemon-tcp.ts → AdbClient.connectOverTcp()). Direct Sockets gives a raw TCPSocket — a byte stream with no framing guarantees beyond TCP’s own — and webadb layers the ADB packet protocol (24-byte AdbPacketHeader with a magic value, command, arg0, arg1, payload length, and a checksum) on top of it. That is precisely the shape that GOAWAY disrupts: ADB’s wire protocol is a sequence of length-prefixed packets with an OKAY/FAIL handshake and a stream-id namespace (CNXN, OPEN, WRTE, OKAY, CLSE), which is a very close cousin of QUIC’s stream model. An ADB OPEN on a stream ID the daemon has already closed is the ADB-side analogue of opening a QUIC stream after GOAWAY.

If webadb ever moves its network transport to WebTransport — which is the natural progression, because WebTransport gives you a QUIC connection with real streams, real datagrams, and real congestion control instead of a hand-rolled framing layer — then three specific behaviours from these commits become load-bearing:

  1. A stream-creation failure must be a rejection, not a hang. In ADB, OPEN is a request that expects an OKAY in response. If the WebTransport stream creation rejects, the ADB layer must translate that into “this OPEN failed” rather than waiting forever for an OKAY that will never arrive. c0314b99894d is what makes the browser-side signal trustworthy enough to build on.

  2. There is no automatic retry. HttpNetworkTransaction can retry a GOAWAY’d request on a new connection; a WebTransport object cannot. So an ADB-over-WebTransport client would have to own the reconnect logic: tear down the transport, re-dial, and re-authenticate. Note that this is also true for ADB’s own protocol — adbd restarting mid-session invalidates every in-flight OPEN — so the ADB layer was going to need this logic regardless. The transport choice does not create the requirement; it just changes where the code lives.

  3. The “wait instead of reject” TODO is the interesting one. Chromium’s crbug.com/40114825 wants CreateStream to block when the peer’s MAX_STREAMS limit is temporarily exhausted rather than failing outright. For a protocol like ADB, where a single CNXN session multiplexes many logical operations, temporarily exhausting the stream limit is a routine backpressure condition, not a fatal error. The current behaviour — reject immediately — would turn ordinary flow control into a spurious disconnect.

There is a fourth observation that is easy to miss and, in my opinion, the most interesting thing in this cluster of commits: getStats() and GOAWAY are two halves of the same observability problem. Chromium’s WebTransport.getStats() shipped into Chrome 160 (tracking bug 573538454), and the Chromium implementation in services/network/web_transport.cc maps a QUICHE webtransport::SessionStats into a mojom struct like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
mojom::WebTransportStatsPtr StatsToMojom(
const webtransport::SessionStats& stats,
uint64_t expired_pending_datagram_count) {
mojom::WebTransportStatsPtr result = mojom::WebTransportStats::New();
result->timestamp = base::Time::Now();
result->min_rtt = ToTimeDelta(stats.min_rtt);
result->smoothed_rtt = ToTimeDelta(stats.smoothed_rtt);
result->rtt_variation = ToTimeDelta(stats.rtt_variation);
result->estimated_send_rate_bps = stats.estimated_send_rate_bps;
result->datagrams_expired_outgoing = base::ClampAdd(
stats.datagram_stats.expired_outgoing, expired_pending_datagram_count);
result->datagrams_lost_outgoing = stats.datagram_stats.lost_outgoing;
return result;
}

Note the fields Chromium actually populates: smoothedRtt, rttVariation, minRtt, estimatedSendRate, and the datagram counters. The Chrome 160 release note is explicit about what is missing: “Chromium does not currently expose connection byte or packet totals.” The w3c/webtransport spec’s WebTransportConnectionStats dictionary defines bytesSent, bytesAcknowledged, packetsSent, bytesLost, packetsLost, bytesReceived, packetsReceived, atSendCapacity and more — but Chromium’s implementation populates only the RTT family, the send-rate estimate, and the datagram counters.

And the spec’s getStats() algorithm has a property that is directly relevant to the GOAWAY story:

1
2
3
4
1. If |transport|.[[State]] is "closed", abort these steps after
queueing a network task with |transport| to resolve |p| with
the most recent stats available for the connection. The exact point
at which those stats are collected is implementation-defined.

Statistics remain accessible after the connection closes. That is what the Chrome 160 release note means by “Statistics remain accessible after the connection closes.” For a client like an ADB transport, that is exactly the right shape: when a connection dies mid-session, the last known smoothedRtt and estimatedSendRate are the evidence you need to explain why it died — was the link congested, was the peer tearing down, was the RTT spiking?

And the spec’s getStats() algorithm has one more line that deserves attention:

1
2
1. If |transport|.[[NewConnection]] is "no", then remove from |gatheredStats|
all stats not marked as pooled connection stats.

That is the privacy model: on a pooled connection, only “pooled connection stats” — the RTT family, per the spec’s annotations on smoothedRtt, rttVariation, and minRtt — are exposed. Bytes and packets are not, because they would be a cross-origin fingerprinting vector. So even as Chromium fills in more of the dictionary, the byte counters on a pooled connection will remain unexposed by design. For webadb’s purposes, this is actually fine: an ADB session is a dedicated connection, not a pooled one.

The rest of the day, honestly accounted for

This is a quiet day across the board, and I would rather say so plainly than inflate it.

ya-webadb has not seen a commit since November 20 (a62aacc — “feat(scrcpy): add UHID manager (#880)”), and the last release remains v3.0.0-beta.5 from November 6. The six most recent pull requests all closed on or before November 19. There is nothing new upstream in the library itself.

w3c/webtransport has not merged since November 23 (51e7fdb — the batch of ten fixes this blog covered on the 24th). The six open pull requests are the same set from November 9–11: JinDX’s “Track closing send streams until their data is committed” (#829), “Snapshot WebTransport TLS exporter label and context bytes” (#821), “Serialize WebTransport datagram send passes for each writable” (#819), and jan-ivar’s “Don’t create incoming streams after cleanup” (#818), “Validate options.headers next to protocols in constructor” (#817), and “Add WebTransport datagram concept” (#816). None of them have moved.

ChromeStatus shows zero feature entries updated in the last 24 hours. The twenty-five WebTransport-related features are all in the same state they were in when the previous post went out.

Direct Sockets was skipped this run — per the standing rule, the Chrome/Chromium Direct Sockets scan runs weekly on Mondays, and today is Thursday. The WICG/direct-sockets specification repository has not been touched since July 10 (a75fe71 — “sending udp to multicast address requires permission policy”). For the record, the last Direct Sockets activity in Chromium that this blog has tracked was the TCPServerSocket private-network-enforcement gap reported as issue 518397189, which Google closed as a duplicate of 495799116 on September 8.

Other Chromium activity in the same window included two WebCodecs commits worth a mention: b3919888f4 (“Handle kSampleFormatS24 in WebCodecs AudioData::copyTo()”, fixing a NOTREACHED() renderer crash when 24-bit PCM from FFmpeg or Symphonia hit RemovePlanar()) and 7d7651ed66 adding fuzz coverage for it. And 5dcedee8fa (“[Clipboard] Restrict ClipboardHostImpl::ReadFiles to kCopyPaste buffer”) closed a real gap: on Linux/X11, a renderer with transient user activation could call ClipboardHost::ReadFiles(kSelection) and obtain GrantReadFile() permissions even though selection paste is plain-text only. Both are relevant to webadb’s clipboard panel — the clipboard panel is exactly the kind of feature that would be interested in the selection buffer — but neither is the subject of this post.

What this means for webadb.online

No immediate code change. webadb’s current browser-side transports are WebUSB and Direct Sockets, neither of which is QUIC-based, so none of these commits change behaviour in the app today.

But the architecture is now pinned down in detail. The three commits — 873a1c2e47f9 (GOAWAY becomes retryable for fetch), c0314b99894d (WebTransport stream creation can fail cleanly), and 4b9a3a8ae7 (getStats() enabled in stable, shipping in Chrome 160) — together specify the contract a future WebTransport-based ADB transport would sit on: clean rejection on a draining connection, no automatic retry, and a stats API that survives the connection’s death.

The concrete takeaway for the ADB layer is the OPEN-to-OKAY correspondence. When webadb’s network transport eventually rides on WebTransport, every ADB OPEN maps onto a QUIC stream creation, and c0314b99894d is precisely the commit that guarantees the browser will tell the application when that creation failed instead of leaving it hanging on a promise that never settles. The crbug.com/40114825 TODO — wait rather than reject when the stream limit is temporarily exhausted — is the one piece of that contract still unimplemented, and it is the piece that matters most for a multiplexed protocol like ADB.

And the stats API is worth watching because it is the only mechanism that lets a browser client explain a network failure to a user in concrete terms. When a wireless ADB session drops, “the connection was lost” is a shrug; “smoothedRtt was 380 ms and estimatedSendRate had collapsed to 4 kb/s before the disconnect” is a diagnosis. Chrome 160 gives webadb the raw data for that — in a release that reaches stable on December 8, with early stable following on December 9.


Sources for this post: Chromium commit c0314b99894d8b9485bf9e69948c2c99eadcf1ae (bug 588512371), commit 873a1c2e47f99d1b791d84e97ccad57a35c9e579 (bug 584808449), commit 4b9a3a8ae7ff0b… (bug 573538454), commit eda00213037496… (bug 577073049), the w3c/webtransport specification at 51e7fdb, the Chrome 160 release notes on chromestatus.com, and the Chrome Platform Status API’s channel schedule.

How webadb.online turns your browser tab into an ADB client

Open webadb.online in Chrome, hit Connect device, pick your phone in
the picker, and a seconds later a >_ shell is running in your browser —
no driver install, no daemon, no native binary. There is no server in the
loop. USB traffic never leaves your machine. This post walks through how
that actually works, end to end: from the moment Chrome renders the
device picker to the moment shell.exec("ls") returns text in your
terminal pane.

The three actors

The whole stack has three components that need to agree on a wire
protocol:

Component Runs in Talks to
Chromium browser your machine Android device via USB
webadb.online a Cloudflare Pages static bundle Chromium (your tab)
ya-webadb bundled in webadb.online (@yume-chan/adb, @yume-chan/adb-daemon-webusb) Chromium → device

ya-webadb is the TypeScript ADB implementation that makes the browser
side possible. It reimplements the ADB protocol on top of a
UsbConnectionInterface that you wire up — for web, that’s the
WebUSB-backed WebUsbDaemonConnection from the -webusb companion
package. We don’t fork ya-webadb; we just import it and feed it the
device the user picked.

Step 1 — the device picker

The whole flow starts with a single line in lib/use-connect-actions.ts:

1
const device = await AdbDaemonWebUsbDeviceManager.requestDevice();

That call hands control to Chrome, which renders the native USB device
picker (anchored to the top-left of the page on macOS, top-center on
Windows). Chrome reads every USB device the host kernel knows about,
filters the ones exposing the ADB interface (vendor 0x18d1 /
0x04e8 / 0x12d1 / …), and shows just those.

Once you pick one, Chrome returns a USBDevice handle. Your
browser tab, not webadb.online, owns that handle.
From this point on,
no other browser tab and no host-side adb daemon can talk to the
phone — the kernel driver is bound to whichever process opened the
device. If you try adb devices on the host while a webadb.online
session is live, you’ll see no devices. This isn’t a bug, it’s how USB
works.

USBDevice is then passed to WebUsbDaemonConnection, which builds
the ADB daemon transport around it.

Step 2 — the ADB handshake

ADB is a length-prefixed binary protocol over a bulk USB endpoint.
Every “connection” is a stream of framed packets; each packet has a
24-byte header (command, arg0, arg1, payload length, magic, checksum)
followed by a payload. ADB version, max payload, banner, etc. are
exchanged in plain ASCII during OPEN.

ya-webadb implements the entire protocol in pure TypeScript. Its
AdbDaemonConnection consumes the framed stream from WebUSB, dispatches
by command, and gives you back Adb objects that wrap sync / async /
shell / file services.

Our lib/adb-client.ts is a thin wrapper around that. It owns:

  • the Adb object (one per session)
  • a disposers array so the React effect cleanup can call .close()
    on the connection when the user disconnects
  • a tiny event bus that the React layer subscribes to

The Adb object itself exposes typed services — AdbSync, AdbShell,
AdbFile, AdbReverse, AdbForward, AdbTcp, AdbPower —
that’s every subsystem the panels use.

Step 3 — auth (the RSA fingerprint dance)

ADB requires an RSA keypair to authenticate the host. The browser
generates one with crypto.subtle.generateKey on first connect; it
persists in IndexedDB (the webadb-online:credentials database).
Every subsequent connection uses the same key.

On the phone, the first time you connect with a new host key, Android
pops a system dialog asking you to confirm the fingerprint of the host
key. The user’s “Always allow from this computer” check permanently
trusts the key. After that, the browser-side auth is invisible.

This is the part people hit most often. If you tapped Cancel once
and now the panel says “device unauthorized”, the fix is to revoke the
authorization from Developer Options on the phone (USB debugging
settings → Revoke authorizations → re-plug). The browser-side key
stays the same, so you don’t have to re-grant every app — just once
per device.

Step 4 — per-service plumbing

Once Adb.authenticate() returns, the panels open connections to
specific services:

1
2
// from lib/screencast/pipeline.ts
const stream = await adb.shell.raw(`screenrecord ...`);

ADB services are addressed by name. shell:v2:raw:command opens a
shell subprocess. sync: opens the file service (used by File
Manager, APK install). shell:exec:command runs a one-shot exec
without a PTY. Each of these has its own framing — some are
length-prefixed streams, some are bidi, some have their own handshake.

ya-webadb models each service as a class. When a panel calls
adb.shell.raw("..."), ya-webadb:

  1. Opens a new USB bulk endpoint pair (in/out).
  2. Sends OPEN(1, "shell:v2:raw:screenrecord ...") to the daemon.
  3. The daemon forks the subprocess and pipes its stdout to the bulk
    in endpoint of the new connection.
  4. Returns a ReadableStream<Uint8Array> that yields the subprocess
    output as it’s produced.

Step 5 — streaming binary data (the screencast case)

Screencast is the gnarliest user of the protocol because it streams
megabytes per second through a 16-MB-payload USB endpoint, where each
MP4 chunk is its own complete ISO BMFF file. We use shell:v2:raw
specifically because the default shell:exec: protocol caps payloads
at the device-side MAX_PAYLOAD from OPEN (usually 256 KB on modern
phones). The :raw variant skips that aggregation layer and gives us
the raw fd, which is what screenrecord --output - would write to —
except HyperOS won’t let screenrecord write to stdout, so we use the
file-mode trick (writing to /sdcard/webadb-screencast.mp4 and polling
the file via a separate stat / dd shell command — see the
screencast deep-dive for why this works and what edge cases we hit).

Step 6 — disconnect

webadb.online only holds the USB device for the lifetime of the tab.
When you close the tab, hit Disconnect in the top bar, or refresh,
the cleanup effect in use-connect-actions.ts calls adb.close()
which:

  1. Sends CLOSE on every open service.
  2. Calls USBDevice.close() on the WebUSB handle.
  3. Releases the kernel driver back to the host (so adb devices on
    the host works again).

The browser may also revoke the persisted device permission, depending
on the version of Chrome. To re-grant, you click Connect device
again — the picker remembers the last device, so it’s one click, not a
fresh flow.

What this means for the security model

Three properties worth calling out:

  1. Zero server trust. The static bundle never talks to anything
    other than your USB device. The Cloudflare Pages origin only serves
    files. There’s no analytics endpoint, no session server, no debug
    ping. GA4 is loaded with anonymize_ip and respects
    prefers-reduced-motion so it doesn’t change behavior in
    privacy-sensitive contexts.

  2. The USB device grant is the security boundary. WebUSB grants
    are per-origin (scheme + host + port). A different origin can’t
    reuse your grant. That’s why we don’t embed a third-party iframe
    for the ADB handshake even when the temptation is real (CDN
    debugging, support tooling).

  3. The persistent key is local. Your ADB host key is in
    IndexedDB under the webadb.online origin. If you clear site data
    the next connection will produce a new key and the phone will ask
    you to authorize again. There’s no way to “back up” the key
    across browsers; that’s intentional.

What’s in the queue

The deeper-cut topics we’ll cover in separate posts:

  • the moov-at-end / rotating-recorder design in the screencast panel,
    and why we can’t just rely on screenrecord - stdout on modern
    Android
  • cross-origin isolation (COEP require-corp + COOP) and the exact
    sequence of headers that lets us use MediaSource,
    SharedArrayBuffer, and WebUSB in the same page without breaking
    GA4
  • the roadmap: audio capture, app deep links, Scrcpy-level touch
    emulation, and a real installer
  • the macOS Big Sur window chrome — why we did it, what the
    accessibility trade-offs are, and how the dock persists state

If you want to peek at the protocol itself, @yume-chan/adb ships a
debugging dump mode that logs every frame to the console — useful
when you’re trying to figure out what cp -r is doing under the hood.

Inside the webadb screencast panel — streaming a device screen via MSE + fMP4

The screencast panel is the only place on webadb.online where bytes
flow from the device into the browser at the speed of a small video
stream. Everything else — terminal output, logcat, file uploads — is
small text. The screencast pipeline is a few hundred lines of code
that has to deal with three things that are not in any textbook:

  1. screenrecord writes the moov box only at end-of-recording —
    the device-side file is half-finished at every moment during the
    recording. ISO BMFF init segments aren’t optional.
  2. screenrecord - (stdout mode) is broken on HyperOS — the
    kernel returns “Read-only filesystem” when screenrecord tries to
    open stdout. So we have to use the file mode and poll a path on
    /sdcard.
  3. The 4-GB size limit on 32-bit box headers — Xiaomi’s
    screenrecord uses 64-bit largesize boxes for the mdat, which
    need BigInt parsing on the JavaScript side.

This post is the writeup of the design that finally shipped — commit
b8fcb37 on main, after four false starts.

The naive plan (what doesn’t work)

The most straightforward screencast implementation is:

1
2
3
4
const stream = await adb.shell.raw("screenrecord - --time-limit 5");
const chunks: Uint8Array[] = [];
for await (const chunk of stream) chunks.push(chunk);
// stitch chunks, mux into fMP4, appendBuffer to MediaSource

The muxing step is the part mp4-muxer does for you. You push H.264
NALs in, you get fMP4 init + media segments out, you append them to a
SourceBuffer and video.src = MediaSource plays it. This is the
shape of the implementation most scrcpy-web clones use.

Two problems:

  1. screenrecord - fails on Xiaomi / HyperOS / API 36. It writes
    to stdout, then the kernel refuses because stdout isn’t a regular
    file on Android. You get error: cannot open 'w-': Read-only filesystem. You can verify this on your phone with
    adb shell "screenrecord - /sdcard/foo.mp4" — same error.

  2. Even where stdout works, the moov box lives in screenrecord’s
    internal buffer until end-of-recording.
    If you mux from raw
    NALs yourself you don’t need moov (you build your own init
    segment with SPS/PPS extracted from the first IDR). But every
    short-lived recording of 3 seconds means 3 seconds of
    dead video at the start — the mux needs an IDR to extract
    SPS/PPS, and screenrecord emits an IDR every couple of seconds,
    so you usually wait ~2 seconds before the first frame paints.

    The dead-video problem is also why trying to do the obvious
    thing — pipe screenrecord stdout straight into your muxer —
    gives you a panel where the video is permanently ~3 seconds
    behind real time.

What we landed on

Use screenrecord in file mode, then poll the file from a
second adb shell command. Use screenrecord’s own ftyp + moov
boxes verbatim (no custom muxing) and stream them to MediaSource.

This works because screenrecord writes complete, self-contained MP4
files. Every file has ftyp at offset 0, mdat in the middle, and moov
at the end. The moov contains the avcC box which has the SPS/PPS.
The mdat contains only H.264 NALs (no SPS/PPS — those are in avcC).
This is verifiable by pulling a finished recording off the device
and running ffprobe:

1
2
3
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'r3.mp4':
Duration: 00:00:04.96, bitrate: 1185 kb/s
Stream #0:0: Video: h264 (High), 480x1072, 1185 kb/s, 30 fps

…and parsing the mdat’s first NALs with a custom walker that
classifies each by NAL type byte: you see [5, 1, 5, 1] (IDR +
non-IDR) but never a 7 (SPS) or 8 (PPS).

So: device gives us a self-contained MP4; we ship it verbatim to
MSE.

But we have the live-streaming problem — screenrecord takes the full
--time-limit to write moov, and we don’t want to wait 3 seconds
with a black screen.

Rotating short recordings

The fix is rotating recordings:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const CHUNK_SECONDS = 3;
while (!stopRequested) {
await shell.spawn(["rm", "-f", STREAM_PATH]).wait();
const proc = await shell.spawn([
"screenrecord",
"--size", `${w}x${h}`,
"--bit-rate", String(bitrate),
"--time-limit", String(CHUNK_SECONDS),
STREAM_PATH,
]);
// Auto-kill in case screenrecord ignores --time-limit on weird ROMs.
setTimeout(() => proc.kill(), (CHUNK_SECONDS + 1) * 1000);
await sleep(CHUNK_ROTATION_SECONDS * 1000); // CHUNK_SECONDS + 2
proc.kill(); // forces moov flush
await sleep(500);
}

Each iteration produces a complete MP4 file with its own moov. We
use the first chunk’s ftyp + moov as the init segment for the
entire MSE session. Subsequent chunks’ mdat content gets appended
as media segments — their ftyp and moov are discarded.

Why this works:

  • screenrecord uses the same encoder config across runs (same
    resolution, same bitrate, same frame rate), so the SPS/PPS in
    every chunk’s avcC are identical to the first chunk’s.
  • MSE remembers the init segment’s stsd/stts/stsc/stsz/stco tables
    and uses them to interpret subsequent media samples. As long as
    the new mdat bytes correspond to those tables, MSE is happy.

There’s a brief gap between chunks — the kill / rm / re-spawn takes
~500 ms during which the file is empty. The MediaSource stays open
and the buffered video keeps playing back during that gap. The
user sees a brief stutter every ~5 seconds, which is much better
than 3 seconds of black screen at start.

Polling a growing file (the part that took longest)

The naive “poll the device-side file” function does this:

1
2
3
4
// WRONG — DO NOT USE
const stream = await shell.spawn([
"tail", "-c", `+${offset + 1}`, STREAM_PATH,
]);

That looks correct but blocks forever when screenrecord is
actively writing to the file. tail -c +N reads from offset N to
EOF and only terminates on EOF — for a file with an open writer,
EOF never comes, so the process never exits, so
ya-webadb‘s shell.spawn().wait() (which awaits
process.exited) never resolves.

The CDP-attached trace that surfaced this is on file in the
screencast saga — [screencast] screenrecord chunk started was
logged, then zero poll lines, even after 20 seconds. The shell
subprocess was just hanging.

Three iterations to fix:

Attempt What we tried Why it failed
tail -c +N Standard incremental tail Blocks on never-EOF writer
wc -c < file One-shot, returns on EOF Same problem — wc also reads to EOF
dd if=… skip=… count= Read N bytes only count cap was missing initially

The actual working implementation uses two shells in sequence:

1
2
3
4
5
6
7
8
9
10
11
12
13
// size probe — stat() is a syscall, never reads content
const size = await shell.spawn(["stat", "-c", "%s", STREAM_PATH])
.wait().toString();

// bounded read — dd exits after reading `count` bytes
const bytes = await shell.spawn([
"dd", `if=${STREAM_PATH}`,
"bs=1", `skip=${offset}`, `count=${want}`,
]).then(p => {
// pipe stdout through ReadableStream
const reader = (p.stdout as ReadableStream).getReader();
// … collect chunks
});

stat -c %s returns the current file size immediately even if
screenrecord is mid-write — the kernel tracks size on every
write(2) call regardless of whether the process has called
fdatasync(2). And dd exits the moment it’s read count bytes,
which terminates the shell subprocess and resolves .wait().

The 8-MB per-poll cap on want keeps each shell transfer
bounded — if we fall way behind for some reason we never drain
megabytes through a single shell call.

The BigInt detour

The mdat box in screenrecord’s output is huge (hundreds of MB for
a 30-min recording). When the file size crosses 4 GB the box
header switches from a 32-bit size to a 64-bit largesize with a
length-1 sentinel at offset 0–3 and the real size at offset 8–15.

JS Number only has 53-bit mantissa precision. Reading the largesize
as hi * 2^32 + lo silently rounds once hi > 1, which gives you
garbage. CDP traces showed mdat(4557430888798830600 @24) — the
4557430888798830600 is 0x3f3f3f3f3f3f4008, which is actually
uninitialized kernel page bytes (the file was allocated but the
content hadn’t been written yet, so the largesize field reads as
sparse placeholder bytes). Even after the field is properly
initialized, the JS rounding still corrupts large values.

Fix:

1
2
3
4
5
6
7
const big = new DataView(
bytes.buffer, bytes.byteOffset + off + 8, 8
).getBigUint64(0, false);
const MAX = BigInt(Number.MAX_SAFE_INTEGER);
const totalSize = big > MAX
? Number.MAX_SAFE_INTEGER
: Number(big);

The clamp to Number.MAX_SAFE_INTEGER is only a safety net —
no real recording on a phone will hit 8 PB. In practice the BigInt
read gives us the correct size every time.

Walkers, not magic numbers

The mp4 box walker used to be a single-purpose findMdatOffset()
function that returned one offset. As soon as we needed to find
ftyp, moov, and mdat in one pass it became a one-shot walker
that records every top-level box it sees:

1
2
3
4
const walkTopBoxes = (bytes: Uint8Array): Array<{
type: string; headerOffset: number;
contentOffset: number; contentLength: number;
}> | null => { /* … */ }

A generic walker is more code but it’s easier to reason about and
easier to add a new box type to (which we did a few times —
adding ftyp capture for the first chunk’s ftyp box so the init
segment uses screenrecord’s exact ftyp verbatim, including the
right brand string and minor version).

The init / media dispatch

The dispatch logic is the part of the pipeline most likely to
silently misroute bytes:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const boxes = walkTopBoxes(bytes);
let newFtyp: Uint8Array | null = null;
let newMdatContent: Uint8Array | null = null;
let newMoov: Uint8Array | null = null;
for (const box of boxes) {
if (box.type === "ftyp" && !ftypBytes) newFtyp = bytes.slice(...);
else if (box.type === "mdat") newMdatContent = bytes.slice(...);
else if (box.type === "moov") newMoov = bytes.slice(...);
}

if (newFtyp) ftypBytes = newFtyp;
if (newMdatContent) pendingMdatContent.push(newMdatContent);

if (newMoov && !initSegmentSent) {
// First moov arrives — send init, then flush pending mdat
initSegmentSent = true;
await sourceOpenPromise;
const codec = extractAvcCodec(bytes, newMoov);
const sb = mediaSource.addSourceBuffer(codec);
await sb.appendBufferAsync(concat(ftypBytes, newMoov));
await sb.appendBufferAsync(concat(...pendingMdatContent));
pendingMdatContent = [];
} else if (initSegmentSent && newMdatContent) {
// Subsequent chunks — just append new mdat content
await sourceBuffer.appendBufferAsync(newMdatContent);
}

Three branches, all named: buffer-only (no moov yet),
first-flush (init + buffered mdat), streaming (subsequent
mdat). The initSegmentSent flag is the line that separates
“we’re buffering” from “we’re streaming”.

What would change for audio

screenrecord v3 on AOSP can capture mic audio with
--audio-source MIC, but Xiaomi/HyperOS strips that flag. We
don’t have an audio path yet. The cleanest fix when it ships is
to mux the audio track into the same fMP4 init segment — the
codec extraction in extractAvcCodec becomes
extractAvcAndAudioCodecs returning video/mp4; codecs="avc1.X, mp4a.40.2" and the rest of the pipeline is unchanged. Pulled
into a separate post when we have hardware that supports it.

Where to look in the code

  • lib/screencast/pipeline.ts — the whole pipeline (~700 lines)
  • lib/screencast/types.ts — the codec + progress message types
  • components/ScreencastPanel.tsx — the React panel that owns
    the video element and dispatches start/stop

A future post will dive into the cross-origin isolation setup
(COEP / COOP / CORP) that makes MediaSource and
SharedArrayBuffer available without breaking GA4 — that’s a
whole separate can of worms.

webadb.online roadmap — what's next, what's blocked, what we need

This is the post I’d want to read if I were considering using
webadb.online for something serious and wanted to know what’s
actually in the queue. Concrete features, ordered by where they
are in the development cycle, with the blockers called out.

We’re at v0.1.0, with twelve panels and ~5k LOC of TypeScript.
Things that work, work well — the screencast saga is the
long-running one and even that has stabilized. The notes below
are about the gaps.

Now (the next 6 weeks)

Screencast audio

screenrecord --audio-source MIC works on AOSP but Xiaomi /
HyperOS strips the flag. We’ve confirmed via adb shell screenrecord --help that the option is silently dropped before
the binary starts, so we can’t even pass it through. The two
paths forward:

  1. Capture audio on the device via a different route (e.g. a
    tiny helper app we side-load) and mux it into the fMP4 init
    segment at the browser side.
  2. Wait for Xiaomi to ship unstripped screenrecord.

The fMP4 muxing is already in the design — extractAvcCodec
becomes extractAvcAndAudioCodecs and the
addSourceBuffer(codecs) call gets the combined codec string
(video/mp4; codecs="avc1.X,mp4a.40.2"). Maybe 40 lines of
change once we have a source.

Clipboard panel for bidirectional text + image

Today the clipboard panel reads text from the device clipboard.
Bidirectional text works via the cmd clipboard set-text
service. Images don’t work because the device-side clipboard
service only carries text; images on Android are stored
per-app, not in a system-wide clipboard, until Android 14’s
“default clipboard” opt-in lands.

Scrcpy-level touch

The screencast panel currently has no input — it’s strictly
view-only. Touch is the obvious next addition. The
implementation route is adb shell input touchscreen tap x y,
which is on-device latency of 100–200 ms. Scrcpy does better
with a custom InputManager service but that’s not accessible
without root.

For mouse: same primitive, different event type (tap vs
swipe). We can ship click + drag + scroll with no
architectural change. The harder half is multi-touch (pinch
to zoom) which needs input touchscreen calls in a specific
sequence with a tight timing budget.

Recursive filename search with a regex, plus content grep on
text files (capped at ~10MB per file so we don’t blow the
device’s RAM). The wiring is there — AdbSync.read() streams
chunks — we just haven’t built the UI for it.

Next (6–16 weeks)

Multi-device switching

Today the topbar shows one device. If you have two phones
plugged in via a hub, you connect to one, then disconnect,
then connect to the other. There’s no parallel-session model.
Adding it would mean:

  • An AdbConnection[] instead of Adb | null in the React
    store.
  • Each panel takes a deviceId prop and looks up the right
    connection.
  • The screencast pipeline is the gnarliest port — its
    spawn / kill / file-poll loop has to be per-device.

We’d want this for power users. It’s not in the queue for the
first six weeks because it’s the kind of feature that
needs careful state-management work to avoid cross-device
pollution.

adb shell am start -W -a android.intent.action.VIEW -d URI
will deep-link into an installed app. Adding a panel that lets
you bookmark a list of deep links (per app) and fire them with
a click is two days of work. Useful for QA, useful for
presentations.

Persistent host key backup / restore

The browser’s ADB keypair lives in IndexedDB. There’s no way
to export it. Adding an export-to-PEM button is maybe 50 lines.
Restoring from PEM is another 50. Both useful for people who
have multiple browsers and want to skip the phone’s “Allow USB
debugging?” dialog when they switch.

Later (next 6+ months)

Installer / launcher

A package that bundles webadb.online with the ability to detect
when the user has Chrome installed and one-click register a
chrome://webadb/ shortcut. Outside the scope of a Cloudflare
Pages static bundle, but doable as a small Electron or
Tauri-style binary that wraps the same bundle.

WebRTC tunneling for low-latency screencast

adb reverse is fine for shell and other bidirectional
streams, but the screencast path polls a file on the device.
A WebRTC bridge would let us send H.264 over a peer connection
to the browser and skip the polling round trip entirely.
Latency drop: ~150ms. Effort: large — needs a small native
helper on the device that owns the encoder.

Account sync

Multi-device workflow needs an opt-in account layer to sync
saved layouts, app shortcuts, the persistent ADB key, and the
last device used. The data is small enough to fit in any
cloud provider; we’d never see the content of your shell
sessions, only metadata.

We’re deliberately not building this until there’s actual
demand. Account systems are expensive to design well and easy
to design badly.

What’s blocked (and why)

Wireless ADB out of the box

The Wi-Fi ADB panel exists and works for devices that
already have wireless debugging enabled. We can’t toggle
wireless debugging on by default because the API to do so
(adb shell settings put global adb_wifi_enabled 1) is gated
behind either root or a specific permission that Xiaomi doesn’t
grant over USB. This isn’t a web limit — it’s an Android one.

Multi-touch input

As noted under Scrcpy-level touch — needs InputManager service
which needs root. There might be a way with vendor-specific
utilities (Xiaomi has cmd input extensions) but we haven’t
checked every ROM variant. Will dig into it once a Xiaomi
engineering contact surfaces.

adb backup / adb restore

Backup is a 4-year-deprecated shell protocol that Google
keeps around but won’t fix. Most modern apps refuse to
participate (you have to opt-in via android:allowBackup="false"
which many devs do). The wire format is documented but the
end-to-end is broken enough that we’d be building a
compatibility shim. Not in the queue.

What we need from users

If you’re using webadb daily and want something done, the most
useful things you can do are:

  1. Report what device + OS combo you’re on when something
    doesn’t work. The screencast saga was unblocked by a single
    adb shell screenrecord --help output from a Xiaomi
    user.
  2. Open issues for actual blockers, not feature requests.
    “I want my layout to persist across sessions” we already
    built; “I want feature X” is on the roadmap. The first type
    of issue gets a fix in days, the second waits for someone
    to want it hard enough to build.
  3. Don’t ask for cloud sync. We won’t do it. If you want
    it, fork and build it. Sync systems are where privacy
    disasters happen and the security model of webadb
    specifically avoids server state.

Where to follow along

The release notes go in this blog (you’ll see them tagged
release-notes). The detailed engineering writeups are
tagged deep-dive. The roadmap itself is just this post,
updated quarterly.

If you’ve read this far, the next post in the series is
The macOS Big Sur chrome — how the window manager, the
dock, the draggable + maximizable desktop windows, and the
state persistence work, and why we picked that aesthetic
over a more “PWA-y” mobile-shell look.

How to use webadb.online

A quick walkthrough of the seven things you’ll actually use webadb.online
for: pairing the device, dropping into an interactive shell, moving files
around, browsing images, managing installed apps, watching CPU and
memory, and the smaller utilities (text editor, APK install, Wi-Fi ADB)
that round out the dock.

1. Connect your device

Open https://webadb.online in a desktop Chromium
browser — Chrome, Edge, or Opera. WebUSB isn’t available on Safari or
mobile, and Firefox needs the deprecated native-flag workaround, so
stick to one of the three.

Hit the big Connect device button. The browser opens a device picker
— usually anchored to the top-left of the window — listing every USB
device you’ve granted permission to before. Pick your phone.

On the phone, accept the “Allow USB debugging?” prompt that pops up
the first time you plug in (Settings → Developer options → USB
debugging must be enabled). Tick “Always allow from this computer” if
you don’t want to confirm every session.

You’ll land on the desktop — a top bar, a dock at the bottom, and a
workspace in the middle. The Shell window opens by default. From here
on, every session picks up where the previous one left off (the
workspace layout and your pinned items are stored in localStorage,
not on a server).

2. ADB shell

The shell dock icon is the first thing you’ll see. It’s a real PTY:
arrow keys work, Ctrl+C interrupts, the window resizes with the
column-count environment variable, and ANSI colors pass through
verbatim — so ls --color=auto, vim, top, and any tool that uses
24-bit escapes render correctly.

Three things to know:

  • Saved commands. Sidebar shortcuts (commands, scripts, binary
    files you’ve uploaded) persist across sessions in localStorage.
    Switching machines or browsers resets them — there is no cloud sync,
    by design, because the ADB session itself doesn’t go through any
    server.
  • No streaming on shared devices. If you’re using a lab phone, the
    shell can be observed by anyone who reconnects with the same RSA
    key — revoke the key from Developer options when you’re done.
  • adb root requires userdebug build. su won’t help on stock
    builds; if you need root, flash a userdebug image or use
    Magisk/KernelSU and run su from inside the shell.

3. File Manager

Open the File Manager from the dock. It mirrors a desktop file browser:

  • Navigate by clicking folders; the path bar updates.
  • Double-click the path bar to type an absolute path. This is the
    only way to reach /data/local/tmp, /sdcard/Android/data/<pkg>/,
    and other paths you can’t step into one directory at a time.
  • Right-click (or the kebab menu) for Pin to sidebar — pinned
    folders stick across sessions and across reconnects.
  • Drag-and-drop a file onto the window to upload it.
  • Double-click text files to open them in the in-browser text editor;
    double-click images to open them in the image viewer.

4. Browse images

Open any image and the viewer pre-loads the rest of the folder, so
left/right arrow keys flip through the whole album without going back
to the directory listing. This is much faster than the Android gallery
app for triage — especially when you’re picking the one screenshot
out of forty that you actually wanted to upload.

Useful while testing:

  • Save writes to your Downloads folder with the original filename.
  • The viewer’s zoom follows the image’s intrinsic size; on
    wallpaper.png it respects the EXIF orientation flag (so portrait
    phone photos don’t show sideways on the desktop).

5. App Manager

The dock’s Apps icon lists every installed package with its launcher
icon (lazy-fetched from the APK — see the previous post
for why the row list uses a letter avatar). For each app you can:

  • Launch — am start -n <pkg>/<activity> for the resolved launcher.
  • Uninstall — pm uninstall <pkg>, with a confirmation dialog.
  • Force-stop / Clear data / Disable / Re-enable under the
    overflow menu.
  • Permissions — see every granted runtime permission, toggle them
    with the same prompts Android would show.
  • APK info — versionCode, install date, target SDK, signature
    scheme, native libraries — anything you’d otherwise need
    aapt2 dump badging for.

6. System Monitor

The dock’s chart icon opens a four-pane monitor modeled on GNOME’s
System Monitor:

  • CPU — per-core usage with sparklines (1s / 5s / 30s windows).
  • Memory — total / used / available / cached, plus a breakdown by
    category (Java heap, native, graphics, system) when the device
    exposes the right /proc files.
  • Network — per-interface sent/received, on both the cellular and
    Wi-Fi interfaces (when the device surfaces both).
  • Processes — sorted by CPU by default; click a column to sort by
    RSS, PID, or user. The list polls every two seconds.

It’s a faithful translation of top / vmstat into something you can
leave running in a corner while you do something else.

7. Other features

A few smaller dock icons round out the workspace:

  • Text Editor — opens any text file you click in the File
    Manager. Edits buffer locally and save pushes the whole file back
    over ADB; there’s no in-browser file watcher, so save and walk
    away rather than expecting live updates.
  • Install APK — drag an APK onto the workspace and confirm. When
    this fails (it does occasionally — mostly on packages signed with
    v2-only signatures that need pm install -t -r instead of the
    installer flow), the workaround is to push to /data/local/tmp/
    with the File Manager, then run pm install xxx.apk from the
    shell. Both paths end up at the same place on the device.
  • Screenshot — captures the foreground app and offers a download.
    Useful for grabbing an error dialog without unlocking the phone.
  • Wi-Fi ADB — enables adb tcpip 5555 and reports the device’s
    current LAN IP, so you can unplug and keep the session going over
    Wi-Fi. Pair this with a saved-sidebar shortcut to the disconnect
    command when you want to clean up afterwards.

That’s the full tour. If something’s missing from the dock that you
expected to see — Sockets? Reverse port-forwarding? — open an issue
on the GitHub repo and it’ll land in a future release.