WebUSB Browser Installer
The browser installer at headless-phone.funnyhat.club flashes official GitHub Releases or local build archives straight over WebUSB — no fastboot, zstd, debugfs, or simg2img installation required.
Browser Support
Section titled “Browser Support”| Browser | Mode | Capabilities |
|---|---|---|
Chrome, Edge, Brave (desktop, HTTPS or localhost) |
Full WebUSB Flasher | Connects directly to fastboot over USB, streams & verifies release images, injects cloud-init seed in WASM, and flashes the phone. |
| Firefox, Safari, or mobile browsers | Config & CLI Companion | Configure Wi-Fi, SSH keys, static IP, charge limits, and Frigate options in the UI, then download node.yaml / NoCloud seed files and copy exact tools/flash.py commands. |
Step-by-Step Installation
Section titled “Step-by-Step Installation”-
Boot the phone into fastboot mode
Power off or reboot the phone while holding Volume Down until the bootloader screen appears. Connect the phone to your computer with a USB-C data cable.
-
Open headless-phone.funnyhat.club and select your device & image source
Pick your device (e.g., Pixel 6 Pro
raven). Device profiles inweb/are auto-synced fromdevices/*/device.envso partition sizes,HAS_INIT_BOOT,BOOTCTRL_BACKEND, andBOOTCTRL_ALLOW_BOOTLOADERSalways match the repository.Choose either:
- GitHub Release (streamed through the same-origin Cloudflare Pages Functions proxy
/api/releases/*), or - Local archives (
headless-phone-boot-<device>.tar.zstanduserdata-<device>.simg.zst/.simg/.ext4from a local build).
- GitHub Release (streamed through the same-origin Cloudflare Pages Functions proxy
-
Configure first-boot settings (optional)
Leave customization off for a zero-config wired DHCP install (
pixel/headless), or enable Customize first-boot settings for Raspberry Pi Imager-style provisioning:- Identity & SSH: Custom hostname, timezone (auto-detected from browser), admin username (cannot be
root; lockspixelif changed), password, SSH public keys (RFC 4253 wire-blob validated in the browser), and opt-in Disable SSH password authentication. - Networking: Wi-Fi (
WPA2,WPA3, orOpen) with optional ISO-3166-1 alpha-2 regulatory country code, plus optional static IPv4 (wiredonen*/eth*orwifi) with gateway and DNS. - Battery Charge Limit Preset:
server-safe: 55%–70% (default)balanced: 60%–80%extended: 75%–90%custom: any integer pair with20 <= start < stop <= 100
- Optional Frigate NVR Bootstrap: Pre-configure internal camera selection (
wide,ultrawide,telephoto,rear,front— up to 2 concurrent streams) or external-RTSP-only mode, resolution, FPS, bitrate, and Edge TPU power state (0..7). Installs a non-blockingheadless-frigate-bootstrap.timer(OnBootSec=10s; becomingfrigate-bootstrap.timeronce the descriptive CLI rename deploys) pinned to a release tag/SHA and verified archive SHA-256.
- Identity & SSH: Custom hostname, timezone (auto-detected from browser), admin username (cannot be
-
Connect & run preflight checks
Click Connect device and select your Pixel in the browser USB picker. The installer queries bootloader variables without mutating anything:
- Verifies
productmatches the selected device,unlocked == yes,is-userspace != yes(bootloader fastboot, notfastbootd), andslot-count == 2. - Defaults to installing on the currently active slot whose
version-bootloaderwas just verified in fastboot (so installs don’t jump onto an unverified inactive slot); you can still manually pick the other slot if desired, in which case the installer warns that the inactive slot’s bootloader couldn’t be verified. - Checks active
version-bootloaderagainstBOOTCTRL_ALLOW_BOOTLOADERSand warns if the bootloader is untested or the device profile is experimental (BOOTCTRL_BACKEND="none"). - Predicts your fallback mDNS hostname locally (
<codename>-<last-6-of-serial>.local) — the serial never leaves your browser.
- Verifies
-
Flash and reboot
Review the partition plan and click Install. The installer:
- Streams and verifies SHA-256 against release
SHA256SUMS.txtand inner boot-bundle checksums before writing a single byte to the phone. - Decompresses Zstandard in WASM (
zstd-stream.wasm) into a per-session OPFS sparse store (~40–60 MiB peak RAM). - Injects
/var/lib/cloud/seed/nocloud/{meta-data,user-data,network-config}using upstreame2fsprogslibext2fscompiled to WebAssembly (ext4-seed.wasm), setting0700/0600root:rootpermissions and verifying byte-for-byte read-back (full install only). - Flashes a browser-generated 4 KiB empty AVB0
vbmeta(flags = 0x03, zero proprietary blobs) tovbmeta_<slot>by default (or patches a user-supplied stockvbmeta.img, or skips if overridden under Image options). - Flashes boot partitions (plus
userdataon a full install), activates the target slot only after every write returnsOKAY, verifiescurrent-slot, and reboots into Debian.
- Streams and verifies SHA-256 against release
Built-In Safety Guardrails
Section titled “Built-In Safety Guardrails”The WebUSB client enforces a strict partition and command allowlist in web/src/fastboot/guardrails.ts:
- Allowlisted flash targets only:
vbmeta_{a,b},boot_{a,b},init_boot_{a,b},vendor_boot_{a,b},dtbo_{a,b}, anduserdata. - Hard-refused critical partitions:
super,metadata,misc,devinfo,bootloader*,radio*,modem*,persist,efs*,pvmfw*,abl*,bl1/2/31,gsa,tzsw, unslottedvbmeta,vbmeta_system*, andvbmeta_vendor*. - Hard-refused commands:
erase,format,oem,flashing, andboot. Onlygetvar,download,flash,set_active,reboot, andreboot-bootloaderare permitted. - Fail-closed transport handling: Any mid-transfer USB timeout or error places the session in a terminal
uncertainstate and closes the USB handle, requiring a reconnect and fresh preflight before retrying.
Running the Web Installer Locally
Section titled “Running the Web Installer Locally”If you want to run or develop the WebUSB installer on localhost (which Chromium treats as a secure context for WebUSB):
cd webpnpm installpnpm run dev # Vite dev server at http://localhost:5173pnpm run dev:pages # Full Cloudflare Pages + /api/releases Functions via wrangler at http://localhost:8788To rebuild the deterministic ext4-seed.wasm (e2fsprogs 1.47.2) and zstd-stream.wasm (zstd 1.5.7) modules from pinned upstream sources on Linux/WSL:
bash web/wasm/build-wasm.shSee web/README.md for Cloudflare Pages deployment and Playwright/Vitest verification commands.