Docs / For developers
Architecture
#Data flow for one game
- Source (
sources/quest_dump.py): folder with an APK and optional<package>/orobb/data; SideQuest backups and AXRB downloads are recognised, app bundles (.xapk/.apks/.apkm/.apkx, split APKs) are merged into one APK first (sources/bundles.py). - Analysis (
analysis/detect.py): package/label/version (pyaxmlparser), ABIs, engine, XR API, graphics API, direct-VrApi, GLAD/eglGetProcAddress, Unity MSAA levels, Meta permissions, telemetry references. - Recipe (
recommend/engine.py): every patch'sdetect()suggests itself with a reason; a catalog entry (exact known-good recipe) overrides heuristics. The UI shows toggles; the user confirms. - Build (
build.py): overport CLI (OVRPort; defaults + extras) → apk-stage patches inorderon anApkWorkspace→ apksigner (with the package's own keystore) → static validation. Optional alternate build (for example without Unreal ForceQuit). - Install (
install/installer.py+agent/frameport_agent.py):prepare(paths, what's already there) → SFTP uploads with resume →finalize(move into place, settings.conf/framebridge.conf, device files, launch.sh, deployment.json, artwork) →shortcuts(detached systemd unit stops Steam, writes shortcuts.vdf + grid art, restarts Steam). - Test (
validate/device.py): agentlaunch_test(systemd-run launch.sh, wait, stop) → fetch launch.log →triage.py(milestones + signatures → suggested patches) → UI offers "apply suggestions and rebuild". Real play sessions are triaged the same way afterwards (validate/session.py, game page "Last session").
#Extending
- New patch:
patches/frame/<name>.pywith aPatchsubclass (detect,apply, optionalvalidate), plus a signature incatalog/triage.yamland a PLAYBOOK row. Stages:overport|apk|install. - Upstream fixed a bug FramePort works around: register an
UpstreamFix(patches/upstream.py) in the workaround's module: a probe that finds the fix in OVRPort's output (True / False / None = can't tell). Each build runs the probes on the converted APK and leaves out the workarounds whose fix is there (log "not needed: …",build.superseded, left out of settings.conf at install; game page andframeport showsay so). The recipe keeps asking for the fix, so builds made with an older runtime keep the workaround.FRAMEPORT_KEEP_WORKAROUNDS=1turns the probes off. - New heuristic: put the rule in the patch's
detect()(andapplies()for visibility), with the evidence in the reason text; checkscripts/eval_heuristics.pystill reproduces the catalog and add a test intests/test_heuristics.py. - New game recipe:
catalog/games/<package>.yaml(or "Save as known-good" in the GUI, which writes to the user catalog). Installed apps fetchcatalog/games/from GitHubmainevery 6 hours (recommend/catalog.refresh_remote), so a merged recipe reaches users without a release;catalog/triage.yamlfollows the same way.FRAMEPORT_CATALOG_URLpoints the apps at another folder that servesindex.json+<package>.yamlinstead. - New target: implement
targets/base.Target; the pipeline and UI only use that interface.
#PC VR (Oculus Rift and SteamVR) games
sources/rift_dump finds Windows game folders (one game per folder); analysis/rift (own PE reader) ranks the
programs, detects bitness, engine, the VR APIs (LibOVR, OpenVR, OpenXR), D3D version and Oculus Platform SDK use; ids
are rift.<slug>. Their only patches are the pcvr category (patches/pcvr.py: Revive, OpenVR backend, crash
reporter, Oculus detection, OpenXR layer, launch arguments, Proton version/env); base.for_game keeps Quest and PC
VR patches apart. Repacks are usually pre-patched, so a game is installed unchanged and its program started
directly; Revive is only suggested for games with LibOVR code, and those run only on the PC (Revive's hooks don't
work under Proton on ARM64). "Build" = pipeline.prepare_rift (checks, plus Revive when the recipe has it). Revive
is a portable tool (tools/revive.py unpacks ReviveInstaller.exe in pure Python: NSIS header + deflate blocks).
Targets:
targets/pc_revive.PcReviveTarget: Windows/WSL (core/winhost.py), non-Steam shortcut (the game's program, orReviveInjector.exe [/openxr] <exe>; Revive's OpenVR backend by default) via the agent's VDF code, grid art, local records in<user data>/pc/.FrameLeptonTarget.install_pcvr→installer.install_pcvr→ agentprepare_pcvr/finalize_pcvr: uploadgame/(+revive/,xrlayer/forpcvr.xr_timefix,helpers/forpcvr.oculus_unreal; size-manifest dedupe, stale files removed),launch.shrunning the ARM64 Proton chain (built from toolmanifest.vdf; withpcvr.oculus_unrealthe program runs throughhelpers/fp_oculushmd.exe, which provides Unreal'sOculusHMDConnectedevent);proton_status/install_protonmanage Proton from Valve's ARM64 compat list.
#Linux apps and Windows programs
pipeline.add_linux_app (AppImage, archive or folder; library kind linux) and pipeline.add_windows_exe add
programs that are installed unchanged. The agent's finalize_linux unpacks them, writes the launcher (arm64 builds
directly, x86_64 builds through Valve's FEX), a Desktop Mode menu entry and, for SteamVR overlay apps, their
.vrmanifest registration; Windows programs run through Proton like PC VR games.
- Native binaries (
artifacts/): editnative/…, runpython native/build.py, commit the new artifacts + SHA256SUMS, runframeport parityto see which games change.
#Self-update (updates.py, ui/updater.py, cli.py update)
check(): GitHub releases/latest, cached 6 h →Update(version, notes = the release body incl. "What's new" from the annotated tag, the asset for this OS, sums, wheel).install_kind(): bundle = the running exe sits in FramePort.exe's folder / FramePort.app / FramePort/FramePort; source = a git checkout (git pull --ff-only+uv sync); wheel = uv tool / pipx / pip (reinstalls the release's wheel).prepare()(bundle):<data>/updates/<ver>/: download → SHA256SUMS.txt check → extract tostaged/(ditto on macOS) → layout check → on Windows the same Authenticode signer as the running exe →ready.json.apply(): writes<data>/updates/apply.{ps1,sh}and starts it detached; FramePort quits. The script waits for the pid. Windows: changes nothing while FramePort or a program file (.exe/.dll/.pyd) is still in use (waits 60 s), backs up the files it replaces (updates/<ver>/previous), moves the old version's files the new one doesn't have out of the bundle's own folders (app, Lib, DLLs, site-packages, data) intoprevioustoo, and copies over the folder (the zip has no folder of its own); a failure deletes the files the update added and restores the rest (GitHub #476: a rollback that kept the new version's added modules made the old version crash at start). Bundles carryframeport/_bundle_files.txt(written byscripts/package.py,core/bundle_files.py): at start the app deletes (or at least never imports) package files the list doesn't have and tells the user to reinstall when compiled modules don't match it — updates made by an older version's script still copy over without cleaning. macOS/Linux:mvtarget →.old, staged → target, rollback on failure, clears the quarantine. Then the script relaunches FramePort. Log:<data>/logs/update.log. GUI: background check 10 s after start + every 6 h → sidebar card + Library bar → dialog with notes → jobapp-update(waits for other jobs) → restart. "Install updates automatically": prepare in the background, apply inmain()before the window opens. CLI: once-a-day hint from the cached result (a daemon thread refreshes it),frameport update [--check] [--yes]. CI runsscripts/update_smoke.pyon every OS with the archive it just built.
#Dynamic data (fetched live, cached, bundled fallback)
overport CLI release (Android-XR-Bridge/OVRPort, fallback ovrport/app) + patch list + titles, Temurin JRE (Adoptium
API), apksigner (Google repository index), Cpp2IL and APKEditor (GitHub releases, on first use), store artwork,
titles and details (overport image API, OculusDB, Steam; by exact name SideQuest and, with the user's own API key,
SteamGridDB when the Meta services are down), catalog recipes and triage signatures (GitHub main),
announcements, Lepton location/appid (Frame appmanifests), Steam user (Frame userdata).
#Built on
FramePort is a front end for other projects; most of the functionality comes from them:
| Project | Used for |
|---|---|
| OVRPort (overport, originally ovrport/app) | Converts Quest games to OpenXR: its CLI applies the game patches and supplies the OpenXR loader; FramePort also includes its VrApi→OpenXR adapter |
| Valve Lepton, Proton and SteamVR | Run Android games, Windows games and OpenXR on the Frame |
| Revive (LibreVR) | Runs Oculus Rift games on OpenXR / SteamVR |
| Mesa (Zink) | OpenGL ES on Vulkan on the Frame |
| Khronos OpenXR SDK | OpenXR headers for the native layers |
| Eclipse Temurin, Android apksigner, Android NDK | Java runtime, APK signing, building the native layers |
| Flet | The desktop app |
| OculusDB, Steam store, SideQuest, SteamGridDB (optional, your own key) | Game descriptions, genres and artwork |
FramePort's own parts: game detection and recipes, the Steam Frame OpenXR adapter (FrameBridge) and the other native
patches in native/, the installer agent that runs on the Frame, and the desktop/command-line app.