import { useEffect, useRef, useState } from 'react';
import { useSearchParams } from 'react-router';
import { fileSource, openXapk, urlSource, type Xapk } from '../lib/xapk';
import { connectHeadset, installXapk, webUsbSupported, type Headset, type Progress } from '../lib/questInstall';
import { fileUrl, getDownloads, questBuild, type QuestBuild } from '../lib/downloads';
const fmtSize = (n: number) =>
n >= 1e9 ? `${(n / 1e9).toFixed(2)} GB` : n >= 1e6 ? `${(n / 1e6).toFixed(1)} MB` : `${Math.max(1, Math.round(n / 1e3))} KB`;
function Step({ n, title, done, children }: { n: number; title: string; done?: boolean; children: React.ReactNode }) {
return (
{done ? '✓' : n}
{title}
{children}
Installs the DorkNet Quest build straight from your browser: no SideQuest or command line. Your headset needs developer mode on (Meta Horizon phone app → your headset → Developer mode).
Install the latest build straight from this server: nothing to download first, it streams to the
headset during the install. Or pick a .xapk you already have.
Pick the DorkNet-….xapk you were given. It stays on your computer; nothing is uploaded.
Selected: {name} {xapk.manifest.version_name} · {fmtSize(totalSize)} · {xapk.source.name}
)}If it says the device is in use, close SideQuest / Meta Quest Developer Hub, or run adb kill-server.
Installs the app and copies the game data. The game data is large, so this takes a few minutes. Keep the cable in and the headset awake (wear it or cover the sensor above the nose).
{(['app', 'data', 'launch'] as const).map((k) => progress[k] &&The app installs alongside the Meta Store version of Rec Room and doesn't replace it. You'll need a DorkNet account to sign in.