mirror of
https://github.com/spoopyghosty0/frameport.git
synced 2026-10-17 20:01:23 +02:00
Compare commits
38
Commits
gvr-detection
...
v1.2.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0eb7850fb | ||
|
|
eba92a2bf6 | ||
|
|
6423739ae6 | ||
|
|
9772b9a17f | ||
|
|
542e54882d | ||
|
|
d7810d28b7 | ||
|
|
8986aa7040 | ||
|
|
a1dd3bc7b6 | ||
|
|
2e1622c56b | ||
|
|
1d586d370b | ||
|
|
e439623baa | ||
|
|
6c82789a72 | ||
|
|
a294359a4e | ||
|
|
277dd99645 | ||
|
|
9cacc0eacc | ||
|
|
a8d56567c8 | ||
|
|
d9ddc85a93 | ||
|
|
74e5dd0d1b | ||
|
|
728a009f22 | ||
|
|
80cb20980e | ||
|
|
1321caabab | ||
|
|
0f964b8483 | ||
|
|
0775d32255 | ||
|
|
7f9373a48e | ||
|
|
ba1344263a | ||
|
|
441388873a | ||
|
|
04de05cff4 | ||
|
|
818814c693 | ||
|
|
4efccba8ea | ||
|
|
b487014d98 | ||
|
|
1d8e66c85f | ||
|
|
3434ce6c0e | ||
|
|
eedf6e4c06 | ||
|
|
3890676dcb | ||
|
|
d0dbbe32e5 | ||
|
|
6101314ce1 | ||
|
|
98ddfa7157 | ||
|
|
91bc6af2b7 |
No files matched your search
@@ -6,6 +6,7 @@ FramePort ports Meta Quest standalone APKs to the **Valve Steam Frame** (SteamOS
|
||||
install over SSH (agent) → Steam shortcut → headless launch test + log triage`.
|
||||
|
||||
Read `docs/PLAYBOOK.md` (symptom → fix) before debugging a game, and `docs/FRAME_RUNTIME.md` for runtime facts.
|
||||
Detailed device findings per game/issue: docs/DEVICE_NOTES.md (read before debugging a game).
|
||||
|
||||
## Layout
|
||||
- `src/frameport/` — Python package. `pipeline.py` is the API the CLI (`cli.py`) and GUI (`ui/`, Flet 1.0) share.
|
||||
@@ -123,8 +124,9 @@ Read `docs/PLAYBOOK.md` (symptom → fix) before debugging a game, and `docs/FRA
|
||||
`ft.AnimatedSwitcher` (`app._show_view`): a new route gets a new wrapper (150 ms fade), a same-route redraw swaps
|
||||
the wrapper's content (no animation; persistent views just remount); the wordmark's portal (`wordmark().data`)
|
||||
pulses once when frame_state turns "connected"; both off with setting `ui.reduce_motion` (Settings → Appearance
|
||||
"Reduce motion", `app.reduce_motion`). Settings has a fixed index column (`settings.SECTIONS` order, Appearance
|
||||
first, Remove FramePort last): entries scroll the section column via `scroll_to(scroll_key=…)` (sections wrapped
|
||||
"Reduce motion", `app.reduce_motion`). Settings has a fixed index column (`settings.SECTIONS` order: most users'
|
||||
needs first (Updates, which also holds game recipe + install-link updates, Installing, Library folders,
|
||||
Appearance), niche ones later (Install links, Tools, This PC), Remove FramePort last): entries scroll the section column via `scroll_to(scroll_key=…)` (sections wrapped
|
||||
in Containers with `ft.ScrollKey`), the header stays; `app.settings_view.show_section(key)` (ui_smoke
|
||||
`settings-index`).
|
||||
Help hints: wording for non-obvious terms lives in `ui/help.py` (`HELP`); show it with `C.help_icon(key)` or the
|
||||
@@ -138,6 +140,7 @@ Read `docs/PLAYBOOK.md` (symptom → fix) before debugging a game, and `docs/FRA
|
||||
uploads are interruptible (Cancel checked per MiB) and resumable (big files via SFTP `.part` append, small files
|
||||
streamed in tar batches; the agent counts files already in `incoming/`). Multi-select in the Library queues
|
||||
installs after asking every needed question up front. Failures end in one pop-up (Resume / Uninstall / log).
|
||||
- Library folders (GitHub discussion #351): `core/folders.py` (no Flet) owns setting `scan.roots` (remember/add/remove/status/rescan_roots; the origin-based fallback only while the setting was never set, so removing every folder doesn't guess them back), Settings → Library folders (`settings.library_folders`, status read via run_bg), CLI `frameport folders [--add/--remove/--json]` + `frameport rescan`. Scans relink moved games (`pipeline.ScanReport`: a library game found elsewhere whose own files are gone and the copy is the same build (Quest: source_sha256, else versionName; Rift: same program path + size from the fingerprint, matched by game id or, renamed, by program) → only paths change (`relink_quest`/`_relink_rift`), user fields/builds/installs stay; another version → Scan a folder… takes it via `replace_apk(found=)`/`replace_rift_game`, Rescan only reports it; the old copy still there → kept). `add_game` no longer overwrites a user recipe (refreshes `suggested` only). Linux apps aren't scanned. PC installs of a moved Rift game (Steam shortcut path) untested.
|
||||
- Other drives (GitHub #90, agent v63): anchors stay in ~/Applications/quest-frame, a game's files may live in
|
||||
`<mount>/FramePort/<pkg>` (`deployment.json` base). Agent `drives` (/proc/mounts, /run/media + Steam library
|
||||
drives; vfat/exfat/ntfs/read-only refused), prepare*/finalize_linux `dest` (unmounted = error, never a fallback;
|
||||
@@ -241,6 +244,14 @@ Rick and Morty runs on the Frame via its catalog recipe (OpenVR, no Revive),
|
||||
flask icon (SCIENCE_OUTLINED) so they aren't confused with Play.
|
||||
- `uninstall.py` + `frameport uninstall-app` + Settings: removes the data dir (after an optional key backup zip),
|
||||
PC Steam shortcuts, the WSL Revive copy, and via agent `purge` FramePort's games/files on the Frame.
|
||||
- Save backups (discussion #352, agent v95; docs/FRAME_RUNTIME.md "Save backups"): agent `_backup_saves`/
|
||||
`_restore_saves '<json>'` stream a tar.gz of `lepton-data/internal/<pkg>` + `external/Android/data/<pkg>` (caches,
|
||||
IL2CPP/shader caches, FrameBridge files, videos/OBBs, files >64 MiB left out; manifest `frameport-saves.json` last)
|
||||
over the exec channel, file work in `podman unshare` (`_saves_ns`), launch lock held, refused while running;
|
||||
restore = untrusted input (staged + checked first), rollback copy `<base>/saves-before-restore.tar.gz` (undo =
|
||||
`rollback: true`). PC `install/saves.py` (`<data>/save-backups/<pkg>/<ts>.tar.gz` + `.json`, keep `saves.keep`
|
||||
= 10), GUI `ui/views/saves_dialog.py` (game menu section "Saves", Frame page "Back up all saves", uninstall's
|
||||
"back up before deleting"), CLI `frameport saves backup|list|restore|undo`.
|
||||
- `patches/` — **the unit of modularity**. `base.py` (Patch interface, registry), `overport.py` (overport CLI patch ids,
|
||||
discovered dynamically via `overport patches`), `frame/*.py` (one module per Frame fix), `settings.py` (FrameBridge
|
||||
adapter keys + device files as patches). Add a patch = add a module that calls `register(...)`.
|
||||
@@ -349,45 +360,7 @@ Rick and Morty runs on the Frame via its catalog recipe (OpenVR, no Revive),
|
||||
`a32_bridge_on` turned the bridge on once in every 32-bit recipe, user ones too, unless the catalog's frame_remove
|
||||
names it).
|
||||
Analysis `extra.headset` (ANALYSIS_VERSION 15): gearvr / go / quest → "Gear VR" / "Oculus Go" platform + Steam tag.
|
||||
Catalog: `headset:` field; com.fallen.affected, net.mobilemischief.spunkydungeon, com.ccpgames.gunjack (works, 2026-10-12). Learned: Unity 2019 contexts
|
||||
have no EGLConfig (EGL_KHR_no_config_context: the VrApi bridge takes the window's or an RGBA8 ES3 config); Unity's
|
||||
floor origin = vrapi_SetTrackingSpace(1) (the VrApi bridge now honours LOCAL_FLOOR/STAGE); mapped GL buffers are
|
||||
per buffer object (a per-target guest copy leaked ~10 MB/s and garbled vertices); the guest runtime's own scudo
|
||||
names its maps `[anon:scudo:*]` below 4 GiB (watch them for guest leaks). The Go controller = the right Frame
|
||||
controller (stick = touchpad touch, sideways > 0.6 or press = click). Gunjack (CCP, UE 4.10 NativeActivity, Gear VR,
|
||||
2026-10-10): needed the native_app_glue imports (ALooper/AInputQueue/AConfiguration/AAsset*, imports.txt), an arm64
|
||||
libvrapi.so for Java's System.loadLibrary("vrapi") and MOUNTED under OVP_HEADLESS_TEST; it then loads its map and
|
||||
quit on purpose: AndroidMain compares AndroidThunkCpp_GetSignature() with an obfuscated copy. **Works since
|
||||
2026-10-11 (owner-verified in the headset):** GameActivity.AndroidThunkJava_GetSignature() = Base64.DEFAULT(SHA-1(
|
||||
signing certificate DER)) (jadx); `a32_bridge.original_signature` computes it from the original APK's
|
||||
META-INF/*.RSA|DSA|EC, `convert()` stores it as `assets/fp_a32_signature.txt` for libUE4.so games, the bridge loads
|
||||
it at activity creation (native_activity.c) and jni.c answers Call*Method on the method ID of
|
||||
`AndroidThunkJava_GetSignature()Ljava/lang/String;` with it. After loading, Unreal leaves VR mode and enters it again on
|
||||
the same GL context; a second OpenXR session there aborted in vrclient (CSharedSemaphoreLinux::WaitFromGPU from the GL
|
||||
binding's PreBeginFrame, also with OVP_HEADLESS_TEST) → the VrApi bridge keeps a running GLES session across
|
||||
LeaveVrMode and reuses it for an EnterVrMode with the same context (upstream-patches/runtime.cpp.patch).
|
||||
Debugging aids added: A32_BREAK=<guest addr>[,..] (stack of the first hits; guest libs load at fixed addresses, e.g.
|
||||
libUE4 0xf25d5000), A32_STRACE in bridge mode = path/exit calls to logcat, activity lifecycle + LeaveVrMode caller
|
||||
logs. Lepton's logcat mirror often dies for these games: read `podman exec <container> logcat` instead. Gunjack input
|
||||
(2026-10-11): it imports no vrapi input functions and reads the Gear VR touchpad/back as AInputEvents from its
|
||||
AInputQueue (native_app_glue), so dispatchKeyEvent never reached it (no control at all) → input.c queues synthetic
|
||||
events there (ALooper_poll* return the queue's ident while one waits; AInputQueue_getEvent/finishEvent and the
|
||||
AInputEvent/AKeyEvent/AMotionEvent getters are hand-written "!" imports that know them; touch positions scaled to the
|
||||
window size). Same mapping as AFFECTED: trigger = hold touchpad, A = tap, right stick = swipe, B = back; for NativeActivity games the stick's up/down = swipe forward/back (touchpad X: Gunjack's OnFlick = reload at ~0°, special weapon at ~180°). Not yet
|
||||
headset-verified. Quest builds on the bridge (2026-10-13, Sports Scramble = a 32-bit Santa Cruz build,
|
||||
UE 4.21 + OVRPlugin on VrApi 1.21): manifest requires `android.hardware.vr.headtracking` version 1
|
||||
(`detect.requires_6dof`, headset "quest", ANALYSIS_VERSION 16) → convert writes `assets/fp_a32_headset.txt`
|
||||
= "quest" → vrapi.c `quest_touch` (read in vrapi_Initialize via the activity's AssetManager; A32_TOUCH=1/0
|
||||
overrides) passes the 64-bit bridge's Touch controllers through (enumerate/caps/state/tracking/haptics, struct
|
||||
tails per VrApi minor) and starts no synthetic input. It also needed AAsset_getBuffer (guest copy, freed in
|
||||
AAsset_close), AKeyEvent_getFlags and the other AConfiguration getters. Headset (owner, 2026-10-13): plays,
|
||||
both controllers work. Recenter (holding the Frame's menu button) turned VrApi games ~90-120 degrees aside: the bridge's app space is LOCAL + the start yaw and the runtime moves LOCAL to the head → the bridge now takes the origin from the head again on XR_TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING (LOCAL) and on vrapi_RecenterPose (owner-verified with Gunjack, 2026-10-13). Next: the other 32-bit catalog games (Journey of the Gods, Shadow Point: still "unsupported" until
|
||||
tested), translator speed. Profiled on the Frame
|
||||
(2026-10-12, `A32_PERFMAP` + perf): FPCR switches are negligible (8 of 86k samples); the cost was the run loop
|
||||
(a mutex + hash-chain walk on every dispatch, a contended counter, inline-lookup slots never refilled: Gunjack
|
||||
~45 % of its CPU) and `jit_invalidate` scanning every block on each Mono `cacheflush` (72 % of Spunky Dungeon's
|
||||
main thread). Now lock-free lookups, ltab refill, per-thread flags, per-page block lists: Gunjack's dispatcher
|
||||
23.6 % -> 1.6 %, CPU in the same phase about -55 %, still 72 fps.
|
||||
Catalog: `headset:` field; com.fallen.affected, net.mobilemischief.spunkydungeon, com.ccpgames.gunjack (works, 2026-10-12). Per-game a32 findings (AFFECTED, Spunky Dungeon, Gunjack's signature check `fp_a32_signature.txt`, synthetic Gear VR input, Quest builds `fp_a32_headset.txt` / `quest_touch`, recenter, debugging aids `A32_BREAK` / `A32_STRACE` / `A32_PERFMAP`, translator profiling): docs/DEVICE_NOTES.md#a32-bridge-games-lessons-debugging-aids-profiling.
|
||||
- `scripts/` — `package.py` (flet build/pack), `eval_heuristics.py` (score heuristics), `ui_smoke.py` (GUI screenshots).
|
||||
- `docs/` — PLAYBOOK, FRAME_RUNTIME, ARCHITECTURE, INSTALL (end users), parity reports (offline + device).
|
||||
|
||||
@@ -475,6 +448,9 @@ Repo is on an NTFS drive (`core.fileMode=false`); line endings are LF (`.gitattr
|
||||
XR_KHR_composition_layer_equirect2/cylinder, XR_FB_composition_layer_image_layout (flip emulated by Vulkan blit).
|
||||
- `xrConvertTimespecTimeToTimeKHR`/`xrConvertTimeToTimespecTimeKHR` return FUNCTION_UNSUPPORTED → adapter emulates
|
||||
(offset = predictedDisplayTime − period − CLOCK_MONOTONIC, sampled in xrWaitFrame).
|
||||
- No XR_FB_display_refresh_rate (`xrGetDisplayRefreshRateFB` -7), yet OVRPort's dispatcher offers it and answered 0 Hz
|
||||
→ FrameBridge always answers with the measured rate (1/predictedDisplayPeriod, else 72). PreyVR (#306, idTech 4:
|
||||
`USERCMD_MSEC = 1000 / GetRefresh()`) had 0 ms tics: async thread spinning, `com_frameTime` stuck at 0, menu black.
|
||||
- Guardian STAGE bounds report 1×1 m (scene emulation uses ≥1.5 m).
|
||||
- GL goes through **Zink** (Mesa GL on Vulkan). Mesa GLSL is strict: `#pragma` before `#extension` fails, implicit
|
||||
int/float conversions fail (enable `GL_EXT_shader_implicit_conversions`), num_views=2 shaders on single-view FBOs
|
||||
@@ -544,28 +520,14 @@ Launch tests ignore log files older than the launch (stale Proton/game logs used
|
||||
(`\\wsl$` is unreliable), so PC mode copies Revive to `%LOCALAPPDATA%\FramePort`.
|
||||
FramePort never bypasses Oculus entitlement checks (Platform SDK games: flagged, PC mode with the Oculus app only).
|
||||
|
||||
**Upload speed (measured 2026-09-29):** via the home router (PC Wi-Fi → router → Frame wlan0) only 15-18 MB/s, the
|
||||
same for paramiko, OpenSSH and 4 parallel streams, so the network path is the limit, not the SSH code. Direct to the
|
||||
Frame's hotspot (`wlanap` 10.35.78.1; the owner's PC has Valve's USB Wi-Fi dongle on it) 83 MB/s OpenSSH / 97 MB/s
|
||||
paramiko; reading dumps from D: via WSL drvfs is then the cap (~82 MB/s). `Frame.fast_link()` (installer
|
||||
`transfer_link`, uploads ≥64 MiB) uses usb0 > wlanap when reachable **and** the host key matches the paired Frame.
|
||||
**Upload speed:** home Wi-Fi caps uploads at ~11-18 MB/s whatever the SSH method; the Frame's hotspot (`wlanap`) ~83-97 MB/s; `Frame.fast_link()` (installer `transfer_link`, uploads ≥64 MiB) prefers usb0 > wlanap when the host key matches. → docs/DEVICE_NOTES.md#upload-speed
|
||||
**Platform SDK detection** must include delay imports (`PEInfo.delay_imports`), modular Unreal's
|
||||
`*-OnlineSubsystemOculus-*.dll` and Ready At Dawn's `pnsovr.dll`: Robo Recall, Lies Beneath and Lone Echo I/II all use
|
||||
it; without the Oculus app they crash with 0xc06d007e (triage `delayload-missing`) — not fixable legitimately.
|
||||
GUI: Frame → Installed → folder icon = file browser (agent `list_files`, flags files missing vs the install
|
||||
manifest); Settings → About shows the bundled agent version and the Frame's.
|
||||
|
||||
**Revive under Proton arm64 (Lone Echo, 2026-09-29):** Revive's Detours hooks (LoadLibraryW/ExW, OpenEventW, the
|
||||
signature check) don't take effect: Wine's kernelbase is ARM64EC. The LibOVR shim in the game then does a plain
|
||||
`LoadLibrary("LibOVRRT64_1.dll")` search (exe dir, cwd, system32, windows, PATH — no registry, `OculusBase` or
|
||||
`LIBOVR_DLL_DIR` used by this build) → `Failed to initialize Oculus API (-3001)` (= Lies Beneath's "Unable to load
|
||||
LibOVRRT DLL"). A symlink `pfx/drive_c/windows/system32/LibOVRRT64_1.dll -> <base>/revive/LibReviveXR64.dll` (Wine
|
||||
maps a symlink to the already-loaded module) gets past it to **-3021 = ovrError_LibSignCheck**: the shim only accepts
|
||||
an Oculus-signed runtime. Next step (not done): make the runtime check pass without Detours, e.g. an injected helper
|
||||
that patches the game's import table (IAT) for LoadLibrary*/WinVerifyTrust, or a prefix-level override. This is
|
||||
runtime interop (what Revive does), not the Platform SDK licence check (which FramePort never touches).
|
||||
Uninstall (Quest, saves kept) used to leave `deployment.json` → still "installed"; fixed (agent v16).
|
||||
|
||||
**Revive under Proton arm64:** Revive's Detours hooks don't take effect (Wine's kernelbase is ARM64EC); a system32 `LibOVRRT64_1.dll` symlink gets past -3001 to -3021 = ovrError_LibSignCheck (Oculus-signed runtime required; not bypassed). → docs/DEVICE_NOTES.md#revive-under-proton-arm64-lone-echo
|
||||
**Discovery/network:** Developer-Mode SteamOS devices announce `_steamos-devkit._tcp` (TXT `login=steamos`) — use it;
|
||||
they don't publish `_ssh._tcp`. The Frame has several links: `wlan0` (home Wi-Fi), `wlanap` = its own hotspot at
|
||||
10.35.78.1/24 (a PC can join it directly), `usb0` = USB gadget network 10.86.200.233/29 (up when cabled to a PC).
|
||||
@@ -579,23 +541,7 @@ stopping Steam kills them → always run that work via `systemd-run --user` (the
|
||||
**overport:** always `--version=latest`; `--workspace` holds runtimes and **per-package keystores (password
|
||||
"password", alias "key") — never lose them**: updates must be signed with the same key or saves are lost on reinstall.
|
||||
Output is deterministic (same input + runtime → same bytes), which is what makes parity testing possible.
|
||||
**OVRPort 1.2.5 (2026-10-01, the fork's first release; CLI-only):** same commands (`patches [--json]`, `patch`, `help`,
|
||||
`install`), but `patch` rejects unknown/duplicate args, unknown patch ids and an empty `--patches=`
|
||||
(`tools/overport.patch` refuses empty lists). After patching it adds `libovrplatformcompat.so` itself when the platform
|
||||
loader lacks `ovrMessageType_ToString` (our `frame.ovrplatformcompat` then skips: same library). New patches (all off;
|
||||
`patches/overport.py`): `patch_ac_nexus_no_appsw_72/_90` (AC Nexus build 207706 only, exclusive),
|
||||
`patch_disable_meta_xr_audio_telemetry` (x86_64 emulators: hidden), `patch_vrapi_openxr` = OVRPort's VrApi adapter =
|
||||
the **unpatched** upstream of our `frame.vrapi_bridge` (`native/vrapi` unchanged since our 5e7df52), only usable with an
|
||||
experimental CLI built with `-PwithVrApi=true` (stable jars list it but fail). The owner prefers OVRPort's fixes over
|
||||
ours where they work as well (less to maintain): compare in the headset before switching a default.
|
||||
`frameport install <pkg> --apk <file>` installs a specific (test) build signed with the game's key.
|
||||
Headset results (2026-10-02, `PATCHED/_test-ovrport-1.2.5/TESTING.md`): OVRPort's own VrApi translator fails on the
|
||||
Frame (Climb 2: requests VkFormat 37 → crash; POTW: no GLES path, missing `vrapi_GetTextureSwapChainHandle`) → keep
|
||||
`frame.vrapi_bridge`; those two changes are upstream candidates. 1.2.5 builds (its platform compat, new permissions)
|
||||
work. AC Nexus: `patch_ac_nexus_no_appsw_90` is the catalog default (owner preferred 90 Hz); `STRICT` patches are only
|
||||
taken from a catalog recipe where `applies()` holds (the AC Nexus ones need build MAIN.450412.207706.final, else the
|
||||
whole overport run fails).
|
||||
|
||||
**OVRPort 1.2.5 (2026-10-01):** `patch` rejects unknown/duplicate args, unknown ids and an empty `--patches=`; it adds `libovrplatformcompat.so` itself (`frame.ovrplatformcompat` then skips). New patches `patch_ac_nexus_no_appsw_72/_90` (AC Nexus build 207706 only; `_90` = catalog default; STRICT patches only from a catalog recipe where `applies()` holds), `patch_disable_meta_xr_audio_telemetry`, `patch_vrapi_openxr` (OVRPort's VrApi translator fails on the Frame → keep `frame.vrapi_bridge`). The owner prefers OVRPort's fixes over ours where they work as well. `frameport install <pkg> --apk <file>` installs a test build. → docs/DEVICE_NOTES.md#ovrport-125
|
||||
**Patching gotchas:**
|
||||
- UnityPy re-serialization breaks scene loading → patch QualitySettings ints in place.
|
||||
- LIEF's DT_NEEDED injection shifts segments; our `elf.add_needed` appends a new PT_LOAD (reuses PT_NOTE, else moves the
|
||||
@@ -607,421 +553,64 @@ whole overport run fails).
|
||||
- VrApi-direct engines (CryEngine Climb 2, POTW) need the VrApi bridge; the bridge drops whole frames on unknown layer
|
||||
types (→ black screen with audio).
|
||||
|
||||
**Steam Frame controller models (2026-09-30, not yet seen in a game):** adapter setting `controller_models`
|
||||
(`native/adapter/render_model.c`) emulates XR_FB_render_model and serves `files/framebridge/controller_{left,right}.glb`;
|
||||
agent v20 (`install_controller_models`, command `controller_models`) converts the Frame's SteamVR render models
|
||||
(folder name matching "frame" + left/right, OBJ+PNG, `openxr_grip` component → grip space) at finalize/set_settings.
|
||||
Valve's models are never committed or copied off the Frame. Only games that use Meta's runtime controller models
|
||||
benefit (manifest `RENDER_MODEL` permission/feature → suggested); **none of the 34 catalog games do** (they ship their
|
||||
own meshes: that would need per-game asset replacement). Model discovery and conversion
|
||||
checked on the device 2026-09-30: `/opt/steamvr/drivers/frame_controller/resources/rendermodels/frame_controller_{left,right}`
|
||||
(component OBJs in model space = the whole `<name>.obj`, one `_color.png` 2048² near-black, `openxr_grip` rotates about
|
||||
X only; hidden-by-default components like `status` are skipped) → ~2 MB glb each, ~1 s. Not yet seen in a game (none
|
||||
of the installed builds has the new adapter, and none requests runtime models), so whether Meta's SDK attaches runtime models at the grip pose is unverified.
|
||||
**Steam Frame controller models:** adapter setting `controller_models` (`native/adapter/render_model.c`, emulates XR_FB_render_model) + agent `install_controller_models` (Frame's SteamVR models → glb at finalize); no catalog game uses runtime models; Valve's models are never committed or copied off the Frame. → docs/DEVICE_NOTES.md#steam-frame-controller-models
|
||||
**overport's dispatcher (`libopenxr_loader.so`) only forwards functions in its own table** (`overportOXR: Unknown
|
||||
proc addr: …`), so adapter emulations of functions it doesn't know are unreachable. For XR_FB_render_model,
|
||||
`native/xrshim` fills the gap: OVRPlugin's `dlopen("libopenxr_loader.so")` string is rewritten to the shim (see
|
||||
native/README). Verified on the device with Toy Master (2026-09-30): `extension shim: xrLoadRenderModelFB -> FrameBridge`.
|
||||
Toy Master doesn't request a model after that (it uses its own), so the glb loading path is only unit-tested.
|
||||
|
||||
**Crash backtraces (2026-09-30):** Lepton writes tombstones only to `lepton-logcats/steamlaunch-<appid>/logcat-crash.log` (after "Dumping logcat"), not launch.log; agent v23 launch tests wait for it and return `crash_log`, triage gets it via `triage(..., crash=)` (not pid-filtered: tombstones come from crash_dump's pid). The guest is `userdebug` (`ro.debuggable=1`), so Lepton's Fossilize layer loads into every app whatever the APK's debuggable flag; it has no off switch. Fossilize crashed Deadpool VR on uninitialized attachment-reference pNexts (several, in FVulkanRenderPass and the render-target layout) → `frame.vk_sanitize` = `native/vkshim` (engine's `dlopen("libvulkan.so")` string → `libfp_vk.so`, wraps vkCreateRenderPass2/KHR, drops unreadable/wrong-sType pNexts; verified: game runs). overport's dispatcher aborts on swapchains > 4096 px (`cmp wN,#4096` in xrCreateSwapchain) → `frame.swapchain_limit` (verified with 4XVR, 7680×3840 accepted by the runtime). Both are default-on (parity classifies their rewrites as
|
||||
"expected"; library migration `quest_binary_fixes_v2`). The adapter shows cylinder layers (4XVR's movie screen) as ~15° quad strips (`cylinder_strips`, setting
|
||||
`cylinder_strips`); the runtime composites them at full resolution. Equirect (360°) layers are dropped: drawing
|
||||
them ourselves (GLES renderer in xrEndFrame: stutter, never showed 4XVR's VR video; Vulkan renderer: hung the
|
||||
Frame's GPU in AC Nexus; reading the newest *released* image broke 4XVR's theatre) was removed again on the owner's
|
||||
request — don't retry without a new approach. Converted layers must count as "swapped" or the original layer list
|
||||
is submitted (runtime returns -2 for every frame). A focus debounce (hiding the Frame's brief
|
||||
FOCUSED→VISIBLE→SYNCHRONIZED dips, which make 4XVR recenter) was also removed: AC Nexus stayed black with it (it
|
||||
hid 521 ms focus changes at start). The new approach (below) is per-game, off the app's render thread, GLES-only.
|
||||
|
||||
**360° layers / 4XVR (2026-09-30):** the Frame's Android SteamVR runtime (`/opt/steamvr/bin/androidarm64/vrclient.so`,
|
||||
mounted in Lepton as `/data/steamvr/runtime`) only composites quad + projection layers (cube/cylinder/equirect(2)
|
||||
are enum names only) — nothing to unlock. Per-game adapter settings (off by default, hooks installed only when on):
|
||||
`equirect_emul` (GLES only: a worker thread with a shared EGL context converts each 360° image to a cube map when it
|
||||
changes and draws one adapter projection layer from it for every frame with exactly that frame's views (the app's own
|
||||
projection views, else xrLocateViews at displayTime); xrEndFrame waits ≤6 ms for the worker's CPU submit, never the
|
||||
GPU. Learned in the headset: quads can't be a background (the Frame draws quad layers above all projection layers
|
||||
whatever the order: hid 4XVR's balcony/controllers), and the Frame doesn't reproject a projection layer from its own
|
||||
pose (images drawn only after head turns, or ahead from xrWaitFrame and sometimes late, wobbled);
|
||||
`equirect_flip/face/res/fps/stereo`), `stable_local`, `focus_hold` (only after 3 s FOCUSED, dips <600 ms),
|
||||
`aim_pitch/aim_yaw/aim_forward`, `refresh_rate`, `layer_debug` (diagnostics); focus_hold is default-on since 2026-10-05. 4XVR re-creates LOCAL spaces every 2–4 s
|
||||
(menu recentring suspect); its theatres are baked 7680×3840 equirect2 images (`assets/100.png` …). Test 360° videos
|
||||
(NASA, public domain) are in the Frame's ~/Videos; copies in `~/Downloads/frameport-360`. 4XVR's "Internal Storage"
|
||||
lists its own `/sdcard/4XPlayer`, not Movies: agent v25 `link_media` hard-links sent files into an app's own top-level
|
||||
folder (`app_media_dirs`), `frameport frame send --app <pkg>`, GUI game page "Add videos" (players) / "Add videos &
|
||||
files…". A 4XVR webm stereo swapchain was refused with XR_ERROR_LIMIT_REACHED (-10) → right eye grey; our projection
|
||||
swapchain was halved (1536/eye) in case memory is the limit (unverified). Frame data snapshot
|
||||
(SteamVR runtimes, Lepton scripts, logs; never commit Valve binaries): `~/frameport-research/frame-data-2026-09-30/`.
|
||||
Not yet verified in the headset.
|
||||
|
||||
**Companion apps / intents (2026-10-03, tested with Stremio + 4XVR):** a second APK can be installed into a running
|
||||
Lepton container (`podman exec -i lepton-steamlaunch-<appid> pm install -g -S <size> < apk`) and runs there, VR
|
||||
included (4XVR in Stremio's flatscreen container: FrameBridge 72 fps, settings via LEPTON_ENV_FRAMEBRIDGE_CONFIG). But
|
||||
Lepton's services.jar (`ActivityStarter.execute`) intercepts **every** `android.intent.action.VIEW` with data (any
|
||||
scheme, explicit component or not, no property to disable): it writes `steam://openurl/<uri>` to `/lepton/steam.pipe`
|
||||
(= the host Steam client's `~/.steam/steam.pipe`) and starts nothing. So "open in external player" hand-offs (Stremio
|
||||
→ 4XVR) can't work inside Lepton; don't retry without Valve changing it. Lepton installs exactly one `*.apk` per app
|
||||
folder (two break `get_apk_path`).
|
||||
**Text input (2026-10-03, verified in the headset with Stremio VR):** Lepton's Android has no IME (`ime list` empty)
|
||||
and runs VR apps headless (`lepton.headless=true`): no Android window has input focus (`dumpsys input` FocusedWindows
|
||||
empty), so neither `input text`, a USB keyboard nor Steam's keyboard reach the app. `lepton-show-flatscreen` on a VR
|
||||
app keeps VR working (FrameBridge 72 fps) and gives the window focus; Steam's on-screen keyboard then opens for text
|
||||
fields. Unity's TMP_InputField on non-Quest Android waits for the system keyboard (`TouchScreenKeyboardShouldBeUsed`)
|
||||
and deselects a frame later unless `isKeyboardUsingEvents` (Android: `InPlaceEditing() && m_HideSoftKeyboard`);
|
||||
uGUI InputField's LateUpdate keeps the field when `InPlaceEditing()`. Patch `frame.unity_text_input` rewrites them
|
||||
(`mov w0,#0|#1; ret`) at Cpp2IL's **Offset** (= file offset; RVA differs by 0x4000 in Stremio's lib), Cpp2IL
|
||||
2022.1 pre-release (Unity 6 / metadata v31; Il2CppDumper can't), cached per libil2cpp sha. `/dev/uinput` has an ACL
|
||||
for steamos (Steam Input) → agent v33 `_keyboard` uinput keyboard ("Type on Frame") reaches everything with focus.
|
||||
Installing a second APK into a container with `pm install` re-runs Lepton's post-install hook on the **main** app
|
||||
(`lepton.active_app_id`; moves its files to /data/steam_app) and corrupts it on the next start (fix: touch the APK →
|
||||
re-bake); `cmd_real package install` skips the hook.
|
||||
**User reports (2026-10-04, issues #4-#10):** Steam shortcuts go to the signed-in account (`loginusers.vdf`
|
||||
MostRecent) else every account (agent v35 `library_users`; it used to refuse with >1 account → Play gave Steam's "Game
|
||||
configuration unavailable"); `launch` uses the shortcut's own appid and errors `NOT_IN_LIBRARY`, the app then adds it
|
||||
and plays. Unity IL2CPP fixes share one Cpp2IL run (`unity_text_input.Il2cppReturnPatch`, `ALL_TARGETS`, cache keyed by
|
||||
global-metadata.dat): `frame.unity_runtime_msaa_off` (OVRManager raises MSAA to 4x at runtime: "Switching to the
|
||||
recommended level" → Lucky's Tale restarted the headset; `OVRDisplay.get_recommendedMSAALevel` → 0) and
|
||||
`frame.unity_multipass` (Oculus XR Plugin multiview → MultiPass via `OculusSettings.GetStereoRenderingMode`; I Am Cat's
|
||||
right eye grey). Both checked against Toy Master's Cpp2IL output, not yet in a headset. VR4 quits itself (System.exit
|
||||
after the intro movie) → catalog `use_alt`. **Catalog changes reach existing games** without hardcoded migrations:
|
||||
recipes store `catalog_rev` (= `CatalogEntry.rev()`), `library._follow_catalog` re-derives non-user recipes whose entry
|
||||
changed; a maintained entry beats the user's shared copy when its `updated`/verified date is later (`catalog._newer`).
|
||||
**Round 2 of reports (2026-10-04):** VR4's campaign hang = one fragment shader reading an uninitialized loop counter
|
||||
(reporter's capture): vkshim `vk_shader_fix` setting (`<size>:<sha256>:<offset>:<words>`, from the recipe's `adapter:`;
|
||||
matched by size + SHA-256, words inserted into a copy) — on the device the module is fixed at load ("fixed shader
|
||||
module (6488 -> 6512 bytes)"); campaign itself not yet seen in a headset by us. Text settings (kind "str") stay out of
|
||||
the Game settings dialog (saving it dropped them). I Am Cat: `GetStereoRenderingMode` is inlined (no call sites) →
|
||||
`Il2cppReturnPatch.field_loads` rewrites the field read in `OculusLoader.Initialize` (Cpp2IL gives the field offset,
|
||||
`field:<name>`); verified with Toy Master: eye swapchains array=1 ×2 instead of array=2. Builds record `recipe_fp`
|
||||
(`patches/base.recipe_fingerprint`, `Patch.revision`): a changed recipe or revised patch shows "Update on Frame".
|
||||
Remembered Frames are found again after an address change (`Frame.relocate`: scan, same SSH host key, before
|
||||
login). Packaged apps show artwork by file path (`thumbs.use_file_paths`, #16). Diagnostics: this boot's kernel log.
|
||||
Device tests of requested games (2026-10-04, headless): I Am Cat, Myst 3.3.0, BattleGlide, Blade & Sorcery: Nomad
|
||||
start (RUNNING, frames). Roblox: SIGSEGV in je_free from libroblox.so ~3 s in (likely its anti-tamper vs the re-signed
|
||||
APK). BONELAB (Unity 2021.3 Vulkan, OVRPlugin 1.94): SIGSEGV with pc == fault addr in vkCreateInstance, called from
|
||||
libSLZQuestNative.so's Vulkan hooks into an unmapped (unloaded) library right after OVRPlugin's pre-init
|
||||
xrDestroyInstance; pinning openxr/vrclient libraries (RTLD_NODELETE) did NOT help — find the unloaded library with the
|
||||
linker's dlopen/dlclose logging next. Accounting+ (Unity 2017.4 built-in Oculus, libOVRPlugin + libvrapi): Unity
|
||||
never starts VR on the Frame (no OVRPlugin/OpenXR lines; runs as a 2D app), which is why its "controller setup"
|
||||
screen can't be passed — Unity 2017's Oculus device check, not the controller profiles. Cpp2IL can't read Unity 2017.
|
||||
The Frame's Android runtime (vrclient.so) knows oculus/touch_controller but not Meta's Touch Plus/Pro profiles
|
||||
(OVRPlugin suggests those too, routinely) → adapter `profile_remap`.
|
||||
Headset round 2 (2026-10-04): the Frame drops focus often (ms to 7 s; only some are presence/standby) → games pause
|
||||
or recentre (B&S Player.OnVRPresence → Teleport, BattleGlide/Unreal pauses); focus_hold now 1 s focused / 1 s max dip
|
||||
(longer must still pause). Myst crash = vrclient xrSyncActions race after FOCUSED → `sync_guard` (confirmed); its
|
||||
object glitches: app space warp suspected (FB_space_warp is advertised and used) → recipe `patch_disable_space_warp`.
|
||||
I Am Cat multipass: poses/times consistent, but every frame is submitted after the next xrWaitFrame (one period late;
|
||||
Zink + doubled draws) and the game clamps its physics step to 10 ms → judder while still; testing scale 0.8. Roblox's
|
||||
newest crash is on Fossilize's recording thread → vk_sanitize extended to own-engine libs (engine "Other").
|
||||
Accounting+: unity_oculus_check + native/ovrpshim (libfp_ovrp.so waits via ovrp_WaitToBeginFrame before Unity
|
||||
2017's ovrp_Update2) → VR in the headset at ~72 fps (2026-10-04), but stuck at "press any button" although input
|
||||
reaches its OVRInput cleanly (probe: both Touch connected 0x63, individual buttons, input focus 1) → works with issues.
|
||||
"outside of frame bounds" warnings stay (~2/frame) and are harmless.
|
||||
Steam library (GitHub #4/#21/#27, agent v38): shortcuts go to every Steam account (signed-in first; MostRecent isn't
|
||||
always the account on the Frame); stop_steam also waits for Steam's helpers; after the restart the agent re-reads
|
||||
shortcuts.vdf and writes once more if Steam put its old copy back (`shortcuts_lost`); lost again (agent v89): Steam
|
||||
ignores FramePort's entries on that Frame, so `add_devkit_entry` adds the devkit entry instead (`added` gets `via:
|
||||
devkit`) and only reports an error if that fails too. 0.6.3's Play
|
||||
auto-repair (`_add_then_play`) crashed (its job got a Job, not a reporter). Uploads resume on a transient OSError.
|
||||
Lepton's Android 11 has no clipboard service (134 services; checked with `podman exec … service check clipboard`):
|
||||
SDL/LÖVE apps crashed at start → `frame.sdl_clipboard` (`apk/dex.py`: in-place dex edit, nops one invoke, fixes
|
||||
the header checksum/signature; verified with LÖVE for Android 11.5, GitHub #24 Dramatic Shape). Godot 4.2-4.4 (Kotlin `as ClipboardManager`,
|
||||
GitHub #134 EndoparasiticVR) → `frame.godot_clipboard` (nops the `Intrinsics.checkNotNull` before that check-cast; Godot's
|
||||
clipboard methods return at once; analysis `godot_clipboard`, ANALYSIS_VERSION 10; checked on real godot-lib/templates
|
||||
4.2.2-4.4.1, not on the device; 4.1 and 4.5+ don't throw). 2D apps (vr_kind none)
|
||||
keep every suggested patch that isn't about VR (`needs_vr = False`), not a fixed list. FramePort on the Frame:
|
||||
`frame/local.py` (127.0.0.1, own key authorized; "This Frame (experimental)"; app data in
|
||||
~/.local/share/frameport-app because ~/.local/share/frameport is the agent's) and Steam library changes wait while
|
||||
Desktop Mode is open. Verified on the device 2026-10-04 (install + launch test from the Frame). Library updates on the
|
||||
Frame run one at a time (agent v40 flock): two quick uninstalls used to bring a removed shortcut back (Roblox).
|
||||
Headset round 3 (owner's verdicts, 2026-10-04): Blade & Sorcery works — its freezes were the headset's wear sensor
|
||||
flickering off while worn (vrserver.txt "HMD off/on" 0.5-2 s) → per-game `focus_hold_ms=2500` (only this game reacts;
|
||||
not a default). BattleGlide works (focus_hold). Myst works with issues (object glitches; space warp ruled out, its
|
||||
recipe keeps it on). I Am Cat works with issues (judder; scale 0.8 no help). Roblox unsupported (je_free in
|
||||
libroblox, also with the Vulkan shim). Installs skip the Steam restart when the shortcut is unchanged and wait while a
|
||||
game runs (agent v37). New default fixes in FramePort's code reach games already in a library: after every app update
|
||||
`library._follow_catalog` re-derives each non-user recipe once (setting `recipes.app_version`; tests switch it off via
|
||||
`library.REFRESH_ON_UPDATE`). Analysis fields added later: **bump `analysis/detect.ANALYSIS_VERSION`** (stored as `analysis.extra.analysis_version`); older entries whose APK is still there are analysed again at the GUI's start (background thread, not a job: ~8 s per 900 MB APK) and before a build (`pipeline.refresh_analyses`, GitHub #104); only `analysis`/`suggested` change, user recipes stay; an unreadable APK gets `analysis_failed` = the version (not retried until the next bump). Troubleshooting techniques: docs/PLAYBOOK.md "Debugging techniques". Unity `boot.config` "vulkan" substring mislabels GLES games as Vulkan
|
||||
(I Am Cat ran GLES); OVRPlugin's "Unavailable OpenXR extension: XR_FB_scene" is routine (no longer triaged).
|
||||
**Round 4 (2026-10-04):** XR_KHR_android_surface_swapchain is listed by the Frame's runtime but returns
|
||||
FUNCTION_UNSUPPORTED → adapter `surface_emul` (default on, `native/adapter/surface_swapchain.c`): an ordinary runtime
|
||||
swapchain is returned, the game gets a Surface from a SurfaceTexture on a worker thread (own EGL context, JavaVM from
|
||||
XrInstanceCreateInfoAndroidKHR), frames are read back (glReadPixels) and uploaded in xrEndFrame (Vulkan: own command
|
||||
buffer + fence per panel, never waits; GLES: glTexSubImage2D). I Am Monkey's intro works (owner-confirmed). SUPERHOT
|
||||
(Quest) quit at start: its cloud save folder was mode 1700 and Lepton's app writes through the folder's group →
|
||||
launch.sh `fix_perms` adds u+rwx,g+rwx (agent v41). Lucky's Tale: Unity's Loading.PreloadManager thread grows the
|
||||
native heap ~1 GB/s until the OOM killer (Frame freezes); no fix. `perf` works as steamos (paranoid 2; ptrace_scope 1
|
||||
blocks gdb/eu-stack/debuggerd) — see PLAYBOOK "Debugging techniques". QuestCraft downloads its JRE at first run into
|
||||
`files/runtimes/JRE` (Pojlib Installer); on the Frame it was missing (unpacked by hand, unverified). WiiCompiled: its launcher shows
|
||||
(lepton-show-flatscreen) but imports .wcgame files through Android's document picker (OPEN_DOCUMENT), which Lepton
|
||||
lacks (ActivityNotFoundException) → imported by hand: libmain.so + game.json → internal files/game/<profile>,
|
||||
DATA/ → external files/WiiCompiledOpenXRVR/DATA, MOD/ → .../RetroRewind6 (decompiled with jadx). Lepton has no
|
||||
picker at all: a FramePort fix would be an injected picker activity. Generated cover/banner art used to suppress the
|
||||
Steam placeholder set (no Steam art at all) → fixed in artwork/steam.py.
|
||||
**Steam library failures (GitHub #21/#30):** on some Frames Steam never loads FramePort's shortcuts.vdf entries (same SteamOS build and arm64 beta client as the dev Frame; IDs correct; file written before Steam starts): Play → console_log `GameAction [AppID <id>] … RequestingLicense → UpdatingAppInfo → LaunchApp failed with AppError_9` (= "Game configuration unavailable", Steam treats the id as a store app). Cause unknown; agent v42/43 diagnostics: `launch` returns `steam` (started / error + code / silent from console_log), `collect_diag` adds `steam_library` (real Steam dir, beta, Steam start vs vdf write time, entries per account, devkit games) + `steam-console.txt` (incl. Steam's `logs/shortcuts.previous.txt` if present; steamclient.so has "LoadShortcuts: rejecting attempt to load shortcuts: invalid account ID"). **Fallback (agent v43):** when Play gets AppError_9 the agent registers the game through Steam's devkit interface (what Valve's Devkit Management Tool does, MIT: `devkit-1 steam://devkit-1/<~/.steam/steam.token>/create-shortcut?response=<file>&gameid=<id>&directory=~/devkit-game` written to ~/.steam/steam.pipe; answer file / `.error`; `~/devkit-game/<id>/launch.sh` = link to the game's launch.sh, `<id>-argv.json` ["launch.sh"] (relative to the folder), `<id>-settings.json` {steam_play 0, compat_tool ""}). Steam adds it live (no restart), picks its own appid (read back from shortcuts.vdf by DevkitGameID), shows it as a normal non-Steam game named "Devkit Game: <id>" (OpenVR 0, but VR works: owner-verified 2026-10-04), art copied to grid/<appid>*. Ids: letter first, then letters/digits/_ only (spaces, '-', leading digit → "missing/invalid arguments"). Later Plays use the devkit entry; uninstall (`devkit_unregister`, `delete-shortcut` live) and purge remove it. Verified on the dev Frame: register/launch/unregister; the AppError_9 trigger itself only in unit tests. GitHub #42 (two Steam accounts, neither MostRecent): Steam rewrote the active account's shortcuts.vdf without FramePort's entries right after starting, and added the devkit entry live without saving it, so `devkit_appid` (vdf only) failed ("Steam added the devkit entry but didn't save it"); agent v55 `devkit_appid_from_log` reads Steam's `sanitize shortcut app id "~/devkit-game/<id>/launch.sh": replacing 0 with N` console line. GitHub #41 (one account): same Steam behaviour, and every install restarts Steam, which forgets the never-saved devkit entry. Agent v56: the log fallback reads only the current session's console_log.txt; Play re-registers a devkit entry that gets AppError_9; art updates also write the devkit entry's grid art (`copy_grid_art`). Open: why some Frames' Steam never loads or saves shortcuts.vdf (single account too).
|
||||
**Exit game (GitHub #36, 2026-10-04):** `Apps.TerminateApp` (what Exit game calls; reachable for tests through Steam's CEF devtools on 127.0.0.1:8080, SharedJSContext, `Runtime.evaluate` — a stdlib websocket client is enough) closed both a normal shortcut and a devkit entry on the dev Frame within 1-3 s. SIGTERM to Steam's `reaper` alone left launch.sh + Lepton (setsid) + the container running (an earlier headset launch ran on for 87 min); SIGTERM to launch.sh cleans up in ~4 s. Agent v44: launch.sh's 2 s loop ends the game when its parent (the reaper) is gone; `upgrade_launchers` (from ensure_host_fixes) adds that to existing launchers in place. Which in-headset exit path fails is still unknown. Screenshots on the Frame: all under SteamVR's appid 250820 (`760/remote/250820/screenshots`, screenshots.vdf has creation time, no game).
|
||||
**SteamVR dashboard at game start (2026-10-04):** the dashboard (Resume game / controller / VR options) was open whenever a FramePort game started (also over Lepton's 2D launcher). Steam's UI exposes `SteamClient.OpenVR.VROverlay.{IsDashboardVisible,HideDashboard,ShowDashboard}` (CEF devtools, `steam_js` in the agent). Agent v44: launch.sh starts `_dashboard_worker` (waits for FrameBridge's first `pacing:` line in launch.log, then hides a visible dashboard for 25 s, at most 3 times; log `<base>/dashboard.log`; opt out with env FRAMEPORT_KEEP_DASHBOARD=1). Verified on the dev Frame (dashboard shown → 4XVR launched via Steam → hidden ~5 s after the first frames); not yet seen in the headset. **Headset (ITR2, 2026-10-05): too late** — Steam shows its frame menu (`valve.steam.gamepadui.frame.menu`, vrwebhelper_systemui.txt `[PooledPopups] Showing`) ~0.3 s after the game's first submitted frame (FrameBridge `new layer:`), but the first `pacing:` summary comes ~8 s later; the owner had pressed Resume (`[HideDashboard] return_to_game`) before the worker looked. Agent v52: watches from the first `new layer:` line (incremental log reads, 0.5 s polls, 30 s window). Agent v59: watches 120 s and hides up to 10 times (the menu came back after 30 s in the owner's sessions). Agent v53: stops for good once the player opens the dashboard with the controller (`toggle_dashboard_action` in vrwebhelper_systemui.txt since the worker started): v52 closed it 60 ms after each press, and the game, paused for it, stayed paused.
|
||||
**Space warp / ITR2 (2026-10-04):** Into The Radius 2 (UE5, `libUnreal.so` + OVRPlugin, Vulkan) uses Application SpaceWarp (extra swapchains `376x376 format=97` motion vectors + `format=129` depth); #35 reports flickering textures. OVRPort's `patch_disable_space_warp` has no effect on UE5, and hiding XR_FB_space_warp in FrameBridge's enumerate doesn't reach the game either: **OVRPort's dispatcher offers/enables XR_FB_space_warp itself**. FrameBridge `hide_space_warp` (per game, off) hides it and strips `XrCompositionLayerSpaceWarpInfoFB` (1000171000) from the projection views (log `hide_space_warp: removed space warp info`); the game still renders its MV swapchains. Test build installed on the dev Frame; flicker not yet checked in a headset. Heuristic: UE5 + OVRPlugin shows it as an option (off). `equirect_emul` is suggested for Unreal games whose graphics API isn't detected ("GLES or unknown"); on Vulkan it switches itself off (Myst/Riven/ITR2): harmless, but Unreal Vulkan detection is a known gap.
|
||||
**PR #34 (merged 2026-10-04, Lucas-Mathieu):** `native/adapter/audio_metadata.h` patches Meta XR Audio Wwise (only build ID e1619e7f…, Batman: Arkham Shadow 1.4.1) so queued audio metadata isn't freed while the current audio frame references it (smoke-bomb crash). Verified headless: installs ("metadata reclamation follows …"), 72 fps; we added a once-per-second scan limit. Outside PRs: review source, rebuild `artifacts/` ourselves, merge locally (contributor's commit kept), push main.
|
||||
**Heuristics eval (2026-10-04):** `scripts/eval_heuristics.py "<VR CyberDeck Portable>"` → 19/44 recipes exact, 322/352 fields (most diffs: `frame.unity_text_input` suggested where older catalog recipes lack it; the rest are runtime-only findings: use_alt, vk_shader_fix, focus_hold, sync_guard, multipass). `PATCHED/` copies aren't scored (already converted).
|
||||
**Crash backtraces:** Lepton writes tombstones only to `lepton-logcats/steamlaunch-<appid>/logcat-crash.log` (launch tests return `crash_log`). Fossilize loads into every app (userdebug guest) → `frame.vk_sanitize` (`native/vkshim`); overport's dispatcher aborts on swapchains > 4096 px → `frame.swapchain_limit`; cylinder layers → quad strips (`cylinder_strips`). Drawing equirect layers ourselves and a focus debounce were tried and removed: don't retry without a new approach. → docs/DEVICE_NOTES.md#crash-backtraces-fossilize-swapchain-limit-cylinder-and-equirect-layers
|
||||
**360° layers / 4XVR:** the Frame's Android runtime composites only quad + projection layers (quads always above projection layers). Per-game adapter settings (off by default): `equirect_emul` (GLES), `equirect_flip/face/res/fps/stereo`, `stable_local`, `focus_hold` (default on), `aim_pitch/aim_yaw/aim_forward`, `refresh_rate`, `layer_debug`; agent `link_media` / `app_media_dirs` put sent files into a player's own folder. → docs/DEVICE_NOTES.md#360-layers--4xvr
|
||||
**Companion apps / intents:** a second APK can run inside a game's Lepton container, but Lepton turns every `android.intent.action.VIEW` with data into `steam://openurl` → "open in external player" hand-offs can't work; Lepton installs exactly one `*.apk` per app folder. → docs/DEVICE_NOTES.md#companion-apps--intents-stremio--4xvr
|
||||
**Text input:** Lepton's Android has no IME and VR apps run headless (no focused window); `lepton-show-flatscreen` keeps VR and gives focus + Steam's keyboard (`device.text_input_window`); `frame.unity_text_input` patches Unity's TMP_InputField/InputField at Cpp2IL offsets; agent `_keyboard` = uinput "Type on Frame". `pm install` of a second APK corrupts the main app (`cmd_real package install` skips the hook). → docs/DEVICE_NOTES.md#text-input-stremio-vr
|
||||
**User reports #4-#10:** shortcuts go to the signed-in account (agent `library_users`), `launch` errors `NOT_IN_LIBRARY`; shared Cpp2IL run (`unity_text_input.Il2cppReturnPatch`) for `frame.unity_runtime_msaa_off` and `frame.unity_multipass`; VR4 → catalog `use_alt`. **Catalog changes reach existing games**: recipes store `catalog_rev`, `library._follow_catalog` re-derives non-user recipes. → docs/DEVICE_NOTES.md#user-reports-2026-10-04-issues-4-10
|
||||
**Round 2 of reports / headset rounds 2-3 (2026-10-04):** vkshim `vk_shader_fix` (VR4); `Il2cppReturnPatch.field_loads` (I Am Cat); builds record `recipe_fp` (changed recipe/revised patch → "Update on Frame"); `Frame.relocate`; adapter `profile_remap` (Touch Plus/Pro); `sync_guard` (Myst); `focus_hold` tuning; ovrpshim for Unity 2017 (Accounting+); Steam library to every account, `shortcuts_lost` / `add_devkit_entry`; no clipboard service → `frame.sdl_clipboard`, `frame.godot_clipboard`; 2D apps keep non-VR patches (`needs_vr = False`); `frame/local.py` (FramePort on the Frame); after every app update `library._follow_catalog` re-derives non-user recipes once (`recipes.app_version`, `library.REFRESH_ON_UPDATE`). Analysis fields added later: **bump `analysis/detect.ANALYSIS_VERSION`** (re-analysis at GUI start + `pipeline.refresh_analyses`; `analysis_failed`). Roblox and BONELAB crash (unsupported). → docs/DEVICE_NOTES.md#round-2-of-reports-headset-rounds-2-3-2026-10-04
|
||||
**Round 4:** XR_KHR_android_surface_swapchain is listed but unsupported → adapter `surface_emul` (default on, `native/adapter/surface_swapchain.c`); save folders without u/g+rwx → launch.sh `fix_perms`; Lucky's Tale OOM (no fix); `perf` works as steamos (gdb blocked); QuestCraft JRE, WiiCompiled import by hand (Lepton has no document picker). → docs/DEVICE_NOTES.md#round-4-2026-10-04-surface-swapchains-save-folder-permissions
|
||||
**Steam library failures (GitHub #21/#30/#41/#42):** on some Frames Steam never loads FramePort's shortcuts.vdf entries (Play → AppError_9) → fallback: register through Steam's devkit interface (`devkit-1 … create-shortcut`, `~/devkit-game/<id>/`; `devkit_appid`, `devkit_appid_from_log`, `devkit_unregister`, `copy_grid_art`; ids: letter first, letters/digits/_ only); `collect_diag` adds `steam_library`. Cause still unknown. → docs/DEVICE_NOTES.md#steam-library-failures-and-the-devkit-fallback-github-21304142
|
||||
**Exit game (GitHub #36):** `Apps.TerminateApp` (Steam CEF devtools on 127.0.0.1:8080) closes games; launch.sh ends the game when its parent reaper is gone (`upgrade_launchers` adds it). → docs/DEVICE_NOTES.md#exit-game-github-36
|
||||
**SteamVR dashboard at game start:** launch.sh's `_dashboard_worker` hides the dashboard via `SteamClient.OpenVR.VROverlay` (agent `steam_js`) from the first FrameBridge `new layer:` line (120 s, ≤10 times, stops after `toggle_dashboard_action`); log `<base>/dashboard.log`, opt out `FRAMEPORT_KEEP_DASHBOARD=1`. → docs/DEVICE_NOTES.md#steamvr-dashboard-at-game-start
|
||||
**Space warp / ITR2:** OVRPort's dispatcher offers XR_FB_space_warp itself (`patch_disable_space_warp` doesn't reach UE5) → FrameBridge `hide_space_warp` (per game, off; suggested for UE5 + OVRPlugin). `equirect_emul` switches itself off on Vulkan. → docs/DEVICE_NOTES.md#space-warp--itr2
|
||||
**PR #34 (Lucas-Mathieu):** `native/adapter/audio_metadata.h` keeps Meta XR Audio Wwise metadata alive (Batman: Arkham Shadow 1.4.1 smoke-bomb crash). Outside PRs: review source, rebuild `artifacts/` ourselves, merge locally. → docs/DEVICE_NOTES.md#pr-34-meta-xr-audio-metadata-batman
|
||||
**Heuristics eval (2026-10-04):** 19/44 recipes exact (superseded by the 2026-10-15 numbers under Heuristics). → docs/DEVICE_NOTES.md#heuristics-eval-2026-10-04
|
||||
**Power (0.9, agent v47):** sidebar bar below the Frame card: Sleep / Restart / Shut down, each confirmed (`app.frame_power`, a running game asks again). logind answers CanSuspend/CanReboot/CanPowerOff = "challenge" for an SSH session but "yes" inside a user unit, so agent `power` runs `systemctl suspend|reboot|poweroff` from a transient `systemd-run --user --on-active=3` timer (the command answers first). Restart verified on the device (back in ~84 s, new boot id).
|
||||
**Proton default (agent v51, owner's choice 2026-10-05):** the newest **stable** ARM64 Proton is the default for PC VR games (`pick_proton`: asked-for name/alias, else newest installed stable, else any stable). Agent v49-50 defaulted to Experimental; the owner's headset A/B with Rick and Morty (Experimental 69 % reprojected frames, stable felt much smoother) reverted it. The game page's Customize shows `pcvr.proton_tool` as a dropdown (Stable (default) / Experimental = alias `proton-experimental`); `ensure_proton` installs a chosen one (it asks once more for the runtime Steam only names after Proton is installed; Experimental installed unattended on the device in 53 s). A PC VR launch test that fails on stable suggests Experimental (`pipeline.PROTON_TOOL`, `proton_alternative_worth_trying`, button "Try Proton Experimental and reinstall"). Remaining Rick and Morty stutter on head turns = the game rendering below the refresh rate (reprojection), not Proton.
|
||||
**USB cable link (verified 2026-10-05, cabled to the dev PC):** `usb0` is a USB **NCM** gadget (configfs g1: `ncm.usb0` + `ffs.adb`, Valve 28de:2460) set up by `usb-ncm-gadget@usb0.service`, which only runs with `ConditionPathExists=|/etc/systemd/system/adbd.service.d/steamos-devkit-enabled` = **Developer Mode only**. `usb-ncm-dnsmasq@usb0` serves DHCP with fixed `dhcp-host` entries: Frame 10.86.200.233, PC **10.86.200.234** (`frame/usb.py` FRAME_USB_IP/PC_USB_IP). Windows 11 binds its built-in "UsbNcm Host Device" (no driver); WSL mirrored sees eth 10.86.200.234. USB is high-speed (USB 2.0): upload 36.9 MB/s vs 11.3 MB/s home Wi-Fi. Frame→PC over the cable worked without a firewall change. `scripts/usb_autotest.py` (Windows via powershell.exe from WSL), `frameport frame usb-check`. Wizard "Set up with a USB cable" (`PairingServer(host=PC_USB_IP)`; the real bootstrap ran end to end over USB). Discovery dedupes by SSH host key and prefers USB > Frame hotspot > network (`discovery.dedupe`); a lost address is re-found by key (`Frame.relocate`, tested with a dead saved address).
|
||||
**Proton default:** the newest **stable** ARM64 Proton (`pick_proton`; owner's headset A/B); `pcvr.proton_tool` dropdown (Experimental = alias `proton-experimental`), `ensure_proton`, `proton_alternative_worth_trying`. → docs/DEVICE_NOTES.md#proton-default-stable-vs-experimental
|
||||
**USB cable link:** `usb0` is a USB NCM gadget (Developer Mode only); Frame 10.86.200.233, PC **10.86.200.234** (`frame/usb.py`); ~37 MB/s; `scripts/usb_autotest.py`, `frameport frame usb-check`; discovery prefers USB > hotspot > network (`discovery.dedupe`). → docs/DEVICE_NOTES.md#usb-cable-link
|
||||
**Catalog updates without a release (2026-10-05):** apps fetch `catalog/games/*.yaml` from GitHub `main` (`recommend/catalog.refresh_remote`: one API call `git/trees/main?recursive=1` + raw.githubusercontent downloads of changed blobs, cached as `catalog-gh-<sha>.yaml`, every 6 h; GUI at start + Settings → Data "Check now"; CLI background thread + `frameport catalog-update`). `catalog.load()` only reads the cache. A remote entry is skipped (`unusable_reason`) when it names a patch/adapter key this app doesn't register, has a field `CatalogEntry` doesn't know, or `min_app` > this version: add `min_app` (or rely on new patch ids) when a config needs an unreleased FramePort. Remote beats bundled unless the bundled entry has a later updated/verified date; the user's own entries still win as before. Off: setting `catalog.auto_update`, env FRAMEPORT_NO_CATALOG_UPDATE; FRAMEPORT_CATALOG_URL still overrides the source. So: **pushing a catalog change to main reaches users within 6 h** (their recipes follow via catalog_rev → Update on Frame).
|
||||
**Start activity / QuestCraft / ITR2 pop-in (2026-10-05):** WiiCompiled's VR part (`QuestActivity`, SDL, process `:game`) stays behind Lepton's flat window when the launcher is shown (`device.text_input_window`). `frame.start_activity` (opt-in; analysis `extra.vr_activity` = the original APK's activity with Meta's VR category when it isn't the launcher) gives that activity's filter LAUNCHER and every other LAUNCHER becomes INFO, per element (`axml.set_start_activity`); Lepton's own `apk-info-extractor --print-activity-name` (on the Frame under Lepton/liblepton/apk_extractor) then answers QuestActivity. **OVRPort gives every MAIN activity LAUNCHER + VR categories**, so the VR activity must come from the original APK's analysis, not the converted manifest. Lepton has no activity override (`APP_ACTIVITY` is reset when app_metadata.sh is sourced). QuestCraft reaches Minecraft 1.21.5 (Fabric, Vivecraft, Sodium; LTW "Large Thin Wrapper" GL 3.0 on the Frame's Zink) and stops at `OpenGL error 1282` in `WindowFramebuffer` createTexture (Minecraft's crash report in `files/instances/1.21.5/crash-reports/`, Pojlib's `files/latestlog.txt`); the vrclient SIGSEGV / "pthread_mutex_lock called on a destroyed mutex" afterwards is only the shutdown (Unity's render thread still in vrclient while the instance is destroyed). ITR2 "models popping in and out" in game: Unreal reads user config from **internal** storage (`lepton-data/internal/<pkg>/files/UnrealGame/<Project>/<Project>/Saved/Config/Android/Engine.ini`, not external); `r.AllowOcclusionQueries=0` there broke its menus (removed again). Vulkan shim `vk_query_slots` (two slots per occlusion query) never saw ITR2 create an occlusion query pool, and the run with it crashed (Unreal RenderThread SIGSEGV, caught by sentry-native: no tombstone; the backtrace is in `cache/sentry/*/.sentry-native/*.run/*.envelope` with module offsets) - left off. Next suspect: Unreal 5 mobile HZB occlusion reading depth stored with Valve's FDM injection layer; test = launcher `VK_INSTANCE_LAYERS=''` (Lepton then loads neither VALVE_rpo nor VALVE_fdm_injection, Fossilize still). QuestCraft: LTW overrides glGetError and returns 0 with `LIBGL_NOERROR` set; Lepton passes `LEPTON_ENV_<NAME>` to the app as `<NAME>`, so catalog `lepton_env: {LEPTON_ENV_LIBGL_NOERROR: '1'}` gets Minecraft past the GL error 1282; then black picture (see the catalog entry). FrameBridge logs `new layer` once per layer type per process and projection views only for the first frames, so a second session in the same process (Vivecraft after Unity) needs `layer_debug=1`.
|
||||
**Vulkan validation / ITR2 solved (2026-10-05):** Khronos' validation layer can't come from Lepton (its layer dir is in the read-only guest image; the Linux copies on the Frame are glibc) and a global `debug.vulkan.layers` property (via the LEPTON_GFXRECON_FP_PROPS trick) kills the container at boot. Working recipe: bundle `libVkLayer_khronos_validation.so` (Khronos android-binaries release, arm64-v8a, stored uncompressed) into a test APK re-signed with the game's key (`apk.sign.sign`), install with `frameport install <pkg> --apk`, and set the Vulkan shim's `vk_validation=1` (it adds the layer at vkCreateInstance; findings under the logcat tag VALIDATION in launch.log, each message ID capped at 10). ITR2's flicker + windows behind models = Unreal's Qualcomm shader-resolve subpasses with a depth resolve of a single-sampled depth attachment (VUID-04908/-03179); `vk_spec_fixes=1` drops that resolve (its TRANSFER_DST half never applies to ITR2: the main depth is transient). Valve's VALVE_rpo layer removed ITR2's fog (catalog `lepton_env: VK_INSTANCE_LAYERS: VK_LAYER_VALVE_fdm_injection`). `r.ViewDistanceScale=2` in the internal Saved/Config/Android/Engine.ini only exists on the owner's Frame (the catalog can't write internal storage yet). Launch tests: Lepton prints a transient "is not a running context" on the first start after an APK change (agent v54 `not_started` waits 30 s for "Boot complete!").
|
||||
**GitHub #38/#39 (2026-10-05):** PowerWash Simulator stuck at "Waiting.." on a reporter's Frame = Unity sized the right-eye image rect past its swapchain (rect 268+1656 on a 1920-wide swapchain; the runtime's recommended size differs per Frame) and SteamVR rejected every frame (`xrEndFrame failed -25`, XR_ERROR_SWAPCHAIN_RECT_INVALID), after which the game stopped calling xrEndFrame. FrameBridge `rect_clamp` (default on; sizes noted in xrCreateSwapchain; clamped layers count as swapped) keeps projection/quad rects inside their swapchain; triage `swapchain-rect-invalid`. Not reproducible on the dev Frame with `scale` (Unity's eye sizing isn't just the recommended width); no regression there (72 fps). The adapter's revision was NOT bumped (that would mark every installed game outdated): affected users rebuild. The Room VR (#38) = Unity's render thread SIGSEGV in libgallium_dri.so ~30 ms after the game recreates its eye swapchain with samples=4 (FrameBridge retries samples=1); the game's own code turns MSAA on (not OVRManager); candidate fix: hide GL_EXT_multisampled_render_to_texture (GL shim) - needs the APK to test. The launch test passed both (render thread dead / no frames): triage gap.
|
||||
**Headset round 2026-10-05 (evening):** I Am Cat's judder = repeated xrLocateViews of one display time returning
|
||||
slightly different poses → FrameBridge `pose_consistency` (owner-verified, works). Lucky's Tale freeze on touching a
|
||||
save slot = OVRPort's OpenXR dispatcher converting XR_FB_haptic_amplitude_envelope with ns read as s (GitHub #9) →
|
||||
xrshim `haptic_fix` (owner-verified); its remaining short pauses were the wear sensor ("HMD off/on" 0.5-1 s in
|
||||
`logs/eyetracking.txt`, not vrserver.txt) → **`focus_hold` is on by default with 5 s** (owner's choice; C defaults
|
||||
too). The Room VR works (`unity_no_overlay_copy`). BattleSisters (Unity 2019.4 built-in VR, no libOculusXRPlugin.so)
|
||||
flooded "outside of frame bounds" ~2400/s and hung the GPU (kernel hangcheck, zink DEVICE LOST) → the ovrpshim frame
|
||||
wait now also applies to Unity 2019 without the Oculus XR Plugin (`UnityOculusCheck.legacy_loop`). Vader Immortal
|
||||
(UE4, stuck on the loading image after the intro, GitHub #49): VRP repacks carry a Frida gadget (`libfrda.so`,
|
||||
config `hijack_responses`), but OVRPort's `patch_clean_up_frida` removes its loadLibrary call, so it never runs on
|
||||
the Frame; `frame.ovr_trace` (opt-in, `native/ovrtrace`: 1138 exported ovr_* stubs → real loader functions, logcat
|
||||
tag `fp_ovrtrace`: calls, PopMessage answers, unanswered requests every 10 s) is the next diagnostic.
|
||||
**Unity built-in VR input (2026-10-05):** probe builds (`FRAMEPORT_INPUT_PROBE=1 frameport build …`; it logs
|
||||
trigger/grip crossings too) showed OVRPlugin returns the full Touch state for every controller mask (also Go masks);
|
||||
presses reach the games' OVRInput. Accounting+ (Il2CppDumper v6.7.46 reads its Unity 2017 metadata v24, run on Windows)
|
||||
passes stance selection (NewtonVR grip/trigger) but its motion warning waits for `Input.GetMouseButtonDown(0/1)`,
|
||||
which Lepton never delivers (no focused Android window) → ovrpshim registers its own
|
||||
`UnityEngine.Input::GetMouseButtonDown(System.Int32)` icall (il2cpp_add_internal_call, after Unity's: resolve first)
|
||||
that adds a click in the frame a Touch trigger or A/B/X/Y is newly pressed (`unity_oculus_check` revision 3).
|
||||
BattleSisters (Unity 2019 InputSystem/XR InputDevices via `VrHandInput`): libunity's Oculus module (OVRPlugin
|
||||
function table: a global pointer at 0x16b57c0 in this build, slots filled by name, e.g. +0x160 GetControllerState,
|
||||
+0x168 State2, +0xe8 GetNodePresent) only reports controllers when `strncmp(deviceModel, "Oculus", 6) == 0` (next to
|
||||
the Go check `deviceModel == "Oculus Pacific"`); Lepton's model is "Valve Lepton" → Go/unknown → only Go masks polled,
|
||||
buttons dead. `unity_oculus_check` revision 4 (`oculus_model_checks`, Unity 2019 only) turns the 17 compares' length
|
||||
into 0 (`orr w2, wzr, #6` → `mov w2, #0` after the adrp/add of the "Oculus" literal; the string stays: it is also
|
||||
Unity's VR device name). Device result: libunity now polls `ovrp_GetControllerState(0x3)` (Touch); owner-confirmed
|
||||
2026-10-06: buttons work. Its first controller vibration then hit OVRPort's haptic-envelope bug (11 GB, OOM kill) →
|
||||
`haptic_fix` is now suggested for every game with libOVRPlugin.so (settings detect), BattleSisters works. Ruled out before: ProductName, GetNodePresent, the device-model string itself, exports.
|
||||
Accounting+ works (owner, 2026-10-06).
|
||||
**Vader Immortal (UE4, GitHub #49, 2026-10-06, headless):** stuck after the intro on an in-game image (the splash
|
||||
quad ends ~6 s in; then the game's own projection frames, 72 fps, balanced xrBeginFrame/xrEndFrame). Not the Platform
|
||||
SDK (`frame.ovr_trace`: only user + entitlement, both answered) and not the repack's Frida gadget (OVRPort's
|
||||
`patch_clean_up_frida` removes its loadLibrary). It **leaks ~430 GPU mappings (/dev/dri/renderD128) and ~20 MB a
|
||||
second** (6.5 GB + swap after 5 min, then 26 fps): page-fault stacks (perf -e page-faults, offsets resolved with the
|
||||
process maps + vrclient.so's own symbols; its text segment is at file offset + 0x4000) end in SteamVR's runtime:
|
||||
`xrBeginFrame → CSxrCompositorOpenVR::BeginFrame → SubmitExplicitTimingData → CVRCompositorSharedTextures::
|
||||
BeginGPUTimingCommandBuffer` and `xrEndFrame → CVRCompositorClient::SubmitWithArrayIndexAndTime`. Ruled out: the
|
||||
layer color scale/bias + image layout structs (FrameBridge `strip_color_bias` 1/2, diagnostic), Valve's Vulkan
|
||||
layers (VK_INSTANCE_LAYERS=""), array swapchains in general (Lucky's Tale/I Am Cat flat). Kernel tracepoints aren't
|
||||
allowed for steamos. FrameBridge: `layer_debug` logs xrDestroySwapchain and per-5 s xrBeginFrame/xrEndFrame counts;
|
||||
`frame_balance` (ends an open frame before the next begin) exists but Vader never leaves one open. Next (built,
|
||||
not yet run: the Frame slept): `layer_debug` also counts xrAcquire/Wait/ReleaseSwapchainImage per 5 s (hooked only
|
||||
with layer_debug, after the other conditional hooks) to see whether Vader skips a wait or release: it doesn't (361/361/361 per 5 s).
|
||||
FrameBridge `snapshot=N` (`snapshot_gl.c`, GLES): every N s the left-eye image the game submits is read back on its
|
||||
own context and saved as `files/fb_snap_0-7.ppm` (quarter size) — headless launches show a black headset view, this
|
||||
shows what the game draws. Vader: Lucasfilm logo (an OBB mp4: video works), then its loading card (portrait + segmented
|
||||
bar) that never advances; the async loader thread sleeps and OBB reads stop (~168 MB of a 2.7 GB pak).
|
||||
**SteamVR overlay apps (agent v75, 2026-10-10):** host OpenVR overlays (VRApplication_Overlay) are composited over Lepton (Quest) games on the Frame (probe checker seen over 4XVR in the headset view, `native/vroverlay_probe`); Windows ones register through Proton's vrclient too (Temporal Reality's Windows build created its overlays; fpsVR never reaches OpenVR under Proton). Detection `analysis/vroverlay.py` (bundled `.vrmanifest` with `is_dashboard_overlay`, else OpenVR + IVROverlay + self-registration markers, engine Other; Rift fingerprint `RIFT_ANALYSIS`), patch `pcvr.vr_overlay` (param autostart), Linux entry fields `vr_overlay`/`vr_overlay_autostart` (game page switch); agent `register_vr_overlay`/`unregister_vr_overlay`/`launch_vr_overlay` (IVRApplications via ctypes, live; manifest `<anchor>/frameport-overlay.vrmanifest`, the app's own key, binary = launch.sh). **SteamVR on the Frame reads only `binary_path_linux_arm`** (binary_path_linux alone is skipped). Overlay apps: no launch test, no Linux Steam-parent watchdog (`FRAMEPORT_OVERLAY`), not a "running game". A Steam overlay-app shortcut and a game shortcut run together. SteamVR's SetApplicationAutoLaunch didn't persist on the dev Frame (the watch never started by itself) → **agent v76: FramePort's own autostart**: the deployment's `overlay.autostart` is the source of truth; `ensure_host_fixes` (`ensure_overlay_service`) keeps the user service `frameport-vr-overlays.service` (`_vr_overlay_watch`, 5 s polls of the known vrserver's /proc stat) only while an overlay app has autostart on (register/unregister, uninstall, purge and the kill switch `~/.local/share/frameport/vr-overlays.disabled` / `FRAMEPORT_NO_OVERLAY_AUTOSTART` update it); a new vrserver (pid + start time, kept in `~/.cache/frameport-vr-overlays.json` across agent updates) → child `_vr_overlay_round`: wait for IVRApplications, 15 s grace, `launch_vr_overlay` for apps not running (folder process or GetApplicationProcessId); log `~/.local/share/frameport/vr-overlays.log`. Dev Frame: adopted the running vrserver, skipped the already running watch; a start after a real SteamVR start/boot is not yet seen. Details: docs/FRAME_RUNTIME.md "Overlay apps".
|
||||
**Vader's leak solved / AC Nexus flips (2026-10-14):** Vader Immortal leaves GL errors pending on its context; SteamVR's GL interop (`openxr_graphics_gl_openvr.cpp`, `xrclient_<pkg>.txt` in Steam's logs: `SXR_GL_CHECK: error:0x502 ... glGenTextures`) takes the stale error as its own failure once, and from then on `CVRCompositorSharedTextures::BeginCommandBuffer` allocates a command buffer every frame (perf page-fault stacks; ~430 renderD128 mappings + 22 MB/s). Adapter `gl_error_clear` (GLES, catalog on for Vader ep1-3) clears them before xrCreateSwapchain/xrBeginFrame/xrEndFrame: flat memory, no SXR_GL_CHECK (headless). The per-game `xrclient_<pkg>.txt` logs are worth reading for runtime errors. The Frame's runtime caps swapchains per session (XR_ERROR_LIMIT_REACHED from ~15; AC Nexus asks for more): flip emulation now turns quads upright in place (scratch VkImage, once per acquire; transfer usage added to single-layer colour swapchains) instead of a shadow swapchain per quad, which ran into the cap (#138). Headless sessions don't draw AC Nexus's panels (adapter `flip_dump` saves before/after images of flipped quads, for headset runs).
|
||||
**Unreal's self-restart (agent v90, 2026-10-13):** UE 4.21+ restarts the app once after its first-run shader
|
||||
precompile ("optimizing" screen; `r.ProgramBinaryCache.RestartAndroidAfterPrecompile`): it starts its own LAUNCHER
|
||||
activity and calls System.exit(0); Lepton ends the container with the first process (the restarted one with it).
|
||||
Skipping `AndroidThunkJava_RestartApplication` or the cvar = 0 (accepted via UE4CommandLine.txt `-ini:`) left Sports
|
||||
Scramble on that level for good. launch.sh (RESTART_BLOCK, `upgrade_launchers` adds it) starts Lepton once more when
|
||||
`_restart_requested` sees the app's own LAUNCHER start (system log, uid >= 10000) <= 5 s before its exit; first run
|
||||
kept as `launch-before-restart.log`; `FRAMEPORT_NO_RESTART=1` off. Owner-verified with Sports Scramble's first start (2026-10-13).
|
||||
**xrWaitFrame runs ahead (Journey of the Gods, 2026-10-14, owner-verified):** with real frames (headset on) the
|
||||
Frame's runtime sometimes returns from xrWaitFrame at once with a display time less than one refresh after the frame
|
||||
just submitted, and then rejects the second submission for that refresh (`VRCompositorError_AlreadySubmitted` in
|
||||
Steam's `logs/xrclient_<pkg>.txt`; FrameBridge pacing above the display rate). VrApi games that render faster than
|
||||
the display ran ahead (~120 submits/s at 90 Hz) and the scene slid and snapped back. The VrApi bridge re-waits when
|
||||
the new display time is under half a period after the last submitted one (`pacing 2s:` counters). Headless runs only
|
||||
submit empty frames and never show it. Lepton's logcat mirror also missed the whole verifying session (launch.log =
|
||||
Lepton's own lines only): the keeper now catches a silent mirror too (agent v91).
|
||||
**Lepton's logcat mirror dies (agent v67, 2026-10-09; v91 2026-10-14):** Lepton's mirror (`podman exec -it <container> logcat -v threadtime,color`) fails three ways: `logcat: Unexpected EOF!` right after the game starts, `Logcat read failure`, or running and writing nothing at all (Lepton 3.0.5: seen twice on 2026-10-14, once in the owner's session, once headless). launch.sh's `_logcat_keeper` reads `podman exec <container> logcat -v threadtime -T <epoch>` itself into launch.log after a failure line or 20 s without a logcat line (from the launcher's start when the mirror never wrote, else from just before its last line), restarts it from where it ended (≤5), stops it when Lepton's coloured lines come back, sets the container's log buffer to 16 MiB (`logcat -G`), and logs every decision to `<base>/logcat-keeper.log`. Checked on the dev Frame: a mirror killed mid-game (hand-over without a gap) and a silent mirror (the whole session recovered).
|
||||
**Double launch (agent v57, 2026-10-06):** a second Play while Lepton still boots (~10 s with nothing to see) made
|
||||
the second Lepton stop the first one's container ("Waiting for steamlaunch-<appid> (PID …) to exit", exit 137
|
||||
"(starting)", "Clearing baked app data due to early exit") and both died (Vader, BattleSisters). launch.sh now takes
|
||||
`flock` on `<base>/.launch.lock` (fd 9, inherited by Lepton; the watchdog and dashboard helpers close it with
|
||||
`9>&-`); a second launch exits 0 and logs to `<base>/launch-dup.log`. `upgrade_launchers` adds it to existing
|
||||
launchers. Verified on the device (second launch during boot: ignored, the first kept running). Vader on its loading
|
||||
card ignores input too (owner pressed/held every button: presses reach the runtime, the card never changes).
|
||||
**Issue triage round (2026-10-06, owner's headset):** vibration in OVRPlugin games = 2 s vibrations updated per frame and
|
||||
stopped with amplitude 0; FrameBridge turns amplitude 0 into xrStopHapticFeedback (else each buzz ran 2 s), haptic_fix
|
||||
uses the envelope RMS (was its peak), per-game `haptic_scale` → Creed/The Boys/Jurassic World fine. Lambda1VR (TBXR):
|
||||
loader named by Build.MANUFACTURER (`frame.tbxr_vendor`), no graphics extension enabled (FrameBridge adds
|
||||
XR_KHR_opengl_es_enable + asks for the requirements on -50), always multisampled render-to-texture (GL shim gives
|
||||
single-sampled stand-ins when GL_EXT_multisampled_render_to_texture is hidden) + its xash/ data → works. Jurassic World:
|
||||
`frame.vrapi_stub`. Metro Awakening: contributor's vkshim fixes + hide_space_warp + no VALVE_rpo (jumping polygons like
|
||||
ITR2). Pinball FX VR: hide_space_warp (stutters). Eleven: a Meta online request fails after platform init → needs Meta
|
||||
services. Star Wars Tales: top half black + freeze after loading; ruled out: asset-file paks (never requested), Valve
|
||||
foveation (off: no change), GL errors (MESA_DEBUG=1: none), EGL_BAD_ACCESS once in OVRPlugin init (harmless); the game's
|
||||
eye image reads back black. BlazeRush: VrApi bridge exports + ovr*_ToString stubs + avatar stub get it to the menu room
|
||||
at 72 fps, full input reaches it (diagnostics `input 5s`: Touch type only, sticks 1.0, buttons, poses 0x8f), but the room
|
||||
draws no controllers and ignores input; avatar loader forced to its "Failed" path (no logged-in user) changed nothing.
|
||||
`frame.ovr_trace` can't trace Unity games (P/Invoke dlsym; nothing imports ovr_*). Headless: the VrApi bridge's 30 s
|
||||
head-pose deadline ends VR mode without a worn headset (not a game bug).
|
||||
**Lepton storage (2026-09-30):** each app's /sdcard (= /storage/emulated/0 → `<base>/lepton-data/external`) has `Movies`/`Download`/`Documents` symlinked to the Frame's `~/Videos`/`~/Downloads`/`~/Documents` (liblepton/mounting.sh, only if they exist at start); agent v24 `storage_targets` reads that mapping. Android's MediaProvider canonicalises paths to /home/steamos/... and rejects every file ("doesn't appear under [/system/media...]"), `sm list-volumes` is empty: the media index never works, apps must browse folders. Lepton installs with `adb install -g` (runtime permissions granted, MANAGE_EXTERNAL_STORAGE too). Files: `install/files.py`, `frameport frame send|storage`, GUI Files tab (formerly Frame → Send files).
|
||||
**SteamVR per-app settings (2026-09-30):** editing steamvr.vrsettings while SteamVR runs is lost; the web API (127.0.0.1:27062 /app/setsettings) needs `x-steamvr-secret`. `native/vrsettings` = `fp_vrsettings.exe` (freestanding, OpenVR `FnTable:IVRSettings_003` as a Utility app, loads SteamVR's bin/win64/openvr_api.dll) sets them live and SteamVR persists them: section `steam.app.<shortcut appid>`, keys `preferredRefreshRate` (float) and `motionSmoothingOverride` (0 global, 1 on, 2 off, 3 always). Steam Link (vrlink) lists the Frame's rates 72/80/90/96/108/120/144 in vrserver.txt and follows the per-app preference ("host preferred N Hz"; whether the key is honoured is unverified in-headset yet). Judder metric: vrcompositor.txt session summary dropped + "Timed out. N total" (Stormland: 0 dropped but 313 timeouts in 2 min); fpsVR (`%LOCALAPPDATA%\fpsVR\*.json`, 0.1 ms histograms) gives p99 CPU/GPU ms. `pcvr.steamvr_tuning` (default on, PC only) applies on Play: highest rate whose budget ≥ p99×1.05, at least one step down, smoothing on.
|
||||
|
||||
**Language packs (merged from PR #20, 2026-10-04):** overport's `libovrplatformloader.so` is a dispatcher that `dlopen`s Meta's own loader (`libovrplatformloader_meta.so` / `_meta_q1.so`, also `libpxrplatformloader.so`) and keeps its own message queue; `ovr_LanguagePack_GetCurrent/SetCurrent` are 8-byte `return 0` stubs in it, `ovr_AssetFile_GetList` forwards to Meta's loader. `frame.langpacks` (opt-in, `native/langpack`) serves `<tag>.lang` files from the game's data; `elf.hide_exports` marks the loader's exports STB_LOCAL (bionic and glibc only match GLOBAL/WEAK; verified for glibc, bionic's `is_symbol_global_and_defined` is from memory). `libfp_langpack.so` is built here (`python native/build.py --only langpack`) and committed. Owner-verified 2026-10-04: Deadpool VR with only `en.lang` and the patch on plays English dialogue and runs normally (headless launch tests show 2-6 fps while it loads: not a regression sign). A dispatcher answer that arrives after we answered the timed-out GetList is dropped (one answer per request); games already in a library get `lang_packs` filled after an app update (`library._refresh_data_fields`). The library logs to logcat under the tag `fp_langpack` (dirs looked in, packs found, every language-pack call), so it shows up in the game's `launch.log`; an `ovr_AssetFile_GetList` the dispatcher leaves unanswered for 1.5 s is answered with our packs alone. Deadpool VR (Unreal) accepts a pack only when its `Metadata` equals the game's own version string (`ULanguagePacksSubsystem` compares it with `%s.%s.%s.%s.%s` built from the build info, e.g. `1.0.40.356975.Quest` = versionName; found by disassembling `libUE4.so`): the patch writes the APK's versionName into the library (`@FPMETA@` slot, `with_metadata`), `FRAMEPORT_LANGPACK_META` overrides it. Deadpool VR (2026-10-04, headset): German became selectable with that Metadata, but dialogue stayed silent (even English once reported as a pack) while the path was spelled `/sdcard/Android/obb/<pkg>/x.lang`; with the `/storage/emulated/0/Android/obb/<pkg>/x.lang` spelling (Unreal's own, now listed first in `scan_dirs`) German dialogue plays. `FRAMEPORT_LANGPACK_SKIP=<tags>` or a file `fp_langpack_skip` in the obb folder leaves packs out of the list (experiments).
|
||||
|
||||
**Cube swapchains (GitHub #107, 2026-10-09):** the Frame's runtime refuses `faceCount=6` swapchains (-2,
|
||||
XR_ERROR_RUNTIME_FAILURE); OVRPlugin ignores that ("CreateSwapchain for eye 0: 0x0, 0 stages") and crashes in
|
||||
ovrp_EndFrame4 (memset). FrameBridge `cube_standin` (default on, `native/adapter/cube_standin.c`) serves a refused cube
|
||||
swapchain as one GL cube-map texture in the app's context (GLES only) and drops its layers. Verified headless with
|
||||
Budget Cuts Ultimate (2048² sRGB, 12 mips; runs on at ~70 fps); what the cube layer showed is simply missing.
|
||||
**Hardware video decoding (PR #96, PR #128 by Lucas-Mathieu, adapted 2026-10-10, agent v71):** `native/hevc` = one
|
||||
OMX plugin `OMX.frameport.{avc,hevc,vp9}.decoder` (FFmpeg v4l2m2m on Iris /dev/video-dec0, FFmpeg software decoders as
|
||||
fallback inside the component, Vulkan copy for big native surfaces). The connection installs it once per Frame
|
||||
(`ensure_video_codec` → agent `video_codec_status`/`install_video_codec`: `~/.local/share/frameport/video-codec/versions/
|
||||
<manifest sha>` + `current` symlink). A Frame keeps the same or a newer `revision` (no flip-flop between PCs) → **bump
|
||||
`revision` in native/hevc/build.py with every artifact change**; a failed install isn't retried during the connection.
|
||||
Per game: only launchers of games whose recipe has `frame.hw_video_decode` (install stage, no APK change; suggested
|
||||
from analysis `media_codec`, ANALYSIS_VERSION 8; deployment.json `hw_video_decode`) get the codec line → the Podman
|
||||
wrapper (native/hevc/podman.py) mounts the plugin into that container (merged media_codecs.xml in
|
||||
$XDG_RUNTIME_DIR/frameport-video). Off for every game: Settings → Installing (library `video.hw_decode` → agent
|
||||
`video_codec_switch` = video-codec/disabled); one game: `FRAMEPORT_NO_HW_VIDEO=1 %command%`. `upgrade_launchers`
|
||||
converts agent ≤70 launchers (Batman's `<base>/frameport-codec` → keeps the line, folder then removed). Batman: catalog
|
||||
+ migration `batman_video_patches` (`frame.hw_video_decode` + hidden adapter setting `surface_native`). Iris: 8K
|
||||
refused (ENOMEM) while any other decoder session is open; SteamVR's vrlinkrunthread holds one ~12 s at game start →
|
||||
refused opens retry until 20 s after the plugin loaded (else 2 s), then software; VP9 7680x3840 never returned a
|
||||
picture → VP9 ≤4096x2304; hidden VP9 frames come back as empty capture buffers (bytesused 0, no LAST):
|
||||
FFmpeg's wrapper ended the EOS drain at the first one (two-pass VP9 lost its last ~25 frames) → build.py requeues
|
||||
them (codec revision 8; drain ends at LAST, or 1 s after a skipped empty buffer; dev Frame 2026-10-10: 600/600 =
|
||||
OMX.google.vp9 Y hashes). Rebuilds are deterministic (ext4 + NTFS path
|
||||
with spaces, two NDK copies → same; rev 8 141de01f…; PR #128's own sources → its 27a2d749…). Not yet run on the device.
|
||||
**Vulkan shader dump (GitHub #140, 2026-10-10):** adapter `vk_shader_dump=1` (Vulkan shim, `native/vkshim/shader_dump.h`;
|
||||
applies where vk_sanitize can: Unreal/Other arm64) writes each distinct SPIR-V module once to
|
||||
`files/fp_vk_shaders/<size>_<sha256>.spv` (tmp + rename) and one `index.txt` line per vkCreateShaderModule (`<seq> <ms>
|
||||
<unix ms> <name> new|known|again|failed`, O_APPEND) to find the module behind a GPU hang. Agent v72 `collect_diag`
|
||||
returns `shaders` (newest modules of fp_vk_shaders + fp_spirv, ≤4 MB each, base64) → bundle
|
||||
`games/<pkg>/target/shaders/`. Triage `gpu-hang` suggests both dumps; `triage.graphics_api` (FrameBridge's
|
||||
xrCreateSwapchain formats: <0x1000 Vulkan, else GL) keeps only the session's API's (`API_ONLY`). Host-tested only.
|
||||
Agent v74: a reporter's hang came ~10 s after the last new module, so the culprit wasn't among the newest written →
|
||||
with an index naming modules, `shader_dumps` sends every module of the index's **newest session** (after the last
|
||||
`# start`), deduplicated, last used first, each ≤4 MB, ≤30 MB in all (`session` = how many it names) + that session's
|
||||
index lines; no index (fp_spirv) = the old newest-by-mtime 4 MB. One JSON line (~40 MB base64) over the SSH channel
|
||||
is read whole by `Frame.agent` (fine at that size); `_Writer.fit` drops the least recently used modules last, after
|
||||
cutting logs, to stay under the 24 MB zip limit.
|
||||
**Unreal OBB check (GitHub #159, 2026-10-10):** Epic's DownloaderActivity checks OBB name+size (OBBData), then with `bVerifyOBBOnStartUp=true` CRCs the whole OBB; its screens are invisible in Lepton (stuck at `Displayed …/.DownloaderActivity`, triage `unreal-obb-check-stuck`) → `frame.unreal_skip_obb_check` (analysis `unreal_verify_obb`, ANALYSIS_VERSION 11) flips the manifest boolean (`axml.set_meta_data_bool`); skips only the CRC pass. Host-tested only.
|
||||
**Issue round 2026-10-12 (agent v83):** Lepton pastes STEAM_COMPAT_DATA_PATH unquoted into `sh -c "ln -s …/internal/<pkg>
|
||||
/data/data/<pkg>"` (mounting.sh): a game on a card named "Steam Frame 512g" got no internal storage (no saves/prefs;
|
||||
Beyond Sandbox's EOS then looped `createKeychain→resetKeychain` forever, 1.85 GB log). Quest launchers with an unsafe
|
||||
path now `ln -sfn <base> ~/.local/share/frameport/lepton-paths/<pkg>` at every start and give Lepton that path
|
||||
(`app_dir_lines`/`set_app_dir`/`launcher_base`; upgrade_launchers converts; deployment.json keeps the real base).
|
||||
Verified on the device with a spaced copy of Stremio (old: the `ln` error; new: /data/data link, shared_prefs
|
||||
writable). `frame.eos_keychain_loop` (opt-in, triage `eos-keychain-loop`) returns from EOSSDK.resetKeychain. Wander
|
||||
0.3570 (Unity 6.5, Firebase, Gecko) ran out of bionic's 128 pthread keys → `frame.unity_tls_key_pool` (Klownicle's
|
||||
approach, #198: libunity's 4 key imports renamed `fp_tkey_*` via `elf.rename_imports`, `libfp_tkeys.so` pools
|
||||
destructor-less keys behind one real key); device: past Firestore, 72 fps. Cpp2IL releases can't read metadata v107
|
||||
(Unity 6.5) → `tools/cpp2il.py` falls back to the development CI build (nightly.link) on that error. Vermillion's canvas
|
||||
is an OVROverlay quad (drawn above the hand) → `frame.vermillion_scene_canvas` (PaintableMesh getters → false;
|
||||
installed build checked, 72 fps headless; headset not yet). Linux apps: `desktop_icon` switch, a deleted desktop copy
|
||||
stays deleted (#212). Findings: OLAR (#201) RHIThread null deref in libUnreal (`ldr x8,[x19,#792]`, x19=0) not fixed by
|
||||
hide_space_warp / vk_hide_fdm / no Valve layers; FNAF HW (#135) "freeze" = first-start GL program-binary-cache compile
|
||||
on Zink (threads busy in zink/disk cache), not a hang; VR4 (#199) reporter's patch.203 OBB truncated. Upload benchmark
|
||||
(`scripts/upload_bench.py`, #242): home Wi-Fi caps every method at ~11 MB/s; paramiko uses ~3x OpenSSH's CPU; Windows
|
||||
OpenSSH refuses FramePort's key file (ACL "bad permissions") until its permissions are tightened.
|
||||
**OpenSSH uploads (2026-10-15, #324/#242):** sftp escapes `* ? [` inside double quotes itself (and undoes it for
|
||||
put's destination), so `native_upload.quote` escapes only `\\`/`"`; Win32 sftp turns every local backslash into `/`
|
||||
(escapes too) → local paths go as `C:/…`. Logins: `Frame.auth` = the attempt that worked (app_key / user_key = a key
|
||||
file from Settings → Installing → SSH keys, library `ssh.extra_keys`, CLI `frame ssh-keys` / agent / password).
|
||||
OpenSSH strict (FramePort + Settings keys, IdentitiesOnly) unless auth was "agent"; a refused strict login retries
|
||||
relaxed (+ private copies of ~/.ssh/id_{rsa,dsa,ecdsa,ed25519}: OpenSSH skips its defaults once any -i is given, + the
|
||||
agent); `-v` key lines go into the error. FramePort doesn't add its key to the Frame for this. Windows-tested.
|
||||
**Meta user id (GitHub #182, 2026-10-11):** OVRPort's platform loader (runtimes 3.4.3-23204ea and -aa54c3f) answers
|
||||
`ovr_GetLoggedInUserID` (and two other callers) without a Meta account with a made-up id from a helper (`stp; mov x29,
|
||||
sp; bl random; …; mov/movk x9 = 0x53444835ec580000 (6e18); add x0, x8, x9; ldp; ret`), kept only in memory → a new id
|
||||
every start; Walkabout Mini Golf files saves under `Profiles/Oculus/<id>/` and lost all progress. `frame.ovr_stable_user`
|
||||
(default_on, detect = the game has libovrplatformloader.so) rewrites the helper to `mov x0, <6e18 + 32 bits of
|
||||
sha256(package, keystore)>; ret`: stable per game and per user (keystores are personal), so online games never see two
|
||||
FramePort users as one. Found in every PATCHED build checked. Host-tested only; upstream candidate.
|
||||
**Vivox API 31 (GitHub #101, 2026-10-09):** newer Vivox builds (Green Hell VR) call Android 12 AudioManager
|
||||
communication-device methods from `com.vivox.sdk.AudioChangeListener` with no SDK check → NoSuchMethodError on Lepton's
|
||||
Android 11. `frame.vivox_audio_route` (analysis `vivox_api31`, ANALYSIS_VERSION 4) makes every such method return at
|
||||
once (`Dex.return_early`: return-void / `const/4 v0,0; return v0`; nopping the invoke would leave a move-result the
|
||||
verifier rejects). Older Vivox (Eleven Table Tennis, BattleSisters) lacks that code and isn't matched. Verified
|
||||
headless: Vivox initialises, 150 s at ~65-70 fps.
|
||||
**Steam Input gamepad for 2D apps (GitHub #162, agent v72, 2026-10-10):** Lepton's Android only has the Wayland seat's `wayland_touch/keyboard/pointer`. Steam makes its virtual pad (uinput, `/devices/virtual/input`, 28de:11ff, "Microsoft X-Box 360 pad N", ACL for steamos) only while the Frame's controllers are on (controller.txt "Steam Controller reserving XInput slot 0"; gone when they sleep), also with no game running; steamos-manager's 28de:0000 keys device isn't a pad (no BTN_SOUTH). Lepton's container root (system_server too) = steamos (`keep-id:uid=0`), so a bind-mounted `/dev/input/eventN` opens. Opt-in `device.steam_gamepad` (vr_kind none; suggested for `android.hardware.gamepad`/`LEANBACK_LAUNCHER`, analysis `gamepad`, ANALYSIS_VERSION 9): deployment.json `steam_gamepad` → launcher `GAMEPAD_LINE` (after the codec line: exports FRAMEPORT_GAMEPAD + LEPTON_ENV_SDL_GAMECONTROLLER_ALLOW_STEAM_VIRTUAL_GAMEPAD, puts `agent/bin` first on PATH) → `PODMAN_WRAPPER` (written by ensure_host_fixes; non-`run` calls go straight on; `run` imports the agent's `podman_run_args`; hands on to the next Podman after its own PATH entry with itself removed from PATH, so it chains to the codec wrapper either way round) adds the pads + `Vendor_28de_Product_<pid>.kl` (Xbox 360 layout). Verified headless with a uinput stand-in pad (Stremio's container: EventHub `classes=0x80000141`, our key layout, KeyEvent BUTTON_A dispatched); with Steam's real pad and a game: not yet. Pads made after the start aren't seen until the next one.
|
||||
**Multiview programs on flat framebuffers (GitHub #77, Doom3Quest, 2026-10-09, prototype):** Mesa enforces OVR_multiview's
|
||||
"program num_views == draw framebuffer views" rule (`draw_validate.c`, the draw is dropped silently); Qualcomm doesn't.
|
||||
Doom3Quest compiles every VS with `layout(num_views=2) in;` and draws its HUD/PDA into 2D-texture FBOs → black. Opt-in
|
||||
`frame.gl_multiview_fbo` (analysis `gl_multiview_libs`, ANALYSIS_VERSION 6; own-engine GLES only): `native/glmv` =
|
||||
`libfpglmv.so` (12 chars = "libGLESv3.so": libdoom3.so's one `.rodata` dlopen string is rewritten in place, its qgl*
|
||||
table comes from dlsym on that handle; also first DT_NEEDED for its direct gl*/egl* imports). Such draws use a lazily
|
||||
built single-view twin (view 0, uniforms copied per draw); eglMakeCurrent resets the per-thread cache. Host-tested only
|
||||
(rewriter on all 19 Doom3Quest shaders + glmv.c against a stand-in GL, `tests/test_gl_multiview_fbo.py`); the host's
|
||||
Mesa 23.2 llvmpipe has no OVR_multiview. Headset-verified by Xandrix1987 (2026-10-09: HUD/PDA shown, no fps drop) -> in the Doom3Quest catalog recipe.
|
||||
**BlazeRush (GitHub #57, Klownicle's verified guide, 2026-10-10; FramePort's version headless-tested only):**
|
||||
`frame.blazerush` (1.0.349 only: exec-segment SHA + every word checked, offsets from PT_LOAD) NOPs the avatar-readiness
|
||||
wait (0x4b2dbc), RETs the avatar renderer (0x4b2adc), renames `cache/shader_cache` → `cache/br_shader_v1`. GL shim
|
||||
(now also exports glShaderSource/glLinkProgram/glProgramBinary/glDeleteProgram/glDraw*: pass-through unless a setting
|
||||
is on) `gl_int_attribs` (integer inputs fed via glVertexAttribPointer re-set with glVertexAttribIPointer per draw,
|
||||
reflection cached per EGL context + program, dropped on link/binary/delete) and `gl_highp_markers` (vertex shaders with
|
||||
every '|' marker: mediump→highp except on in/out/uniform lines); host test `tests/test_blazerush.py` with a stand-in
|
||||
GL. FOV: the game reads VrApi props 7/8 right after vrapi_Initialize (no session; the Frame has no
|
||||
XR_EPIC_view_configuration_fov) → the bridge saves the live FOV (also located before tracking, headless: 118.87×120.04
|
||||
on the dev Frame) in `files/framebridge-vrapi-fov.txt` and answers with it at the next start (log `FOV properties: …
|
||||
(saved by an earlier session)`). `device.config_sync` (catalog field `config_sync`, agent v78): user_config.xml
|
||||
r_3dwidth/height, r_width/height from the runtime eye size (FrameBridge logs `runtime recommended eye size`) × scale,
|
||||
written at finalize, set_settings and by launch.sh before Lepton starts (`_config_sync`). Headless runs at scale 1.7
|
||||
end in `zink: DEVICE LOST` right after the bridge's 30 s no-tracking deadline tears the session down (gpu fault at the
|
||||
teardown; not at scale 1.0): a headless-only artifact, the headset never hits that deadline. Launch tests count an exit/crash after
|
||||
such a line as a pass (triage.yaml `headless_end`, finding `headless-end`; GitHub #57 "Failed to launch" on install).
|
||||
**Session triage (agent v70, 2026-10-09):** launch tests never reach FOCUSED, so real play sessions are triaged
|
||||
too. list_installed gives each game `last_play` {start, end, test} from `<anchor>/plays.log` (launch tests write a
|
||||
`test <unix>` line first → test sessions are only marked); `session_log` returns the newest session's launch.log
|
||||
(`<base>/session.log`, ≤4 MB: head + tail + FrameBridge/crash lines between) + that session's logcat-crash.log +
|
||||
`journalctl -k` GPU lines ("kernel: …"). The GUI's connection refresh (`app._check_sessions` → `pipeline.sessions_due`,
|
||||
background thread; sessions >7 days old are skipped) runs `pipeline.triage_session` = `validate/session.analyze`
|
||||
(triage.yaml signatures incl. `space-warp-used` (info, `question:`, never auto-applied), `gpu-hang` (`report: true`)
|
||||
+ computed `slow-frames` (pacing windows vs the nearest refresh rate) and `focus-dips` (FrameBridge always logs
|
||||
`focus: lost` / `focus: back after N ms`, session_fixes.c)) → library `last_session` / `last_session_checked` → game
|
||||
page "Last session" callout (Try this fix / Rebuild with this fix / Yes-No question / Report / Dismiss). Suggestions may
|
||||
be values (`adapter.scale=0.85`, `triage.split_suggestion`); adapter-only fixes are pushed live (`apply_suggestions_live`
|
||||
→ agent set_settings, like the Game settings dialog). CLI `frameport session <pkg> [--apply]`. PC VR (Proton) launchers
|
||||
log no session end, so they aren't triaged yet. pac_hints stays triage-only: a survey of all 68 dump APKs found unpaired
|
||||
PAC hints in 21 libraries of 18 games (OpenSSL's 38/40 in most UE4 libUE4.so and libEOSSDK.so, UE5 libUnreal.so ~400
|
||||
vs +2-3, libass, libopencv, …), most of them games that work, so default-on would rewrite many working builds.
|
||||
**Start activity / QuestCraft / ITR2 pop-in:** `frame.start_activity` (analysis `extra.vr_activity`, `axml.set_start_activity`; OVRPort gives every MAIN activity LAUNCHER, so take the VR activity from the original APK); Unreal reads user config from **internal** storage; Lepton passes `LEPTON_ENV_<NAME>` to the app as `<NAME>` (QuestCraft `LIBGL_NOERROR`); vkshim `vk_query_slots` left off. → docs/DEVICE_NOTES.md#start-activity--questcraft--itr2-pop-in
|
||||
**Vulkan validation / ITR2 solved:** bundle Khronos' `libVkLayer_khronos_validation.so` into a test APK + vkshim `vk_validation=1` (logcat tag VALIDATION); `vk_spec_fixes=1` drops ITR2's invalid depth resolve; VALVE_rpo removed its fog (catalog `lepton_env: VK_INSTANCE_LAYERS`). Agent `not_started` waits 30 s for "Boot complete!". → docs/DEVICE_NOTES.md#vulkan-validation--itr2-solved
|
||||
**GitHub #38/#39:** SteamVR rejects image rects past their swapchain (-25) → FrameBridge `rect_clamp` (default on), triage `swapchain-rect-invalid`; The Room VR MSAA crash in libgallium. → docs/DEVICE_NOTES.md#github-3839-powerwash-simulator-the-room-vr
|
||||
**Headset round 2026-10-05:** FrameBridge `pose_consistency` (I Am Cat judder), xrshim `haptic_fix` (Lucky's Tale), **`focus_hold` on by default with 5 s** (wear-sensor dips, `logs/eyetracking.txt`), `unity_no_overlay_copy` (The Room VR), ovrpshim frame wait for Unity 2019 (`UnityOculusCheck.legacy_loop`), `frame.ovr_trace` (opt-in, `native/ovrtrace`, logcat `fp_ovrtrace`). → docs/DEVICE_NOTES.md#headset-round-2026-10-05-evening
|
||||
**Unity built-in VR input:** probe builds `FRAMEPORT_INPUT_PROBE=1`; ovrpshim adds a `GetMouseButtonDown` icall click (Accounting+); libunity 2019 only polls Touch when the device model starts with "Oculus" → `unity_oculus_check` revision 4 `oculus_model_checks` (BattleSisters); `haptic_fix` suggested for every game with libOVRPlugin.so. → docs/DEVICE_NOTES.md#unity-built-in-vr-input-accounting-battlesisters
|
||||
**Vader Immortal (GitHub #49):** stuck on its loading card and leaked GPU mappings (solved below: `gl_error_clear`); diagnostics FrameBridge `layer_debug`, `strip_color_bias`, `frame_balance`, `snapshot=N` (`snapshot_gl.c`: saves the submitted left-eye image as `files/fb_snap_*.ppm`). → docs/DEVICE_NOTES.md#vader-immortal-headless-investigation
|
||||
**SteamVR overlay apps:** host OpenVR overlays composite over Lepton games; detection `analysis/vroverlay.py`, patch `pcvr.vr_overlay`, Linux fields `vr_overlay`/`vr_overlay_autostart`, agent `register_vr_overlay`/`unregister_vr_overlay`/`launch_vr_overlay`; SteamVR on the Frame reads only `binary_path_linux_arm`; FramePort's own autostart (`ensure_overlay_service`, `frameport-vr-overlays.service`). See also docs/FRAME_RUNTIME.md "Overlay apps". → docs/DEVICE_NOTES.md#steamvr-overlay-apps
|
||||
**Vader's leak solved / AC Nexus flips:** stale GL errors broke SteamVR's GL interop → adapter `gl_error_clear` (GLES, catalog for Vader ep1-3); read `xrclient_<pkg>.txt` in Steam's logs for runtime errors; the runtime caps swapchains per session (~15) → flip emulation in place; adapter `flip_dump`. → docs/DEVICE_NOTES.md#vaders-leak-solved--ac-nexus-flips
|
||||
**Unreal's self-restart:** UE 4.21+ restarts itself after the first shader precompile and Lepton ends the container → launch.sh RESTART_BLOCK starts Lepton once more (`upgrade_launchers`; `FRAMEPORT_NO_RESTART=1` off). → docs/DEVICE_NOTES.md#unreals-self-restart
|
||||
**xrWaitFrame runs ahead:** the runtime sometimes returns a display time <1 refresh after the last submit and rejects the second submission (`VRCompositorError_AlreadySubmitted`) → the VrApi bridge re-waits (`pacing 2s:` counters). → docs/DEVICE_NOTES.md#xrwaitframe-runs-ahead-journey-of-the-gods
|
||||
**Lepton's logcat mirror dies** (EOF, read failure, or silent) → launch.sh `_logcat_keeper` reads `podman exec <container> logcat` itself into launch.log (log `<base>/logcat-keeper.log`). → docs/DEVICE_NOTES.md#leptons-logcat-mirror-dies
|
||||
**Double launch:** launch.sh takes `flock` on `<base>/.launch.lock` (fd 9); a second launch exits 0 and logs to `<base>/launch-dup.log` (`upgrade_launchers` adds it). → docs/DEVICE_NOTES.md#double-launch
|
||||
**Issue triage round 2026-10-06:** FrameBridge turns haptic amplitude 0 into xrStopHapticFeedback, per-game `haptic_scale`; Lambda1VR → `frame.tbxr_vendor`; Jurassic World → `frame.vrapi_stub`; Metro Awakening / Pinball FX → `hide_space_warp`; `frame.ovr_trace` can't trace Unity games; the VrApi bridge's 30 s head-pose deadline ends headless VR mode. → docs/DEVICE_NOTES.md#issue-triage-round-2026-10-06
|
||||
**Lepton storage:** each app's /sdcard has `Movies`/`Download`/`Documents` symlinked to the Frame's `~/Videos`/`~/Downloads`/`~/Documents` (agent `storage_targets`); the media index never works; Lepton grants all runtime permissions. → docs/DEVICE_NOTES.md#lepton-storage
|
||||
**SteamVR per-app settings:** `native/vrsettings` = `fp_vrsettings.exe` sets `steam.app.<appid>` `preferredRefreshRate` / `motionSmoothingOverride` live; `pcvr.steamvr_tuning` (default on, PC only). → docs/DEVICE_NOTES.md#steamvr-per-app-settings
|
||||
**Language packs:** `frame.langpacks` (opt-in, `native/langpack`, `elf.hide_exports`, logcat tag `fp_langpack`) serves `<tag>.lang` files; Unreal needs the pack's Metadata = the game's version (`with_metadata`, `FRAMEPORT_LANGPACK_META`) and the `/storage/emulated/0/...` path spelling; `FRAMEPORT_LANGPACK_SKIP`. → docs/DEVICE_NOTES.md#language-packs
|
||||
**Cube swapchains:** the runtime refuses `faceCount=6` → FrameBridge `cube_standin` (default on, GLES only, `native/adapter/cube_standin.c`). → docs/DEVICE_NOTES.md#cube-swapchains
|
||||
**Hardware video decoding:** `native/hevc` OMX plugin (`OMX.frameport.{avc,hevc,vp9}.decoder`), installed once per Frame (`ensure_video_codec`, agent `video_codec_status`/`install_video_codec`/`video_codec_switch`); **bump `revision` in native/hevc/build.py with every artifact change**; per game `frame.hw_video_decode` (analysis `media_codec`), Settings `video.hw_decode`, `FRAMEPORT_NO_HW_VIDEO=1`; Batman migration `batman_video_patches` + `surface_native`. → docs/DEVICE_NOTES.md#hardware-video-decoding
|
||||
**Vulkan shader dump:** adapter `vk_shader_dump=1` (`native/vkshim/shader_dump.h`) writes SPIR-V modules + `index.txt` to `files/fp_vk_shaders/`; `collect_diag` returns the newest session's modules (`shader_dumps`); triage `gpu-hang`, `triage.graphics_api`. → docs/DEVICE_NOTES.md#vulkan-shader-dump
|
||||
**Unreal OBB check (#159):** `frame.unreal_skip_obb_check` (analysis `unreal_verify_obb`) turns off Epic's OBB CRC pass; triage `unreal-obb-check-stuck`. → docs/DEVICE_NOTES.md#unreal-obb-check
|
||||
**Issue round 2026-10-12:** Lepton breaks on unquoted paths with spaces → launchers give Lepton a `~/.local/share/frameport/lepton-paths/<pkg>` link (`app_dir_lines`/`set_app_dir`/`launcher_base`); `frame.eos_keychain_loop`, `frame.unity_tls_key_pool` (`libfp_tkeys.so`, `elf.rename_imports`), `frame.vermillion_scene_canvas`; `tools/cpp2il.py` falls back to Cpp2IL's dev build for metadata v107; Linux `desktop_icon`; `scripts/upload_bench.py`. → docs/DEVICE_NOTES.md#issue-round-2026-10-12
|
||||
**OpenSSH uploads (#324/#242):** `native_upload.quote` escapes only backslash and `"`, Win32 local paths go as `C:/…`; `Frame.auth` records the login that worked (app_key / user_key from `ssh.extra_keys`, `frame ssh-keys`, agent, password); strict IdentitiesOnly first, relaxed retry. → docs/DEVICE_NOTES.md#openssh-uploads
|
||||
**Meta user id (#182):** OVRPort's platform loader makes up a new user id every start → `frame.ovr_stable_user` (default on) returns a stable per-game, per-user id. → docs/DEVICE_NOTES.md#meta-user-id
|
||||
**Vivox API 31 (#101):** newer Vivox calls Android 12 AudioManager methods → `frame.vivox_audio_route` (analysis `vivox_api31`, `Dex.return_early`). → docs/DEVICE_NOTES.md#vivox-api-31
|
||||
**Steam Input gamepad for 2D apps (#162):** opt-in `device.steam_gamepad` (deployment `steam_gamepad` → launcher `GAMEPAD_LINE` → `PODMAN_WRAPPER` / `podman_run_args` bind-mount Steam's virtual pads). → docs/DEVICE_NOTES.md#steam-input-gamepad-for-2d-apps
|
||||
**Multiview programs on flat framebuffers (#77):** Mesa drops num_views=2 draws on single-view FBOs → `frame.gl_multiview_fbo` (`native/glmv` = `libfpglmv.so`, analysis `gl_multiview_libs`); headset-verified with Doom3Quest. → docs/DEVICE_NOTES.md#multiview-programs-on-flat-framebuffers-doom3quest
|
||||
**BlazeRush (#57):** `frame.blazerush` (1.0.349 only), GL shim `gl_int_attribs` / `gl_highp_markers`, saved VrApi FOV (`files/framebridge-vrapi-fov.txt`), `device.config_sync` (catalog `config_sync`); launch tests treat an end after the headless deadline as a pass (triage `headless_end`). → docs/DEVICE_NOTES.md#blazerush
|
||||
**Session triage:** real play sessions are triaged too: agent `last_play` / `session_log` (`<anchor>/plays.log`), `pipeline.sessions_due` / `triage_session` = `validate/session.analyze` (incl. `space-warp-used`, `gpu-hang`, `slow-frames`, `focus-dips`) → library `last_session` → game page "Last session"; `apply_suggestions_live`; CLI `frameport session <pkg> [--apply]`; pac_hints stays triage-only. → docs/DEVICE_NOTES.md#session-triage
|
||||
**Unresolved (as of 2026-09-28):** Arcsmith (right-eye distortion) and Time Stall (both eyes) — swap, tracking, Valve
|
||||
layers, depth, pacing ruled out. Sniper Elite VR (DEVICE LOST), Espire 1 (Mesa GL upload crash), HITMAN 3 (freedreno
|
||||
crash): use PC versions.
|
||||
|
||||
**Install links / FrameDrop button protocol (2026-10-07, not yet clicked end to end from a browser):** FrameDrop
|
||||
(framedropvr.com, a closed-source Windows sideloader) defines "Install with FrameDrop" buttons:
|
||||
`https://framedropvr.com/install?manifest=<url>|url=<file>` → that page opens `framedrop://install?…` (1.6 s, else its
|
||||
home page); manifest `{"schema":"framedrop.install/v1","name","files":[{"url","sha256"}]}` (name = Steam title; .apk
|
||||
or Linux .zip). `deeplink.py` (no Flet) parses framedrop://, frameport:// and the pasted https link, enforces its
|
||||
rules (https; http only on loopback; no credentials; no LAN/loopback/link-local IPs, also after DNS and redirects; URL
|
||||
ends in a file name), caps manifests at 256 KiB, ignores non-hex sha256 (FrameDrop's own example has a placeholder),
|
||||
downloads into `<data>/downloads/<slug>-<hash>/` (OBBs → `obb/` next to the APK, `.part` removed on cancel/mismatch);
|
||||
`pipeline.add_from_link` routes APK / Linux / exe and sets `title` + `title_locked` + `link` (a bare file link keeps
|
||||
FramePort's title). GUI: `views/link_dialog.py` (always asks first), Add games → "Install from a link…", CLI
|
||||
`frameport open-link [--yes --no-install --gui]`. **A `flet build` bundle can't take a URL argument** (the Flutter
|
||||
host treats any argv as a developer page URL), so `urlhandler.py` registers a script, not FramePort.exe: Windows
|
||||
HKCU `Software\Classes\{framedrop,frameport}` → hidden PowerShell `frameport-link-handler.ps1`; WSL (source runs)
|
||||
the same keys → `wsl.exe -d <distro> -e sh frameport-link-handler.sh`; Linux `frameport-links.desktop` +
|
||||
`xdg-mime`; macOS unsupported (Apple Events, paste instead). The script drops the link into `<data>/links/*.link`
|
||||
and starts FramePort unless `<data>/gui.alive` is < 10 s old (`gui.starting` stops double starts); the GUI's
|
||||
`_watch_links` thread touches the heartbeat and opens links (newest window session). Settings → Install links: one
|
||||
switch per scheme (`links.framedrop`, `links.frameport`, default on); a scheme another program owns (FrameDrop) is
|
||||
only taken with "Use FramePort for these links" (`register([s], force=True)`); off removes only FramePort's own
|
||||
registration (`MARK` in the command). Never registered with FRAMEPORT_HOME/FRAMEPORT_NO_LINK_HANDLER (tests,
|
||||
screenshots). Same round: files dropped on the Library (`ui/dropped.py`, bundles only like the Files tab), "Add a
|
||||
Windows program (.exe)…" (`pipeline.add_windows_exe`: exe in Downloads/home/drive root copied alone into
|
||||
`<data>/windows-apps/<slug>/`), patch `device.display_mode` (Automatic / VR / Flat window → `InstallContext.display`,
|
||||
`installer.show_window`). FramePort-only manifest extension `"frameport": {"description", "icon"}` (bad values ignored; icon: same URL rules,
|
||||
≤2 MiB, Pillow-checked, ≥32 px, saved as PNG in `<data>/downloads/icons/`, shown in the question by asset URL, then
|
||||
`sources.apply_custom(pkg, "icon")` unless `.picked` exists; description fills `details.description` only when
|
||||
empty). Bare file links get a title guessed from the file name (`title_from_filename`: version/arch dropped, package
|
||||
names → last part). Windows test of 0.12.1.dev191 (2026-10-07): a button click opened the dialog; but a click right
|
||||
after closing FramePort did nothing (the closed window's heartbeat was < 10 s old) → the handler scripts now wait
|
||||
up to 4 s for the link file to be taken before trusting the heartbeat, the window's CLOSE event / atexit delete
|
||||
`gui.alive`, and the Windows command runs under `conhost.exe --headless` (plain `-WindowStyle Hidden` flashed a
|
||||
console). Screens: `scripts/ui_smoke.py --links --fake-frame --game <pkg>` (tall pages: `--viewport
|
||||
1280x7000`; Flutter's popup menu ignores Escape).
|
||||
Demo link: the homepage's example button = `deeplink.DEMO_MANIFEST` (https://frameport.app/demo/cool-game.json, published
|
||||
from site/public/demo/); every form (https button page, frameport://, framedrop://, pasted) → `InstallRequest.demo`,
|
||||
no network (fetch_manifest returns `demo_manifest()`, download refuses), `link_dialog.show_demo` (Install =
|
||||
`easter.demo_install`: Cool Game's cover out of the portal; eggs off → "Nice, it works!"), CLI just says so.
|
||||
**Install links / FrameDrop button protocol:** `deeplink.py` parses framedrop://, frameport:// and https install links (strict URL rules, manifest ≤256 KiB, downloads into `<data>/downloads/`), `pipeline.add_from_link`, `views/link_dialog.py`, CLI `frameport open-link`; `urlhandler.py` registers a script (bundles can't take URL arguments), `<data>/links/*.link` + `gui.alive` heartbeat; Settings → Install links (`links.framedrop`/`links.frameport`); `ui/dropped.py`, `pipeline.add_windows_exe`, `device.display_mode`; demo link `deeplink.DEMO_MANIFEST`. → docs/DEVICE_NOTES.md#install-links--framedrop-button-protocol
|
||||
**Install link updates:** manifest `version` → library `link.version`; `pipeline.check_link_updates` (GUI start, 6 h, setting `links.check_updates` = Settings → Updates → Games) marks `link_update` → Library bar / game page → `link_dialog.update_from_link`; CLI `frameport link-updates`; the demo link is never checked. → docs/DEVICE_NOTES.md#install-links--framedrop-button-protocol
|
||||
|
||||
## Releases, CI, GitHub
|
||||
Maintainer-only notes (accounts, credentials, key locations) live in the git-ignored `CLAUDE.local.md`.
|
||||
|
||||
+690
-7
@@ -8,6 +8,7 @@ Commands: info, prepare, finalize, shortcuts, shortcut_status, launch_test, stop
|
||||
install_lepton, list_installed, proton_status, install_proton, prepare_pcvr, finalize_pcvr,
|
||||
controller_models, list_screenshots, delete_screenshots (and more: see the cmd_* functions).
|
||||
Streaming: python3 frameport_agent.py _keyboard (a virtual keyboard: JSON lines on stdin, see keyboard_session)
|
||||
python3 frameport_agent.py _backup_saves|_restore_saves '<json>' (save backups: tar.gz on stdout/stdin)
|
||||
|
||||
Install layout (one Lepton container per game; same as the manual installs from 2026-09):
|
||||
~/Applications/quest-frame/<pkg>/ anchor: launch.sh, deployment.json, artwork/ (always internal storage)
|
||||
@@ -44,7 +45,7 @@ try:
|
||||
except ImportError: # Windows: pc_revive loads this file for its VDF code only (GitHub #131)
|
||||
fcntl = None
|
||||
|
||||
AGENT_VERSION = 91
|
||||
AGENT_VERSION = 96
|
||||
HOME = os.path.expanduser("~")
|
||||
STEAM = os.path.join(HOME, ".local/share/Steam")
|
||||
ANCHORS = os.path.join(HOME, "Applications/quest-frame")
|
||||
@@ -2438,6 +2439,9 @@ class SteamVRApps:
|
||||
"""IVRApplications of the running SteamVR, through its libopenvr_api.so (ctypes) as a utility app (never starts
|
||||
SteamVR). `None` from open() = SteamVR isn't running."""
|
||||
|
||||
interface = b"FnTable:IVRApplications_007"
|
||||
table_size = 31
|
||||
|
||||
@classmethod
|
||||
def open(cls):
|
||||
import ctypes
|
||||
@@ -2456,13 +2460,13 @@ class SteamVRApps:
|
||||
vr.VR_InitInternal2(ctypes.byref(err), VR_APP_UTILITY, None)
|
||||
if err.value:
|
||||
return None
|
||||
ptr = vr.VR_GetGenericInterface(b"FnTable:IVRApplications_007", ctypes.byref(err))
|
||||
ptr = vr.VR_GetGenericInterface(cls.interface, ctypes.byref(err))
|
||||
if not ptr:
|
||||
vr.VR_ShutdownInternal()
|
||||
return None
|
||||
self = cls()
|
||||
self.vr, self.ct = vr, ctypes
|
||||
self.table = (ctypes.c_void_p * 31).from_address(ptr)
|
||||
self.table = (ctypes.c_void_p * cls.table_size).from_address(ptr)
|
||||
return self
|
||||
|
||||
def fn(self, name, restype, *argtypes):
|
||||
@@ -3187,8 +3191,6 @@ def upgrade_launchers():
|
||||
new = new.replace("\nfix_perms\n", "\n" + cloud + "\nfix_perms\n", 1)
|
||||
new = set_codec_line(new, wants_hw_video(os.path.dirname(path)))
|
||||
new = set_gamepad_line(new, wants_gamepad(os.path.dirname(path)))
|
||||
new = set_config_sync_line(new, os.path.basename(os.path.dirname(path)),
|
||||
wants_config_sync(os.path.dirname(path)))
|
||||
pkg = os.path.basename(os.path.dirname(path))
|
||||
base = launcher_base(new, pkg)
|
||||
if base: # games on a drive whose path has a space reach Lepton through a link (agent v83)
|
||||
@@ -3224,6 +3226,11 @@ def upgrade_launchers():
|
||||
new = new.replace("\n trap - EXIT INT TERM\n", f"\n trap - EXIT INT TERM\n {end}\n", 1)
|
||||
elif "\nexec " in new: # Proton launcher: exec replaces the shell, so only the start is logged
|
||||
new = new.replace("\nexec ", f"\n{start}\nexec ", 1)
|
||||
if "export LEPTON_ENV_FRAMEBRIDGE_CONFIG=" in new:
|
||||
# Normalize startup helpers after restoring the play log, so the first upgrade has the final order.
|
||||
pkg = os.path.basename(os.path.dirname(path))
|
||||
new = set_config_sync_line(new, pkg, wants_config_sync(os.path.dirname(path)))
|
||||
new = set_refresh_rate_line(new, pkg)
|
||||
if new == text:
|
||||
continue
|
||||
tmp = path + ".tmp"
|
||||
@@ -3611,6 +3618,7 @@ def write_launcher(anchor, base, pkg, title, appid, lepton, env, hw_video=False,
|
||||
plays_start=plays_lines(anchor)[0],
|
||||
plays_end=plays_lines(anchor)[1], restart=restart_block(pkg, lepton))
|
||||
text = set_config_sync_line(text, pkg, config_sync)
|
||||
text = set_refresh_rate_line(text, pkg)
|
||||
path = os.path.join(anchor, "launch.sh")
|
||||
with open(path + ".tmp", "w") as f:
|
||||
f.write(text)
|
||||
@@ -3803,6 +3811,89 @@ def cmd_config_sync(args):
|
||||
return sync_game_config(pkg, dep)
|
||||
|
||||
|
||||
# SteamVR's OpenXR runtime only enumerates its current rate and rejects requests for any other rate. Select the
|
||||
# mode through the host's per-app setting before Lepton starts; the APK's refresh_rate setting alone cannot do it.
|
||||
class SteamVRSettings(SteamVRApps):
|
||||
interface = b"FnTable:IVRSettings_003"
|
||||
table_size = 11
|
||||
|
||||
def refresh_rate(self, appid, rate):
|
||||
ct = self.ct
|
||||
section, key = f"steam.app.{int(appid)}".encode(), b"preferredRefreshRate"
|
||||
err = ct.c_int(0)
|
||||
if rate > 0:
|
||||
ct.CFUNCTYPE(None, ct.c_char_p, ct.c_char_p, ct.c_float, ct.POINTER(ct.c_int))(
|
||||
self.table[3])(section, key, rate, ct.byref(err)) # SetFloat
|
||||
else:
|
||||
ct.CFUNCTYPE(None, ct.c_char_p, ct.c_char_p, ct.POINTER(ct.c_int))(
|
||||
self.table[10])(section, key, ct.byref(err)) # RemoveKeyInSection: restore the game's choice
|
||||
if err.value:
|
||||
name = ct.CFUNCTYPE(ct.c_char_p, ct.c_int)(self.table[0])(err.value)
|
||||
raise AgentError((name or b"SteamVR settings error").decode())
|
||||
|
||||
|
||||
REFRESH_RATE_MARKER = ".frameport-refresh-rate"
|
||||
|
||||
|
||||
def sync_refresh_rate(pkg, dep, check_running=True):
|
||||
"""Apply a saved Quest refresh rate to SteamVR. Retry from launch.sh when SteamVR wasn't available on save."""
|
||||
if not dep or dep.get("kind", "quest") != "quest" or not dep.get("appid"):
|
||||
return None
|
||||
marker = os.path.join(dep["base"], REFRESH_RATE_MARKER)
|
||||
rate = None
|
||||
try:
|
||||
for line in open(os.path.join(dep["base"], "settings.conf")):
|
||||
key, _, value = line.strip().partition("=")
|
||||
if key == "refresh_rate":
|
||||
rate = float(value)
|
||||
except (OSError, ValueError):
|
||||
return {"skipped": "refresh rate settings missing or invalid"}
|
||||
if rate is None and not os.path.exists(marker):
|
||||
return None # don't touch manually configured SteamVR preferences for games with no FramePort override
|
||||
rate = rate or 0.0
|
||||
if not (rate == 0 or 60 <= rate <= 144):
|
||||
return {"skipped": "invalid refresh rate"}
|
||||
if check_running and container_running(dep["appid"]):
|
||||
return {"skipped": "the game is running (applied at its next start)"}
|
||||
vr = None
|
||||
try:
|
||||
vr = SteamVRSettings.open()
|
||||
if vr is None:
|
||||
return {"skipped": "SteamVR unavailable (applied at the next start)"}
|
||||
vr.refresh_rate(dep["appid"], rate)
|
||||
if rate > 0:
|
||||
with open(marker, "w") as f:
|
||||
f.write(str(rate))
|
||||
elif os.path.exists(marker):
|
||||
os.remove(marker)
|
||||
return {"refresh_rate": rate, "app_key": f"steam.app.{dep['appid']}"}
|
||||
except (OSError, AgentError) as exc:
|
||||
return {"skipped": str(exc)}
|
||||
finally:
|
||||
if vr is not None:
|
||||
vr.close()
|
||||
|
||||
|
||||
def set_refresh_rate_line(text, pkg):
|
||||
text = "".join(line for line in text.splitlines(True) if " _refresh_rate " not in line)
|
||||
if "\nsetsid " not in text:
|
||||
return text
|
||||
agent = shlex.quote(os.path.abspath(__file__))
|
||||
line = (f'timeout 10s python3 {agent} _refresh_rate {shlex.quote(pkg)} '
|
||||
'>"$app_dir/refresh-rate.log" 2>&1 9>&- || true')
|
||||
# Run before the wrappers, which are kept immediately ahead of child=''. Also stay ahead of the play log
|
||||
# and config-sync steps so repairing those doesn't move this line on the next upgrade.
|
||||
for anchor in ("\n" + VIDEO_CODEC_LINE + "\n", "\n" + GAMEPAD_LINE + "\n", "\nchild=''\n", "\nsetsid "):
|
||||
if anchor in text:
|
||||
return text.replace(anchor, f"\n{line}{anchor}", 1)
|
||||
return text
|
||||
|
||||
|
||||
def refresh_rate_worker(pkg):
|
||||
pkg = check_pkg(pkg)
|
||||
print(json.dumps(sync_refresh_rate(pkg, deployment(pkg), check_running=False)))
|
||||
|
||||
|
||||
def cmd_video_codec_status(args):
|
||||
"""The shared codec installed on this Frame ({digest, revision}, {} if none or damaged) and whether FramePort's
|
||||
setting switched it off for every game ("disabled")."""
|
||||
@@ -4111,7 +4202,7 @@ def configure_install(args, prep, moved):
|
||||
synced = sync_game_config(pkg, dep)
|
||||
write_deployment(pkg, dep)
|
||||
return {"ok": True, "base": base, "appid": appid, "moved_data_files": moved, "controller_models": models,
|
||||
"config_sync": synced, "deployment": deployment_summary(dep)}
|
||||
"config_sync": synced, "deployment": deployment_summary(dep), "refresh_rate": sync_refresh_rate(pkg, dep)}
|
||||
|
||||
|
||||
# --------------------------------------------------------------- Steam Frame controller models (XR_FB_render_model)
|
||||
@@ -5393,7 +5484,8 @@ def cmd_set_settings(args):
|
||||
else int(number)
|
||||
dep["configuration_fp"] = hashlib.sha256(json.dumps(applied, sort_keys=True).encode()).hexdigest()[:32]
|
||||
write_deployment(pkg, dep)
|
||||
return {"settings": current, "controller_models": models, "config_sync": synced}
|
||||
return {"settings": current, "controller_models": models, "config_sync": synced,
|
||||
"refresh_rate": sync_refresh_rate(pkg, dep)}
|
||||
|
||||
|
||||
TITLE_MAX = 128
|
||||
@@ -7906,6 +7998,588 @@ def monitor_session(stdin, stdout, monitor=None, sleep=time.sleep, max_ticks=Non
|
||||
return 0
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------------------ save backups (#352)
|
||||
# Steam doesn't sync Quest games' saves: the PC app backs them up and restores them. The game's two storage roots (its
|
||||
# internal /data/data/<pkg> folder and its /sdcard/Android/data/<pkg> folder) go into one tar.gz streamed over the SSH
|
||||
# exec channel: `_backup_saves '<json>'` = archive on stdout, one result JSON line on stderr; `_restore_saves '<json>'`
|
||||
# = archive on stdin, one result JSON line on stdout. Both refuse while the game runs and hold its launch lock. Files
|
||||
# Lepton's containers own are read and written in podman's user namespace (`podman unshare`, where the steamos user
|
||||
# owns every mapped id). Caches, shader/program binaries, IL2CPP copies, FrameBridge's own files, videos/OBBs and
|
||||
# anything over SAVES_MAX_FILE stay out; the manifest (last member) lists files, sizes, sha256 and what was left out.
|
||||
SAVES_MANIFEST = "frameport-saves.json"
|
||||
SAVES_ROLLBACK = "saves-before-restore.tar.gz"
|
||||
SAVES_FORMAT = 1
|
||||
SAVES_MAX_FILE = 64 << 20 # larger files are left out of a backup (the manifest's "skipped", reason "size")
|
||||
SAVES_MAX_TOTAL = 4 << 30 # a bigger backup is refused (that's game content, not saves)
|
||||
SAVES_RESTORE_MAX_FILE = 1 << 30 # restore (untrusted input): one member at most this big ...
|
||||
SAVES_RESTORE_MAX_TOTAL = 8 << 30 # ... all of them together at most this big
|
||||
SAVES_RESTORE_MAX_MEMBERS = 200000
|
||||
SAVES_MANIFEST_MAX = 32 << 20
|
||||
# folder names (any depth, case-insensitive) that only hold what a game rebuilds by itself (Android's own backup
|
||||
# leaves out cache/code_cache/no_backup too)
|
||||
SAVES_SKIP_DIRS = {"cache", "code_cache", "code cache", "no_backup", "il2cpp", "unityshadercache", "gpucache",
|
||||
"shadercache", "grshadercache", "dawncache", "dawngraphitecache", "dawnwebgpucache",
|
||||
"programbinarycache", "vulkanprogrambinarycache", "pipelinecaches", "fp_vk_shaders", "fp_spirv",
|
||||
"cachestorage", "scriptcache"}
|
||||
SAVES_SKIP_UNDER_SAVED = {"logs", "crashes"} # Unreal's Saved/Logs and Saved/Crashes
|
||||
SAVES_SKIP_EXT = (".obb", ".apk", ".foz", ".mp4", ".m4v", ".mkv", ".webm", ".mov")
|
||||
SAVES_SKIP_PREFIX = ("fb_snap_", "framebridge") # FrameBridge's snapshots, config and state (FramePort writes them)
|
||||
|
||||
|
||||
def saves_roots(base, pkg):
|
||||
"""{"internal": .../internal/<pkg> (= /data/data/<pkg>), "external": .../external/Android/data/<pkg>}."""
|
||||
data = os.path.join(base, "lepton-data")
|
||||
return {"internal": os.path.join(data, "internal", pkg),
|
||||
"external": os.path.join(data, "external", "Android", "data", pkg)}
|
||||
|
||||
|
||||
def _saves_skip_dir(rel_parts, name):
|
||||
low = name.lower()
|
||||
if low in SAVES_SKIP_DIRS:
|
||||
return True
|
||||
return low in SAVES_SKIP_UNDER_SAVED and bool(rel_parts) and rel_parts[-1].lower() == "saved"
|
||||
|
||||
|
||||
def _saves_skip_file(name):
|
||||
low = name.lower()
|
||||
return low.endswith(SAVES_SKIP_EXT) or low.startswith(SAVES_SKIP_PREFIX)
|
||||
|
||||
|
||||
def collect_saves(roots, max_file=SAVES_MAX_FILE):
|
||||
"""What a backup holds: {"dirs": [(arc, path, stat)], "files": [(arc, path, stat)], "skipped": [{path, size,
|
||||
reason}]}, sorted. Symlinks (Lepton's links), devices and pipes are never followed or included."""
|
||||
import stat as st_
|
||||
|
||||
out = {"dirs": [], "files": [], "skipped": []}
|
||||
for key in sorted(roots):
|
||||
root = roots[key]
|
||||
try:
|
||||
rst = os.lstat(root)
|
||||
except OSError:
|
||||
continue
|
||||
if not st_.S_ISDIR(rst.st_mode):
|
||||
out["skipped"].append({"path": key, "size": 0, "reason": "not a folder"})
|
||||
continue
|
||||
out["dirs"].append((key, root, rst))
|
||||
for cur, dirs, files in os.walk(root, topdown=True, followlinks=False):
|
||||
rel = os.path.relpath(cur, root)
|
||||
parts = [] if rel == "." else rel.split(os.sep)
|
||||
keep = []
|
||||
for d in sorted(dirs):
|
||||
p = os.path.join(cur, d)
|
||||
arc = "/".join([key, *parts, d])
|
||||
try:
|
||||
s = os.lstat(p)
|
||||
except OSError:
|
||||
continue
|
||||
if st_.S_ISLNK(s.st_mode):
|
||||
out["skipped"].append({"path": arc, "size": 0, "reason": "link"})
|
||||
elif _saves_skip_dir(parts, d):
|
||||
out["skipped"].append({"path": arc + "/", "size": 0, "reason": "cache"})
|
||||
else:
|
||||
keep.append(d)
|
||||
out["dirs"].append((arc, p, s))
|
||||
dirs[:] = keep
|
||||
for f in sorted(files):
|
||||
p = os.path.join(cur, f)
|
||||
arc = "/".join([key, *parts, f])
|
||||
try:
|
||||
s = os.lstat(p)
|
||||
except OSError:
|
||||
continue
|
||||
if not st_.S_ISREG(s.st_mode):
|
||||
out["skipped"].append({"path": arc, "size": 0,
|
||||
"reason": "link" if st_.S_ISLNK(s.st_mode) else "special"})
|
||||
elif _saves_skip_file(f):
|
||||
out["skipped"].append({"path": arc, "size": s.st_size, "reason": "not a save"})
|
||||
elif s.st_size > max_file:
|
||||
out["skipped"].append({"path": arc, "size": s.st_size, "reason": "size"})
|
||||
elif not os.access(p, os.R_OK):
|
||||
out["skipped"].append({"path": arc, "size": s.st_size, "reason": "unreadable"})
|
||||
else:
|
||||
out["files"].append((arc, p, s))
|
||||
return out
|
||||
|
||||
|
||||
class _HashingReader:
|
||||
"""A file read for the archive, hashed on the way (tarfile reads exactly the member's size)."""
|
||||
|
||||
def __init__(self, f):
|
||||
self.f, self.h = f, hashlib.sha256()
|
||||
|
||||
def read(self, n=-1):
|
||||
data = self.f.read(n)
|
||||
self.h.update(data)
|
||||
return data
|
||||
|
||||
|
||||
def _saves_tarinfo(arc, s, is_dir):
|
||||
import tarfile
|
||||
|
||||
ti = tarfile.TarInfo(arc)
|
||||
ti.type = tarfile.DIRTYPE if is_dir else tarfile.REGTYPE
|
||||
ti.mode = s.st_mode & 0o7777
|
||||
ti.uid, ti.gid = s.st_uid, s.st_gid
|
||||
ti.uname = ti.gname = ""
|
||||
ti.mtime = int(s.st_mtime)
|
||||
ti.size = 0 if is_dir else s.st_size
|
||||
return ti
|
||||
|
||||
|
||||
def _dep_version(dep):
|
||||
"""The installed build's game version (deployments record the APK's version as source_version)."""
|
||||
return str((dep or {}).get("version") or (dep or {}).get("source_version") or "")
|
||||
|
||||
|
||||
def write_saves_tar(out, pkg, roots, dep=None, max_file=SAVES_MAX_FILE, max_total=SAVES_MAX_TOTAL):
|
||||
"""Stream the game's saves as tar.gz to `out` (a binary file object). Returns the manifest (also the archive's
|
||||
last member, frameport-saves.json)."""
|
||||
import gzip
|
||||
import io
|
||||
import tarfile
|
||||
|
||||
found = collect_saves(roots, max_file)
|
||||
total = sum(s.st_size for _a, _p, s in found["files"])
|
||||
if total > max_total:
|
||||
raise AgentError(f"{pkg}'s saves are {total / 2**30:.1f} GiB, more than the {max_total / 2**30:.0f} GiB a "
|
||||
f"save backup takes (that's game content, not saves)")
|
||||
manifest = {"format": SAVES_FORMAT, "package": pkg, "title": (dep or {}).get("title") or pkg,
|
||||
"version": _dep_version(dep), "created": time.time(), "agent": AGENT_VERSION,
|
||||
"roots": sorted(roots), "max_file": max_file, "files": [], "dirs": [], "skipped": found["skipped"]}
|
||||
gz = gzip.GzipFile(fileobj=out, mode="wb", compresslevel=6)
|
||||
with tarfile.open(fileobj=gz, mode="w|", format=tarfile.PAX_FORMAT) as tar:
|
||||
for arc, _p, s in found["dirs"]:
|
||||
tar.addfile(_saves_tarinfo(arc, s, True))
|
||||
manifest["dirs"].append({"path": arc, "mode": s.st_mode & 0o7777, "uid": s.st_uid, "gid": s.st_gid})
|
||||
for arc, p, s in found["files"]:
|
||||
with open(p, "rb") as f:
|
||||
reader = _HashingReader(f)
|
||||
tar.addfile(_saves_tarinfo(arc, s, False), reader)
|
||||
manifest["files"].append({"path": arc, "size": s.st_size, "sha256": reader.h.hexdigest(),
|
||||
"mode": s.st_mode & 0o7777, "uid": s.st_uid, "gid": s.st_gid,
|
||||
"mtime": int(s.st_mtime)})
|
||||
raw = json.dumps(manifest, indent=1).encode()
|
||||
ti = tarfile.TarInfo(SAVES_MANIFEST)
|
||||
ti.size, ti.mtime, ti.mode = len(raw), int(manifest["created"]), 0o644
|
||||
tar.addfile(ti, io.BytesIO(raw))
|
||||
gz.close()
|
||||
return manifest
|
||||
|
||||
|
||||
def saves_summary(manifest):
|
||||
return {"package": manifest.get("package"), "files": len(manifest.get("files") or []),
|
||||
"bytes": sum(int(f.get("size") or 0) for f in manifest.get("files") or []),
|
||||
"skipped": [s for s in manifest.get("skipped") or [] if s.get("reason") in ("size", "unreadable")],
|
||||
"created": manifest.get("created"), "version": manifest.get("version")}
|
||||
|
||||
|
||||
def _saves_member_name(name):
|
||||
"""A member's path as parts, or None when it isn't confined to internal/ or external/ (absolute, '..', NUL,
|
||||
backslashes, overlong)."""
|
||||
if not isinstance(name, str) or not name or "\0" in name or "\\" in name or name.startswith("/"):
|
||||
return None
|
||||
parts = [p for p in name.split("/") if p not in ("", ".")]
|
||||
if not parts or parts[0] not in ("internal", "external") or ".." in parts:
|
||||
return None
|
||||
if len(name) > 4096 or any(len(p) > 255 for p in parts):
|
||||
return None
|
||||
return parts
|
||||
|
||||
|
||||
def stage_saves_archive(inp, staging, max_file=SAVES_RESTORE_MAX_FILE, max_total=SAVES_RESTORE_MAX_TOTAL,
|
||||
max_members=SAVES_RESTORE_MAX_MEMBERS):
|
||||
"""Read an untrusted save archive from `inp` into `staging` (flat numbered files, never the members' names).
|
||||
Returns (entries {parts tuple: {kind, mode, mtime, staged, size, sha256}}, manifest). Refuses links, devices, paths
|
||||
outside the two roots, duplicates, oversize members and files that don't match the manifest."""
|
||||
import tarfile
|
||||
|
||||
entries, manifest, total, count = {}, None, 0, 0
|
||||
try:
|
||||
tar = tarfile.open(fileobj=inp, mode="r|gz")
|
||||
except (tarfile.TarError, OSError, EOFError) as exc:
|
||||
raise AgentError(f"not a save backup (unreadable archive: {exc})") from None
|
||||
try:
|
||||
for m in tar:
|
||||
count += 1
|
||||
if count > max_members:
|
||||
raise AgentError("the backup has too many files")
|
||||
if m.name == SAVES_MANIFEST:
|
||||
if not m.isreg() or m.size > SAVES_MANIFEST_MAX or manifest is not None:
|
||||
raise AgentError("the backup's manifest is invalid")
|
||||
try:
|
||||
manifest = json.loads(tar.extractfile(m).read().decode("utf-8"))
|
||||
except ValueError:
|
||||
raise AgentError("the backup's manifest is invalid") from None
|
||||
continue
|
||||
parts = _saves_member_name(m.name)
|
||||
if parts is None:
|
||||
raise AgentError(f"the backup has a file outside the game's save folders: {m.name[:200]!r}")
|
||||
key = tuple(parts)
|
||||
if key in entries:
|
||||
raise AgentError(f"the backup has {m.name[:200]!r} twice")
|
||||
if m.isdir():
|
||||
entries[key] = {"kind": "dir", "mode": m.mode & 0o7777, "mtime": int(m.mtime or 0)}
|
||||
continue
|
||||
if not m.isreg():
|
||||
raise AgentError(f"the backup has a link or special file: {m.name[:200]!r}")
|
||||
if len(parts) < 2:
|
||||
raise AgentError(f"the backup has a file in place of a save folder: {m.name[:200]!r}")
|
||||
if m.size > max_file:
|
||||
raise AgentError(f"{m.name[:200]!r} in the backup is too big ({m.size} bytes)")
|
||||
total += m.size
|
||||
if total > max_total:
|
||||
raise AgentError("the backup is too big to restore")
|
||||
staged = os.path.join(staging, f"{len(entries):08d}")
|
||||
src = tar.extractfile(m)
|
||||
h = hashlib.sha256()
|
||||
with open(staged, "wb") as f:
|
||||
left = m.size
|
||||
while left:
|
||||
chunk = src.read(min(left, 1 << 20))
|
||||
if not chunk:
|
||||
raise AgentError("the backup is cut off")
|
||||
h.update(chunk)
|
||||
f.write(chunk)
|
||||
left -= len(chunk)
|
||||
entries[key] = {"kind": "file", "mode": m.mode & 0o7777, "mtime": int(m.mtime or 0), "staged": staged,
|
||||
"size": m.size, "sha256": h.hexdigest()}
|
||||
except (tarfile.TarError, EOFError, zlib.error, OSError) as exc:
|
||||
raise AgentError(f"the backup is damaged or cut off ({exc})") from None
|
||||
finally:
|
||||
try:
|
||||
tar.close()
|
||||
except Exception: # noqa: BLE001
|
||||
pass
|
||||
if not isinstance(manifest, dict) or manifest.get("format") != SAVES_FORMAT:
|
||||
raise AgentError("not a FramePort save backup (no manifest)")
|
||||
listed = {}
|
||||
for f in manifest.get("files") or []:
|
||||
parts = _saves_member_name(str((f or {}).get("path", "")))
|
||||
if parts is not None:
|
||||
listed[tuple(parts)] = f
|
||||
for key, e in entries.items():
|
||||
if e["kind"] != "file":
|
||||
continue
|
||||
f = listed.get(key)
|
||||
if not f or f.get("sha256") != e["sha256"] or f.get("size") != e["size"]:
|
||||
raise AgentError(f"the backup is damaged: {'/'.join(key)[:200]} doesn't match its manifest")
|
||||
return entries, manifest
|
||||
|
||||
|
||||
def _saves_dest(roots, parts):
|
||||
return os.path.join(roots[parts[0]], *parts[1:])
|
||||
|
||||
|
||||
def check_saves_destinations(roots, entries):
|
||||
"""No restored path may pass through or replace a link, or swap a file for a folder (Lepton keeps links in a
|
||||
game's storage: writing through one would land outside it)."""
|
||||
import stat as st_
|
||||
|
||||
for key, e in entries.items():
|
||||
for i in range(1, len(key) + 1):
|
||||
sub = key[:i]
|
||||
path = _saves_dest(roots, sub)
|
||||
try:
|
||||
s = os.lstat(path)
|
||||
except FileNotFoundError:
|
||||
break # the rest gets created
|
||||
if st_.S_ISLNK(s.st_mode):
|
||||
raise AgentError(f"won't restore through the link {'/'.join(sub)}")
|
||||
want_dir = i < len(key) or e["kind"] == "dir"
|
||||
if want_dir and not st_.S_ISDIR(s.st_mode):
|
||||
raise AgentError(f"{'/'.join(sub)} is a file on the Frame but a folder in the backup")
|
||||
if not want_dir and not st_.S_ISREG(s.st_mode):
|
||||
raise AgentError(f"{'/'.join(sub)} is a folder on the Frame but a file in the backup")
|
||||
|
||||
|
||||
def _saves_parent_stat(path):
|
||||
"""stat of path's nearest existing folder."""
|
||||
p = path
|
||||
while True:
|
||||
try:
|
||||
return os.stat(p)
|
||||
except OSError:
|
||||
parent = os.path.dirname(p)
|
||||
if parent == p:
|
||||
raise
|
||||
p = parent
|
||||
|
||||
|
||||
def _saves_chown(path, uid, gid):
|
||||
try:
|
||||
s = os.lstat(path)
|
||||
if (s.st_uid, s.st_gid) != (uid, gid):
|
||||
os.chown(path, uid, gid)
|
||||
except OSError:
|
||||
pass # (outside podman's namespace only our own ids can be set)
|
||||
|
||||
|
||||
def _saves_mkdir(path, mode=None):
|
||||
"""Create a missing folder (and its parents) owned like its parent folder; mode None = the parent's mode."""
|
||||
if os.path.isdir(path):
|
||||
return
|
||||
parent = os.path.dirname(path)
|
||||
_saves_mkdir(parent)
|
||||
ps = os.stat(parent)
|
||||
os.mkdir(path)
|
||||
os.chmod(path, ((ps.st_mode if mode is None else mode) & 0o2777) | 0o700)
|
||||
_saves_chown(path, ps.st_uid, ps.st_gid)
|
||||
|
||||
|
||||
def apply_staged_saves(roots, entries, manifest):
|
||||
"""Put staged files in place: existing files keep their owner and mode, new ones get their folder's owner and the
|
||||
backup's mode (at least u+rw); each file is swapped in with one rename. Save files the backup doesn't have go
|
||||
(the same rules as a backup decide what's a save; files too big for the backup stay). Returns counts."""
|
||||
import stat as st_
|
||||
|
||||
restored = removed = 0
|
||||
for key in sorted((k for k, e in entries.items() if e["kind"] == "dir"), key=len):
|
||||
_saves_mkdir(_saves_dest(roots, key), entries[key]["mode"])
|
||||
for root in roots.values():
|
||||
_saves_mkdir(root)
|
||||
for key, e in sorted(entries.items()):
|
||||
if e["kind"] != "file":
|
||||
continue
|
||||
dest = _saves_dest(roots, key)
|
||||
_saves_mkdir(os.path.dirname(dest))
|
||||
try:
|
||||
s = os.lstat(dest)
|
||||
uid, gid, mode = s.st_uid, s.st_gid, st_.S_IMODE(s.st_mode)
|
||||
except FileNotFoundError:
|
||||
ps = _saves_parent_stat(os.path.dirname(dest))
|
||||
uid, gid, mode = ps.st_uid, ps.st_gid, (e["mode"] & 0o777) | 0o600
|
||||
staged = e["staged"]
|
||||
os.chmod(staged, mode)
|
||||
_saves_chown(staged, uid, gid)
|
||||
if e.get("mtime"):
|
||||
os.utime(staged, (e["mtime"], e["mtime"]))
|
||||
os.replace(staged, dest)
|
||||
restored += 1
|
||||
keep = {"/".join(k) for k, e in entries.items() if e["kind"] == "file"}
|
||||
max_file = manifest.get("max_file")
|
||||
current = collect_saves(roots, max_file if isinstance(max_file, int) and max_file > 0 else SAVES_MAX_FILE)
|
||||
for arc, path, _s in current["files"]:
|
||||
if arc not in keep:
|
||||
try:
|
||||
os.remove(path)
|
||||
removed += 1
|
||||
except OSError:
|
||||
pass
|
||||
return {"restored": restored, "removed": removed}
|
||||
|
||||
|
||||
def saves_context(args):
|
||||
"""(pkg, dep, roots) of an installed Quest game (its roots are real folders, or missing)."""
|
||||
pkg = check_pkg(args.get("package"))
|
||||
dep = deployment(pkg)
|
||||
if not dep:
|
||||
raise AgentError(f"{pkg} is not installed")
|
||||
if dep.get("kind") in ("pcvr", "linux"):
|
||||
raise AgentError("save backups are for Quest (Android) games only")
|
||||
base = dep["base"]
|
||||
if not os.path.isdir(os.path.join(base, "lepton-app")) and not os.path.isdir(os.path.join(base, "lepton-data")):
|
||||
raise AgentError(f"{pkg}'s files are missing at {base} (storage not mounted?)")
|
||||
roots = saves_roots(base, pkg)
|
||||
data = os.path.realpath(os.path.join(base, "lepton-data"))
|
||||
for r in roots.values():
|
||||
if os.path.islink(r) or (os.path.lexists(r) and not _inside(os.path.realpath(r), data)):
|
||||
raise AgentError(f"{r} is a link: refusing")
|
||||
return pkg, dep, roots
|
||||
|
||||
|
||||
class _SavesLock:
|
||||
"""The game's launch lock (launch.sh holds it while the game runs): a backup or restore never overlaps a play
|
||||
session, and a Play meanwhile is ignored like a double launch."""
|
||||
|
||||
def __init__(self, dep):
|
||||
self.path, self.fd = os.path.join(dep["base"], ".launch.lock"), None
|
||||
|
||||
def __enter__(self):
|
||||
if fcntl is None:
|
||||
return self
|
||||
self.fd = os.open(self.path, os.O_RDWR | os.O_CREAT, 0o644)
|
||||
try:
|
||||
fcntl.flock(self.fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
|
||||
except OSError:
|
||||
os.close(self.fd)
|
||||
self.fd = None
|
||||
raise AgentError("the game is running") from None
|
||||
return self
|
||||
|
||||
def __exit__(self, *exc):
|
||||
if self.fd is not None:
|
||||
os.close(self.fd)
|
||||
self.fd = None
|
||||
|
||||
|
||||
def saves_running(dep):
|
||||
return bool(dep.get("appid")) and container_running(dep["appid"])
|
||||
|
||||
|
||||
def _saves_in_namespace(op, args):
|
||||
"""Run op again inside podman's user namespace (stdio inherited); None = run it in this process."""
|
||||
owner = as_owner()
|
||||
if not owner or os.environ.get("FRAMEPORT_SAVES_NS") == "1":
|
||||
return None
|
||||
env = dict(os.environ, FRAMEPORT_SAVES_NS="1")
|
||||
return subprocess.run(owner + [sys.executable or "python3", os.path.abspath(__file__), "_saves_ns", op,
|
||||
json.dumps(args)], env=env).returncode
|
||||
|
||||
|
||||
def saves_backup_session(args, out, err):
|
||||
"""`_backup_saves`: the archive on `out`, one JSON line (ok + summary, or error) on `err`; exit 0 = complete."""
|
||||
def emit(obj):
|
||||
err.write(json.dumps(obj) + "\n")
|
||||
err.flush()
|
||||
|
||||
def here():
|
||||
pkg, dep, roots = saves_context(args)
|
||||
manifest = write_saves_tar(out, pkg, roots, dep, int(args.get("max_file") or SAVES_MAX_FILE),
|
||||
int(args.get("max_total") or SAVES_MAX_TOTAL))
|
||||
out.flush()
|
||||
emit({"ok": True, "result": saves_summary(manifest)})
|
||||
return 0
|
||||
try:
|
||||
return _saves_run("backup", args, here)
|
||||
except AgentError as exc:
|
||||
emit({"ok": False, "error": str(exc)})
|
||||
return 1
|
||||
except Exception as exc: # noqa: BLE001
|
||||
emit({"ok": False, "error": f"{type(exc).__name__}: {exc}"})
|
||||
return 1
|
||||
|
||||
|
||||
def saves_restore_session(args, inp, out):
|
||||
"""`_restore_saves`: the archive on `inp` (or the rollback copy with args.rollback), one JSON line on `out`."""
|
||||
def emit(obj):
|
||||
out.write(json.dumps(obj) + "\n")
|
||||
out.flush()
|
||||
|
||||
def here():
|
||||
emit({"ok": True, "result": restore_saves(args, inp)})
|
||||
return 0
|
||||
try:
|
||||
return _saves_run("restore", args, here)
|
||||
except AgentError as exc:
|
||||
emit({"ok": False, "error": str(exc)})
|
||||
return 1
|
||||
except Exception as exc: # noqa: BLE001
|
||||
emit({"ok": False, "error": f"{type(exc).__name__}: {exc}"})
|
||||
return 1
|
||||
|
||||
|
||||
def _saves_run(op, args, here):
|
||||
"""Outside podman's namespace: check the game, take its launch lock, then run `op` in the namespace (stdio
|
||||
inherited). Inside it (FRAMEPORT_SAVES_NS=1), or without podman (tests): run `here` in this process."""
|
||||
if os.environ.get("FRAMEPORT_SAVES_NS") == "1":
|
||||
return here()
|
||||
_pkg, dep, _roots = saves_context(args)
|
||||
if saves_running(dep):
|
||||
raise AgentError("the game is running")
|
||||
with _SavesLock(dep):
|
||||
code = _saves_in_namespace(op, args)
|
||||
return here() if code is None else code
|
||||
|
||||
|
||||
def restore_saves(args, inp):
|
||||
"""Stage (and check) the whole archive first, keep the current saves as <base>/saves-before-restore.tar.gz (one
|
||||
copy), then swap the files in. A failure while swapping puts the rollback copy back. args.rollback restores that
|
||||
copy instead of `inp` (the current saves become the new rollback copy: undo of the undo)."""
|
||||
pkg, dep, roots = saves_context(args)
|
||||
base = dep["base"]
|
||||
rollback = os.path.join(base, SAVES_ROLLBACK)
|
||||
staging = tempfile.mkdtemp(prefix=".saves-restore-", dir=base)
|
||||
limits = (SAVES_RESTORE_MAX_FILE, SAVES_RESTORE_MAX_TOTAL, SAVES_RESTORE_MAX_MEMBERS)
|
||||
try:
|
||||
if args.get("rollback"):
|
||||
if not os.path.isfile(rollback):
|
||||
raise AgentError("there's no copy of the saves from before the last restore")
|
||||
with open(rollback, "rb") as f:
|
||||
entries, manifest = stage_saves_archive(f, staging, *limits)
|
||||
else:
|
||||
entries, manifest = stage_saves_archive(inp, staging, *limits)
|
||||
if manifest.get("package") != pkg:
|
||||
raise AgentError(f"this backup is of {manifest.get('package')}, not {pkg}")
|
||||
check_saves_destinations(roots, entries)
|
||||
tmp = rollback + ".tmp"
|
||||
with open(tmp, "wb") as f:
|
||||
write_saves_tar(f, pkg, roots, dep, SAVES_MAX_FILE, 1 << 62)
|
||||
os.replace(tmp, rollback)
|
||||
try:
|
||||
counts = apply_staged_saves(roots, entries, manifest)
|
||||
except Exception as exc: # noqa: BLE001
|
||||
undo = os.path.join(staging, "undo")
|
||||
os.mkdir(undo)
|
||||
try:
|
||||
with open(rollback, "rb") as f:
|
||||
back, back_manifest = stage_saves_archive(f, undo)
|
||||
apply_staged_saves(roots, back, back_manifest)
|
||||
state = "the saves from before were put back"
|
||||
except Exception as again: # noqa: BLE001
|
||||
state = f"putting the saves from before back failed too ({again}); they're in {rollback}"
|
||||
raise AgentError(f"restoring failed ({exc}); {state}") from exc
|
||||
return {**counts, "package": pkg, "rollback": rollback, "rollback_size": os.path.getsize(rollback),
|
||||
"backup_created": manifest.get("created"), "backup_version": manifest.get("version")}
|
||||
finally:
|
||||
shutil.rmtree(staging, ignore_errors=True)
|
||||
|
||||
|
||||
def _saves_info(found):
|
||||
return {"files": len(found["files"]), "bytes": sum(s.st_size for _a, _p, s in found["files"]),
|
||||
"skipped": [s for s in found["skipped"] if s["reason"] in ("size", "unreadable")]}
|
||||
|
||||
|
||||
def cmd_saves_info(args):
|
||||
"""What a save backup of the game would hold now (files, bytes, large files left out), whether the game runs, and
|
||||
the rollback copy of the last restore."""
|
||||
pkg, dep, roots = saves_context(args)
|
||||
max_file = int(args.get("max_file") or SAVES_MAX_FILE)
|
||||
owner = as_owner()
|
||||
if owner: # the app's files may belong to mapped ids: count them in podman's namespace
|
||||
p = run(owner + [sys.executable or "python3", os.path.abspath(__file__), "_saves_ns", "info",
|
||||
json.dumps(args)], env=dict(os.environ, FRAMEPORT_SAVES_NS="1"))
|
||||
try:
|
||||
info = json.loads(p.stdout.strip().splitlines()[-1])
|
||||
except (ValueError, IndexError):
|
||||
raise AgentError(f"couldn't read {pkg}'s saves: {p.stderr.strip()[-300:]}") from None
|
||||
else:
|
||||
info = _saves_info(collect_saves(roots, max_file))
|
||||
rollback = os.path.join(dep["base"], SAVES_ROLLBACK)
|
||||
info.update(package=pkg, running=saves_running(dep), version=_dep_version(dep),
|
||||
rollback={"size": os.path.getsize(rollback), "time": os.path.getmtime(rollback)}
|
||||
if os.path.isfile(rollback) else None)
|
||||
return info
|
||||
|
||||
|
||||
def cmd_saves_rollback_delete(args):
|
||||
"""Remove the copy of the saves from before the last restore."""
|
||||
_pkg, dep, _roots = saves_context(args)
|
||||
path = os.path.join(dep["base"], SAVES_ROLLBACK)
|
||||
if os.path.isfile(path):
|
||||
os.remove(path)
|
||||
return {"removed": True}
|
||||
return {"removed": False}
|
||||
|
||||
|
||||
def saves_ns_main(op, raw):
|
||||
"""`_saves_ns <op> '<json>'`: the part of a save command that runs inside `podman unshare`."""
|
||||
os.environ["FRAMEPORT_SAVES_NS"] = "1"
|
||||
args = json.loads(raw)
|
||||
if op == "backup":
|
||||
return saves_backup_session(args, sys.stdout.buffer, sys.stderr)
|
||||
if op == "restore":
|
||||
return saves_restore_session(args, sys.stdin.buffer, sys.stdout)
|
||||
if op == "info":
|
||||
try:
|
||||
_pkg, _dep, roots = saves_context(args)
|
||||
print(json.dumps(_saves_info(collect_saves(roots, int(args.get("max_file") or SAVES_MAX_FILE)))))
|
||||
return 0
|
||||
except AgentError as exc:
|
||||
print(str(exc), file=sys.stderr)
|
||||
return 1
|
||||
return 2
|
||||
|
||||
|
||||
COMMANDS = {n[4:]: f for n, f in globals().items() if n.startswith("cmd_")}
|
||||
|
||||
|
||||
@@ -7918,6 +8592,12 @@ def main():
|
||||
if len(sys.argv) >= 2 and sys.argv[1] == "_vr_overlay_round":
|
||||
print(json.dumps(overlay_autostart_round()), flush=True)
|
||||
return
|
||||
if len(sys.argv) >= 3 and sys.argv[1] == "_backup_saves":
|
||||
return saves_backup_session(json.loads(sys.argv[2]), sys.stdout.buffer, sys.stderr)
|
||||
if len(sys.argv) >= 3 and sys.argv[1] == "_restore_saves":
|
||||
return saves_restore_session(json.loads(sys.argv[2]), sys.stdin.buffer, sys.stdout)
|
||||
if len(sys.argv) >= 4 and sys.argv[1] == "_saves_ns":
|
||||
return saves_ns_main(sys.argv[2], sys.argv[3])
|
||||
if len(sys.argv) >= 2 and sys.argv[1] == "_monitor":
|
||||
return monitor_session(sys.stdin, sys.stdout)
|
||||
if len(sys.argv) >= 3 and sys.argv[1] == "_shortcuts_worker":
|
||||
@@ -7946,6 +8626,9 @@ def main():
|
||||
if len(sys.argv) >= 3 and sys.argv[1] == "_config_sync":
|
||||
config_sync_worker(sys.argv[2])
|
||||
return 0
|
||||
if len(sys.argv) >= 3 and sys.argv[1] == "_refresh_rate":
|
||||
refresh_rate_worker(sys.argv[2])
|
||||
return 0
|
||||
if len(sys.argv) >= 3 and sys.argv[1] == "_tools_worker":
|
||||
tools_worker(sys.argv[2])
|
||||
return 0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
1a4dce5c4a6d0dfc5f20e55ac29e70c73cc2cc124c21ca6a7e1b316e6afb1c79 ./arm64-v8a/libVkLayer_fdm_darken.so
|
||||
5becb96ee86fbda0ce98c0e0fd064f8ba092314aceaa400e3dcc785705dc3c23 ./arm64-v8a/libVkLayer_fp_shaderfix.so
|
||||
fbc3b0238462d976d234fee6740db92b873c85d6bb22a6b01428e64e9058ed83 ./arm64-v8a/liba32bridge.so
|
||||
222727ddabf7eaee08c92e86c64f02edc6639667e9041ab2629032b885c9ae3a ./arm64-v8a/liba32bridge.so
|
||||
c9c3da5cac224c38e2210b781bd12b7f97e02bd6b0ebb0ef85543e4ea4b76671 ./arm64-v8a/liba32rt.so
|
||||
18d8d917e83a6d87008f41908eb478dff635e798844e125abd1e8a5cf31805e2 ./arm64-v8a/liba32stub.so
|
||||
d6337034fb0bdcca7ef9b7063d85b7586b8508b63b435959e8fffaba0691091c ./arm64-v8a/libfp_langpack.so
|
||||
@@ -8,16 +8,16 @@ d6337034fb0bdcca7ef9b7063d85b7586b8508b63b435959e8fffaba0691091c ./arm64-v8a/li
|
||||
321da502e0f8f46f0880aad39fe6b84bdef88f925164568814cf704a1b31a577 ./arm64-v8a/libfp_ovrp.so
|
||||
40defdaddcda53bd2649eb48076fae1622bfc2bfc88e9e03c94fc8b45af2a4f2 ./arm64-v8a/libfp_ovrtrace.so
|
||||
0167c2fde5dfde62897f9d85afc4fc8e97784e988b5b8df6cea8c407240b3424 ./arm64-v8a/libfp_tkeys.so
|
||||
e8c0965c188665a4e565e4a3af983ef1866d1cf9225665cc90d8df286bc96ef3 ./arm64-v8a/libfp_vk.so
|
||||
468b97ee3c36481d939a87425b15880c7a801d16732350e1e2832b385d63f20a ./arm64-v8a/libfp_vk.so
|
||||
383054f8b3b41dde76d062c71856cd3163655e50009c08454bc1793f393ead65 ./arm64-v8a/libfpg.so
|
||||
5432674a59d02f411cd853a5dc57e3fa547d1ac518f25bf433fc54c43677177a ./arm64-v8a/libfpglmv.so
|
||||
8a8f6b1da8952cb3933a5b53558424a5fc56043b2527a16bb6dd62a00d2de01a ./arm64-v8a/libframe_xrshim.so
|
||||
4a13a33e112c9e4e3c5ff4337ed6e988a9e5b3602f48d654df148ef5fafbf426 ./arm64-v8a/libfpglmv.so
|
||||
36400eae4ba3807bcfcd54463daa217347032b07218792faa448d8cbbd086a0e ./arm64-v8a/libframe_xrshim.so
|
||||
19ba5ed3c4b780f5ae46251f6958f552acfc5f13c8bb39f995579593fa8990c6 ./arm64-v8a/libglshim.so
|
||||
0f058921e9c1f5b9ef5847cc9e6b80a23e75028c76c1d3bb02d1610b535f81c9 ./arm64-v8a/libopenxr_loader_generic.so
|
||||
b1ec76d3c93862ef2e5dcffab44b4b45cdbd791df3c6870350a04be44a0e0137 ./arm64-v8a/libopenxr_loader_generic.so
|
||||
1feaeafad467c4cafdf2b018a4d84b0bee200c3f711697b4ce97e66a3ba256ca ./arm64-v8a/libovrplatformcompat.so
|
||||
a4ed80ae45ca90758239f152ea5a2e8c127d491e1e697ea5680db6fd7f72db07 ./arm64-v8a/libvrapi.so
|
||||
a4ed80ae45ca90758239f152ea5a2e8c127d491e1e697ea5680db6fd7f72db07 ./arm64-v8a/libvrapi_foveation.so
|
||||
9e8a7ce599b62a7c607b0d3637e4ec1b1ea1974c3373a7af3f5920ad2adc5e00 ./armeabi-v7a/libopenxr_loader_generic.so
|
||||
b35a45e3e4948352a5433553420848eb7a8837afbe114edb1e95979872e25426 ./armeabi-v7a/libopenxr_loader_generic.so
|
||||
1871eae093432d277da4bc751bf5f3269dfcf11f9168260b0c3caadb0dedb19d ./dex/oculusos-stubs.dex
|
||||
b634ab5640e258563c536e658cad87080553df6f34f62269a21d554844e58bfe ./hevc/COPYING.FFmpeg
|
||||
141de01f0d40b97d4f9a720db5ab8ea442f6aa35db5272048899292884994a1c ./hevc/libstagefrighthw.so
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -34,7 +34,11 @@ say "Letting FramePort log in"
|
||||
key=$(curl -fsS "$PC_URL/key?code=$PAIR_CODE")
|
||||
[[ "$key" == ssh-ed25519\ * ]] || { echo "Couldn't reach FramePort at $PC_URL. Is it still open?"; exit 1; }
|
||||
mkdir -p ~/.ssh && chmod 700 ~/.ssh && touch ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys
|
||||
grep -qxF "$key" ~/.ssh/authorized_keys || echo "$key" >> ~/.ssh/authorized_keys
|
||||
# a file without a final newline would glue our key onto its last line, where sshd never matches it (GitHub #242)
|
||||
grep -qxF "$key" ~/.ssh/authorized_keys || {
|
||||
[ -n "$(tail -c1 ~/.ssh/authorized_keys)" ] && echo >> ~/.ssh/authorized_keys
|
||||
echo "$key" >> ~/.ssh/authorized_keys
|
||||
}
|
||||
|
||||
say "Setting up Lepton's containers"
|
||||
# rootless podman leaks one kernel keyring per container start; ~200 game launches would exhaust the quota
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package: ScaredBySquares.Game
|
||||
title: Scared By Squares
|
||||
status: unknown
|
||||
notes: 'Showed black and dropped back to the home environment while the game kept running (sound only, GitHub 323).
|
||||
Fixed in FramePort 1.2.1 and checked on the Frame without the headset (the game runs at 72 fps and SteamVR keeps it
|
||||
as the running game); not yet confirmed in the headset. Rebuild and reinstall the game after updating FramePort.'
|
||||
details: 'The game (Unreal 4.27, OpenXR) creates two controller actions named "turn" (an action mapping and an axis
|
||||
mapping called Turn). The Frame''s runtime accepts the duplicate, then fails to load the input manifest it builds
|
||||
from the actions ("SetXrInputConfig failed. Failed to load manifest") and treats the game as closed. FrameBridge''s
|
||||
action_dedup (on by default) creates the second one as "turn_2".'
|
||||
tested_version: '2'
|
||||
engine: Unreal
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.hw_video_decode
|
||||
- frame.unreal_skip_obb_check
|
||||
updated: '2026-10-16'
|
||||
min_app: 1.2.1
|
||||
source_hint: Scared By Squares
|
||||
@@ -0,0 +1,25 @@
|
||||
package: com.RealitiesIO.puzzlingPlaces
|
||||
title: Puzzling Places
|
||||
status: issues
|
||||
notes: Works fine, but pointers dont show well on main menu, easy to work around.
|
||||
tested_version: '2.14'
|
||||
engine: Unreal
|
||||
xr: OpenXR
|
||||
overport_extra:
|
||||
- patch_disable_space_warp
|
||||
alt_overport:
|
||||
- patch_remove_unreal_force_quit
|
||||
frame:
|
||||
- frame.unreal_skip_obb_check
|
||||
- frame.unreal_ovrp_entrypoints
|
||||
- frame.hw_video_decode
|
||||
adapter:
|
||||
equirect_emul: 1
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-16'
|
||||
known_good_sha256: 8d9bb64b0af4c34269fffb64c5ef7515d6ba4715f5234f95517975b8e2b56c00
|
||||
app: 1.2.0
|
||||
overport_cli: 1.2.5
|
||||
issue: 359
|
||||
source_hint: Puzzling Places
|
||||
@@ -0,0 +1,22 @@
|
||||
package: com.SDI.TWD
|
||||
title: 'The Walking Dead: Saints & Sinners'
|
||||
status: works
|
||||
tested_version: Shipping / 2024.01.19 / build 400355 - STAGECH1
|
||||
engine: Unreal
|
||||
xr: VrApi
|
||||
alt_overport:
|
||||
- patch_remove_unreal_force_quit
|
||||
frame:
|
||||
- frame.ovr_microphone
|
||||
- frame.hw_video_decode
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-17'
|
||||
known_good_sha256: 4b172a5abba0901c75278fb55b867f344120c658c26ae07c8558d90e0c38cec3
|
||||
app: 1.2.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 91
|
||||
issue: 376
|
||||
source_hint: The Walking Dead- Saints & Sinners
|
||||
@@ -0,0 +1,27 @@
|
||||
package: com.VertigoGames.The7thGuestVR
|
||||
title: The 7th Guest VR
|
||||
status: issues
|
||||
notes: Runs and is playable. Foveated rendering (fixed and eye-tracked) sits offset toward the bottom right, and
|
||||
changing the foveated region size has no visible effect.
|
||||
tested_version: 1.1.3.12072
|
||||
engine: Unreal
|
||||
xr: OpenXR
|
||||
alt_overport:
|
||||
- patch_remove_unreal_force_quit
|
||||
frame:
|
||||
- frame.unreal_skip_obb_check
|
||||
- frame.hw_video_decode
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
scale: 2.0
|
||||
foveation: fixed
|
||||
foveation_radius: 0.1
|
||||
verified:
|
||||
date: '2026-10-16'
|
||||
known_good_sha256: 11a1208888adedf4aa48a672b2af5535f0e8f11e5bb1ce0a28bafe5d272bb672
|
||||
app: 1.2.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 91
|
||||
issue: 363
|
||||
source_hint: Guest
|
||||
@@ -0,0 +1,26 @@
|
||||
package: com.fasttravelgames.lollipop
|
||||
title: 'Vampire: The Masquerade - Justice'
|
||||
status: issues
|
||||
notes: Game runs fine and playable, on loading there's a random sphere in the middle of the sceen. Also control
|
||||
input images are missing so you get text like press <img>wmr.Rstick...
|
||||
tested_version: 1.00.1653
|
||||
engine: Unreal
|
||||
xr: OpenXR
|
||||
alt_overport:
|
||||
- patch_remove_unreal_force_quit
|
||||
frame:
|
||||
- frame.bhaptics_permission
|
||||
- frame.hw_video_decode
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
scale: 2.0
|
||||
foveation: tracked
|
||||
verified:
|
||||
date: '2026-10-17'
|
||||
known_good_sha256: 5669f8e9c52e4fa00a3bbce79d323c7f521e098b08dacaf330db0083c7993dee
|
||||
app: 1.2.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 91
|
||||
issue: 377
|
||||
source_hint: vampire
|
||||
@@ -0,0 +1,16 @@
|
||||
package: com.fgovr.quest
|
||||
title: FGO VR
|
||||
status: issues
|
||||
notes: Audio stuttering and popping sounds
|
||||
tested_version: 0.2.0-fgo-resolution
|
||||
engine: Other
|
||||
xr: OpenXR
|
||||
adapter:
|
||||
scale: 1.2
|
||||
verified:
|
||||
date: '2026-10-17'
|
||||
known_good_sha256: e26a0755297961e5131fe4bd404cbd956e18aef01bed71a79114805f6d805032
|
||||
app: 1.2.1.dev433
|
||||
overport_cli: 1.2.5
|
||||
issue: 364
|
||||
source_hint: com.fgovr.quest
|
||||
@@ -4,6 +4,8 @@ status: works
|
||||
notes: >-
|
||||
Headset tested for GitHub issue 61: full view, loading into gameplay, both eyes, controller input and sound
|
||||
work with the splash bypass and multiview depth-size fix. Keep the main OBB and all three content/sound-bank PAKs.
|
||||
GitHub issue 369 (headset, Lepton 3.0.5): the GPU hang at a later loading screen is fixed by zink_shader_fix;
|
||||
played ~28 min at 72 fps.
|
||||
details: Unreal Engine 4 (GLES) by ILMxLAB, like Vader Immortal, but a different engine build - it has none of Vader's
|
||||
Quest-only branches (no GetQuestShaderPrecompilePercent or RPOC key map; it precompiles shaders through Unreal's
|
||||
own pipeline cache), so frame.unreal_quest_precompile/_keymap don't apply. Its seasons and Wwise banks are Meta
|
||||
@@ -17,6 +19,10 @@ details: Unreal Engine 4 (GLES) by ILMxLAB, like Vader Immortal, but a different
|
||||
frame.unreal_multiview_depth refreshes both cached dimensions from the current eye render size; multiview and
|
||||
multisampling remain enabled. The two engine fixes check exported symbols, function sizes and instruction bytes
|
||||
before changing one instruction each; unrecognized engine builds are left unchanged.
|
||||
A fragment shader (module 16800_8dbab031..., as Zink compiles it) reads 12 int loop counters/accumulators before
|
||||
setting them and hangs the GPU (kernel hangcheck) at a loading screen, the same bug as Vader Immortal's lightspeed
|
||||
shaders; the Vulkan layer under Zink inserts stores of 0 (frame.zink_shader_fix, zink_shader_fix). Captured with
|
||||
Lepton 3.0.5, so a Frame update that changes Zink's output stops it matching (the layer logs that).
|
||||
tested_version: 1.1.9+734762.cl.439699
|
||||
engine: Unreal
|
||||
xr: VrApi
|
||||
@@ -27,10 +33,12 @@ frame:
|
||||
- frame.unreal_thumb_touch
|
||||
- frame.unreal_splash_bypass
|
||||
- frame.unreal_multiview_depth
|
||||
- frame.zink_shader_fix
|
||||
adapter:
|
||||
pose_time_fix: 1
|
||||
zink_shader_fix: 16800:8dbab031be7975e23452e333fe63afe44d5c8f4fd2b096aa21ed300426747757:4008:0x0003003e,219,102,0x0003003e,229,102,0x0003003e,235,102,0x0003003e,241,102,0x0003003e,302,102,0x0003003e,312,102,0x0003003e,318,102,0x0003003e,324,102,0x0003003e,369,102,0x0003003e,379,102,0x0003003e,385,102,0x0003003e,391,102
|
||||
verified:
|
||||
issue: 61
|
||||
updated: '2026-10-12'
|
||||
issue: 369
|
||||
updated: '2026-10-17'
|
||||
min_app: 1.0.4
|
||||
source_hint: Star Wars- Tales from the Galaxys Edge
|
||||
@@ -0,0 +1,26 @@
|
||||
package: com.orbusvr.OrbusVRCommunity
|
||||
title: OrbusVR
|
||||
status: works
|
||||
tested_version: '31.01'
|
||||
engine: Unity
|
||||
xr: VrApi
|
||||
frame:
|
||||
- frame.unity_oculus_check
|
||||
- frame.unity_text_input
|
||||
- frame.unity_runtime_msaa_off
|
||||
- frame.hw_video_decode
|
||||
- frame.unity_gl_shim
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
pose_time_fix: 1
|
||||
verified:
|
||||
date: '2026-10-16'
|
||||
known_good_sha256: fe569ffe52ca73f2384162ce80769f05f7cf177edbf26d8e429ca0e9b4aa27e8
|
||||
app: 1.2.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261015.6141207'
|
||||
agent: 91
|
||||
issue: 378
|
||||
source_hint: OrbusVR
|
||||
@@ -0,0 +1,27 @@
|
||||
package: com.schellgames.ieytd2
|
||||
title: I Expect You To Die 2
|
||||
status: works
|
||||
notes: loaded up and played 5 minutes looks fine.
|
||||
tested_version: 1.0.1.171177 (ReleaseCandidate_1.0.1_QuestStore)
|
||||
engine: Unity
|
||||
xr: VrApi
|
||||
frame:
|
||||
- frame.unity_no_msaa
|
||||
- frame.unity_oculus_check
|
||||
- frame.unity_text_input
|
||||
- frame.unity_runtime_msaa_off
|
||||
- frame.unity_gl_shim
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
scale: 2.0
|
||||
verified:
|
||||
date: '2026-10-16'
|
||||
known_good_sha256: fc626ec62e49e19210a188d90f94c370e956d0de729cbd04cbe8866430d77730
|
||||
app: 1.2.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261015.6141207'
|
||||
agent: 91
|
||||
issue: 358
|
||||
source_hint: Expect
|
||||
@@ -0,0 +1,19 @@
|
||||
package: org.godotengine.endoparasitic_vr
|
||||
title: EndoparasiticVR
|
||||
status: works
|
||||
tested_version: '1.3'
|
||||
engine: Other
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.godot_clipboard
|
||||
adapter:
|
||||
equirect_emul: 1
|
||||
verified:
|
||||
date: '2026-10-17'
|
||||
known_good_sha256: 89ed0e940c0285b1284a22d8eb5b35966dda79dd57a602c475be3cf1b758fa35
|
||||
app: 1.2.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 91
|
||||
issue: 375
|
||||
source_hint: Endoparasitic
|
||||
@@ -0,0 +1,18 @@
|
||||
package: org.smarttube.stable
|
||||
title: SmartTube
|
||||
status: issues
|
||||
notes: Android's home screen shows for a few seconds while the app starts (normal for flat Android apps; longest on the
|
||||
first start after an install). Froze once in the reporter's session.
|
||||
tested_version: '32.56'
|
||||
engine: Other
|
||||
xr: '?'
|
||||
as_is: true
|
||||
frame:
|
||||
- frame.hw_video_decode
|
||||
verified:
|
||||
date: '2026-10-16'
|
||||
known_good_sha256: cc53f1aedac52ea0d4e77803acd580e32e7e5179adc96b55db7267b63a16c864
|
||||
app: 1.2.0
|
||||
overport_cli: 1.2.5
|
||||
issue: 350
|
||||
source_hint: SmartTube_stable_arm64-v8a
|
||||
+107
-5
@@ -21,6 +21,27 @@ signatures:
|
||||
which the Frame doesn't have; games that depend on it (often online games) quit or stay offline. FramePort
|
||||
doesn't get around such checks.
|
||||
suggest: []
|
||||
- id: meta-request-failed
|
||||
# Unity's Oculus.Platform wrapper logs this when a Meta platform call gets no usable answer: OVRPort's platform
|
||||
# library answers some calls without Meta's services (request id 0), so the game's callback never runs and it
|
||||
# can wait forever (e.g. Thief Simulator, Eleven, Spectre; GitHub #346, #360, #368).
|
||||
pattern: 'An unknown error occurred\. Request failed\.[\s\S]{0,400}?Oculus\.Platform\.Request'
|
||||
severity: warning
|
||||
diagnosis: A Meta platform request made by the game failed (it needs Meta's online services, which the Frame
|
||||
doesn't have). If the game then stays on a loading screen or doesn't go on, it is waiting for that answer;
|
||||
some games have a per-game fix that skips the call. A problem report with diagnostics shows which call it is.
|
||||
suggest: []
|
||||
report: true
|
||||
- id: meta-system-activities
|
||||
# The game ships its own (renamed) copy of Meta's platform loader instead of going through OVRPort's, which
|
||||
# tries to open Meta's system activities (Horizon OS) and aborts when Android can't start them (Breachers, #357).
|
||||
pattern: 'DisplayErrorAndExit: Failed to launch SystemActivities'
|
||||
severity: fatal
|
||||
diagnosis: The game's own Meta platform library tried to open Meta's system screens (Horizon OS), which the
|
||||
Frame doesn't have, and quit on purpose. Games built this way are usually online games that depend on Meta's
|
||||
services; FramePort can't provide those.
|
||||
suggest: []
|
||||
supersedes: [native-crash]
|
||||
- id: lua-lightuserdata-pointer
|
||||
pattern: 'bad light userdata pointer'
|
||||
severity: fatal
|
||||
@@ -61,6 +82,13 @@ signatures:
|
||||
severity: fatal
|
||||
diagnosis: 32-bit-only APK (e.g. a Gear VR or Oculus Go game). The Steam Frame has no 32-bit ARM support; FramePort's 32-bit bridge translates the game (experimental).
|
||||
suggest: [frame.a32_bridge]
|
||||
- id: a32-jit-overflow
|
||||
pattern: 'a32: block at 0x[0-9a-f]+ overflowed the code buffer'
|
||||
severity: fatal
|
||||
diagnosis: The 32-bit bridge's translator stopped the game on a long run of instructions it hands to its
|
||||
interpreter, for example OpenSSL's ARMv8 SHA-1 code in Pinball FX2 VR. Fixed in newer FramePort versions;
|
||||
update FramePort and rebuild the game ("Update on Frame").
|
||||
suggest: [frame.a32_bridge]
|
||||
- id: android-too-new
|
||||
pattern: '(NoClassDefFoundError|ClassNotFoundException|NoSuchMethodError)\b.*(Landroid/window/|android\.window\.|(storeStoreFence|loadLoadFence)\(\)V in class Ljava/lang/invoke/VarHandle)'
|
||||
severity: fatal
|
||||
@@ -71,6 +99,13 @@ signatures:
|
||||
severity: fatal
|
||||
diagnosis: This app is a website, not a game, and it can't open on the Frame. It is a Trusted Web Activity that opens Meta's browser (com.oculus.browser), which the Frame doesn't have; open the website (TWALauncherActivity's "Using URL" line) in a browser instead.
|
||||
suggest: []
|
||||
- id: gvr-not-supported
|
||||
# GitHub #335 (Blade Runner: Revelations, Daydream, Unity 2017.4): Unity's "Google VR Error [Daydream]", the GVR
|
||||
# library's Java side missing on the 32-bit bridge, or a bind to Daydream's VrCore service
|
||||
pattern: 'Google VR Error \[(Daydream|Cardboard)\]|Google VR had a fatal issue while loading|class com/google/vr/sdk/base/CardboardViewNativeImpl not found|act=com\.google\.vr\.vrcore\.\S+ pkg=com\.google\.vr\.vrcore'
|
||||
severity: fatal
|
||||
diagnosis: This is a Google Daydream / Cardboard VR build (Google VR SDK), and its VR can't reach the Frame's headset. Daydream needs Google's VR services (VrCore) and Cardboard draws for a phone in a viewer; FramePort has no translation for either, so the game runs as a flat window at best, usually without working controls. An Oculus build of the same game (Meta Quest, Oculus Go or Gear VR) goes through FramePort's normal path.
|
||||
suggest: []
|
||||
- id: unity-render-crash
|
||||
pattern: 'CRASH\s*:.*#\d+\s+pc [0-9a-f]+\s+\S*libgallium_dri\.so'
|
||||
severity: fatal
|
||||
@@ -107,12 +142,17 @@ signatures:
|
||||
- id: swapchain-rect-invalid
|
||||
pattern: 'xrEndFrame failed -25\b'
|
||||
severity: fatal
|
||||
diagnosis: The runtime rejects the game's frames, so it stops drawing (for example stuck at a "Waiting" box). An image rect reaches a few pixels past its swapchain on some Frames; FrameBridge from FramePort 0.11.0 clamps the rects, so rebuild and reinstall the game.
|
||||
diagnosis: The runtime rejects the game's frames, so it stops drawing (for example stuck at a "Waiting" box). An image rect reaches a few pixels past its swapchain on some Frames (FrameBridge from FramePort 0.11.0 clamps the rects), or is empty (0x0, for example BattleTalent's first frames right after Unity switches its MSAA level; a newer FrameBridge shows the whole swapchain image instead), so rebuild and reinstall the game.
|
||||
suggest: [frame.adapter]
|
||||
- id: cylinder-menu-layers-rejected
|
||||
pattern: 'xrEndFrame failed -16\b'
|
||||
severity: error
|
||||
diagnosis: The game draws a curved (cylinder) screen to each eye separately (for example the Doom3Quest / PreyVR menu). The Frame's runtime has no cylinder layers, so FrameBridge shows each as flat quad strips; a per-eye pair makes too many quad layers for one frame and the runtime rejects the whole frame (XR_ERROR_LAYER_INVALID), leaving the menu black while the game runs. FrameBridge from this build shows the left eye's strips to both eyes to halve the count; rebuild and reinstall the game to try it.
|
||||
severity: info
|
||||
# PreyVR (GitHub #306): one rejected frame at the start of every session (its space isn't locatable yet); the black
|
||||
# menu there had another cause (a 0 Hz refresh rate stopped the game clock), so this alone is no error
|
||||
diagnosis: The runtime rejected a frame's layers once (XR_ERROR_LAYER_INVALID). At the start of a session that is
|
||||
harmless. If it repeats every frame the picture stays black; FrameBridge shows a curved (cylinder) screen drawn
|
||||
to each eye separately (for example the Doom3Quest / PreyVR menu) as one set of flat strips for both eyes to stay
|
||||
within the runtime's layer limit, so rebuild and reinstall the game with the current FrameBridge.
|
||||
suggest: [frame.adapter]
|
||||
- id: missing-ovr-symbol
|
||||
pattern: '(UnsatisfiedLinkError|cannot locate symbol) .*"?(ovr_[A-Za-z0-9_]+|ovr[A-Z][A-Za-z0-9]*_ToString)'
|
||||
@@ -173,7 +213,8 @@ signatures:
|
||||
suggest: [adapter.vk_shader_dump, adapter.zink_shader_dump]
|
||||
report: true
|
||||
- id: space-warp-used
|
||||
pattern: 'xrCreateSwapchain \d+x\d+ format=(97|129) '
|
||||
# space warp's motion vectors (97 = R16G16B16A16_SFLOAT); its depth (129) is also what eye depth layers use (#323)
|
||||
pattern: 'xrCreateSwapchain \d+x\d+ format=97 '
|
||||
unless: 'per-game: hide_space_warp=1'
|
||||
severity: info
|
||||
diagnosis: The game uses Meta's space warp (it renders half of its frames plus motion vectors, and the runtime makes
|
||||
@@ -181,6 +222,13 @@ signatures:
|
||||
Metro Awakening). Turning it off makes the game render every frame itself.
|
||||
question: Did textures flicker, jump or smear while you moved?
|
||||
suggest: [adapter.hide_space_warp]
|
||||
- id: duplicate-action-renamed
|
||||
pattern: 'action_dedup: action .* already exists in its set'
|
||||
severity: info
|
||||
diagnosis: The game creates two controller actions with the same name (for example an Unreal action and axis both
|
||||
called Turn). The Frame's runtime then can't load the game's controller setup and drops the game back to the home
|
||||
environment while it keeps running. FramePort renamed the second one, so this is handled.
|
||||
suggest: []
|
||||
- id: unity-runtime-msaa
|
||||
pattern: 'recommended MSAA level is [248]\. Switching to the recommended level'
|
||||
severity: info
|
||||
@@ -243,6 +291,16 @@ signatures:
|
||||
severity: error
|
||||
diagnosis: The screen stays black because the game submits a layer the VrApi bridge can't show. Whole frames with that VrApi layer type are dropped.
|
||||
suggest: []
|
||||
- id: unreal-reserve-refused
|
||||
# GitHub #349: Unreal's out-of-memory handler dereferences its not yet created log while libUnreal.so's static
|
||||
# constructors run (System.loadLibrary), after the Binned3 allocator's up-front reservation failed
|
||||
pattern: '(?s)fault addr 0x10\b(?:(?!Fatal signal).){0,8000}?#00 pc [0-9a-f]+\s+\S*lib(?:Unreal|UE4)\.so(?:(?!Fatal signal).){0,8000}?soinfo17call_constructors'
|
||||
severity: fatal
|
||||
diagnosis: The game crashed while Unreal was still loading, before its first frame. Its memory allocator (Binned3)
|
||||
reserves tens of gigabytes of address space at once, which Quest allows and the Frame's kernel refuses in one
|
||||
piece (for example Transformers Beyond Reality). Rebuild with the reservation marked as not committed.
|
||||
suggest: [frame.unreal_noreserve]
|
||||
supersedes: [native-crash]
|
||||
- id: graphics-requirements-missing
|
||||
pattern: '(XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING|Failed to create XR session: -50\b|xrCreateSession[^\n]*-50\b)'
|
||||
severity: fatal
|
||||
@@ -319,6 +377,13 @@ signatures:
|
||||
diagnosis: 'The Frame''s Vulkan driver crashed on a call from Unreal. Unreal 5 passes things Quest''s driver ignores: a depth resolve in a subpass without a depth attachment (handled by the Vulkan shim), and image barriers and views for a missing image when it expects fragment density maps (foveation) from the headset (for example Metro Awakening).'
|
||||
suggest: [frame.vk_sanitize, adapter.vk_spec_fixes, adapter.vk_hide_fdm]
|
||||
supersedes: [native-crash]
|
||||
- id: quest-foveation-image-missing
|
||||
pattern: 'foveationImage = 0x0, width = 0, height = 0'
|
||||
unless: 'hide_fb_foveation: filtering dispatcher extensions'
|
||||
severity: info
|
||||
question: Did the Vulkan game stop on its first frames?
|
||||
diagnosis: OVRPlugin enabled Quest Vulkan foveation but received no density image. For a first-frame failure, compare with Quest foveation suppressed. This message alone does not prove the crash cause; a null Unreal graphics pipeline can also follow an earlier fatal error.
|
||||
suggest: [adapter.hide_fb_foveation]
|
||||
- id: unreal-fdm-missing
|
||||
pattern: 'vk shim: left out \d+ image barrier\(s\) without an image \(first: layout \d+ -> 1000218000'
|
||||
unless: 'vk shim: fragment density map extensions hidden'
|
||||
@@ -347,6 +412,13 @@ signatures:
|
||||
diagnosis: The game crashed creating a very large image (over 4096 px, for example in video players). OVRPort's OpenXR dispatcher aborts on such swapchains.
|
||||
suggest: [frame.swapchain_limit]
|
||||
supersedes: [native-crash]
|
||||
- id: cortopia-org-id-wait
|
||||
# Meta's C# wrapper logs this when the native call returned request id 0 (no callback ever follows); Cortopia's
|
||||
# start-up awaits it forever (GitHub #360)
|
||||
pattern: 'An unknown error occurred\. Request failed\.[\s\S]{0,600}?Cortopia\.Scripts\.Platform\.Meta'
|
||||
severity: error
|
||||
diagnosis: The game waits forever on its loading screen for an answer from Meta's platform (an org-scoped user id, used as its analytics id) that OVRPort's platform library doesn't give. The patch makes the game skip that one request, as it does without Wi-Fi.
|
||||
suggest: [frame.cortopia_org_id]
|
||||
- id: ovr-microphone-crash
|
||||
pattern: 'ovr_Microphone_GetOutputBufferMaxSize\+'
|
||||
severity: fatal
|
||||
@@ -360,10 +432,22 @@ signatures:
|
||||
suggest: [frame.slz_vulkan_hooks]
|
||||
supersedes: [java-crash, native-crash]
|
||||
- id: vivox-api31
|
||||
pattern: 'NoSuchMethodError: No virtual method \w*CommunicationDevice\w*\(.*Landroid/media/AudioManager'
|
||||
pattern: 'NoSuchMethodError: No virtual method \w*CommunicationDevice\w*\(.*Landroid/media/AudioManager[^\n]*(?:\n[^\n]*\sat [^\n]*){0,12}?\n[^\n]*\sat com\.vivox\.'
|
||||
severity: fatal
|
||||
diagnosis: The game's Vivox voice-chat SDK calls Android 12 audio-routing methods (AudioManager communication devices) without checking the Android version; Lepton runs Android 11, so the app crashes (for example Green Hell VR). The patch makes Vivox's audio-route check return early (voice chat keeps the default route).
|
||||
suggest: [frame.vivox_audio_route]
|
||||
supersedes: [java-crash, audio-api31]
|
||||
- id: photon-voice-api31
|
||||
pattern: 'NoSuchMethodError: No virtual method \w*CommunicationDevice\w*\(.*Landroid/media/AudioManager[^\n]*(?:\n[^\n]*\sat [^\n]*){0,12}?\n[^\n]*\sat com\.exitgames\.photon\.'
|
||||
severity: fatal
|
||||
diagnosis: The game's Photon Voice microphone plugin calls Android 12 audio-routing methods (AudioManager communication devices) without checking the Android version; Lepton runs Android 11, so the app crashes when voice chat starts (for example Table Troopers at the tutorial). The patch makes Photon's audio-device pick return early (the microphone keeps the default route).
|
||||
suggest: [frame.photon_voice_audio_route]
|
||||
supersedes: [java-crash, audio-api31]
|
||||
- id: audio-api31
|
||||
pattern: 'NoSuchMethodError: No virtual method \w*CommunicationDevice\w*\(.*Landroid/media/AudioManager'
|
||||
severity: fatal
|
||||
diagnosis: Code in the game (often a voice-chat SDK) calls Android 12 audio-routing methods (AudioManager communication devices) without checking the Android version; Lepton runs Android 11, so the app crashes. FramePort has fixes for Vivox and Photon Voice; this one comes from another library, so please report it with the log.
|
||||
report: true
|
||||
supersedes: [java-crash]
|
||||
- id: lepton-data-link-failed
|
||||
pattern: "ln: cannot create symbolic link from '[^']*' to '/data/data/|Couldn't create directory for SharedPreferences file /data/user/0/"
|
||||
@@ -371,6 +455,24 @@ signatures:
|
||||
diagnosis: The game has no internal storage (saves, settings) inside Lepton. Usually its folder's path has a space (a microSD card named for example "Steam Frame 512g"), which Lepton's own scripts can't handle; FramePort's launcher (agent 83 and newer) gives Lepton a path without spaces. Connect FramePort once so the launcher is updated, then start the game again.
|
||||
report: true
|
||||
supersedes: [java-crash, native-crash]
|
||||
- id: gms-android12-call
|
||||
pattern: 'No virtual method permitUnsafeIntentLaunch\(\)'
|
||||
severity: fatal
|
||||
diagnosis: Google Play services' code in the game called an Android 12 method (the game was built for Android 12 and newer, so its version checks were built in as "always true") and Lepton runs Android 11; the game crashes on its GoogleApiHandler thread at start (for example Titan Isles). The patch makes those checks answer "no" again; Play services themselves aren't on the Frame, so sign-in and other Google features stay off.
|
||||
suggest: [frame.gms_platform_version]
|
||||
supersedes: [java-crash]
|
||||
- id: usb-midi-watcher
|
||||
pattern: 'UsbManager\.getDeviceList\(\)'' on a null object reference|at jp\.kshoji\.driver\.midi\.device\.MidiDeviceConnectionWatcher\$MidiDeviceConnectionWatchThread\.checkConnectedDevices'
|
||||
severity: fatal
|
||||
diagnosis: The app's USB MIDI driver (kshoji's, used by Unity MIDI plugins, for example PianoVision) asked Android's USB service for MIDI devices; the Frame's Android has no USB service, so the app crashed. The patch stops that poll; USB MIDI devices can't reach the app on the Frame anyway.
|
||||
suggest: [frame.usb_midi_watcher]
|
||||
supersedes: [java-crash]
|
||||
- id: unity-appui-vibrator
|
||||
pattern: 'NoClassDefFoundError: Failed resolution of: Landroid/os/VibratorManager;'
|
||||
severity: fatal
|
||||
diagnosis: The game's start activity uses Android 12's VibratorManager (Unity's App UI package, for example PianoVision) and Lepton runs Android 11, so it quits before the game starts. The patch starts the activity without a vibrator; its UI haptic feedback then does nothing.
|
||||
suggest: [frame.unity_appui_vibrator]
|
||||
supersedes: [java-crash]
|
||||
- id: bhaptics-permission-prompt
|
||||
pattern: 'GrantPermissionsActivity: Permission grant result .*permission=android\.permission\.BLUETOOTH_CONNECT'
|
||||
severity: error
|
||||
|
||||
@@ -0,0 +1,641 @@
|
||||
# Device notes
|
||||
|
||||
Detailed device findings per game and issue, moved verbatim from CLAUDE.md (which keeps a one-line pointer
|
||||
with the key fact and the patch/setting names for each). Read the matching section before debugging a game;
|
||||
general runtime facts are in docs/FRAME_RUNTIME.md and symptom → fix rows in docs/PLAYBOOK.md.
|
||||
|
||||
## a32 bridge: games, lessons, debugging aids, profiling
|
||||
|
||||
Learned: Unity 2019 contexts
|
||||
have no EGLConfig (EGL_KHR_no_config_context: the VrApi bridge takes the window's or an RGBA8 ES3 config); Unity's
|
||||
floor origin = vrapi_SetTrackingSpace(1) (the VrApi bridge now honours LOCAL_FLOOR/STAGE); mapped GL buffers are
|
||||
per buffer object (a per-target guest copy leaked ~10 MB/s and garbled vertices); the guest runtime's own scudo
|
||||
names its maps `[anon:scudo:*]` below 4 GiB (watch them for guest leaks). The Go controller = the right Frame
|
||||
controller (stick = touchpad touch, sideways > 0.6 or press = click). Gunjack (CCP, UE 4.10 NativeActivity, Gear VR,
|
||||
2026-10-10): needed the native_app_glue imports (ALooper/AInputQueue/AConfiguration/AAsset*, imports.txt), an arm64
|
||||
libvrapi.so for Java's System.loadLibrary("vrapi") and MOUNTED under OVP_HEADLESS_TEST; it then loads its map and
|
||||
quit on purpose: AndroidMain compares AndroidThunkCpp_GetSignature() with an obfuscated copy. **Works since
|
||||
2026-10-11 (owner-verified in the headset):** GameActivity.AndroidThunkJava_GetSignature() = Base64.DEFAULT(SHA-1(
|
||||
signing certificate DER)) (jadx); `a32_bridge.original_signature` computes it from the original APK's
|
||||
META-INF/*.RSA|DSA|EC, `convert()` stores it as `assets/fp_a32_signature.txt` for libUE4.so games, the bridge loads
|
||||
it at activity creation (native_activity.c) and jni.c answers Call*Method on the method ID of
|
||||
`AndroidThunkJava_GetSignature()Ljava/lang/String;` with it. After loading, Unreal leaves VR mode and enters it again on
|
||||
the same GL context; a second OpenXR session there aborted in vrclient (CSharedSemaphoreLinux::WaitFromGPU from the GL
|
||||
binding's PreBeginFrame, also with OVP_HEADLESS_TEST) → the VrApi bridge keeps a running GLES session across
|
||||
LeaveVrMode and reuses it for an EnterVrMode with the same context (upstream-patches/runtime.cpp.patch).
|
||||
Debugging aids added: A32_BREAK=<guest addr>[,..] (stack of the first hits; guest libs load at fixed addresses, e.g.
|
||||
libUE4 0xf25d5000), A32_STRACE in bridge mode = path/exit calls to logcat, activity lifecycle + LeaveVrMode caller
|
||||
logs. Lepton's logcat mirror often dies for these games: read `podman exec <container> logcat` instead. Gunjack input
|
||||
(2026-10-11): it imports no vrapi input functions and reads the Gear VR touchpad/back as AInputEvents from its
|
||||
AInputQueue (native_app_glue), so dispatchKeyEvent never reached it (no control at all) → input.c queues synthetic
|
||||
events there (ALooper_poll* return the queue's ident while one waits; AInputQueue_getEvent/finishEvent and the
|
||||
AInputEvent/AKeyEvent/AMotionEvent getters are hand-written "!" imports that know them; touch positions scaled to the
|
||||
window size). Same mapping as AFFECTED: trigger = hold touchpad, A = tap, right stick = swipe, B = back; for NativeActivity games the stick's up/down = swipe forward/back (touchpad X: Gunjack's OnFlick = reload at ~0°, special weapon at ~180°). Not yet
|
||||
headset-verified. Quest builds on the bridge (2026-10-13, Sports Scramble = a 32-bit Santa Cruz build,
|
||||
UE 4.21 + OVRPlugin on VrApi 1.21): manifest requires `android.hardware.vr.headtracking` version 1
|
||||
(`detect.requires_6dof`, headset "quest", ANALYSIS_VERSION 16) → convert writes `assets/fp_a32_headset.txt`
|
||||
= "quest" → vrapi.c `quest_touch` (read in vrapi_Initialize via the activity's AssetManager; A32_TOUCH=1/0
|
||||
overrides) passes the 64-bit bridge's Touch controllers through (enumerate/caps/state/tracking/haptics, struct
|
||||
tails per VrApi minor) and starts no synthetic input. It also needed AAsset_getBuffer (guest copy, freed in
|
||||
AAsset_close), AKeyEvent_getFlags and the other AConfiguration getters. Headset (owner, 2026-10-13): plays,
|
||||
both controllers work. Recenter (holding the Frame's menu button) turned VrApi games ~90-120 degrees aside: the bridge's app space is LOCAL + the start yaw and the runtime moves LOCAL to the head → the bridge now takes the origin from the head again on XR_TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING (LOCAL) and on vrapi_RecenterPose (owner-verified with Gunjack, 2026-10-13). Next: the other 32-bit catalog games (Journey of the Gods, Shadow Point: still "unsupported" until
|
||||
tested), translator speed. Profiled on the Frame
|
||||
(2026-10-12, `A32_PERFMAP` + perf): FPCR switches are negligible (8 of 86k samples); the cost was the run loop
|
||||
(a mutex + hash-chain walk on every dispatch, a contended counter, inline-lookup slots never refilled: Gunjack
|
||||
~45 % of its CPU) and `jit_invalidate` scanning every block on each Mono `cacheflush` (72 % of Spunky Dungeon's
|
||||
main thread). Now lock-free lookups, ltab refill, per-thread flags, per-page block lists: Gunjack's dispatcher
|
||||
23.6 % -> 1.6 %, CPU in the same phase about -55 %, still 72 fps.
|
||||
|
||||
## Upload speed
|
||||
|
||||
**Upload speed (measured 2026-09-29):** via the home router (PC Wi-Fi → router → Frame wlan0) only 15-18 MB/s, the
|
||||
same for paramiko, OpenSSH and 4 parallel streams, so the network path is the limit, not the SSH code. Direct to the
|
||||
Frame's hotspot (`wlanap` 10.35.78.1; the owner's PC has Valve's USB Wi-Fi dongle on it) 83 MB/s OpenSSH / 97 MB/s
|
||||
paramiko; reading dumps from D: via WSL drvfs is then the cap (~82 MB/s). `Frame.fast_link()` (installer
|
||||
`transfer_link`, uploads ≥64 MiB) uses usb0 > wlanap when reachable **and** the host key matches the paired Frame.
|
||||
|
||||
## Revive under Proton arm64 (Lone Echo)
|
||||
|
||||
**Revive under Proton arm64 (Lone Echo, 2026-09-29):** Revive's Detours hooks (LoadLibraryW/ExW, OpenEventW, the
|
||||
signature check) don't take effect: Wine's kernelbase is ARM64EC. The LibOVR shim in the game then does a plain
|
||||
`LoadLibrary("LibOVRRT64_1.dll")` search (exe dir, cwd, system32, windows, PATH — no registry, `OculusBase` or
|
||||
`LIBOVR_DLL_DIR` used by this build) → `Failed to initialize Oculus API (-3001)` (= Lies Beneath's "Unable to load
|
||||
LibOVRRT DLL"). A symlink `pfx/drive_c/windows/system32/LibOVRRT64_1.dll -> <base>/revive/LibReviveXR64.dll` (Wine
|
||||
maps a symlink to the already-loaded module) gets past it to **-3021 = ovrError_LibSignCheck**: the shim only accepts
|
||||
an Oculus-signed runtime. Next step (not done): make the runtime check pass without Detours, e.g. an injected helper
|
||||
that patches the game's import table (IAT) for LoadLibrary*/WinVerifyTrust, or a prefix-level override. This is
|
||||
runtime interop (what Revive does), not the Platform SDK licence check (which FramePort never touches).
|
||||
Uninstall (Quest, saves kept) used to leave `deployment.json` → still "installed"; fixed (agent v16).
|
||||
|
||||
|
||||
## OVRPort 1.2.5
|
||||
|
||||
**OVRPort 1.2.5 (2026-10-01, the fork's first release; CLI-only):** same commands (`patches [--json]`, `patch`, `help`,
|
||||
`install`), but `patch` rejects unknown/duplicate args, unknown patch ids and an empty `--patches=`
|
||||
(`tools/overport.patch` refuses empty lists). After patching it adds `libovrplatformcompat.so` itself when the platform
|
||||
loader lacks `ovrMessageType_ToString` (our `frame.ovrplatformcompat` then skips: same library). New patches (all off;
|
||||
`patches/overport.py`): `patch_ac_nexus_no_appsw_72/_90` (AC Nexus build 207706 only, exclusive),
|
||||
`patch_disable_meta_xr_audio_telemetry` (x86_64 emulators: hidden), `patch_vrapi_openxr` = OVRPort's VrApi adapter =
|
||||
the **unpatched** upstream of our `frame.vrapi_bridge` (`native/vrapi` unchanged since our 5e7df52), only usable with an
|
||||
experimental CLI built with `-PwithVrApi=true` (stable jars list it but fail). The owner prefers OVRPort's fixes over
|
||||
ours where they work as well (less to maintain): compare in the headset before switching a default.
|
||||
`frameport install <pkg> --apk <file>` installs a specific (test) build signed with the game's key.
|
||||
Headset results (2026-10-02, `PATCHED/_test-ovrport-1.2.5/TESTING.md`): OVRPort's own VrApi translator fails on the
|
||||
Frame (Climb 2: requests VkFormat 37 → crash; POTW: no GLES path, missing `vrapi_GetTextureSwapChainHandle`) → keep
|
||||
`frame.vrapi_bridge`; those two changes are upstream candidates. 1.2.5 builds (its platform compat, new permissions)
|
||||
work. AC Nexus: `patch_ac_nexus_no_appsw_90` is the catalog default (owner preferred 90 Hz); `STRICT` patches are only
|
||||
taken from a catalog recipe where `applies()` holds (the AC Nexus ones need build MAIN.450412.207706.final, else the
|
||||
whole overport run fails).
|
||||
|
||||
|
||||
## Steam Frame controller models
|
||||
|
||||
**Steam Frame controller models (2026-09-30, not yet seen in a game):** adapter setting `controller_models`
|
||||
(`native/adapter/render_model.c`) emulates XR_FB_render_model and serves `files/framebridge/controller_{left,right}.glb`;
|
||||
agent v20 (`install_controller_models`, command `controller_models`) converts the Frame's SteamVR render models
|
||||
(folder name matching "frame" + left/right, OBJ+PNG, `openxr_grip` component → grip space) at finalize/set_settings.
|
||||
Valve's models are never committed or copied off the Frame. Only games that use Meta's runtime controller models
|
||||
benefit (manifest `RENDER_MODEL` permission/feature → suggested); **none of the 34 catalog games do** (they ship their
|
||||
own meshes: that would need per-game asset replacement). Model discovery and conversion
|
||||
checked on the device 2026-09-30: `/opt/steamvr/drivers/frame_controller/resources/rendermodels/frame_controller_{left,right}`
|
||||
(component OBJs in model space = the whole `<name>.obj`, one `_color.png` 2048² near-black, `openxr_grip` rotates about
|
||||
X only; hidden-by-default components like `status` are skipped) → ~2 MB glb each, ~1 s. Not yet seen in a game (none
|
||||
of the installed builds has the new adapter, and none requests runtime models), so whether Meta's SDK attaches runtime models at the grip pose is unverified.
|
||||
|
||||
## Crash backtraces, Fossilize, swapchain limit, cylinder and equirect layers
|
||||
|
||||
**Crash backtraces (2026-09-30):** Lepton writes tombstones only to `lepton-logcats/steamlaunch-<appid>/logcat-crash.log` (after "Dumping logcat"), not launch.log; agent v23 launch tests wait for it and return `crash_log`, triage gets it via `triage(..., crash=)` (not pid-filtered: tombstones come from crash_dump's pid). The guest is `userdebug` (`ro.debuggable=1`), so Lepton's Fossilize layer loads into every app whatever the APK's debuggable flag; it has no off switch. Fossilize crashed Deadpool VR on uninitialized attachment-reference pNexts (several, in FVulkanRenderPass and the render-target layout) → `frame.vk_sanitize` = `native/vkshim` (engine's `dlopen("libvulkan.so")` string → `libfp_vk.so`, wraps vkCreateRenderPass2/KHR, drops unreadable/wrong-sType pNexts; verified: game runs). overport's dispatcher aborts on swapchains > 4096 px (`cmp wN,#4096` in xrCreateSwapchain) → `frame.swapchain_limit` (verified with 4XVR, 7680×3840 accepted by the runtime). Both are default-on (parity classifies their rewrites as
|
||||
"expected"; library migration `quest_binary_fixes_v2`). The adapter shows cylinder layers (4XVR's movie screen) as ~15° quad strips (`cylinder_strips`, setting
|
||||
`cylinder_strips`); the runtime composites them at full resolution. Equirect (360°) layers are dropped: drawing
|
||||
them ourselves (GLES renderer in xrEndFrame: stutter, never showed 4XVR's VR video; Vulkan renderer: hung the
|
||||
Frame's GPU in AC Nexus; reading the newest *released* image broke 4XVR's theatre) was removed again on the owner's
|
||||
request — don't retry without a new approach. Converted layers must count as "swapped" or the original layer list
|
||||
is submitted (runtime returns -2 for every frame). A focus debounce (hiding the Frame's brief
|
||||
FOCUSED→VISIBLE→SYNCHRONIZED dips, which make 4XVR recenter) was also removed: AC Nexus stayed black with it (it
|
||||
hid 521 ms focus changes at start). The new approach (below) is per-game, off the app's render thread, GLES-only.
|
||||
|
||||
|
||||
## 360° layers / 4XVR
|
||||
|
||||
**360° layers / 4XVR (2026-09-30):** the Frame's Android SteamVR runtime (`/opt/steamvr/bin/androidarm64/vrclient.so`,
|
||||
mounted in Lepton as `/data/steamvr/runtime`) only composites quad + projection layers (cube/cylinder/equirect(2)
|
||||
are enum names only) — nothing to unlock. Per-game adapter settings (off by default, hooks installed only when on):
|
||||
`equirect_emul` (GLES only: a worker thread with a shared EGL context converts each 360° image to a cube map when it
|
||||
changes and draws one adapter projection layer from it for every frame with exactly that frame's views (the app's own
|
||||
projection views, else xrLocateViews at displayTime); xrEndFrame waits ≤6 ms for the worker's CPU submit, never the
|
||||
GPU. Learned in the headset: quads can't be a background (the Frame draws quad layers above all projection layers
|
||||
whatever the order: hid 4XVR's balcony/controllers), and the Frame doesn't reproject a projection layer from its own
|
||||
pose (images drawn only after head turns, or ahead from xrWaitFrame and sometimes late, wobbled);
|
||||
`equirect_flip/face/res/fps/stereo`), `stable_local`, `focus_hold` (only after 3 s FOCUSED, dips <600 ms),
|
||||
`aim_pitch/aim_yaw/aim_forward`, `refresh_rate`, `layer_debug` (diagnostics); focus_hold is default-on since 2026-10-05. 4XVR re-creates LOCAL spaces every 2–4 s
|
||||
(menu recentring suspect); its theatres are baked 7680×3840 equirect2 images (`assets/100.png` …). Test 360° videos
|
||||
(NASA, public domain) are in the Frame's ~/Videos; copies in `~/Downloads/frameport-360`. 4XVR's "Internal Storage"
|
||||
lists its own `/sdcard/4XPlayer`, not Movies: agent v25 `link_media` hard-links sent files into an app's own top-level
|
||||
folder (`app_media_dirs`), `frameport frame send --app <pkg>`, GUI game page "Add videos" (players) / "Add videos &
|
||||
files…". A 4XVR webm stereo swapchain was refused with XR_ERROR_LIMIT_REACHED (-10) → right eye grey; our projection
|
||||
swapchain was halved (1536/eye) in case memory is the limit (unverified). Frame data snapshot
|
||||
(SteamVR runtimes, Lepton scripts, logs; never commit Valve binaries): `~/frameport-research/frame-data-2026-09-30/`.
|
||||
Not yet verified in the headset.
|
||||
|
||||
|
||||
## Companion apps / intents (Stremio + 4XVR)
|
||||
|
||||
**Companion apps / intents (2026-10-03, tested with Stremio + 4XVR):** a second APK can be installed into a running
|
||||
Lepton container (`podman exec -i lepton-steamlaunch-<appid> pm install -g -S <size> < apk`) and runs there, VR
|
||||
included (4XVR in Stremio's flatscreen container: FrameBridge 72 fps, settings via LEPTON_ENV_FRAMEBRIDGE_CONFIG). But
|
||||
Lepton's services.jar (`ActivityStarter.execute`) intercepts **every** `android.intent.action.VIEW` with data (any
|
||||
scheme, explicit component or not, no property to disable): it writes `steam://openurl/<uri>` to `/lepton/steam.pipe`
|
||||
(= the host Steam client's `~/.steam/steam.pipe`) and starts nothing. So "open in external player" hand-offs (Stremio
|
||||
→ 4XVR) can't work inside Lepton; don't retry without Valve changing it. Lepton installs exactly one `*.apk` per app
|
||||
folder (two break `get_apk_path`).
|
||||
|
||||
## Text input (Stremio VR)
|
||||
|
||||
**Text input (2026-10-03, verified in the headset with Stremio VR):** Lepton's Android has no IME (`ime list` empty)
|
||||
and runs VR apps headless (`lepton.headless=true`): no Android window has input focus (`dumpsys input` FocusedWindows
|
||||
empty), so neither `input text`, a USB keyboard nor Steam's keyboard reach the app. `lepton-show-flatscreen` on a VR
|
||||
app keeps VR working (FrameBridge 72 fps) and gives the window focus; Steam's on-screen keyboard then opens for text
|
||||
fields. Unity's TMP_InputField on non-Quest Android waits for the system keyboard (`TouchScreenKeyboardShouldBeUsed`)
|
||||
and deselects a frame later unless `isKeyboardUsingEvents` (Android: `InPlaceEditing() && m_HideSoftKeyboard`);
|
||||
uGUI InputField's LateUpdate keeps the field when `InPlaceEditing()`. Patch `frame.unity_text_input` rewrites them
|
||||
(`mov w0,#0|#1; ret`) at Cpp2IL's **Offset** (= file offset; RVA differs by 0x4000 in Stremio's lib), Cpp2IL
|
||||
2022.1 pre-release (Unity 6 / metadata v31; Il2CppDumper can't), cached per libil2cpp sha. `/dev/uinput` has an ACL
|
||||
for steamos (Steam Input) → agent v33 `_keyboard` uinput keyboard ("Type on Frame") reaches everything with focus.
|
||||
Installing a second APK into a container with `pm install` re-runs Lepton's post-install hook on the **main** app
|
||||
(`lepton.active_app_id`; moves its files to /data/steam_app) and corrupts it on the next start (fix: touch the APK →
|
||||
re-bake); `cmd_real package install` skips the hook.
|
||||
|
||||
## User reports 2026-10-04 (issues #4-#10)
|
||||
|
||||
**User reports (2026-10-04, issues #4-#10):** Steam shortcuts go to the signed-in account (`loginusers.vdf`
|
||||
MostRecent) else every account (agent v35 `library_users`; it used to refuse with >1 account → Play gave Steam's "Game
|
||||
configuration unavailable"); `launch` uses the shortcut's own appid and errors `NOT_IN_LIBRARY`, the app then adds it
|
||||
and plays. Unity IL2CPP fixes share one Cpp2IL run (`unity_text_input.Il2cppReturnPatch`, `ALL_TARGETS`, cache keyed by
|
||||
global-metadata.dat): `frame.unity_runtime_msaa_off` (OVRManager raises MSAA to 4x at runtime: "Switching to the
|
||||
recommended level" → Lucky's Tale restarted the headset; `OVRDisplay.get_recommendedMSAALevel` → 0) and
|
||||
`frame.unity_multipass` (Oculus XR Plugin multiview → MultiPass via `OculusSettings.GetStereoRenderingMode`; I Am Cat's
|
||||
right eye grey). Both checked against Toy Master's Cpp2IL output, not yet in a headset. VR4 quits itself (System.exit
|
||||
after the intro movie) → catalog `use_alt`. **Catalog changes reach existing games** without hardcoded migrations:
|
||||
recipes store `catalog_rev` (= `CatalogEntry.rev()`), `library._follow_catalog` re-derives non-user recipes whose entry
|
||||
changed; a maintained entry beats the user's shared copy when its `updated`/verified date is later (`catalog._newer`).
|
||||
|
||||
## Round 2 of reports, headset rounds 2-3 (2026-10-04)
|
||||
|
||||
**Round 2 of reports (2026-10-04):** VR4's campaign hang = one fragment shader reading an uninitialized loop counter
|
||||
(reporter's capture): vkshim `vk_shader_fix` setting (`<size>:<sha256>:<offset>:<words>`, from the recipe's `adapter:`;
|
||||
matched by size + SHA-256, words inserted into a copy) — on the device the module is fixed at load ("fixed shader
|
||||
module (6488 -> 6512 bytes)"); campaign itself not yet seen in a headset by us. Text settings (kind "str") stay out of
|
||||
the Game settings dialog (saving it dropped them). I Am Cat: `GetStereoRenderingMode` is inlined (no call sites) →
|
||||
`Il2cppReturnPatch.field_loads` rewrites the field read in `OculusLoader.Initialize` (Cpp2IL gives the field offset,
|
||||
`field:<name>`); verified with Toy Master: eye swapchains array=1 ×2 instead of array=2. Builds record `recipe_fp`
|
||||
(`patches/base.recipe_fingerprint`, `Patch.revision`): a changed recipe or revised patch shows "Update on Frame".
|
||||
Remembered Frames are found again after an address change (`Frame.relocate`: scan, same SSH host key, before
|
||||
login). Packaged apps show artwork by file path (`thumbs.use_file_paths`, #16). Diagnostics: this boot's kernel log.
|
||||
Device tests of requested games (2026-10-04, headless): I Am Cat, Myst 3.3.0, BattleGlide, Blade & Sorcery: Nomad
|
||||
start (RUNNING, frames). Roblox: SIGSEGV in je_free from libroblox.so ~3 s in (likely its anti-tamper vs the re-signed
|
||||
APK). BONELAB (Unity 2021.3 Vulkan, OVRPlugin 1.94): SIGSEGV with pc == fault addr in vkCreateInstance, called from
|
||||
libSLZQuestNative.so's Vulkan hooks into an unmapped (unloaded) library right after OVRPlugin's pre-init
|
||||
xrDestroyInstance; pinning openxr/vrclient libraries (RTLD_NODELETE) did NOT help — find the unloaded library with the
|
||||
linker's dlopen/dlclose logging next. Accounting+ (Unity 2017.4 built-in Oculus, libOVRPlugin + libvrapi): Unity
|
||||
never starts VR on the Frame (no OVRPlugin/OpenXR lines; runs as a 2D app), which is why its "controller setup"
|
||||
screen can't be passed — Unity 2017's Oculus device check, not the controller profiles. Cpp2IL can't read Unity 2017.
|
||||
The Frame's Android runtime (vrclient.so) knows oculus/touch_controller but not Meta's Touch Plus/Pro profiles
|
||||
(OVRPlugin suggests those too, routinely) → adapter `profile_remap`.
|
||||
Headset round 2 (2026-10-04): the Frame drops focus often (ms to 7 s; only some are presence/standby) → games pause
|
||||
or recentre (B&S Player.OnVRPresence → Teleport, BattleGlide/Unreal pauses); focus_hold now 1 s focused / 1 s max dip
|
||||
(longer must still pause). Myst crash = vrclient xrSyncActions race after FOCUSED → `sync_guard` (confirmed); its
|
||||
object glitches: app space warp suspected (FB_space_warp is advertised and used) → recipe `patch_disable_space_warp`.
|
||||
I Am Cat multipass: poses/times consistent, but every frame is submitted after the next xrWaitFrame (one period late;
|
||||
Zink + doubled draws) and the game clamps its physics step to 10 ms → judder while still; testing scale 0.8. Roblox's
|
||||
newest crash is on Fossilize's recording thread → vk_sanitize extended to own-engine libs (engine "Other").
|
||||
Accounting+: unity_oculus_check + native/ovrpshim (libfp_ovrp.so waits via ovrp_WaitToBeginFrame before Unity
|
||||
2017's ovrp_Update2) → VR in the headset at ~72 fps (2026-10-04), but stuck at "press any button" although input
|
||||
reaches its OVRInput cleanly (probe: both Touch connected 0x63, individual buttons, input focus 1) → works with issues.
|
||||
"outside of frame bounds" warnings stay (~2/frame) and are harmless.
|
||||
Steam library (GitHub #4/#21/#27, agent v38): shortcuts go to every Steam account (signed-in first; MostRecent isn't
|
||||
always the account on the Frame); stop_steam also waits for Steam's helpers; after the restart the agent re-reads
|
||||
shortcuts.vdf and writes once more if Steam put its old copy back (`shortcuts_lost`); lost again (agent v89): Steam
|
||||
ignores FramePort's entries on that Frame, so `add_devkit_entry` adds the devkit entry instead (`added` gets `via:
|
||||
devkit`) and only reports an error if that fails too. 0.6.3's Play
|
||||
auto-repair (`_add_then_play`) crashed (its job got a Job, not a reporter). Uploads resume on a transient OSError.
|
||||
Lepton's Android 11 has no clipboard service (134 services; checked with `podman exec … service check clipboard`):
|
||||
SDL/LÖVE apps crashed at start → `frame.sdl_clipboard` (`apk/dex.py`: in-place dex edit, nops one invoke, fixes
|
||||
the header checksum/signature; verified with LÖVE for Android 11.5, GitHub #24 Dramatic Shape). Godot 4.2-4.4 (Kotlin `as ClipboardManager`,
|
||||
GitHub #134 EndoparasiticVR) → `frame.godot_clipboard` (nops the `Intrinsics.checkNotNull` before that check-cast; Godot's
|
||||
clipboard methods return at once; analysis `godot_clipboard`, ANALYSIS_VERSION 10; checked on real godot-lib/templates
|
||||
4.2.2-4.4.1, not on the device; 4.1 and 4.5+ don't throw). 2D apps (vr_kind none)
|
||||
keep every suggested patch that isn't about VR (`needs_vr = False`), not a fixed list. FramePort on the Frame:
|
||||
`frame/local.py` (127.0.0.1, own key authorized; "This Frame (experimental)"; app data in
|
||||
~/.local/share/frameport-app because ~/.local/share/frameport is the agent's) and Steam library changes wait while
|
||||
Desktop Mode is open. Verified on the device 2026-10-04 (install + launch test from the Frame). Library updates on the
|
||||
Frame run one at a time (agent v40 flock): two quick uninstalls used to bring a removed shortcut back (Roblox).
|
||||
Headset round 3 (owner's verdicts, 2026-10-04): Blade & Sorcery works — its freezes were the headset's wear sensor
|
||||
flickering off while worn (vrserver.txt "HMD off/on" 0.5-2 s) → per-game `focus_hold_ms=2500` (only this game reacts;
|
||||
not a default). BattleGlide works (focus_hold). Myst works with issues (object glitches; space warp ruled out, its
|
||||
recipe keeps it on). I Am Cat works with issues (judder; scale 0.8 no help). Roblox unsupported (je_free in
|
||||
libroblox, also with the Vulkan shim). Installs skip the Steam restart when the shortcut is unchanged and wait while a
|
||||
game runs (agent v37). New default fixes in FramePort's code reach games already in a library: after every app update
|
||||
`library._follow_catalog` re-derives each non-user recipe once (setting `recipes.app_version`; tests switch it off via
|
||||
`library.REFRESH_ON_UPDATE`). Analysis fields added later: **bump `analysis/detect.ANALYSIS_VERSION`** (stored as `analysis.extra.analysis_version`); older entries whose APK is still there are analysed again at the GUI's start (background thread, not a job: ~8 s per 900 MB APK) and before a build (`pipeline.refresh_analyses`, GitHub #104); only `analysis`/`suggested` change, user recipes stay; an unreadable APK gets `analysis_failed` = the version (not retried until the next bump). Troubleshooting techniques: docs/PLAYBOOK.md "Debugging techniques". Unity `boot.config` "vulkan" substring mislabels GLES games as Vulkan
|
||||
(I Am Cat ran GLES); OVRPlugin's "Unavailable OpenXR extension: XR_FB_scene" is routine (no longer triaged).
|
||||
|
||||
## Round 4 (2026-10-04): surface swapchains, save-folder permissions
|
||||
|
||||
**Round 4 (2026-10-04):** XR_KHR_android_surface_swapchain is listed by the Frame's runtime but returns
|
||||
FUNCTION_UNSUPPORTED → adapter `surface_emul` (default on, `native/adapter/surface_swapchain.c`): an ordinary runtime
|
||||
swapchain is returned, the game gets a Surface from a SurfaceTexture on a worker thread (own EGL context, JavaVM from
|
||||
XrInstanceCreateInfoAndroidKHR), frames are read back (glReadPixels) and uploaded in xrEndFrame (Vulkan: own command
|
||||
buffer + fence per panel, never waits; GLES: glTexSubImage2D). I Am Monkey's intro works (owner-confirmed). SUPERHOT
|
||||
(Quest) quit at start: its cloud save folder was mode 1700 and Lepton's app writes through the folder's group →
|
||||
launch.sh `fix_perms` adds u+rwx,g+rwx (agent v41). Lucky's Tale: Unity's Loading.PreloadManager thread grows the
|
||||
native heap ~1 GB/s until the OOM killer (Frame freezes); no fix. `perf` works as steamos (paranoid 2; ptrace_scope 1
|
||||
blocks gdb/eu-stack/debuggerd) — see PLAYBOOK "Debugging techniques". QuestCraft downloads its JRE at first run into
|
||||
`files/runtimes/JRE` (Pojlib Installer); on the Frame it was missing (unpacked by hand, unverified). WiiCompiled: its launcher shows
|
||||
(lepton-show-flatscreen) but imports .wcgame files through Android's document picker (OPEN_DOCUMENT), which Lepton
|
||||
lacks (ActivityNotFoundException) → imported by hand: libmain.so + game.json → internal files/game/<profile>,
|
||||
DATA/ → external files/WiiCompiledOpenXRVR/DATA, MOD/ → .../RetroRewind6 (decompiled with jadx). Lepton has no
|
||||
picker at all: a FramePort fix would be an injected picker activity. Generated cover/banner art used to suppress the
|
||||
Steam placeholder set (no Steam art at all) → fixed in artwork/steam.py.
|
||||
|
||||
## Steam library failures and the devkit fallback (GitHub #21/#30/#41/#42)
|
||||
|
||||
**Steam library failures (GitHub #21/#30):** on some Frames Steam never loads FramePort's shortcuts.vdf entries (same SteamOS build and arm64 beta client as the dev Frame; IDs correct; file written before Steam starts): Play → console_log `GameAction [AppID <id>] … RequestingLicense → UpdatingAppInfo → LaunchApp failed with AppError_9` (= "Game configuration unavailable", Steam treats the id as a store app). Cause unknown; agent v42/43 diagnostics: `launch` returns `steam` (started / error + code / silent from console_log), `collect_diag` adds `steam_library` (real Steam dir, beta, Steam start vs vdf write time, entries per account, devkit games) + `steam-console.txt` (incl. Steam's `logs/shortcuts.previous.txt` if present; steamclient.so has "LoadShortcuts: rejecting attempt to load shortcuts: invalid account ID"). **Fallback (agent v43):** when Play gets AppError_9 the agent registers the game through Steam's devkit interface (what Valve's Devkit Management Tool does, MIT: `devkit-1 steam://devkit-1/<~/.steam/steam.token>/create-shortcut?response=<file>&gameid=<id>&directory=~/devkit-game` written to ~/.steam/steam.pipe; answer file / `.error`; `~/devkit-game/<id>/launch.sh` = link to the game's launch.sh, `<id>-argv.json` ["launch.sh"] (relative to the folder), `<id>-settings.json` {steam_play 0, compat_tool ""}). Steam adds it live (no restart), picks its own appid (read back from shortcuts.vdf by DevkitGameID), shows it as a normal non-Steam game named "Devkit Game: <id>" (OpenVR 0, but VR works: owner-verified 2026-10-04), art copied to grid/<appid>*. Ids: letter first, then letters/digits/_ only (spaces, '-', leading digit → "missing/invalid arguments"). Later Plays use the devkit entry; uninstall (`devkit_unregister`, `delete-shortcut` live) and purge remove it. Verified on the dev Frame: register/launch/unregister; the AppError_9 trigger itself only in unit tests. GitHub #42 (two Steam accounts, neither MostRecent): Steam rewrote the active account's shortcuts.vdf without FramePort's entries right after starting, and added the devkit entry live without saving it, so `devkit_appid` (vdf only) failed ("Steam added the devkit entry but didn't save it"); agent v55 `devkit_appid_from_log` reads Steam's `sanitize shortcut app id "~/devkit-game/<id>/launch.sh": replacing 0 with N` console line. GitHub #41 (one account): same Steam behaviour, and every install restarts Steam, which forgets the never-saved devkit entry. Agent v56: the log fallback reads only the current session's console_log.txt; Play re-registers a devkit entry that gets AppError_9; art updates also write the devkit entry's grid art (`copy_grid_art`). Open: why some Frames' Steam never loads or saves shortcuts.vdf (single account too).
|
||||
|
||||
## Exit game (GitHub #36)
|
||||
|
||||
**Exit game (GitHub #36, 2026-10-04):** `Apps.TerminateApp` (what Exit game calls; reachable for tests through Steam's CEF devtools on 127.0.0.1:8080, SharedJSContext, `Runtime.evaluate` — a stdlib websocket client is enough) closed both a normal shortcut and a devkit entry on the dev Frame within 1-3 s. SIGTERM to Steam's `reaper` alone left launch.sh + Lepton (setsid) + the container running (an earlier headset launch ran on for 87 min); SIGTERM to launch.sh cleans up in ~4 s. Agent v44: launch.sh's 2 s loop ends the game when its parent (the reaper) is gone; `upgrade_launchers` (from ensure_host_fixes) adds that to existing launchers in place. Which in-headset exit path fails is still unknown. Screenshots on the Frame: all under SteamVR's appid 250820 (`760/remote/250820/screenshots`, screenshots.vdf has creation time, no game).
|
||||
|
||||
## SteamVR dashboard at game start
|
||||
|
||||
**SteamVR dashboard at game start (2026-10-04):** the dashboard (Resume game / controller / VR options) was open whenever a FramePort game started (also over Lepton's 2D launcher). Steam's UI exposes `SteamClient.OpenVR.VROverlay.{IsDashboardVisible,HideDashboard,ShowDashboard}` (CEF devtools, `steam_js` in the agent). Agent v44: launch.sh starts `_dashboard_worker` (waits for FrameBridge's first `pacing:` line in launch.log, then hides a visible dashboard for 25 s, at most 3 times; log `<base>/dashboard.log`; opt out with env FRAMEPORT_KEEP_DASHBOARD=1). Verified on the dev Frame (dashboard shown → 4XVR launched via Steam → hidden ~5 s after the first frames); not yet seen in the headset. **Headset (ITR2, 2026-10-05): too late** — Steam shows its frame menu (`valve.steam.gamepadui.frame.menu`, vrwebhelper_systemui.txt `[PooledPopups] Showing`) ~0.3 s after the game's first submitted frame (FrameBridge `new layer:`), but the first `pacing:` summary comes ~8 s later; the owner had pressed Resume (`[HideDashboard] return_to_game`) before the worker looked. Agent v52: watches from the first `new layer:` line (incremental log reads, 0.5 s polls, 30 s window). Agent v59: watches 120 s and hides up to 10 times (the menu came back after 30 s in the owner's sessions). Agent v53: stops for good once the player opens the dashboard with the controller (`toggle_dashboard_action` in vrwebhelper_systemui.txt since the worker started): v52 closed it 60 ms after each press, and the game, paused for it, stayed paused.
|
||||
|
||||
## Space warp / ITR2
|
||||
|
||||
**Space warp / ITR2 (2026-10-04):** Into The Radius 2 (UE5, `libUnreal.so` + OVRPlugin, Vulkan) uses Application SpaceWarp (extra swapchains `376x376 format=97` motion vectors + `format=129` depth); #35 reports flickering textures. OVRPort's `patch_disable_space_warp` has no effect on UE5, and hiding XR_FB_space_warp in FrameBridge's enumerate doesn't reach the game either: **OVRPort's dispatcher offers/enables XR_FB_space_warp itself**. FrameBridge `hide_space_warp` (per game, off) hides it and strips `XrCompositionLayerSpaceWarpInfoFB` (1000171000) from the projection views (log `hide_space_warp: removed space warp info`); the game still renders its MV swapchains. Test build installed on the dev Frame; flicker not yet checked in a headset. Heuristic: UE5 + OVRPlugin shows it as an option (off). `equirect_emul` is suggested for Unreal games whose graphics API isn't detected ("GLES or unknown"); on Vulkan it switches itself off (Myst/Riven/ITR2): harmless, but Unreal Vulkan detection is a known gap.
|
||||
|
||||
## PR #34: Meta XR Audio metadata (Batman)
|
||||
|
||||
**PR #34 (merged 2026-10-04, Lucas-Mathieu):** `native/adapter/audio_metadata.h` patches Meta XR Audio Wwise (only build ID e1619e7f…, Batman: Arkham Shadow 1.4.1) so queued audio metadata isn't freed while the current audio frame references it (smoke-bomb crash). Verified headless: installs ("metadata reclamation follows …"), 72 fps; we added a once-per-second scan limit. Outside PRs: review source, rebuild `artifacts/` ourselves, merge locally (contributor's commit kept), push main.
|
||||
|
||||
## Heuristics eval (2026-10-04)
|
||||
|
||||
**Heuristics eval (2026-10-04):** `scripts/eval_heuristics.py "<VR CyberDeck Portable>"` → 19/44 recipes exact, 322/352 fields (most diffs: `frame.unity_text_input` suggested where older catalog recipes lack it; the rest are runtime-only findings: use_alt, vk_shader_fix, focus_hold, sync_guard, multipass). `PATCHED/` copies aren't scored (already converted).
|
||||
|
||||
## Proton default (stable vs Experimental)
|
||||
|
||||
**Proton default (agent v51, owner's choice 2026-10-05):** the newest **stable** ARM64 Proton is the default for PC VR games (`pick_proton`: asked-for name/alias, else newest installed stable, else any stable). Agent v49-50 defaulted to Experimental; the owner's headset A/B with Rick and Morty (Experimental 69 % reprojected frames, stable felt much smoother) reverted it. The game page's Customize shows `pcvr.proton_tool` as a dropdown (Stable (default) / Experimental = alias `proton-experimental`); `ensure_proton` installs a chosen one (it asks once more for the runtime Steam only names after Proton is installed; Experimental installed unattended on the device in 53 s). A PC VR launch test that fails on stable suggests Experimental (`pipeline.PROTON_TOOL`, `proton_alternative_worth_trying`, button "Try Proton Experimental and reinstall"). Remaining Rick and Morty stutter on head turns = the game rendering below the refresh rate (reprojection), not Proton.
|
||||
|
||||
## USB cable link
|
||||
|
||||
**USB cable link (verified 2026-10-05, cabled to the dev PC):** `usb0` is a USB **NCM** gadget (configfs g1: `ncm.usb0` + `ffs.adb`, Valve 28de:2460) set up by `usb-ncm-gadget@usb0.service`, which only runs with `ConditionPathExists=|/etc/systemd/system/adbd.service.d/steamos-devkit-enabled` = **Developer Mode only**. `usb-ncm-dnsmasq@usb0` serves DHCP with fixed `dhcp-host` entries: Frame 10.86.200.233, PC **10.86.200.234** (`frame/usb.py` FRAME_USB_IP/PC_USB_IP). Windows 11 binds its built-in "UsbNcm Host Device" (no driver); WSL mirrored sees eth 10.86.200.234. USB is high-speed (USB 2.0): upload 36.9 MB/s vs 11.3 MB/s home Wi-Fi. Frame→PC over the cable worked without a firewall change. `scripts/usb_autotest.py` (Windows via powershell.exe from WSL), `frameport frame usb-check`. Wizard "Set up with a USB cable" (`PairingServer(host=PC_USB_IP)`; the real bootstrap ran end to end over USB). Discovery dedupes by SSH host key and prefers USB > Frame hotspot > network (`discovery.dedupe`); a lost address is re-found by key (`Frame.relocate`, tested with a dead saved address).
|
||||
|
||||
## Start activity / QuestCraft / ITR2 pop-in
|
||||
|
||||
**Start activity / QuestCraft / ITR2 pop-in (2026-10-05):** WiiCompiled's VR part (`QuestActivity`, SDL, process `:game`) stays behind Lepton's flat window when the launcher is shown (`device.text_input_window`). `frame.start_activity` (opt-in; analysis `extra.vr_activity` = the original APK's activity with Meta's VR category when it isn't the launcher) gives that activity's filter LAUNCHER and every other LAUNCHER becomes INFO, per element (`axml.set_start_activity`); Lepton's own `apk-info-extractor --print-activity-name` (on the Frame under Lepton/liblepton/apk_extractor) then answers QuestActivity. **OVRPort gives every MAIN activity LAUNCHER + VR categories**, so the VR activity must come from the original APK's analysis, not the converted manifest. Lepton has no activity override (`APP_ACTIVITY` is reset when app_metadata.sh is sourced). QuestCraft reaches Minecraft 1.21.5 (Fabric, Vivecraft, Sodium; LTW "Large Thin Wrapper" GL 3.0 on the Frame's Zink) and stops at `OpenGL error 1282` in `WindowFramebuffer` createTexture (Minecraft's crash report in `files/instances/1.21.5/crash-reports/`, Pojlib's `files/latestlog.txt`); the vrclient SIGSEGV / "pthread_mutex_lock called on a destroyed mutex" afterwards is only the shutdown (Unity's render thread still in vrclient while the instance is destroyed). ITR2 "models popping in and out" in game: Unreal reads user config from **internal** storage (`lepton-data/internal/<pkg>/files/UnrealGame/<Project>/<Project>/Saved/Config/Android/Engine.ini`, not external); `r.AllowOcclusionQueries=0` there broke its menus (removed again). Vulkan shim `vk_query_slots` (two slots per occlusion query) never saw ITR2 create an occlusion query pool, and the run with it crashed (Unreal RenderThread SIGSEGV, caught by sentry-native: no tombstone; the backtrace is in `cache/sentry/*/.sentry-native/*.run/*.envelope` with module offsets) - left off. Next suspect: Unreal 5 mobile HZB occlusion reading depth stored with Valve's FDM injection layer; test = launcher `VK_INSTANCE_LAYERS=''` (Lepton then loads neither VALVE_rpo nor VALVE_fdm_injection, Fossilize still). QuestCraft: LTW overrides glGetError and returns 0 with `LIBGL_NOERROR` set; Lepton passes `LEPTON_ENV_<NAME>` to the app as `<NAME>`, so catalog `lepton_env: {LEPTON_ENV_LIBGL_NOERROR: '1'}` gets Minecraft past the GL error 1282; then black picture (see the catalog entry). FrameBridge logs `new layer` once per layer type per process and projection views only for the first frames, so a second session in the same process (Vivecraft after Unity) needs `layer_debug=1`.
|
||||
|
||||
## Vulkan validation / ITR2 solved
|
||||
|
||||
**Vulkan validation / ITR2 solved (2026-10-05):** Khronos' validation layer can't come from Lepton (its layer dir is in the read-only guest image; the Linux copies on the Frame are glibc) and a global `debug.vulkan.layers` property (via the LEPTON_GFXRECON_FP_PROPS trick) kills the container at boot. Working recipe: bundle `libVkLayer_khronos_validation.so` (Khronos android-binaries release, arm64-v8a, stored uncompressed) into a test APK re-signed with the game's key (`apk.sign.sign`), install with `frameport install <pkg> --apk`, and set the Vulkan shim's `vk_validation=1` (it adds the layer at vkCreateInstance; findings under the logcat tag VALIDATION in launch.log, each message ID capped at 10). ITR2's flicker + windows behind models = Unreal's Qualcomm shader-resolve subpasses with a depth resolve of a single-sampled depth attachment (VUID-04908/-03179); `vk_spec_fixes=1` drops that resolve (its TRANSFER_DST half never applies to ITR2: the main depth is transient). Valve's VALVE_rpo layer removed ITR2's fog (catalog `lepton_env: VK_INSTANCE_LAYERS: VK_LAYER_VALVE_fdm_injection`). `r.ViewDistanceScale=2` in the internal Saved/Config/Android/Engine.ini only exists on the owner's Frame (the catalog can't write internal storage yet). Launch tests: Lepton prints a transient "is not a running context" on the first start after an APK change (agent v54 `not_started` waits 30 s for "Boot complete!").
|
||||
|
||||
## GitHub #38/#39: PowerWash Simulator, The Room VR
|
||||
|
||||
**GitHub #38/#39 (2026-10-05):** PowerWash Simulator stuck at "Waiting.." on a reporter's Frame = Unity sized the right-eye image rect past its swapchain (rect 268+1656 on a 1920-wide swapchain; the runtime's recommended size differs per Frame) and SteamVR rejected every frame (`xrEndFrame failed -25`, XR_ERROR_SWAPCHAIN_RECT_INVALID), after which the game stopped calling xrEndFrame. FrameBridge `rect_clamp` (default on; sizes noted in xrCreateSwapchain; clamped layers count as swapped) keeps projection/quad rects inside their swapchain; triage `swapchain-rect-invalid`. Not reproducible on the dev Frame with `scale` (Unity's eye sizing isn't just the recommended width); no regression there (72 fps). The adapter's revision was NOT bumped (that would mark every installed game outdated): affected users rebuild. The Room VR (#38) = Unity's render thread SIGSEGV in libgallium_dri.so ~30 ms after the game recreates its eye swapchain with samples=4 (FrameBridge retries samples=1); the game's own code turns MSAA on (not OVRManager); candidate fix: hide GL_EXT_multisampled_render_to_texture (GL shim) - needs the APK to test. The launch test passed both (render thread dead / no frames): triage gap.
|
||||
|
||||
## Headset round 2026-10-05 (evening)
|
||||
|
||||
**Headset round 2026-10-05 (evening):** I Am Cat's judder = repeated xrLocateViews of one display time returning
|
||||
slightly different poses → FrameBridge `pose_consistency` (owner-verified, works). Lucky's Tale freeze on touching a
|
||||
save slot = OVRPort's OpenXR dispatcher converting XR_FB_haptic_amplitude_envelope with ns read as s (GitHub #9) →
|
||||
xrshim `haptic_fix` (owner-verified); its remaining short pauses were the wear sensor ("HMD off/on" 0.5-1 s in
|
||||
`logs/eyetracking.txt`, not vrserver.txt) → **`focus_hold` is on by default with 5 s** (owner's choice; C defaults
|
||||
too). The Room VR works (`unity_no_overlay_copy`). BattleSisters (Unity 2019.4 built-in VR, no libOculusXRPlugin.so)
|
||||
flooded "outside of frame bounds" ~2400/s and hung the GPU (kernel hangcheck, zink DEVICE LOST) → the ovrpshim frame
|
||||
wait now also applies to Unity 2019 without the Oculus XR Plugin (`UnityOculusCheck.legacy_loop`). Vader Immortal
|
||||
(UE4, stuck on the loading image after the intro, GitHub #49): VRP repacks carry a Frida gadget (`libfrda.so`,
|
||||
config `hijack_responses`), but OVRPort's `patch_clean_up_frida` removes its loadLibrary call, so it never runs on
|
||||
the Frame; `frame.ovr_trace` (opt-in, `native/ovrtrace`: 1138 exported ovr_* stubs → real loader functions, logcat
|
||||
tag `fp_ovrtrace`: calls, PopMessage answers, unanswered requests every 10 s) is the next diagnostic.
|
||||
|
||||
## Unity built-in VR input (Accounting+, BattleSisters)
|
||||
|
||||
**Unity built-in VR input (2026-10-05):** probe builds (`FRAMEPORT_INPUT_PROBE=1 frameport build …`; it logs
|
||||
trigger/grip crossings too) showed OVRPlugin returns the full Touch state for every controller mask (also Go masks);
|
||||
presses reach the games' OVRInput. Accounting+ (Il2CppDumper v6.7.46 reads its Unity 2017 metadata v24, run on Windows)
|
||||
passes stance selection (NewtonVR grip/trigger) but its motion warning waits for `Input.GetMouseButtonDown(0/1)`,
|
||||
which Lepton never delivers (no focused Android window) → ovrpshim registers its own
|
||||
`UnityEngine.Input::GetMouseButtonDown(System.Int32)` icall (il2cpp_add_internal_call, after Unity's: resolve first)
|
||||
that adds a click in the frame a Touch trigger or A/B/X/Y is newly pressed (`unity_oculus_check` revision 3).
|
||||
BattleSisters (Unity 2019 InputSystem/XR InputDevices via `VrHandInput`): libunity's Oculus module (OVRPlugin
|
||||
function table: a global pointer at 0x16b57c0 in this build, slots filled by name, e.g. +0x160 GetControllerState,
|
||||
+0x168 State2, +0xe8 GetNodePresent) only reports controllers when `strncmp(deviceModel, "Oculus", 6) == 0` (next to
|
||||
the Go check `deviceModel == "Oculus Pacific"`); Lepton's model is "Valve Lepton" → Go/unknown → only Go masks polled,
|
||||
buttons dead. `unity_oculus_check` revision 4 (`oculus_model_checks`, Unity 2019 only) turns the 17 compares' length
|
||||
into 0 (`orr w2, wzr, #6` → `mov w2, #0` after the adrp/add of the "Oculus" literal; the string stays: it is also
|
||||
Unity's VR device name). Device result: libunity now polls `ovrp_GetControllerState(0x3)` (Touch); owner-confirmed
|
||||
2026-10-06: buttons work. Its first controller vibration then hit OVRPort's haptic-envelope bug (11 GB, OOM kill) →
|
||||
`haptic_fix` is now suggested for every game with libOVRPlugin.so (settings detect), BattleSisters works. Ruled out before: ProductName, GetNodePresent, the device-model string itself, exports.
|
||||
Accounting+ works (owner, 2026-10-06).
|
||||
|
||||
## Vader Immortal (headless investigation)
|
||||
|
||||
**Vader Immortal (UE4, GitHub #49, 2026-10-06, headless):** stuck after the intro on an in-game image (the splash
|
||||
quad ends ~6 s in; then the game's own projection frames, 72 fps, balanced xrBeginFrame/xrEndFrame). Not the Platform
|
||||
SDK (`frame.ovr_trace`: only user + entitlement, both answered) and not the repack's Frida gadget (OVRPort's
|
||||
`patch_clean_up_frida` removes its loadLibrary). It **leaks ~430 GPU mappings (/dev/dri/renderD128) and ~20 MB a
|
||||
second** (6.5 GB + swap after 5 min, then 26 fps): page-fault stacks (perf -e page-faults, offsets resolved with the
|
||||
process maps + vrclient.so's own symbols; its text segment is at file offset + 0x4000) end in SteamVR's runtime:
|
||||
`xrBeginFrame → CSxrCompositorOpenVR::BeginFrame → SubmitExplicitTimingData → CVRCompositorSharedTextures::
|
||||
BeginGPUTimingCommandBuffer` and `xrEndFrame → CVRCompositorClient::SubmitWithArrayIndexAndTime`. Ruled out: the
|
||||
layer color scale/bias + image layout structs (FrameBridge `strip_color_bias` 1/2, diagnostic), Valve's Vulkan
|
||||
layers (VK_INSTANCE_LAYERS=""), array swapchains in general (Lucky's Tale/I Am Cat flat). Kernel tracepoints aren't
|
||||
allowed for steamos. FrameBridge: `layer_debug` logs xrDestroySwapchain and per-5 s xrBeginFrame/xrEndFrame counts;
|
||||
`frame_balance` (ends an open frame before the next begin) exists but Vader never leaves one open. Next (built,
|
||||
not yet run: the Frame slept): `layer_debug` also counts xrAcquire/Wait/ReleaseSwapchainImage per 5 s (hooked only
|
||||
with layer_debug, after the other conditional hooks) to see whether Vader skips a wait or release: it doesn't (361/361/361 per 5 s).
|
||||
FrameBridge `snapshot=N` (`snapshot_gl.c`, GLES): every N s the left-eye image the game submits is read back on its
|
||||
own context and saved as `files/fb_snap_0-7.ppm` (quarter size) — headless launches show a black headset view, this
|
||||
shows what the game draws. Vader: Lucasfilm logo (an OBB mp4: video works), then its loading card (portrait + segmented
|
||||
bar) that never advances; the async loader thread sleeps and OBB reads stop (~168 MB of a 2.7 GB pak).
|
||||
|
||||
## SteamVR overlay apps
|
||||
|
||||
**SteamVR overlay apps (agent v75, 2026-10-10):** host OpenVR overlays (VRApplication_Overlay) are composited over Lepton (Quest) games on the Frame (probe checker seen over 4XVR in the headset view, `native/vroverlay_probe`); Windows ones register through Proton's vrclient too (Temporal Reality's Windows build created its overlays; fpsVR never reaches OpenVR under Proton). Detection `analysis/vroverlay.py` (bundled `.vrmanifest` with `is_dashboard_overlay`, else OpenVR + IVROverlay + self-registration markers, engine Other; Rift fingerprint `RIFT_ANALYSIS`), patch `pcvr.vr_overlay` (param autostart), Linux entry fields `vr_overlay`/`vr_overlay_autostart` (game page switch); agent `register_vr_overlay`/`unregister_vr_overlay`/`launch_vr_overlay` (IVRApplications via ctypes, live; manifest `<anchor>/frameport-overlay.vrmanifest`, the app's own key, binary = launch.sh). **SteamVR on the Frame reads only `binary_path_linux_arm`** (binary_path_linux alone is skipped). Overlay apps: no launch test, no Linux Steam-parent watchdog (`FRAMEPORT_OVERLAY`), not a "running game". A Steam overlay-app shortcut and a game shortcut run together. SteamVR's SetApplicationAutoLaunch didn't persist on the dev Frame (the watch never started by itself) → **agent v76: FramePort's own autostart**: the deployment's `overlay.autostart` is the source of truth; `ensure_host_fixes` (`ensure_overlay_service`) keeps the user service `frameport-vr-overlays.service` (`_vr_overlay_watch`, 5 s polls of the known vrserver's /proc stat) only while an overlay app has autostart on (register/unregister, uninstall, purge and the kill switch `~/.local/share/frameport/vr-overlays.disabled` / `FRAMEPORT_NO_OVERLAY_AUTOSTART` update it); a new vrserver (pid + start time, kept in `~/.cache/frameport-vr-overlays.json` across agent updates) → child `_vr_overlay_round`: wait for IVRApplications, 15 s grace, `launch_vr_overlay` for apps not running (folder process or GetApplicationProcessId); log `~/.local/share/frameport/vr-overlays.log`. Dev Frame: adopted the running vrserver, skipped the already running watch; a start after a real SteamVR start/boot is not yet seen. Details: docs/FRAME_RUNTIME.md "Overlay apps".
|
||||
|
||||
## Vader's leak solved / AC Nexus flips
|
||||
|
||||
**Vader's leak solved / AC Nexus flips (2026-10-14):** Vader Immortal leaves GL errors pending on its context; SteamVR's GL interop (`openxr_graphics_gl_openvr.cpp`, `xrclient_<pkg>.txt` in Steam's logs: `SXR_GL_CHECK: error:0x502 ... glGenTextures`) takes the stale error as its own failure once, and from then on `CVRCompositorSharedTextures::BeginCommandBuffer` allocates a command buffer every frame (perf page-fault stacks; ~430 renderD128 mappings + 22 MB/s). Adapter `gl_error_clear` (GLES, catalog on for Vader ep1-3) clears them before xrCreateSwapchain/xrBeginFrame/xrEndFrame: flat memory, no SXR_GL_CHECK (headless). The per-game `xrclient_<pkg>.txt` logs are worth reading for runtime errors. The Frame's runtime caps swapchains per session (XR_ERROR_LIMIT_REACHED from ~15; AC Nexus asks for more): flip emulation now turns quads upright in place (scratch VkImage, once per acquire; transfer usage added to single-layer colour swapchains) instead of a shadow swapchain per quad, which ran into the cap (#138). Headless sessions don't draw AC Nexus's panels (adapter `flip_dump` saves before/after images of flipped quads, for headset runs).
|
||||
|
||||
## Unreal's self-restart
|
||||
|
||||
**Unreal's self-restart (agent v90, 2026-10-13):** UE 4.21+ restarts the app once after its first-run shader
|
||||
precompile ("optimizing" screen; `r.ProgramBinaryCache.RestartAndroidAfterPrecompile`): it starts its own LAUNCHER
|
||||
activity and calls System.exit(0); Lepton ends the container with the first process (the restarted one with it).
|
||||
Skipping `AndroidThunkJava_RestartApplication` or the cvar = 0 (accepted via UE4CommandLine.txt `-ini:`) left Sports
|
||||
Scramble on that level for good. launch.sh (RESTART_BLOCK, `upgrade_launchers` adds it) starts Lepton once more when
|
||||
`_restart_requested` sees the app's own LAUNCHER start (system log, uid >= 10000) <= 5 s before its exit; first run
|
||||
kept as `launch-before-restart.log`; `FRAMEPORT_NO_RESTART=1` off. Owner-verified with Sports Scramble's first start (2026-10-13).
|
||||
|
||||
## xrWaitFrame runs ahead (Journey of the Gods)
|
||||
|
||||
**xrWaitFrame runs ahead (Journey of the Gods, 2026-10-14, owner-verified):** with real frames (headset on) the
|
||||
Frame's runtime sometimes returns from xrWaitFrame at once with a display time less than one refresh after the frame
|
||||
just submitted, and then rejects the second submission for that refresh (`VRCompositorError_AlreadySubmitted` in
|
||||
Steam's `logs/xrclient_<pkg>.txt`; FrameBridge pacing above the display rate). VrApi games that render faster than
|
||||
the display ran ahead (~120 submits/s at 90 Hz) and the scene slid and snapped back. The VrApi bridge re-waits when
|
||||
the new display time is under half a period after the last submitted one (`pacing 2s:` counters). Headless runs only
|
||||
submit empty frames and never show it. Lepton's logcat mirror also missed the whole verifying session (launch.log =
|
||||
Lepton's own lines only): the keeper now catches a silent mirror too (agent v91).
|
||||
|
||||
## Lepton's logcat mirror dies
|
||||
|
||||
**Lepton's logcat mirror dies (agent v67, 2026-10-09; v91 2026-10-14):** Lepton's mirror (`podman exec -it <container> logcat -v threadtime,color`) fails three ways: `logcat: Unexpected EOF!` right after the game starts, `Logcat read failure`, or running and writing nothing at all (Lepton 3.0.5: seen twice on 2026-10-14, once in the owner's session, once headless). launch.sh's `_logcat_keeper` reads `podman exec <container> logcat -v threadtime -T <epoch>` itself into launch.log after a failure line or 20 s without a logcat line (from the launcher's start when the mirror never wrote, else from just before its last line), restarts it from where it ended (≤5), stops it when Lepton's coloured lines come back, sets the container's log buffer to 16 MiB (`logcat -G`), and logs every decision to `<base>/logcat-keeper.log`. Checked on the dev Frame: a mirror killed mid-game (hand-over without a gap) and a silent mirror (the whole session recovered).
|
||||
|
||||
## Double launch
|
||||
|
||||
**Double launch (agent v57, 2026-10-06):** a second Play while Lepton still boots (~10 s with nothing to see) made
|
||||
the second Lepton stop the first one's container ("Waiting for steamlaunch-<appid> (PID …) to exit", exit 137
|
||||
"(starting)", "Clearing baked app data due to early exit") and both died (Vader, BattleSisters). launch.sh now takes
|
||||
`flock` on `<base>/.launch.lock` (fd 9, inherited by Lepton; the watchdog and dashboard helpers close it with
|
||||
`9>&-`); a second launch exits 0 and logs to `<base>/launch-dup.log`. `upgrade_launchers` adds it to existing
|
||||
launchers. Verified on the device (second launch during boot: ignored, the first kept running). Vader on its loading
|
||||
card ignores input too (owner pressed/held every button: presses reach the runtime, the card never changes).
|
||||
|
||||
## Issue triage round (2026-10-06)
|
||||
|
||||
**Issue triage round (2026-10-06, owner's headset):** vibration in OVRPlugin games = 2 s vibrations updated per frame and
|
||||
stopped with amplitude 0; FrameBridge turns amplitude 0 into xrStopHapticFeedback (else each buzz ran 2 s), haptic_fix
|
||||
uses the envelope RMS (was its peak), per-game `haptic_scale` → Creed/The Boys/Jurassic World fine. Lambda1VR (TBXR):
|
||||
loader named by Build.MANUFACTURER (`frame.tbxr_vendor`), no graphics extension enabled (FrameBridge adds
|
||||
XR_KHR_opengl_es_enable + asks for the requirements on -50), always multisampled render-to-texture (GL shim gives
|
||||
single-sampled stand-ins when GL_EXT_multisampled_render_to_texture is hidden) + its xash/ data → works. Jurassic World:
|
||||
`frame.vrapi_stub`. Metro Awakening: contributor's vkshim fixes + hide_space_warp + no VALVE_rpo (jumping polygons like
|
||||
ITR2). Pinball FX VR: hide_space_warp (stutters). Eleven: a Meta online request fails after platform init → needs Meta
|
||||
services. Star Wars Tales: top half black + freeze after loading; ruled out: asset-file paks (never requested), Valve
|
||||
foveation (off: no change), GL errors (MESA_DEBUG=1: none), EGL_BAD_ACCESS once in OVRPlugin init (harmless); the game's
|
||||
eye image reads back black. BlazeRush: VrApi bridge exports + ovr*_ToString stubs + avatar stub get it to the menu room
|
||||
at 72 fps, full input reaches it (diagnostics `input 5s`: Touch type only, sticks 1.0, buttons, poses 0x8f), but the room
|
||||
draws no controllers and ignores input; avatar loader forced to its "Failed" path (no logged-in user) changed nothing.
|
||||
`frame.ovr_trace` can't trace Unity games (P/Invoke dlsym; nothing imports ovr_*). Headless: the VrApi bridge's 30 s
|
||||
head-pose deadline ends VR mode without a worn headset (not a game bug).
|
||||
|
||||
## Lepton storage
|
||||
|
||||
**Lepton storage (2026-09-30):** each app's /sdcard (= /storage/emulated/0 → `<base>/lepton-data/external`) has `Movies`/`Download`/`Documents` symlinked to the Frame's `~/Videos`/`~/Downloads`/`~/Documents` (liblepton/mounting.sh, only if they exist at start); agent v24 `storage_targets` reads that mapping. Android's MediaProvider canonicalises paths to /home/steamos/... and rejects every file ("doesn't appear under [/system/media...]"), `sm list-volumes` is empty: the media index never works, apps must browse folders. Lepton installs with `adb install -g` (runtime permissions granted, MANAGE_EXTERNAL_STORAGE too). Files: `install/files.py`, `frameport frame send|storage`, GUI Files tab (formerly Frame → Send files).
|
||||
|
||||
## SteamVR per-app settings
|
||||
|
||||
**SteamVR per-app settings (2026-09-30):** editing steamvr.vrsettings while SteamVR runs is lost; the web API (127.0.0.1:27062 /app/setsettings) needs `x-steamvr-secret`. `native/vrsettings` = `fp_vrsettings.exe` (freestanding, OpenVR `FnTable:IVRSettings_003` as a Utility app, loads SteamVR's bin/win64/openvr_api.dll) sets them live and SteamVR persists them: section `steam.app.<shortcut appid>`, keys `preferredRefreshRate` (float) and `motionSmoothingOverride` (0 global, 1 on, 2 off, 3 always). Steam Link (vrlink) lists the Frame's rates 72/80/90/96/108/120/144 in vrserver.txt and follows the per-app preference ("host preferred N Hz"; whether the key is honoured is unverified in-headset yet). Judder metric: vrcompositor.txt session summary dropped + "Timed out. N total" (Stormland: 0 dropped but 313 timeouts in 2 min); fpsVR (`%LOCALAPPDATA%\fpsVR\*.json`, 0.1 ms histograms) gives p99 CPU/GPU ms. `pcvr.steamvr_tuning` (default on, PC only) applies on Play: highest rate whose budget ≥ p99×1.05, at least one step down, smoothing on.
|
||||
|
||||
|
||||
## Language packs
|
||||
|
||||
**Language packs (merged from PR #20, 2026-10-04):** overport's `libovrplatformloader.so` is a dispatcher that `dlopen`s Meta's own loader (`libovrplatformloader_meta.so` / `_meta_q1.so`, also `libpxrplatformloader.so`) and keeps its own message queue; `ovr_LanguagePack_GetCurrent/SetCurrent` are 8-byte `return 0` stubs in it, `ovr_AssetFile_GetList` forwards to Meta's loader. `frame.langpacks` (opt-in, `native/langpack`) serves `<tag>.lang` files from the game's data; `elf.hide_exports` marks the loader's exports STB_LOCAL (bionic and glibc only match GLOBAL/WEAK; verified for glibc, bionic's `is_symbol_global_and_defined` is from memory). `libfp_langpack.so` is built here (`python native/build.py --only langpack`) and committed. Owner-verified 2026-10-04: Deadpool VR with only `en.lang` and the patch on plays English dialogue and runs normally (headless launch tests show 2-6 fps while it loads: not a regression sign). A dispatcher answer that arrives after we answered the timed-out GetList is dropped (one answer per request); games already in a library get `lang_packs` filled after an app update (`library._refresh_data_fields`). The library logs to logcat under the tag `fp_langpack` (dirs looked in, packs found, every language-pack call), so it shows up in the game's `launch.log`; an `ovr_AssetFile_GetList` the dispatcher leaves unanswered for 1.5 s is answered with our packs alone. Deadpool VR (Unreal) accepts a pack only when its `Metadata` equals the game's own version string (`ULanguagePacksSubsystem` compares it with `%s.%s.%s.%s.%s` built from the build info, e.g. `1.0.40.356975.Quest` = versionName; found by disassembling `libUE4.so`): the patch writes the APK's versionName into the library (`@FPMETA@` slot, `with_metadata`), `FRAMEPORT_LANGPACK_META` overrides it. Deadpool VR (2026-10-04, headset): German became selectable with that Metadata, but dialogue stayed silent (even English once reported as a pack) while the path was spelled `/sdcard/Android/obb/<pkg>/x.lang`; with the `/storage/emulated/0/Android/obb/<pkg>/x.lang` spelling (Unreal's own, now listed first in `scan_dirs`) German dialogue plays. `FRAMEPORT_LANGPACK_SKIP=<tags>` or a file `fp_langpack_skip` in the obb folder leaves packs out of the list (experiments).
|
||||
|
||||
|
||||
## Cube swapchains
|
||||
|
||||
**Cube swapchains (GitHub #107, 2026-10-09):** the Frame's runtime refuses `faceCount=6` swapchains (-2,
|
||||
XR_ERROR_RUNTIME_FAILURE); OVRPlugin ignores that ("CreateSwapchain for eye 0: 0x0, 0 stages") and crashes in
|
||||
ovrp_EndFrame4 (memset). FrameBridge `cube_standin` (default on, `native/adapter/cube_standin.c`) serves a refused cube
|
||||
swapchain as one GL cube-map texture in the app's context (GLES only) and drops its layers. Verified headless with
|
||||
Budget Cuts Ultimate (2048² sRGB, 12 mips; runs on at ~70 fps); what the cube layer showed is simply missing.
|
||||
|
||||
## Hardware video decoding
|
||||
|
||||
**Hardware video decoding (PR #96, PR #128 by Lucas-Mathieu, adapted 2026-10-10, agent v71):** `native/hevc` = one
|
||||
OMX plugin `OMX.frameport.{avc,hevc,vp9}.decoder` (FFmpeg v4l2m2m on Iris /dev/video-dec0, FFmpeg software decoders as
|
||||
fallback inside the component, Vulkan copy for big native surfaces). The connection installs it once per Frame
|
||||
(`ensure_video_codec` → agent `video_codec_status`/`install_video_codec`: `~/.local/share/frameport/video-codec/versions/
|
||||
<manifest sha>` + `current` symlink). A Frame keeps the same or a newer `revision` (no flip-flop between PCs) → **bump
|
||||
`revision` in native/hevc/build.py with every artifact change**; a failed install isn't retried during the connection.
|
||||
Per game: only launchers of games whose recipe has `frame.hw_video_decode` (install stage, no APK change; suggested
|
||||
from analysis `media_codec`, ANALYSIS_VERSION 8; deployment.json `hw_video_decode`) get the codec line → the Podman
|
||||
wrapper (native/hevc/podman.py) mounts the plugin into that container (merged media_codecs.xml in
|
||||
$XDG_RUNTIME_DIR/frameport-video). Off for every game: Settings → Installing (library `video.hw_decode` → agent
|
||||
`video_codec_switch` = video-codec/disabled); one game: `FRAMEPORT_NO_HW_VIDEO=1 %command%`. `upgrade_launchers`
|
||||
converts agent ≤70 launchers (Batman's `<base>/frameport-codec` → keeps the line, folder then removed). Batman: catalog
|
||||
+ migration `batman_video_patches` (`frame.hw_video_decode` + hidden adapter setting `surface_native`). Iris: 8K
|
||||
refused (ENOMEM) while any other decoder session is open; SteamVR's vrlinkrunthread holds one ~12 s at game start →
|
||||
refused opens retry until 20 s after the plugin loaded (else 2 s), then software; VP9 7680x3840 never returned a
|
||||
picture → VP9 ≤4096x2304; hidden VP9 frames come back as empty capture buffers (bytesused 0, no LAST):
|
||||
FFmpeg's wrapper ended the EOS drain at the first one (two-pass VP9 lost its last ~25 frames) → build.py requeues
|
||||
them (codec revision 8; drain ends at LAST, or 1 s after a skipped empty buffer; dev Frame 2026-10-10: 600/600 =
|
||||
OMX.google.vp9 Y hashes). Rebuilds are deterministic (ext4 + NTFS path
|
||||
with spaces, two NDK copies → same; rev 8 141de01f…; PR #128's own sources → its 27a2d749…). Not yet run on the device.
|
||||
|
||||
## Vulkan shader dump
|
||||
|
||||
**Vulkan shader dump (GitHub #140, 2026-10-10):** adapter `vk_shader_dump=1` (Vulkan shim, `native/vkshim/shader_dump.h`;
|
||||
applies where vk_sanitize can: Unreal/Other arm64) writes each distinct SPIR-V module once to
|
||||
`files/fp_vk_shaders/<size>_<sha256>.spv` (tmp + rename) and one `index.txt` line per vkCreateShaderModule (`<seq> <ms>
|
||||
<unix ms> <name> new|known|again|failed`, O_APPEND) to find the module behind a GPU hang. Agent v72 `collect_diag`
|
||||
returns `shaders` (newest modules of fp_vk_shaders + fp_spirv, ≤4 MB each, base64) → bundle
|
||||
`games/<pkg>/target/shaders/`. Triage `gpu-hang` suggests both dumps; `triage.graphics_api` (FrameBridge's
|
||||
xrCreateSwapchain formats: <0x1000 Vulkan, else GL) keeps only the session's API's (`API_ONLY`). Host-tested only.
|
||||
Agent v74: a reporter's hang came ~10 s after the last new module, so the culprit wasn't among the newest written →
|
||||
with an index naming modules, `shader_dumps` sends every module of the index's **newest session** (after the last
|
||||
`# start`), deduplicated, last used first, each ≤4 MB, ≤30 MB in all (`session` = how many it names) + that session's
|
||||
index lines; no index (fp_spirv) = the old newest-by-mtime 4 MB. One JSON line (~40 MB base64) over the SSH channel
|
||||
is read whole by `Frame.agent` (fine at that size); `_Writer.fit` drops the least recently used modules last, after
|
||||
cutting logs, to stay under the 24 MB zip limit.
|
||||
|
||||
## Unreal OBB check
|
||||
|
||||
**Unreal OBB check (GitHub #159, 2026-10-10):** Epic's DownloaderActivity checks OBB name+size (OBBData), then with `bVerifyOBBOnStartUp=true` CRCs the whole OBB; its screens are invisible in Lepton (stuck at `Displayed …/.DownloaderActivity`, triage `unreal-obb-check-stuck`) → `frame.unreal_skip_obb_check` (analysis `unreal_verify_obb`, ANALYSIS_VERSION 11) flips the manifest boolean (`axml.set_meta_data_bool`); skips only the CRC pass. Host-tested only.
|
||||
|
||||
## Issue round 2026-10-12
|
||||
|
||||
**Issue round 2026-10-12 (agent v83):** Lepton pastes STEAM_COMPAT_DATA_PATH unquoted into `sh -c "ln -s …/internal/<pkg>
|
||||
/data/data/<pkg>"` (mounting.sh): a game on a card named "Steam Frame 512g" got no internal storage (no saves/prefs;
|
||||
Beyond Sandbox's EOS then looped `createKeychain→resetKeychain` forever, 1.85 GB log). Quest launchers with an unsafe
|
||||
path now `ln -sfn <base> ~/.local/share/frameport/lepton-paths/<pkg>` at every start and give Lepton that path
|
||||
(`app_dir_lines`/`set_app_dir`/`launcher_base`; upgrade_launchers converts; deployment.json keeps the real base).
|
||||
Verified on the device with a spaced copy of Stremio (old: the `ln` error; new: /data/data link, shared_prefs
|
||||
writable). `frame.eos_keychain_loop` (opt-in, triage `eos-keychain-loop`) returns from EOSSDK.resetKeychain. Wander
|
||||
0.3570 (Unity 6.5, Firebase, Gecko) ran out of bionic's 128 pthread keys → `frame.unity_tls_key_pool` (Klownicle's
|
||||
approach, #198: libunity's 4 key imports renamed `fp_tkey_*` via `elf.rename_imports`, `libfp_tkeys.so` pools
|
||||
destructor-less keys behind one real key); device: past Firestore, 72 fps. Cpp2IL releases can't read metadata v107
|
||||
(Unity 6.5) → `tools/cpp2il.py` falls back to the development CI build (nightly.link) on that error, and since #293 on any release failure (BattleTalent, Unity 2021.3: the release dies exit 134 in CsFileUtils.GetTypeName after making the folders, no .cs; `il2cpp._run` = non-zero exit or no .cs is unreadable; never with FRAMEPORT_CPP2IL; caches holding "every class missing" are re-run). Vermillion's canvas
|
||||
is an OVROverlay quad (drawn above the hand) → `frame.vermillion_scene_canvas` (PaintableMesh getters → false;
|
||||
installed build checked, 72 fps headless; headset not yet). Linux apps: `desktop_icon` switch, a deleted desktop copy
|
||||
stays deleted (#212). Findings: OLAR (#201) RHIThread null deref in libUnreal (`ldr x8,[x19,#792]`, x19=0) not fixed by
|
||||
hide_space_warp / vk_hide_fdm / no Valve layers; FNAF HW (#135) "freeze" = first-start GL program-binary-cache compile
|
||||
on Zink (threads busy in zink/disk cache), not a hang; VR4 (#199) reporter's patch.203 OBB truncated. Upload benchmark
|
||||
(`scripts/upload_bench.py`, #242): home Wi-Fi caps every method at ~11 MB/s; paramiko uses ~3x OpenSSH's CPU; Windows
|
||||
OpenSSH refuses FramePort's key file (ACL "bad permissions") until its permissions are tightened.
|
||||
|
||||
## OpenSSH uploads
|
||||
|
||||
**OpenSSH uploads (2026-10-15, #324/#242):** sftp escapes `* ? [` inside double quotes itself (and undoes it for
|
||||
put's destination), so `native_upload.quote` escapes only `\\`/`"`; Win32 sftp turns every local backslash into `/`
|
||||
(escapes too) → local paths go as `C:/…`. Logins: `Frame.auth` = the attempt that worked (app_key / user_key = a key
|
||||
file from Settings → Installing → SSH keys, library `ssh.extra_keys`, CLI `frame ssh-keys` / agent / password).
|
||||
OpenSSH strict (FramePort + Settings keys, IdentitiesOnly) unless auth was "agent"; a refused strict login retries
|
||||
relaxed (+ private copies of ~/.ssh/id_{rsa,dsa,ecdsa,ed25519}: OpenSSH skips its defaults once any -i is given, + the
|
||||
agent); `-v` key lines go into the error. FramePort doesn't add its key to the Frame for this. Windows-tested.
|
||||
|
||||
## Meta user id
|
||||
|
||||
**Meta user id (GitHub #182, 2026-10-11):** OVRPort's platform loader (runtimes 3.4.3-23204ea and -aa54c3f) answers
|
||||
`ovr_GetLoggedInUserID` (and two other callers) without a Meta account with a made-up id from a helper (`stp; mov x29,
|
||||
sp; bl random; …; mov/movk x9 = 0x53444835ec580000 (6e18); add x0, x8, x9; ldp; ret`), kept only in memory → a new id
|
||||
every start; Walkabout Mini Golf files saves under `Profiles/Oculus/<id>/` and lost all progress. `frame.ovr_stable_user`
|
||||
(default_on, detect = the game has libovrplatformloader.so) rewrites the helper to `mov x0, <6e18 + 32 bits of
|
||||
sha256(package, keystore)>; ret`: stable per game and per user (keystores are personal), so online games never see two
|
||||
FramePort users as one. Found in every PATCHED build checked. Host-tested only; upstream candidate.
|
||||
|
||||
## Vivox API 31
|
||||
|
||||
**Vivox API 31 (GitHub #101, 2026-10-09):** newer Vivox builds (Green Hell VR) call Android 12 AudioManager
|
||||
communication-device methods from `com.vivox.sdk.AudioChangeListener` with no SDK check → NoSuchMethodError on Lepton's
|
||||
Android 11. `frame.vivox_audio_route` (analysis `vivox_api31`, ANALYSIS_VERSION 4) makes every such method return at
|
||||
once (`Dex.return_early`: return-void / `const/4 v0,0; return v0`; nopping the invoke would leave a move-result the
|
||||
verifier rejects). Older Vivox (Eleven Table Tennis, BattleSisters) lacks that code and isn't matched. Verified
|
||||
headless: Vivox initialises, 150 s at ~65-70 fps.
|
||||
Photon Voice does the same (GitHub #362 Table Troopers, #325): `com.exitgames.photon.audioinaec.AudioInAEC.
|
||||
updateAudioDevice` (void; only caller of getAvailableCommunicationDevices/setCommunicationDevice, reached from the mic
|
||||
thread `AudioInAEC$1.run` via access$000; no SDK_INT check left) → sibling patch `frame.photon_voice_audio_route`
|
||||
(analysis `photon_voice_api31`, ANALYSIS_VERSION 21; shares `vivox_audio_route.patch_class`; Vivox's id, title and
|
||||
output unchanged, no revision bump). Triage: `vivox-api31` / `photon-voice-api31` now need the SDK's class in the
|
||||
stack; any other `*CommunicationDevice*` NoSuchMethodError = `audio-api31` (report). Host-tested on the real dex only.
|
||||
|
||||
## Steam Input gamepad for 2D apps
|
||||
|
||||
**Steam Input gamepad for 2D apps (GitHub #162, agent v72, 2026-10-10):** Lepton's Android only has the Wayland seat's `wayland_touch/keyboard/pointer`. Steam makes its virtual pad (uinput, `/devices/virtual/input`, 28de:11ff, "Microsoft X-Box 360 pad N", ACL for steamos) only while the Frame's controllers are on (controller.txt "Steam Controller reserving XInput slot 0"; gone when they sleep), also with no game running; steamos-manager's 28de:0000 keys device isn't a pad (no BTN_SOUTH). Lepton's container root (system_server too) = steamos (`keep-id:uid=0`), so a bind-mounted `/dev/input/eventN` opens. Opt-in `device.steam_gamepad` (vr_kind none; suggested for `android.hardware.gamepad`/`LEANBACK_LAUNCHER`, analysis `gamepad`, ANALYSIS_VERSION 9): deployment.json `steam_gamepad` → launcher `GAMEPAD_LINE` (after the codec line: exports FRAMEPORT_GAMEPAD + LEPTON_ENV_SDL_GAMECONTROLLER_ALLOW_STEAM_VIRTUAL_GAMEPAD, puts `agent/bin` first on PATH) → `PODMAN_WRAPPER` (written by ensure_host_fixes; non-`run` calls go straight on; `run` imports the agent's `podman_run_args`; hands on to the next Podman after its own PATH entry with itself removed from PATH, so it chains to the codec wrapper either way round) adds the pads + `Vendor_28de_Product_<pid>.kl` (Xbox 360 layout). Verified headless with a uinput stand-in pad (Stremio's container: EventHub `classes=0x80000141`, our key layout, KeyEvent BUTTON_A dispatched); with Steam's real pad and a game: not yet. Pads made after the start aren't seen until the next one.
|
||||
|
||||
## Multiview programs on flat framebuffers (Doom3Quest)
|
||||
|
||||
**Multiview programs on flat framebuffers (GitHub #77, Doom3Quest, 2026-10-09, prototype):** Mesa enforces OVR_multiview's
|
||||
"program num_views == draw framebuffer views" rule (`draw_validate.c`, the draw is dropped silently); Qualcomm doesn't.
|
||||
Doom3Quest compiles every VS with `layout(num_views=2) in;` and draws its HUD/PDA into 2D-texture FBOs → black. Opt-in
|
||||
`frame.gl_multiview_fbo` (analysis `gl_multiview_libs`, ANALYSIS_VERSION 6; own-engine GLES only): `native/glmv` =
|
||||
`libfpglmv.so` (12 chars = "libGLESv3.so": libdoom3.so's one `.rodata` dlopen string is rewritten in place, its qgl*
|
||||
table comes from dlsym on that handle; also first DT_NEEDED for its direct gl*/egl* imports). Such draws use a lazily
|
||||
built single-view twin (view 0, uniforms copied per draw); eglMakeCurrent resets the per-thread cache. Host-tested only
|
||||
(rewriter on all 19 Doom3Quest shaders + glmv.c against a stand-in GL, `tests/test_gl_multiview_fbo.py`); the host's
|
||||
Mesa 23.2 llvmpipe has no OVR_multiview. Headset-verified by Xandrix1987 (2026-10-09: HUD/PDA shown, no fps drop) -> in the Doom3Quest catalog recipe.
|
||||
|
||||
## BlazeRush
|
||||
|
||||
**BlazeRush (GitHub #57, Klownicle's verified guide, 2026-10-10; FramePort's version headless-tested only):**
|
||||
`frame.blazerush` (1.0.349 only: exec-segment SHA + every word checked, offsets from PT_LOAD) NOPs the avatar-readiness
|
||||
wait (0x4b2dbc), RETs the avatar renderer (0x4b2adc), renames `cache/shader_cache` → `cache/br_shader_v1`. GL shim
|
||||
(now also exports glShaderSource/glLinkProgram/glProgramBinary/glDeleteProgram/glDraw*: pass-through unless a setting
|
||||
is on) `gl_int_attribs` (integer inputs fed via glVertexAttribPointer re-set with glVertexAttribIPointer per draw,
|
||||
reflection cached per EGL context + program, dropped on link/binary/delete) and `gl_highp_markers` (vertex shaders with
|
||||
every '|' marker: mediump→highp except on in/out/uniform lines); host test `tests/test_blazerush.py` with a stand-in
|
||||
GL. FOV: the game reads VrApi props 7/8 right after vrapi_Initialize (no session; the Frame has no
|
||||
XR_EPIC_view_configuration_fov) → the bridge saves the live FOV (also located before tracking, headless: 118.87×120.04
|
||||
on the dev Frame) in `files/framebridge-vrapi-fov.txt` and answers with it at the next start (log `FOV properties: …
|
||||
(saved by an earlier session)`). `device.config_sync` (catalog field `config_sync`, agent v78): user_config.xml
|
||||
r_3dwidth/height, r_width/height from the runtime eye size (FrameBridge logs `runtime recommended eye size`) × scale,
|
||||
written at finalize, set_settings and by launch.sh before Lepton starts (`_config_sync`). Headless runs at scale 1.7
|
||||
end in `zink: DEVICE LOST` right after the bridge's 30 s no-tracking deadline tears the session down (gpu fault at the
|
||||
teardown; not at scale 1.0): a headless-only artifact, the headset never hits that deadline. Launch tests count an exit/crash after
|
||||
such a line as a pass (triage.yaml `headless_end`, finding `headless-end`; GitHub #57 "Failed to launch" on install).
|
||||
|
||||
## Session triage
|
||||
|
||||
**Session triage (agent v70, 2026-10-09):** launch tests never reach FOCUSED, so real play sessions are triaged
|
||||
too. list_installed gives each game `last_play` {start, end, test} from `<anchor>/plays.log` (launch tests write a
|
||||
`test <unix>` line first → test sessions are only marked); `session_log` returns the newest session's launch.log
|
||||
(`<base>/session.log`, ≤4 MB: head + tail + FrameBridge/crash lines between) + that session's logcat-crash.log +
|
||||
`journalctl -k` GPU lines ("kernel: …"). The GUI's connection refresh (`app._check_sessions` → `pipeline.sessions_due`,
|
||||
background thread; sessions >7 days old are skipped) runs `pipeline.triage_session` = `validate/session.analyze`
|
||||
(triage.yaml signatures incl. `space-warp-used` (info, `question:`, never auto-applied), `gpu-hang` (`report: true`)
|
||||
+ computed `slow-frames` (pacing windows vs the nearest refresh rate) and `focus-dips` (FrameBridge always logs
|
||||
`focus: lost` / `focus: back after N ms`, session_fixes.c)) → library `last_session` / `last_session_checked` → game
|
||||
page "Last session" callout (Try this fix / Rebuild with this fix / Yes-No question / Report / Dismiss). Suggestions may
|
||||
be values (`adapter.scale=0.85`, `triage.split_suggestion`); adapter-only fixes are pushed live (`apply_suggestions_live`
|
||||
→ agent set_settings, like the Game settings dialog). CLI `frameport session <pkg> [--apply]`. PC VR (Proton) launchers
|
||||
log no session end, so they aren't triaged yet. pac_hints stays triage-only: a survey of all 68 dump APKs found unpaired
|
||||
PAC hints in 21 libraries of 18 games (OpenSSL's 38/40 in most UE4 libUE4.so and libEOSSDK.so, UE5 libUnreal.so ~400
|
||||
vs +2-3, libass, libopencv, …), most of them games that work, so default-on would rewrite many working builds.
|
||||
|
||||
## Install links / FrameDrop button protocol
|
||||
|
||||
**Install links / FrameDrop button protocol (2026-10-07, not yet clicked end to end from a browser):** FrameDrop
|
||||
(framedropvr.com, a closed-source Windows sideloader) defines "Install with FrameDrop" buttons:
|
||||
`https://framedropvr.com/install?manifest=<url>|url=<file>` → that page opens `framedrop://install?…` (1.6 s, else its
|
||||
home page); manifest `{"schema":"framedrop.install/v1","name","files":[{"url","sha256"}]}` (name = Steam title; .apk
|
||||
or Linux .zip). `deeplink.py` (no Flet) parses framedrop://, frameport:// and the pasted https link, enforces its
|
||||
rules (https; http only on loopback; no credentials; no LAN/loopback/link-local IPs, also after DNS and redirects; URL
|
||||
ends in a file name), caps manifests at 256 KiB, ignores non-hex sha256 (FrameDrop's own example has a placeholder),
|
||||
downloads into `<data>/downloads/<slug>-<hash>/` (OBBs → `obb/` next to the APK, `.part` removed on cancel/mismatch);
|
||||
`pipeline.add_from_link` routes APK / Linux / exe and sets `title` + `title_locked` + `link` (a bare file link keeps
|
||||
FramePort's title). GUI: `views/link_dialog.py` (always asks first), Add games → "Install from a link…", CLI
|
||||
`frameport open-link [--yes --no-install --gui]`. **A `flet build` bundle can't take a URL argument** (the Flutter
|
||||
host treats any argv as a developer page URL), so `urlhandler.py` registers a script, not FramePort.exe: Windows
|
||||
HKCU `Software\Classes\{framedrop,frameport}` → hidden PowerShell `frameport-link-handler.ps1`; WSL (source runs)
|
||||
the same keys → `wsl.exe -d <distro> -e sh frameport-link-handler.sh`; Linux `frameport-links.desktop` +
|
||||
`xdg-mime`; macOS unsupported (Apple Events, paste instead). The script drops the link into `<data>/links/*.link`
|
||||
and starts FramePort unless `<data>/gui.alive` is < 10 s old (`gui.starting` stops double starts); the GUI's
|
||||
`_watch_links` thread touches the heartbeat and opens links (newest window session). Settings → Install links: one
|
||||
switch per scheme (`links.framedrop`, `links.frameport`, default on); a scheme another program owns (FrameDrop) is
|
||||
only taken with "Use FramePort for these links" (`register([s], force=True)`); off removes only FramePort's own
|
||||
registration (`MARK` in the command). Never registered with FRAMEPORT_HOME/FRAMEPORT_NO_LINK_HANDLER (tests,
|
||||
screenshots). Same round: files dropped on the Library (`ui/dropped.py`, bundles only like the Files tab), "Add a
|
||||
Windows program (.exe)…" (`pipeline.add_windows_exe`: exe in Downloads/home/drive root copied alone into
|
||||
`<data>/windows-apps/<slug>/`), patch `device.display_mode` (Automatic / VR / Flat window → `InstallContext.display`,
|
||||
`installer.show_window`). FramePort-only manifest extension `"frameport": {"description", "icon"}` (bad values ignored; icon: same URL rules,
|
||||
≤2 MiB, Pillow-checked, ≥32 px, saved as PNG in `<data>/downloads/icons/`, shown in the question by asset URL, then
|
||||
`sources.apply_custom(pkg, "icon")` unless `.picked` exists; description fills `details.description` only when
|
||||
empty). Bare file links get a title guessed from the file name (`title_from_filename`: version/arch dropped, package
|
||||
names → last part). Windows test of 0.12.1.dev191 (2026-10-07): a button click opened the dialog; but a click right
|
||||
after closing FramePort did nothing (the closed window's heartbeat was < 10 s old) → the handler scripts now wait
|
||||
up to 4 s for the link file to be taken before trusting the heartbeat, the window's CLOSE event / atexit delete
|
||||
`gui.alive`, and the Windows command runs under `conhost.exe --headless` (plain `-WindowStyle Hidden` flashed a
|
||||
console). Screens: `scripts/ui_smoke.py --links --fake-frame --game <pkg>` (tall pages: `--viewport
|
||||
1280x7000`; Flutter's popup menu ignores Escape).
|
||||
Demo link: the homepage's example button = `deeplink.DEMO_MANIFEST` (https://frameport.app/demo/cool-game.json, published
|
||||
from site/public/demo/); every form (https button page, frameport://, framedrop://, pasted) → `InstallRequest.demo`,
|
||||
no network (fetch_manifest returns `demo_manifest()`, download refuses), `link_dialog.show_demo` (Install =
|
||||
`easter.demo_install`: Cool Game's cover out of the portal; eggs off → "Nice, it works!"), CLI just says so.
|
||||
Link updates (2026-10-17): manifest `version` (top level, or `frameport.version`, which wins; ≤64 chars) is stored in
|
||||
the entry's `link` record (+ `direct`); `pipeline.check_link_updates` (GUI start via `app._check_link_updates`, every
|
||||
6 h: setting `links.last_update_check`, off with `links.check_updates`) re-fetches web manifests that named a version
|
||||
(`deeplink.can_check_updates`: not bare file links, local manifests or the demo) and sets/clears `link_update`
|
||||
{version, checked}; versions compare with `deeplink.compare_versions` (numbers, then release > suffix). UI: Library
|
||||
`link_bar` + game page callout → `link_dialog.update_from_link` (fetch again, one confirmation, `download_and_install`
|
||||
per game; add_from_link clears the offer and keeps a name the user gave). CLI `frameport link-updates [--install]`.
|
||||
|
||||
+32
@@ -26,6 +26,25 @@ Games/ ← scan this folder (Add games → Scan
|
||||
Not sure of the package name? It's in the OBB file names (`main.<version>.<package name>.obb`), and the game's page
|
||||
shows it under **Details**.
|
||||
|
||||
## I moved my games to another folder or drive. How do I update the library?
|
||||
|
||||
Scan the new folder (**Add games → Scan a folder…**, or **Settings → Library folders → Add folder…**). A game whose
|
||||
files are gone from their old place and that FramePort finds again in the new folder keeps its library entry: only
|
||||
where its files are changes. Its name, tags, artwork, your own recipe and what's installed on the Frame stay; you don't
|
||||
have to remove it from the library first. **Rescan folders** in the Library does the same for every library folder.
|
||||
|
||||
- **Removing a folder:** **Settings → Library folders** lists every folder FramePort scans, with how many library games
|
||||
come from it and whether it's there now (a folder on an unplugged drive shows as not found). The bin icon stops
|
||||
scanning a folder; its games stay in the library. `frameport folders [--add DIR] [--remove DIR]` does the same on the
|
||||
command line, `frameport rescan` rescans.
|
||||
- **Another version in the new folder** (a different APK or game build): **Scan a folder…** on that folder takes it, as
|
||||
**Update with a newer APK…** would (name, tags, art and your own recipe stay). **Rescan folders** leaves such games
|
||||
alone and says so; use the game's **Update with a newer APK…** / **…version…** to switch.
|
||||
- **Two copies** (the old folder is still there): the library keeps the copy it has. To use the other one, delete or
|
||||
rename the old copy and rescan.
|
||||
- PC VR games are recognised by their folder name, or a renamed folder by its program file. Linux apps aren't part of
|
||||
folder scans: add the moved app again with **Add a Linux app…** (it keeps its name, art and switches).
|
||||
|
||||
## Can I scan SideQuest backups or AXRB downloads directly?
|
||||
|
||||
Yes. Scan the folder as it is; FramePort finds the APK and its OBB files in both layouts:
|
||||
@@ -178,6 +197,19 @@ draw more than the battery delivers, especially at lower charge, and the Frame t
|
||||
|
||||
Saves stay on the Frame when you update or reinstall a game.
|
||||
|
||||
## Can I back up a game's saves?
|
||||
|
||||
Yes. Steam doesn't sync Quest games' saves, so FramePort copies them to your PC: the game's menu (**…** on its page) →
|
||||
**Saves** → **Back up saves**, or **Back up all saves** on the Steam Frame page (Installed games). Close the game
|
||||
first. A backup holds the game's own storage (`/data/data/<package>` and `/sdcard/Android/data/<package>`), without
|
||||
caches, shader caches and large downloaded content (videos, OBBs, files over 64 MB); the job says when something was
|
||||
left out. FramePort keeps the 10 newest backups per game (Settings → Data). They're in FramePort's data folder under
|
||||
`save-backups/<package>/` (**Open backups folder** in the game's menu).
|
||||
|
||||
**Restore saves…** puts one back: it replaces the game's saves on the Frame. The Frame keeps a copy of the saves it
|
||||
had, so **Undo last restore** in the same window takes you back. When you uninstall a game and tick *Also delete its
|
||||
saves*, FramePort backs them up first. Command line: `frameport saves backup|list|restore|undo <game>`.
|
||||
|
||||
## A game with mods crashes
|
||||
|
||||
How to tell: play once without mods and custom content. If it then works, a mod is the cause; the diagnostics zip
|
||||
|
||||
@@ -60,6 +60,32 @@
|
||||
`launch.sh` at the new folder and only then deletes the old copy; on the same filesystem it renames instead.
|
||||
Moving a game whose Lepton data holds absolute paths, or a PC VR prefix, is not yet verified on the device.
|
||||
|
||||
## Save backups (Quest games, agent v95, discussion #352)
|
||||
- A Lepton game's saves are two folders of `<base>/lepton-data`: `internal/<pkg>` (= `/data/data/<pkg>`:
|
||||
`shared_prefs/`, `files/`, `databases/`; Unreal's `files/UE4Game|UnrealGame/.../Saved` often lives here) and
|
||||
`external/Android/data/<pkg>` (= `/sdcard/Android/data/<pkg>`: Unity's `files/`, Unreal's external `Saved`). On the
|
||||
dev Frame (2026-10-16) every file in them belongs to `steamos` (Lepton's `keep-id:uid=0`: the container's root and
|
||||
app = steamos), mostly mode 600/660 in 700/771/775/2771 folders; Lepton's links (`Android/obb/<pkg>`, `Movies`,
|
||||
`Download`, `Documents`) sit outside these two folders.
|
||||
- Agent `_backup_saves '<json>'` streams a tar.gz of both (members `internal/…`, `external/…`, PAX, numeric owners and
|
||||
modes; last member `frameport-saves.json` = manifest with size + sha256 per file and what was left out) on the SSH
|
||||
exec channel's stdout, the result JSON on stderr. Left out: folders named cache/code_cache/no_backup/il2cpp/
|
||||
UnityShaderCache/(Vulkan)ProgramBinaryCache/GPUCache/… at any depth, Unreal `Saved/Logs|Crashes`, FrameBridge's
|
||||
`fb_snap_*`/`framebridge*` files, `.obb/.apk/.foz/.mp4/.mkv/.webm/.mov`, symlinks and special files, and files over
|
||||
64 MiB (big downloaded content; e.g. BattleTalent's `files/Video`). More than 4 GiB of saves is refused.
|
||||
- `_restore_saves '<json>'` reads the archive from stdin and treats it as untrusted: only regular files and folders
|
||||
under `internal/`/`external/` (no `..`, absolute paths, links, devices, duplicates), ≤1 GiB per file / 8 GiB in all,
|
||||
each file's sha256 must match the manifest, the manifest's package must be the game. Everything is staged in
|
||||
`<base>/.saves-restore-*` first, a path that would pass through a link on the Frame is refused, then the current
|
||||
saves are written to `<base>/saves-before-restore.tar.gz` (one copy; `rollback: true` restores it and keeps the
|
||||
replaced saves as the new copy) and each file is renamed into place. Existing files keep their owner and mode, new
|
||||
ones get their folder's owner and the backup's mode (at least u+rw); save files the backup doesn't have are removed
|
||||
(left-out files stay). A failure while swapping puts the rollback copy back.
|
||||
- Both run their file work in `podman unshare` (the agent re-runs itself as `_saves_ns <op>` with stdio inherited) so
|
||||
files owned by mapped ids are readable and keep their ids, take the game's launch lock (`<base>/.launch.lock`, a
|
||||
Play meanwhile is ignored as a double launch) and refuse while its container runs. `saves_info` sizes a backup and
|
||||
reports the rollback copy, `saves_rollback_delete` removes it.
|
||||
|
||||
## OpenXR runtime (as seen by games through overport's loader)
|
||||
- Instance extensions present include KHR_android_create_instance (must be enabled; the adapter adds it),
|
||||
KHR_vulkan_enable(2), KHR_opengl_es_enable, KHR_composition_layer_depth, FB_display_refresh_rate, EXT_hand_tracking
|
||||
@@ -80,6 +106,8 @@
|
||||
- Swapchain formats: GLES `GL_SRGB8_ALPHA8` (35907) / `GL_SRGB8` (35905) only, samples = 1. Vulkan: 43 (R8G8B8A8_SRGB)
|
||||
and 50, not 37/44 (UNORM).
|
||||
- Environment blend: ALPHA_BLEND available (grayscale passthrough cameras).
|
||||
- XR_FB_composition_layer_alpha_blend and XR_KHR_composition_layer_color_scale_bias are not the runtime's (OVRPort's
|
||||
dispatcher lists alpha_blend): their structs are ignored, so FrameBridge emulates inverse alpha (`alpha_blend_emul`).
|
||||
- Reference spaces: STAGE bounds are reported as 1×1 m.
|
||||
- Display 72 Hz by default in tests. Head pose is only tracked while the headset is worn; otherwise flags 0x3 and
|
||||
the session stays below FOCUSED.
|
||||
|
||||
@@ -51,6 +51,7 @@ Generated from [catalog/games](../catalog/games) by `scripts/compat_list.py`.
|
||||
| Drunkn Bar Fight 2 - Early Access | Quest | ✅ Works | |
|
||||
| Eleven Table Tennis | Quest | ✅ Works | |
|
||||
| Eleven: Table Tennis VR | PC VR | ✅ Works | |
|
||||
| EndoparasiticVR | Quest | ✅ Works | |
|
||||
| Espire 2 | Quest | ✅ Works | |
|
||||
| Eye of the Temple | Quest | ✅ Works | |
|
||||
| FrenzyVR | Quest | ✅ Works | |
|
||||
@@ -65,6 +66,7 @@ Generated from [catalog/games](../catalog/games) by `scripts/compat_list.py`.
|
||||
| H.U.N.T | Quest | ✅ Works | |
|
||||
| I Am Cat | Quest | ✅ Works | |
|
||||
| I Am Monkey | Quest | ✅ Works | |
|
||||
| I Expect You To Die 2 | Quest | ✅ Works | |
|
||||
| IEYTD3 | Quest | ✅ Works | |
|
||||
| In Death: Unchained | Quest | ✅ Works | |
|
||||
| Into The Radius 2 | Quest | ✅ Works | |
|
||||
@@ -96,6 +98,7 @@ Generated from [catalog/games](../catalog/games) by `scripts/compat_list.py`.
|
||||
| NOPE CHALLENGE | Quest | ✅ Works | |
|
||||
| Ocean Rift | Quest | ✅ Works | |
|
||||
| Operation Wolf Returns: First Mission VR | Quest | ✅ Works | |
|
||||
| OrbusVR | Quest | ✅ Works | |
|
||||
| palazzo_santacruz | Quest | ✅ Works | |
|
||||
| Path of the Warrior | Quest | ✅ Works | |
|
||||
| Pistol Whip | Quest | ✅ Works | |
|
||||
@@ -139,6 +142,7 @@ Generated from [catalog/games](../catalog/games) by `scripts/compat_list.py`.
|
||||
| The Last Clockwinder | Quest | ✅ Works | |
|
||||
| The Room VR | Quest | ✅ Works | |
|
||||
| The Tale of Onogoro | Quest | ✅ Works | |
|
||||
| The Walking Dead: Saints & Sinners | Quest | ✅ Works | |
|
||||
| Time Crisis II VR (Test) | Quest | ✅ Works | |
|
||||
| Time Crisis VR (Experimental) | Quest | ✅ Works | |
|
||||
| Totally Baseball | Quest | ✅ Works | |
|
||||
@@ -167,6 +171,7 @@ Generated from [catalog/games](../catalog/games) by `scripts/compat_list.py`.
|
||||
| End Space | Quest | ⚠️ Works with issues | Controls stop responding after the first mission loads. |
|
||||
| Exploding Kittens VR | Quest | ⚠️ Works with issues | Requires online for most modes. |
|
||||
| ExploreVR | Quest | ⚠️ Works with issues | The 3D world warps and shifts with head movement (wrong perspective). |
|
||||
| FGO VR | Quest | ⚠️ Works with issues | Audio stuttering and popping sounds |
|
||||
| Fisherman | Quest | ⚠️ Works with issues | Loading screens have corruption, but everything works otherwise. |
|
||||
| Homeworld: Vast Reaches | Quest | ⚠️ Works with issues | The game starts but after selecting to start a new game it seems to crash. |
|
||||
| Lawn Mowing Simulator VR | Quest | ⚠️ Works with issues | Left eye textures flicker only when mowing in specific areas. |
|
||||
@@ -176,15 +181,19 @@ Generated from [catalog/games](../catalog/games) by `scripts/compat_list.py`.
|
||||
| Phantom: Covert Ops | Quest | ⚠️ Works with issues | DLC/store button crashes (no Meta store). |
|
||||
| Pinball FX VR | Quest | ⚠️ Works with issues | Plays; mixed reality mode not working yet. |
|
||||
| Plezy | Quest | ⚠️ Works with issues | Some videos play with strong artifacts and wrong colours; the cause is unknown, possibly hardware video decoding. |
|
||||
| Puzzling Places | Quest | ⚠️ Works with issues | Works fine, but pointers dont show well on main menu, easy to work around. |
|
||||
| Quantum Void | Quest | ⚠️ Works with issues | no hands |
|
||||
| Ragnarock | Quest | ⚠️ Works with issues | |
|
||||
| Real VR Fishing | Quest | ⚠️ Works with issues | Seems to be almost 100% functional with meta permissions enabled. |
|
||||
| Silhouette | Quest | ⚠️ Works with issues | Hand-tracking game; the Frame synthesizes hands from controllers, so it is janky. |
|
||||
| SmartTube | Quest | ⚠️ Works with issues | Android's home screen shows for a few seconds while the app starts (normal for flat Android apps; longest on the first start after an install). |
|
||||
| Spunky Dungeon | Quest | ⚠️ Works with issues | Gear VR / Oculus Go game (32-bit only), runs through FramePort's 32-bit bridge (experimental). |
|
||||
| Swarm 2 | Quest | ⚠️ Works with issues | MSAA creates visible seams around edge geometry and also the skybox edge |
|
||||
| The 7th Guest VR | Quest | ⚠️ Works with issues | Runs and is playable. |
|
||||
| The Light Brigade | Quest | ⚠️ Works with issues | Judder in weapons |
|
||||
| The Thrill Of The Fight | Quest | ⚠️ Works with issues | Right eye doesn't draw the opponent or the referee. |
|
||||
| Time Stall | Quest | ⚠️ Works with issues | Both eyes distort during movement (unresolved). |
|
||||
| Vampire: The Masquerade - Justice | Quest | ⚠️ Works with issues | Game runs fine and playable, on loading there's a random sphere in the middle of the sceen. |
|
||||
| WiiCompiled VR | Quest | ⚠️ Works with issues | To add a game: in FramePort's Files tab, upload your .wcgame file to this game's storage, folder Android/data/org.wiicompiled.quest/files/WiiCompiledOpenXRVR… |
|
||||
| Deadly Delivery | Quest | ❌ Doesn't run | Quits after Meta's entitlement check fails: it needs Meta's online services. |
|
||||
| Espire 1: VR Operative (Quest Edition) | Quest | ❌ Doesn't run | Mesa GL driver crash during texture upload. |
|
||||
|
||||
@@ -167,6 +167,7 @@ FramePort downloads it, checks it, restarts and keeps your games and settings. *
|
||||
- Settings → **Updates** turns the check off or turns on **Install updates automatically**.
|
||||
- **Recipes** (the tested patches and settings for each game) update by themselves. A game whose recipe changed shows
|
||||
**Update on Frame**.
|
||||
- **Moved your games?** Scan the new folder (or **Rescan folders**): games found there whose old files are gone keep their library entry, name, artwork, tags and settings, and only their location changes. **Settings → Library folders** lists the folders FramePort scans; remove the old one there (the games stay). See the [FAQ](FAQ.md#i-moved-my-games-to-another-folder-or-drive-how-do-i-update-the-library).
|
||||
- **A newer version of a game:** right-click it (or use **…** on its page) → **Update with a newer APK…** (Quest and
|
||||
Android games) or **Update with a newer version…** (Linux apps: the new AppImage, archive or folder; PC VR games:
|
||||
the new game folder). Its name, artwork, tags and your settings stay. Then click **Update on Frame** (or **on this
|
||||
@@ -220,6 +221,14 @@ The **Files** tab copies files between your PC and the Frame: videos, documents,
|
||||
`/sdcard/Download`, `/sdcard/Documents`).
|
||||
- **Game storage** holds each game's own files. A game's menu → **Add videos and files…** opens it.
|
||||
|
||||
## Backing up saves
|
||||
|
||||
Steam doesn't sync Quest games' saves. A game's menu (**…** on its page) → **Saves** → **Back up saves** copies them
|
||||
to your PC (close the game first); **Back up all saves** on the Steam Frame page does every installed Quest game.
|
||||
**Restore saves…** puts a backup back on the Frame and keeps a copy of the replaced saves there (**Undo last
|
||||
restore**). Backups live in FramePort's data folder under `save-backups/`; the 10 newest per game are kept (Settings →
|
||||
Data). Caches and large downloaded content stay out. More in the [FAQ](FAQ.md#can-i-back-up-a-games-saves).
|
||||
|
||||
## Share a recipe or report a problem
|
||||
|
||||
- **Share working recipe…** (in the game's menu) opens a GitHub issue with the game's recipe filled in. Accepted
|
||||
@@ -258,6 +267,7 @@ option. The main ones:
|
||||
| Command | What it does |
|
||||
|---|---|
|
||||
| `scan <folder>` / `list` / `show <game>` | add games, list the library, show a game's patches |
|
||||
| `folders [--add <folder>] [--remove <folder>]` / `rescan` | list the library folders, add or remove one (its games stay); scan them again for new and moved games |
|
||||
| `add-linux <path> [--exe <program>]` | add a Linux app (AppImage, folder or archive) |
|
||||
| `new-version <game> <path>` | point a game at its newer version (APK, Linux app file/folder, PC VR game folder) |
|
||||
| `recipe <game> --enable/--disable <patch>` | change a game's patches (`patches` lists them all) |
|
||||
@@ -265,6 +275,7 @@ option. The main ones:
|
||||
| `frame discover` / `frame connect` / `frame info` | find, connect to and describe the Frame |
|
||||
| `frame send <files> --dest videos` / `frame storage` / `frame cleanup` | copy files to the Frame, list where they can go, free space |
|
||||
| `frame drives` / `frame move <game> --to <drive>` / `install --dest <drive>` | list the Frame's drives, move a game, install to a drive |
|
||||
| `saves backup <game>\|--all` / `saves list <game>` / `saves restore <game> [n]` / `saves undo <game>` | back up Quest games' saves to this PC, restore one, undo the last restore |
|
||||
| `tools status` / `tools install` | the tools FramePort downloads |
|
||||
| `open-link "<link>"` | install from an install button's address or a download link (`--yes`, `--no-install`) |
|
||||
| `diag report <game>` / `share-recipe <game>` | report a problem / share a working recipe |
|
||||
|
||||
@@ -45,6 +45,7 @@ The manifest:
|
||||
{
|
||||
"schema": "framedrop.install/v1",
|
||||
"name": "My Game",
|
||||
"version": "1.4.2",
|
||||
"files": [{ "url": "https://example.com/my-game.apk", "sha256": "<64 hex digits>" }],
|
||||
"frameport": { "description": "One sentence about the game.", "icon": "https://example.com/icon.png" }
|
||||
}
|
||||
@@ -54,6 +55,13 @@ The manifest:
|
||||
against it. The `frameport` object is optional; its icon and description are shown in the
|
||||
install question. Only public `https://` addresses are accepted.
|
||||
|
||||
`version` is optional (it can also go inside the `frameport` object) and makes updates possible: FramePort remembers
|
||||
the manifest's address and version, fetches the manifest again at start (at most every 6 hours) and, when its
|
||||
`version` is newer, offers to download and install the update (Library bar and the game's page; CLI
|
||||
`frameport link-updates [--install]`). Keep the manifest at the same address and raise `version` with every build.
|
||||
Versions compare number by number (`1.10` > `1.9`), and a suffix sorts before the plain release (`1.2.0-beta2` <
|
||||
`1.2.0`). Bare file links (`?url=…`) and manifests without a version are never checked.
|
||||
|
||||
To build a link from Python: `frameport.deeplink.make_link(manifest_url="https://…/my-game.json")`.
|
||||
|
||||
## On a website
|
||||
|
||||
+198
-49
@@ -2,7 +2,7 @@
|
||||
|
||||
# Patches
|
||||
|
||||
Every patch and game setting FramePort knows: 169 entries in 5 groups. A game's recipe is its chosen patches and settings; tested games get theirs from the catalog ([GAMES.md](GAMES.md)), and other games get the patches FramePort suggests from its analysis. You change them on the game page under Customize.
|
||||
Every patch and game setting FramePort knows: 179 entries in 5 groups. A game's recipe is its chosen patches and settings; tested games get theirs from the catalog ([GAMES.md](GAMES.md)), and other games get the patches FramePort suggests from its analysis. You change them on the game page under Customize.
|
||||
|
||||
Each entry says what the patch does, whether it changes the APK or only the install, when FramePort suggests it, its options, the catalog games whose recipe names it and the launch-test signatures that suggest it. Patches that are on by default are on for every game, so the catalog rarely names them.
|
||||
|
||||
@@ -11,8 +11,8 @@ Link to an entry with its id, dots replaced by dashes: `PATCHES.md#frame-unity_t
|
||||
## Groups
|
||||
|
||||
- [Patches from OVRPort](#group-overport) (25)
|
||||
- [Steam Frame patches](#group-frame) (55)
|
||||
- [Game settings](#group-adapter) (68)
|
||||
- [Steam Frame patches](#group-frame) (61)
|
||||
- [Game settings](#group-adapter) (72)
|
||||
- [Files and settings on the Frame](#group-device) (8)
|
||||
- [PC VR (Proton and Revive)](#group-pcvr) (13)
|
||||
|
||||
@@ -27,7 +27,7 @@ Link to an entry with its id, dots replaced by dashes: `PATCHES.md#frame-unity_t
|
||||
| [Copy OVRPlugin if VrApi is present](#patch_copy_ovrplugin_vrapi) | `patch_copy_ovrplugin_vrapi` | Patches from OVRPort | default |
|
||||
| [Disable controller tracking offset](#patch_disable_controller_offset) | `patch_disable_controller_offset` | Patches from OVRPort | |
|
||||
| [Disable Meta XR Audio telemetry](#patch_disable_meta_xr_audio_telemetry) | `patch_disable_meta_xr_audio_telemetry` | Patches from OVRPort | |
|
||||
| [Disable application space warp if used](#patch_disable_space_warp) | `patch_disable_space_warp` | Patches from OVRPort | 3 |
|
||||
| [Disable application space warp if used](#patch_disable_space_warp) | `patch_disable_space_warp` | Patches from OVRPort | 4 |
|
||||
| [Fix minimal Android SDK](#patch_fix_min_android_sdk) | `patch_fix_min_android_sdk` | Patches from OVRPort | default |
|
||||
| [Fix UE4 crash with Unity stub](#patch_fix_unreal_crash) | `patch_fix_unreal_crash` | Patches from OVRPort | default |
|
||||
| [Force enable passthrough](#patch_force_passthrough) | `patch_force_passthrough` | Patches from OVRPort | 3 |
|
||||
@@ -39,7 +39,7 @@ Link to an entry with its id, dots replaced by dashes: `PATCHES.md#frame-unity_t
|
||||
| [Patch Oculus detection for Unity](#patch_oculus_unity) | `patch_oculus_unity` | Patches from OVRPort | default |
|
||||
| [Patch Oculus detection for Unreal](#patch_oculus_unreal) | `patch_oculus_unreal` | Patches from OVRPort | default |
|
||||
| [Remove localized app names](#patch_remove_localized_names) | `patch_remove_localized_names` | Patches from OVRPort | default |
|
||||
| [Remove Unreal's ForceQuit](#patch_remove_unreal_force_quit) | `patch_remove_unreal_force_quit` | Patches from OVRPort | 41 |
|
||||
| [Remove Unreal's ForceQuit](#patch_remove_unreal_force_quit) | `patch_remove_unreal_force_quit` | Patches from OVRPort | 45 |
|
||||
| [Remove uses-library](#patch_remove_uses_library) | `patch_remove_uses_library` | Patches from OVRPort | default |
|
||||
| [Remove VrApi library](#patch_remove_vrapi) | `patch_remove_vrapi` | Patches from OVRPort | |
|
||||
| [Replace application label and icon](#patch_replace_icon_label) | `patch_replace_icon_label` | Patches from OVRPort | default |
|
||||
@@ -50,13 +50,15 @@ Link to an entry with its id, dots replaced by dashes: `PATCHES.md#frame-unity_t
|
||||
| [Content files from the game's data](#frame-asset_files) | `frame.asset_files` | Steam Frame patches | 2 |
|
||||
| [Asset-file service bypass](#frame-asset_files_stub) | `frame.asset_files_stub` | Steam Frame patches | |
|
||||
| [Skip Meta avatars](#frame-avatar_stub) | `frame.avatar_stub` | Steam Frame patches | 1 |
|
||||
| [bHaptics: skip the Bluetooth permission request](#frame-bhaptics_permission) | `frame.bhaptics_permission` | Steam Frame patches | 5 |
|
||||
| [bHaptics: skip the Bluetooth permission request](#frame-bhaptics_permission) | `frame.bhaptics_permission` | Steam Frame patches | 6 |
|
||||
| [BlazeRush: controllers without Meta avatars, own shader cache](#frame-blazerush) | `frame.blazerush` | Steam Frame patches | 1 |
|
||||
| [Cortopia games: don't wait for Meta's org-scoped id](#frame-cortopia_org_id) | `frame.cortopia_org_id` | Steam Frame patches | |
|
||||
| [Epic Online Services: stop the keychain retry loop](#frame-eos_keychain_loop) | `frame.eos_keychain_loop` | Steam Frame patches | |
|
||||
| [OpenGL ES: multiview shaders on flat panels (HUD, menus)](#frame-gl_multiview_fbo) | `frame.gl_multiview_fbo` | Steam Frame patches | 1 |
|
||||
| [GL shim (Mesa GLSL compatibility)](#frame-gl_shim) | `frame.gl_shim` | Steam Frame patches | 2 |
|
||||
| [Godot apps: start without a clipboard service](#frame-godot_clipboard) | `frame.godot_clipboard` | Steam Frame patches | |
|
||||
| [Hardware video decoding (H.264, HEVC, VP9)](#frame-hw_video_decode) | `frame.hw_video_decode` | Steam Frame patches | 22 |
|
||||
| [Play services: Android 11 version checks](#frame-gms_platform_version) | `frame.gms_platform_version` | Steam Frame patches | |
|
||||
| [Godot apps: start without a clipboard service](#frame-godot_clipboard) | `frame.godot_clipboard` | Steam Frame patches | 1 |
|
||||
| [Hardware video decoding (H.264, HEVC, VP9)](#frame-hw_video_decode) | `frame.hw_video_decode` | Steam Frame patches | 29 |
|
||||
| [Language packs from the game's files](#frame-langpacks) | `frame.langpacks` | Steam Frame patches | |
|
||||
| [Launcher category (INFO → LAUNCHER)](#frame-launcher) | `frame.launcher` | Steam Frame patches | default |
|
||||
| [GL wrapper: OpenGL ES depth formats (Minecraft)](#frame-ltw_depth) | `frame.ltw_depth` | Steam Frame patches | default |
|
||||
@@ -65,49 +67,55 @@ Link to an entry with its id, dots replaced by dashes: `PATCHES.md#frame-unity_t
|
||||
| [Meta XR Audio: skip Quest telemetry class](#frame-metaxr_telemetry) | `frame.metaxr_telemetry` | Steam Frame patches | default |
|
||||
| [Clear android:debuggable](#frame-nodebug) | `frame.nodebug` | Steam Frame patches | 3 |
|
||||
| [Oculus OS telemetry class stubs](#frame-oculusos) | `frame.oculusos` | Steam Frame patches | 17 |
|
||||
| [Fix crash when the game prepares the microphone](#frame-ovr_microphone) | `frame.ovr_microphone` | Steam Frame patches | |
|
||||
| [Fix crash when the game prepares the microphone](#frame-ovr_microphone) | `frame.ovr_microphone` | Steam Frame patches | 1 |
|
||||
| [Keep the same Meta user between starts](#frame-ovr_stable_user) | `frame.ovr_stable_user` | Steam Frame patches | default |
|
||||
| [Trace Meta platform requests (diagnostics)](#frame-ovr_trace) | `frame.ovr_trace` | Steam Frame patches | |
|
||||
| [Platform compat (ovrMessageType_ToString)](#frame-ovrplatformcompat) | `frame.ovrplatformcompat` | Steam Frame patches | default |
|
||||
| [Stub missing Meta platform functions](#frame-ovrstubs) | `frame.ovrstubs` | Steam Frame patches | default |
|
||||
| [Unpaired pointer-authentication checks](#frame-pac_hints) | `frame.pac_hints` | Steam Frame patches | 1 |
|
||||
| [Photon Voice: skip Android 12 audio routing](#frame-photon_voice_audio_route) | `frame.photon_voice_audio_route` | Steam Frame patches | |
|
||||
| [SDL apps: start without a clipboard service](#frame-sdl_clipboard) | `frame.sdl_clipboard` | Steam Frame patches | 5 |
|
||||
| [Stress Level Zero: let Unity start Vulkan itself](#frame-slz_vulkan_hooks) | `frame.slz_vulkan_hooks` | Steam Frame patches | 1 |
|
||||
| [Start straight in VR (skip the 2D launcher)](#frame-start_activity) | `frame.start_activity` | Steam Frame patches | |
|
||||
| [Allow swapchains larger than 4096 px](#frame-swapchain_limit) | `frame.swapchain_limit` | Steam Frame patches | default |
|
||||
| [Team Beef ports: treat the Frame as a Meta headset](#frame-tbxr_vendor) | `frame.tbxr_vendor` | Steam Frame patches | 1 |
|
||||
| [GL shim for Unity (no multisampled render-to-texture)](#frame-unity_gl_shim) | `frame.unity_gl_shim` | Steam Frame patches | 23 |
|
||||
| [Unity App UI: no Android 12 vibrator](#frame-unity_appui_vibrator) | `frame.unity_appui_vibrator` | Steam Frame patches | |
|
||||
| [GL shim for Unity (no multisampled render-to-texture)](#frame-unity_gl_shim) | `frame.unity_gl_shim` | Steam Frame patches | 25 |
|
||||
| [Unity: render each eye separately (no multiview)](#frame-unity_multipass) | `frame.unity_multipass` | Steam Frame patches | 1 |
|
||||
| [Unity: disable MSAA](#frame-unity_no_msaa) | `frame.unity_no_msaa` | Steam Frame patches | 9 |
|
||||
| [Unity: disable MSAA](#frame-unity_no_msaa) | `frame.unity_no_msaa` | Steam Frame patches | 10 |
|
||||
| [Unity: skip OVROverlay layers (fades, splash screens)](#frame-unity_no_overlay_copy) | `frame.unity_no_overlay_copy` | Steam Frame patches | 2 |
|
||||
| [Unity: start VR without Meta's system apps](#frame-unity_oculus_check) | `frame.unity_oculus_check` | Steam Frame patches | 12 |
|
||||
| [Unity: keep MSAA off at runtime (OVRManager)](#frame-unity_runtime_msaa_off) | `frame.unity_runtime_msaa_off` | Steam Frame patches | 28 |
|
||||
| [Make Unity text fields work](#frame-unity_text_input) | `frame.unity_text_input` | Steam Frame patches | 107 |
|
||||
| [Unity: start VR without Meta's system apps](#frame-unity_oculus_check) | `frame.unity_oculus_check` | Steam Frame patches | 14 |
|
||||
| [Unity: keep MSAA off at runtime (OVRManager)](#frame-unity_runtime_msaa_off) | `frame.unity_runtime_msaa_off` | Steam Frame patches | 30 |
|
||||
| [Make Unity text fields work](#frame-unity_text_input) | `frame.unity_text_input` | Steam Frame patches | 109 |
|
||||
| [Unity: share thread keys (games that run out of them)](#frame-unity_tls_key_pool) | `frame.unity_tls_key_pool` | Steam Frame patches | 1 |
|
||||
| [Unity: headset always counts as worn](#frame-unity_user_presence) | `frame.unity_user_presence` | Steam Frame patches | 1 |
|
||||
| [GL shim for Unreal (no multisampled render-to-texture)](#frame-unreal_gl_shim) | `frame.unreal_gl_shim` | Steam Frame patches | 1 |
|
||||
| [Unreal: match multiview depth to the eye size](#frame-unreal_multiview_depth) | `frame.unreal_multiview_depth` | Steam Frame patches | 1 |
|
||||
| [Unreal: stand-ins for OVRPlugin functions OVRPort lacks](#frame-unreal_ovrp_entrypoints) | `frame.unreal_ovrp_entrypoints` | Steam Frame patches | 2 |
|
||||
| [Unreal: reserve memory like on Quest](#frame-unreal_noreserve) | `frame.unreal_noreserve` | Steam Frame patches | |
|
||||
| [Unreal: stand-ins for OVRPlugin functions OVRPort lacks](#frame-unreal_ovrp_entrypoints) | `frame.unreal_ovrp_entrypoints` | Steam Frame patches | 3 |
|
||||
| [Unreal: Quest controller bindings (RPOC key map)](#frame-unreal_quest_keymap) | `frame.unreal_quest_keymap` | Steam Frame patches | 3 |
|
||||
| [Unreal: don't wait for the Quest shader precompile](#frame-unreal_quest_precompile) | `frame.unreal_quest_precompile` | Steam Frame patches | 3 |
|
||||
| [Unreal: start without the OBB check](#frame-unreal_skip_obb_check) | `frame.unreal_skip_obb_check` | Steam Frame patches | 6 |
|
||||
| [Unreal: start without the OBB check](#frame-unreal_skip_obb_check) | `frame.unreal_skip_obb_check` | Steam Frame patches | 9 |
|
||||
| [Unreal: skip the OBB delivery check](#frame-unreal_skip_obb_delivery) | `frame.unreal_skip_obb_delivery` | Steam Frame patches | 1 |
|
||||
| [Unreal: bypass the stalled loading splash](#frame-unreal_splash_bypass) | `frame.unreal_splash_bypass` | Steam Frame patches | 1 |
|
||||
| [Unreal: thumb follows the capacitive touches](#frame-unreal_thumb_touch) | `frame.unreal_thumb_touch` | Steam Frame patches | 7 |
|
||||
| [USB MIDI: don't poll for USB devices](#frame-usb_midi_watcher) | `frame.usb_midi_watcher` | Steam Frame patches | |
|
||||
| [Vermillion: paint canvases in the scene](#frame-vermillion_scene_canvas) | `frame.vermillion_scene_canvas` | Steam Frame patches | 1 |
|
||||
| [Vivox voice chat: skip Android 12 audio routing](#frame-vivox_audio_route) | `frame.vivox_audio_route` | Steam Frame patches | 2 |
|
||||
| [Vulkan: drop invalid render-pass pointers](#frame-vk_sanitize) | `frame.vk_sanitize` | Steam Frame patches | default · 1 |
|
||||
| [VrApi → OpenXR bridge](#frame-vrapi_bridge) | `frame.vrapi_bridge` | Steam Frame patches | 4 |
|
||||
| [Quiet Meta's VrApi loader (OpenXR games)](#frame-vrapi_stub) | `frame.vrapi_stub` | Steam Frame patches | 2 |
|
||||
| [OpenGL ES: shader fixes (Vulkan layer under Zink)](#frame-zink_shader_fix) | `frame.zink_shader_fix` | Steam Frame patches | 1 |
|
||||
| [OpenGL ES: shader fixes (Vulkan layer under Zink)](#frame-zink_shader_fix) | `frame.zink_shader_fix` | Steam Frame patches | 2 |
|
||||
| [Unique controller action names](#adapter-action_dedup) | `adapter.action_dedup` | Game settings | |
|
||||
| [Pointer start](#adapter-aim_forward) | `adapter.aim_forward` | Game settings | |
|
||||
| [Pointer angle](#adapter-aim_pitch) | `adapter.aim_pitch` | Game settings | |
|
||||
| [Pointer turn](#adapter-aim_yaw) | `adapter.aim_yaw` | Game settings | |
|
||||
| [Fix inside-out mixed reality](#adapter-alpha_blend_emul) | `adapter.alpha_blend_emul` | Game settings | |
|
||||
| [Use controllers](#adapter-controller_fix) | `adapter.controller_fix` | Game settings | 1 |
|
||||
| [Show Steam Frame controllers](#adapter-controller_models) | `adapter.controller_models` | Game settings | 6 |
|
||||
| [Stand in for cube layers](#adapter-cube_standin) | `adapter.cube_standin` | Game settings | |
|
||||
| [Show curved menus and screens](#adapter-cylinder_strips) | `adapter.cylinder_strips` | Game settings | |
|
||||
| [Show 360° backgrounds and videos](#adapter-equirect_emul) | `adapter.equirect_emul` | Game settings | 5 |
|
||||
| [Show 360° backgrounds and videos](#adapter-equirect_emul) | `adapter.equirect_emul` | Game settings | 7 |
|
||||
| [360° detail](#adapter-equirect_face) | `adapter.equirect_face` | Game settings | |
|
||||
| [360° picture orientation](#adapter-equirect_flip) | `adapter.equirect_flip` | Game settings | |
|
||||
| [360° video frame rate limit](#adapter-equirect_fps) | `adapter.equirect_fps` | Game settings | |
|
||||
@@ -127,8 +135,9 @@ Link to an entry with its id, dots replaced by dashes: `PATCHES.md#frame-unity_t
|
||||
| [GL shim: high-precision vertex shaders](#adapter-gl_highp_markers) | `adapter.gl_highp_markers` | Game settings | 1 |
|
||||
| [GL shim: integer vertex inputs](#adapter-gl_int_attribs) | `adapter.gl_int_attribs` | Game settings | 1 |
|
||||
| [Flat panel diagnostics (log)](#adapter-gl_mv_debug) | `adapter.gl_mv_debug` | Game settings | |
|
||||
| [Fix freezes when controllers vibrate](#adapter-haptic_fix) | `adapter.haptic_fix` | Game settings | 88 |
|
||||
| [Fix freezes when controllers vibrate](#adapter-haptic_fix) | `adapter.haptic_fix` | Game settings | 94 |
|
||||
| [Vibration strength](#adapter-haptic_scale) | `adapter.haptic_scale` | Game settings | |
|
||||
| [Turn off Quest Vulkan foveation](#adapter-hide_fb_foveation) | `adapter.hide_fb_foveation` | Game settings | |
|
||||
| [Turn off space warp](#adapter-hide_space_warp) | `adapter.hide_space_warp` | Game settings | 5 |
|
||||
| [Controller input diagnostics (log)](#adapter-input_diag) | `adapter.input_diag` | Game settings | |
|
||||
| [Extra diagnostics (log)](#adapter-layer_debug) | `adapter.layer_debug` | Game settings | |
|
||||
@@ -139,14 +148,14 @@ Link to an entry with its id, dots replaced by dashes: `PATCHES.md#frame-unity_t
|
||||
| [See your room](#adapter-passthrough_emul) | `adapter.passthrough_emul` | Game settings | |
|
||||
| [Steadier head tracking](#adapter-pose_consistency) | `adapter.pose_consistency` | Game settings | 2 |
|
||||
| [Pose timing diagnostics (log)](#adapter-pose_debug) | `adapter.pose_debug` | Game settings | |
|
||||
| [Fix hands lagging behind controllers](#adapter-pose_time_fix) | `adapter.pose_time_fix` | Game settings | 14 |
|
||||
| [Fix hands lagging behind controllers](#adapter-pose_time_fix) | `adapter.pose_time_fix` | Game settings | 15 |
|
||||
| [Treat newer Quest controllers as Touch](#adapter-profile_remap) | `adapter.profile_remap` | Game settings | |
|
||||
| [Animate fingers from touch](#adapter-proximity_emul) | `adapter.proximity_emul` | Game settings | |
|
||||
| [Keep pictures in bounds](#adapter-rect_clamp) | `adapter.rect_clamp` | Game settings | |
|
||||
| [Refresh rate](#adapter-refresh_rate) | `adapter.refresh_rate` | Game settings | 3 |
|
||||
| [Wait for the game's GPU](#adapter-release_wait) | `adapter.release_wait` | Game settings | |
|
||||
| [Re-create play space](#adapter-respace_kick) | `adapter.respace_kick` | Game settings | |
|
||||
| [Sharpness](#adapter-scale) | `adapter.scale` | Game settings | 4 |
|
||||
| [Sharpness](#adapter-scale) | `adapter.scale` | Game settings | 8 |
|
||||
| [Room depth](#adapter-scene_depth) | `adapter.scene_depth` | Game settings | |
|
||||
| [Pretend room layout](#adapter-scene_emul) | `adapter.scene_emul` | Game settings | 11 |
|
||||
| [Room height](#adapter-scene_height) | `adapter.scene_height` | Game settings | |
|
||||
@@ -161,21 +170,22 @@ Link to an entry with its id, dots replaced by dashes: `PATCHES.md#frame-unity_t
|
||||
| [Retry refused picture formats](#adapter-swapchain_fix) | `adapter.swapchain_fix` | Game settings | |
|
||||
| [Steady controller input after focus](#adapter-sync_guard) | `adapter.sync_guard` | Game settings | 3 |
|
||||
| [Hide Vulkan foveation](#adapter-vk_hide_fdm) | `adapter.vk_hide_fdm` | Game settings | 1 |
|
||||
| [Vulkan pipeline failures (log)](#adapter-vk_pipeline_log) | `adapter.vk_pipeline_log` | Game settings | |
|
||||
| [Stop objects popping in and out](#adapter-vk_query_slots) | `adapter.vk_query_slots` | Game settings | |
|
||||
| [Vulkan shader dump (diagnostics)](#adapter-vk_shader_dump) | `adapter.vk_shader_dump` | Game settings | |
|
||||
| [Vulkan shader fixes](#adapter-vk_shader_fix) | `adapter.vk_shader_fix` | Game settings | 1 |
|
||||
| [Fix depth flicker (Unreal Vulkan)](#adapter-vk_spec_fixes) | `adapter.vk_spec_fixes` | Game settings | 2 |
|
||||
| [Vulkan error checks (log)](#adapter-vk_validation) | `adapter.vk_validation` | Game settings | |
|
||||
| [OpenGL ES shader dump (diagnostics)](#adapter-zink_shader_dump) | `adapter.zink_shader_dump` | Game settings | |
|
||||
| [OpenGL ES shader fixes](#adapter-zink_shader_fix) | `adapter.zink_shader_fix` | Game settings | 1 |
|
||||
| [OpenGL ES shader fixes](#adapter-zink_shader_fix) | `adapter.zink_shader_fix` | Game settings | 2 |
|
||||
| [Keep the game's saved resolution in step](#device-config_sync) | `device.config_sync` | Files and settings on the Frame | 1 |
|
||||
| [Show as VR or as a flat window](#device-display_mode) | `device.display_mode` | Files and settings on the Frame | |
|
||||
| [Settings files for the game](#device-files) | `device.files` | Files and settings on the Frame | 3 |
|
||||
| [Foveated rendering (Valve)](#device-foveation) | `device.foveation` | Files and settings on the Frame | 3 |
|
||||
| [Foveated rendering (Valve)](#device-foveation) | `device.foveation` | Files and settings on the Frame | 5 |
|
||||
| [Hide Android's navigation bar](#device-hide_navbar) | `device.hide_navbar` | Files and settings on the Frame | |
|
||||
| [Extra Lepton settings](#device-lepton_env) | `device.lepton_env` | Files and settings on the Frame | 3 |
|
||||
| [Controllers as a gamepad (Steam Input)](#device-steam_gamepad) | `device.steam_gamepad` | Files and settings on the Frame | |
|
||||
| [Show the app's Android window (for typing)](#device-text_input_window) | `device.text_input_window` | Files and settings on the Frame | 110 |
|
||||
| [Show the app's Android window (for typing)](#device-text_input_window) | `device.text_input_window` | Files and settings on the Frame | 112 |
|
||||
| [Launch options (SteamVR or OpenXR)](#pcvr-launch_args) | `pcvr.launch_args` | PC VR (Proton and Revive) | 2 |
|
||||
| [Provide the Oculus runtime from Revive (Frame)](#pcvr-libovr_redirect) | `pcvr.libovr_redirect` | PC VR (Proton and Revive) | |
|
||||
| [No Unreal crash reporter](#pcvr-no_crash_reporter) | `pcvr.no_crash_reporter` | PC VR (Proton and Revive) | |
|
||||
@@ -284,7 +294,7 @@ Turns off Meta's frame-rate trick, which causes glitches or hangs outside Quest
|
||||
- **Changes:** Changes the APK (during the OVRPort conversion).
|
||||
- **Suggested (on):** Very heavy game (… GiB) using OVRPlugin: application space warp causes artifacts/hangs off-Quest.
|
||||
- **Offered (off):** Enable if the game shows warping artifacts or hangs (uses OVRPlugin space warp).
|
||||
- **Catalog games (3):** Asgard's Wrath 2, Batman: Arkham Shadow, Marvel's Deadpool VR.
|
||||
- **Catalog games (4):** Asgard's Wrath 2, Batman: Arkham Shadow, Marvel's Deadpool VR, Puzzling Places.
|
||||
- **Source:** [patches/overport.py](../src/frameport/patches/overport.py)
|
||||
|
||||
> For heavy games that use application space warp: it causes artifacts or hangs on non-Quest runtimes (for example Asgard's Wrath 2, Batman: Arkham Shadow).
|
||||
@@ -420,7 +430,7 @@ Stops some Unreal games from closing themselves right after starting.
|
||||
- `patch_remove_unreal_force_quit`
|
||||
- **Changes:** Changes the APK (during the OVRPort conversion).
|
||||
- **Offered (off):** Built as the alternate APK for Unreal games (use it if the game quits itself).
|
||||
- **Catalog games (41):** Asgard's Wrath 2, BARTENDER VR SIMULATOR, Breathedge VR, Carve Snowboarding, Creed, Dance Central, Espire 1: VR Operative (Quest Edition), Espire 2 and 33 more.
|
||||
- **Catalog games (45):** Asgard's Wrath 2, BARTENDER VR SIMULATOR, Breathedge VR, Carve Snowboarding, Creed, Dance Central, Espire 1: VR Operative (Quest Edition), Espire 2 and 37 more.
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `force-quit` (error): The game quit itself right after starting.
|
||||
- **Source:** [patches/overport.py](../src/frameport/patches/overport.py)
|
||||
@@ -497,6 +507,7 @@ Runs a 32-bit game (Gear VR, Oculus Go, early Quest) on the Frame, which only ru
|
||||
- **Suggested (on):** 32-bit-only game: the Frame can't run 32-bit ARM code, the bridge translates it.
|
||||
- **Catalog games (6):** AFFECTED: The Manor, Gunjack, Journey of the Gods, Shadow Point, Sports Scramble (Santa Cruz), Spunky Dungeon.
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `a32-jit-overflow` (fatal): The 32-bit bridge's translator stopped the game on a long run of instructions it hands to its interpreter, for example OpenSSL's ARMv8 SHA-1 code in Pinball FX2 VR.
|
||||
- `no-arm64` (fatal): 32-bit-only APK (e.g. a Gear VR or Oculus Go game).
|
||||
- **Source:** [patches/frame/a32_bridge.py](../src/frameport/patches/frame/a32_bridge.py)
|
||||
|
||||
@@ -511,7 +522,7 @@ FramePort's layer between the game and the Steam Frame: fills in what the Frame
|
||||
- **Suggested (on):** Required for every OpenXR/overport build on the Frame.
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `cube-swapchain-refused` (fatal): The game asked for a cube-map swapchain (for example an OVROverlay skybox or loading cube), which the Frame's runtime doesn't have.
|
||||
- `cylinder-menu-layers-rejected` (error): The game draws a curved (cylinder) screen to each eye separately (for example the Doom3Quest / PreyVR menu).
|
||||
- `cylinder-menu-layers-rejected` (info): The runtime rejected a frame's layers once (XR_ERROR_LAYER_INVALID).
|
||||
- `graphics-requirements-missing` (fatal): The game can't start VR on the Frame; rebuild it with the current FramePort.
|
||||
- `swapchain-rect-invalid` (fatal): The runtime rejects the game's frames, so it stops drawing (for example stuck at a "Waiting" box).
|
||||
- `time-conversion` (warning): The Frame's runtime lacks timespec time conversion; the current adapter build emulates it.
|
||||
@@ -565,7 +576,7 @@ Stops bHaptics from asking for a Bluetooth permission the Frame doesn't have (th
|
||||
- `frame.bhaptics_permission` · also for 2D apps
|
||||
- **Changes:** Changes the APK (a rebuild and reinstall apply it).
|
||||
- **Suggested (on):** bHaptics asks for an Android 12 Bluetooth permission at start; the permission screen interrupts the game on the Frame.
|
||||
- **Catalog games (5):** Quantum Void, Ragnarock, Smash Drums, Tea For God, Vendetta Forever.
|
||||
- **Catalog games (6):** Quantum Void, Ragnarock, Smash Drums, Tea For God, Vampire: The Masquerade - Justice, Vendetta Forever.
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `bhaptics-permission-prompt` (error): The game asked for Android 12's Bluetooth permission (bHaptics' vest SDK, for example Yupitergrad).
|
||||
- **Source:** [patches/frame/bhaptics_permission.py](../src/frameport/patches/frame/bhaptics_permission.py)
|
||||
@@ -585,6 +596,19 @@ Makes BlazeRush's menus and controllers work without Meta's avatars, and lets it
|
||||
|
||||
> BlazeRush 1.0.349 only (Klownicle's guide, GitHub #57). Its menus wait for Meta's avatar, which never comes on the Frame, before they create the game's own controllers: the second menu ignored all input. Two instructions in libtargemapp.so skip that wait and the avatar mesh drawing; the game's shader cache gets a new folder name (cache/br_shader_v1), so programs compiled before the GL shim's shader fixes aren't reused. Only this exact build is changed (code fingerprint and every instruction checked); anything else is left as it is.
|
||||
|
||||
### <a id="frame-cortopia_org_id"></a>Cortopia games: don't wait for Meta's org-scoped id
|
||||
|
||||
Gets Cortopia games (for example Escaping Wonderland) past their loading screen.
|
||||
|
||||
- `frame.cortopia_org_id`
|
||||
- **Changes:** Changes the APK (a rebuild and reinstall apply it).
|
||||
- **Suggested (on):** Cortopia's Meta platform start-up waits for an org-scoped user id that OVRPort's platform library never answers (stuck loading screen).
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `cortopia-org-id-wait` (error): The game waits forever on its loading screen for an answer from Meta's platform (an org-scoped user id, used as its analytics id) that OVRPort's platform library doesn't give.
|
||||
- **Source:** [patches/frame/cortopia_org_id.py](../src/frameport/patches/frame/cortopia_org_id.py)
|
||||
|
||||
> Cortopia Studios' games (e.g. Escaping Wonderland) ask Meta's platform for an org-scoped user id at start when on Wi-Fi, only to use it as their analytics id. OVRPort's platform library doesn't answer that request ("An unknown error occurred. Request failed."), so the game waits forever on its loading screen. Makes the game take its own offline path for that one request (the analytics id stays empty); the licence check and the logged-in user before it are unchanged. Found with Cpp2IL in libil2cpp.so.
|
||||
|
||||
### <a id="frame-eos_keychain_loop"></a>Epic Online Services: stop the keychain retry loop
|
||||
|
||||
Stops Epic Online Services from retrying its login keychain forever (the game would never finish starting).
|
||||
@@ -625,6 +649,19 @@ Corrects graphics code the Frame's drivers reject (black screen with sound).
|
||||
|
||||
> Loads libglshim.so ahead of libEGL in every engine library that fetches GL through eglGetProcAddress. Fixes Quest-only leniency that Mesa/Zink rejects: #pragma before #extension, implicit int/float conversions (enables GL_EXT_shader_implicit_conversions), and multiview shaders used on single-view framebuffers (hides GL_OVR_multiview; gl_hide_multiview=0 turns that off). Logs every failed shader with its source lines (logcat tag GLShim). Symptom: black screen with working audio in a GLES game.
|
||||
|
||||
### <a id="frame-gms_platform_version"></a>Play services: Android 11 version checks
|
||||
|
||||
Lets games with Google Play services code start on the Frame (they'd crash at start on an Android 12 call).
|
||||
|
||||
- `frame.gms_platform_version` · also for 2D apps
|
||||
- **Changes:** Changes the APK (a rebuild and reinstall apply it).
|
||||
- **Suggested (on):** Google Play services' Android 12 checks were built in as 'always true'; on Lepton (Android 11) the game would crash at start.
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `gms-android12-call` (fatal): Google Play services' code in the game called an Android 12 method (the game was built for Android 12 and newer, so its version checks were built in as "always true") and Lepton runs Android 11; the game crashes on its GoogleApiHandler thread at start (for example Titan Isles).
|
||||
- **Source:** [patches/frame/gms_platform_version.py](../src/frameport/patches/frame/gms_platform_version.py)
|
||||
|
||||
> Google Play services' libraries in games built for Android 12+ only (for example Titan Isles) had their Android 12 checks folded into 'always true' when the game was built; on Lepton's Android 11 they then call an Android 12 method and the game crashes at start (FATAL EXCEPTION: GoogleApiHandler). Those checks answer 'no' again (an in-place edit of classes.dex).
|
||||
|
||||
### <a id="frame-godot_clipboard"></a>Godot apps: start without a clipboard service
|
||||
|
||||
Lets Godot games start on the Frame (they'd crash looking for a clipboard).
|
||||
@@ -632,6 +669,7 @@ Lets Godot games start on the Frame (they'd crash looking for a clipboard).
|
||||
- `frame.godot_clipboard` · also for 2D apps
|
||||
- **Changes:** Changes the APK (a rebuild and reinstall apply it).
|
||||
- **Suggested (on):** Godot 4 app: it crashes at start in Lepton, which has no clipboard service.
|
||||
- **Catalog games (1):** EndoparasiticVR.
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `godot-no-clipboard` (fatal): The app crashed at start because the Frame's Android has no clipboard.
|
||||
- **Source:** [patches/frame/godot_clipboard.py](../src/frameport/patches/frame/godot_clipboard.py)
|
||||
@@ -645,7 +683,7 @@ Plays the game's videos on the Frame's video hardware, so 4K and 8K video runs s
|
||||
- `frame.hw_video_decode` · also for 2D apps
|
||||
- **Changes:** Install only: written on the Frame when the game is installed; the APK isn't changed.
|
||||
- **Suggested (on):** The game plays video through Android's decoders (MediaCodec, ExoPlayer or VLC): decode it on the Frame's hardware.
|
||||
- **Catalog games (22):** 4XVR Video Player, AugmentedEmpire, Batman: Arkham Shadow, Battlemarked, Breathedge VR, Dance Central, Exploding Kittens VR, Eye of the Temple and 14 more.
|
||||
- **Catalog games (29):** 4XVR Video Player, AugmentedEmpire, Batman: Arkham Shadow, Battlemarked, Breathedge VR, Dance Central, Exploding Kittens VR, Eye of the Temple and 21 more.
|
||||
- **Source:** [patches/frame/hw_video_decode.py](../src/frameport/patches/frame/hw_video_decode.py)
|
||||
|
||||
> Decodes the game's videos on the Frame's hardware video decoder instead of Android's software decoders, which stutter or fall behind with 4K/8K video (for example video players, Batman: Arkham Shadow's cutscenes). Adds FramePort's codec plugin (OMX.frameport.avc/hevc/vp9.decoder) to this game's container only; the APK isn't changed. When the hardware is busy (for example Steam's own hardware video decoding is on) the video is decoded in software as before.
|
||||
@@ -763,6 +801,7 @@ Stops a crash a few seconds after the logo in games with voice chat.
|
||||
- `frame.ovr_microphone`
|
||||
- **Changes:** Changes the APK (a rebuild and reinstall apply it).
|
||||
- **Suggested (on):** The game uses Meta's microphone API (ovr_Microphone_GetOutputBufferMaxSize), which crashes in OVRPort's library before the microphone is started.
|
||||
- **Catalog games (1):** The Walking Dead: Saints & Sinners.
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `ovr-microphone-crash` (fatal): The game crashed while setting up the microphone (for example Unreal's Oculus voice chat a few seconds after the logo).
|
||||
- **Source:** [patches/frame/ovr_microphone.py](../src/frameport/patches/frame/ovr_microphone.py)
|
||||
@@ -831,6 +870,19 @@ Stops a crash on the Frame's processor in games whose code the Quest runs more l
|
||||
|
||||
> Some engines contain assembly (for example OpenSSL's) that checks a return-address signature it never made. The Quest's CPU ignores those checks, the Steam Frame's enforces them: the game crashes with SIGILL as soon as it uses that code, for example on its first network connection (Star Wars Pinball VR). In a library with unpaired checks, the signing and checking instructions become no-ops.
|
||||
|
||||
### <a id="frame-photon_voice_audio_route"></a>Photon Voice: skip Android 12 audio routing
|
||||
|
||||
Stops games with Photon Voice chat from crashing on the Frame when voice chat starts (an Android 12 audio call).
|
||||
|
||||
- `frame.photon_voice_audio_route` · also for 2D apps
|
||||
- **Changes:** Changes the APK (a rebuild and reinstall apply it).
|
||||
- **Suggested (on):** Photon Voice calls Android 12 audio methods, which Lepton (Android 11) lacks, and crashes when voice chat starts.
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `photon-voice-api31` (fatal): The game's Photon Voice microphone plugin calls Android 12 audio-routing methods (AudioManager communication devices) without checking the Android version; Lepton runs Android 11, so the app crashes when voice chat starts (for example Table Troopers at the tutorial).
|
||||
- **Source:** [patches/frame/photon_voice_audio_route.py](../src/frameport/patches/frame/photon_voice_audio_route.py)
|
||||
|
||||
> Photon Voice's microphone plugin (for example Table Troopers) picks the audio device with Android 12 methods (AudioManager communication devices) without checking the Android version; Lepton runs Android 11, so the game crashes with a NoSuchMethodError when voice chat starts. That method returns at once instead (an in-place edit of classes.dex); the microphone keeps Android's default audio route.
|
||||
|
||||
### <a id="frame-sdl_clipboard"></a>SDL apps: start without a clipboard service
|
||||
|
||||
Lets SDL and LÖVE games start on the Frame (they'd crash looking for a clipboard).
|
||||
@@ -897,6 +949,19 @@ Lets Team Beef ports (for example Lambda1VR) start on the Frame.
|
||||
|
||||
> Team Beef's ports (for example Lambda1VR, RTCWQuest) load an OpenXR library named after the headset maker and pick their VR setup by maker; for "valve" they stop at start (libopenxr_loader_valve.so not found) or take the Pico path. Adds that library and lets them take the Meta path. Keeps GL4ES in charge of its desktop OpenGL draw calls so animated models don't turn into stretched triangles.
|
||||
|
||||
### <a id="frame-unity_appui_vibrator"></a>Unity App UI: no Android 12 vibrator
|
||||
|
||||
Lets games built with Unity's App UI start on the Frame (they'd quit at once on an Android 12 vibrator call).
|
||||
|
||||
- `frame.unity_appui_vibrator` · also for 2D apps
|
||||
- **Changes:** Changes the APK (a rebuild and reinstall apply it).
|
||||
- **Suggested (on):** Unity App UI's activity uses Android 12's VibratorManager at start, which Lepton (Android 11) lacks: the game would quit at once.
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `unity-appui-vibrator` (fatal): The game's start activity uses Android 12's VibratorManager (Unity's App UI package, for example PianoVision) and Lepton runs Android 11, so it quits before the game starts.
|
||||
- **Source:** [patches/frame/unity_appui_vibrator.py](../src/frameport/patches/frame/unity_appui_vibrator.py)
|
||||
|
||||
> The activity of Unity's App UI package (for example PianoVision) gets the vibrator through Android 12's VibratorManager without checking the Android version; on Lepton's Android 11 the game quits at start with a NoClassDefFoundError. The activity then starts without a vibrator and its UI haptic feedback does nothing (an in-place edit of classes.dex).
|
||||
|
||||
### <a id="frame-unity_gl_shim"></a>GL shim for Unity (no multisampled render-to-texture)
|
||||
|
||||
Stops a gray or frozen screen in Unity games that turn on anti-aliasing while running (for example The Room VR).
|
||||
@@ -904,7 +969,7 @@ Stops a gray or frozen screen in Unity games that turn on anti-aliasing while ru
|
||||
- `frame.unity_gl_shim`
|
||||
- **Changes:** Changes the APK (a rebuild and reinstall apply it).
|
||||
- **Suggested (on):** Unity GLES game that may switch to MSAA at runtime: hide multisampled render-to-texture, which crashes the Frame's GL driver (for example The Room VR).
|
||||
- **Catalog games (23):** Audica, BattleSisters, Beat Saber, COMPOUND, Cosmodread, Down the Rabbit Hole, Drunkn Bar Fight, End Space and 15 more.
|
||||
- **Catalog games (25):** Audica, BattleSisters, Beat Saber, COMPOUND, Cosmodread, Down the Rabbit Hole, Drunkn Bar Fight, End Space and 17 more.
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `unreal-msrtt-crash` (fatal): The game's graphics crashed a few seconds after start.
|
||||
- **Source:** [patches/frame/vrapi_bridge.py](../src/frameport/patches/frame/vrapi_bridge.py)
|
||||
@@ -931,7 +996,7 @@ Turns off a smoothing setting that crashes some older Unity games on the Frame.
|
||||
- **Changes:** Changes the APK (a rebuild and reinstall apply it).
|
||||
- **Suggested (on):** Legacy VrApi Unity game on GLES with MSAA (… quality levels): multisampled render-to-texture hangs the Frame's GL driver (for example Sniper Elite VR).
|
||||
- **Offered (off):** GLES Unity game with MSAA on (… quality levels); enable if it hangs the GPU ('zink: DEVICE LOST').
|
||||
- **Catalog games (9):** Audica, BattleSisters, Eye of the Temple, IEYTD3, Jurassic World Aftermath Collection, Mini Motor Racing X, Sniper Elite VR, SUPERHOT VR and 1 more.
|
||||
- **Catalog games (10):** Audica, BattleSisters, Eye of the Temple, I Expect You To Die 2, IEYTD3, Jurassic World Aftermath Collection, Mini Motor Racing X, Sniper Elite VR and 2 more.
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `zink-device-lost` (fatal): The GPU hung, so the game froze or closed.
|
||||
- **Source:** [patches/frame/unity_no_msaa.py](../src/frameport/patches/frame/unity_no_msaa.py)
|
||||
@@ -959,7 +1024,7 @@ Lets older Unity games start VR without Meta's system apps (they'd stay on a 2D
|
||||
- `frame.unity_oculus_check` · revision 5
|
||||
- **Changes:** Changes the APK (a rebuild and reinstall apply it).
|
||||
- **Suggested (on):** Unity with built-in Oculus support: it checks for Meta's system apps before starting VR, else it runs as a 2D app (for example Accounting+, BattleSisters).
|
||||
- **Catalog games (12):** Accounting+, Audica, BattleSisters, Cosmodread, End Space, Eye of the Temple, Jurassic World Aftermath Collection, Mini Motor Racing X and 4 more.
|
||||
- **Catalog games (14):** Accounting+, Audica, BattleSisters, Cosmodread, End Space, Eye of the Temple, I Expect You To Die 2, Jurassic World Aftermath Collection and 6 more.
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `unity-vr-device-none` (fatal): Unity didn't start VR, so the game runs as a hidden 2D app.
|
||||
- **Source:** [patches/frame/unity_oculus_check.py](../src/frameport/patches/frame/unity_oculus_check.py)
|
||||
@@ -973,7 +1038,7 @@ Keeps a smoothing setting off that the game turns on itself and that can freeze
|
||||
- `frame.unity_runtime_msaa_off` · revision 2
|
||||
- **Changes:** Changes the APK (a rebuild and reinstall apply it).
|
||||
- **Suggested (on):** GLES Unity game whose OVRManager turns 4x MSAA on at runtime: multisampled render-to-texture can hang the Frame's GPU.
|
||||
- **Catalog games (28):** Audica, BattleSisters, Beat Saber, COMPOUND, Cosmodread, Down the Rabbit Hole, Drunkn Bar Fight, End Space and 20 more.
|
||||
- **Catalog games (30):** Audica, BattleSisters, Beat Saber, COMPOUND, Cosmodread, Down the Rabbit Hole, Drunkn Bar Fight, End Space and 22 more.
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `unity-render-crash` (fatal): The game's graphics crashed, so the picture freezes or stays gray.
|
||||
- `unity-runtime-msaa` (info): The game turns MSAA on at runtime, which can hang the Frame's GPU.
|
||||
@@ -989,7 +1054,7 @@ Lets you type into this app's text fields on the Frame (they'd close at once).
|
||||
- `frame.unity_text_input` · also for 2D apps
|
||||
- **Changes:** Changes the APK (a rebuild and reinstall apply it).
|
||||
- **Suggested (on):** Unity app with text fields (…): they close at once on the Frame because it has no system keyboard.
|
||||
- **Catalog games (107):** AgeOfJoy, AllInOneSports, Ancient_Dungeon, Arcsmith, Arkio, Assassin's Creed Nexus, Attack on Titan VR: Unbreakable, Audica and 99 more.
|
||||
- **Catalog games (109):** AgeOfJoy, AllInOneSports, Ancient_Dungeon, Arcsmith, Arkio, Assassin's Creed Nexus, Attack on Titan VR: Unbreakable, Audica and 101 more.
|
||||
- **Source:** [patches/frame/unity_text_input.py](../src/frameport/patches/frame/unity_text_input.py)
|
||||
|
||||
> Unity's TMP_InputField / InputField wait for Android's on-screen keyboard and close themselves a frame later when there is none (Lepton has no on-screen keyboard; Meta's system keyboard does this on a Quest), so a selected text field only flashes a caret. Rewrites TouchScreenKeyboardShouldBeUsed -> false and isKeyboardUsingEvents (TMP) / InPlaceEditing (uGUI) -> true in libil2cpp.so, found per game with Cpp2IL (downloaded on first use), so fields stay selected and take key presses: Steam's keyboard (with "Show the app window") or Type on Frame from the PC.
|
||||
@@ -1049,6 +1114,19 @@ Shows the full environment when its upper part is clipped but menu panels look c
|
||||
|
||||
> Some UE4 games keep the initial Android window size for their stereo depth buffer, clipping the upper part of the environment while menu panels look correct. Refreshes the cached depth dimensions from the current eye render target before allocation. Preserves multiview and multisampling. Verified in Tales from the Galaxy's Edge 1.1.9; changes one branch only when the function size and surrounding code match.
|
||||
|
||||
### <a id="frame-unreal_noreserve"></a>Unreal: reserve memory like on Quest
|
||||
|
||||
Lets the game load: it reserves more memory at start than the Frame grants in one piece and crashed before its first frame (for example Transformers Beyond Reality).
|
||||
|
||||
- `frame.unreal_noreserve` · also for 2D apps
|
||||
- **Changes:** Changes the APK (a rebuild and reinstall apply it).
|
||||
- **Suggested (on):** Unreal's Binned3 allocator reserves more memory at start than the Frame's kernel allows in one piece; without this the game crashes while it loads.
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `unreal-reserve-refused` (fatal): The game crashed while Unreal was still loading, before its first frame.
|
||||
- **Source:** [patches/frame/unreal_noreserve.py](../src/frameport/patches/frame/unreal_noreserve.py)
|
||||
|
||||
> Unreal reserves its memory ranges on Android with ordinary read/write mappings. Games built with Unreal's Binned3 allocator reserve tens of gigabytes at once while the engine loads (76 GiB in Transformers Beyond Reality); Quest allows that, the Frame's kernel refuses mappings larger than its memory, and the game crashes before its first frame (SIGSEGV at fault addr 0x10 in libUnreal.so, inside System.loadLibrary). This marks those mappings MAP_NORESERVE, as Quest effectively treats them: memory is still only used when the game touches it.
|
||||
|
||||
### <a id="frame-unreal_ovrp_entrypoints"></a>Unreal: stand-ins for OVRPlugin functions OVRPort lacks
|
||||
|
||||
Lets older Unreal games start VR on the Frame (for example Star Wars Pinball VR).
|
||||
@@ -1056,7 +1134,7 @@ Lets older Unreal games start VR on the Frame (for example Star Wars Pinball VR)
|
||||
- `frame.unreal_ovrp_entrypoints`
|
||||
- **Changes:** Changes the APK (a rebuild and reinstall apply it).
|
||||
- **Suggested (on):** Unreal looks up OVRPlugin function(s) OVRPort's OVRPlugin lacks: ……. Without them Unreal starts no VR.
|
||||
- **Catalog games (2):** Ghostbusters: Rise of the Ghost Lord, Star Wars Pinball VR.
|
||||
- **Catalog games (3):** Ghostbusters: Rise of the Ghost Lord, Puzzling Places, Star Wars Pinball VR.
|
||||
- **Source:** [patches/frame/unreal_ovrp.py](../src/frameport/patches/frame/unreal_ovrp.py)
|
||||
|
||||
> Unreal's Oculus module looks up every OVRPlugin function it was built against and starts no VR when one is missing; OVRPort's OpenXR OVRPlugin lacks some old ones (for example ovrp_GetPTWNear, which Unreal 4.25 builds like Star Wars Pinball VR look up). The game then never starts an OpenXR session and crashes a few seconds in. Adds a generated library to libOVRPlugin.so with a stand-in for each missing function that reports failure (ovrpFailure), so Unreal's Oculus support starts. The functions OVRPort has are untouched.
|
||||
@@ -1092,7 +1170,7 @@ Starts Unreal games without re-checking their data file (they'd seem to hang on
|
||||
- `frame.unreal_skip_obb_check` · also for 2D apps
|
||||
- **Changes:** Changes the APK (a rebuild and reinstall apply it).
|
||||
- **Suggested (on):** Unreal checks the OBB's contents before starting (bVerifyOBBOnStartUp); on the Frame a failed or slow check can't be seen and the game seems to hang.
|
||||
- **Catalog games (6):** Dance Central, Kill It With Fire VR, Lost Recipes, MacacoVR, Maestro, Ragnarock.
|
||||
- **Catalog games (9):** Dance Central, Kill It With Fire VR, Lost Recipes, MacacoVR, Maestro, Puzzling Places, Ragnarock, Scared By Squares and 1 more.
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `unreal-obb-check-stuck` (fatal): The game stays on Unreal's OBB check screen (DownloaderActivity), which the Frame doesn't show, and never starts VR (for example Contractors, GitHub #159).
|
||||
- **Source:** [patches/frame/unreal_obb_check.py](../src/frameport/patches/frame/unreal_obb_check.py)
|
||||
@@ -1139,6 +1217,19 @@ Makes the hands' thumbs follow what your thumb touches (they always pointed up:
|
||||
|
||||
> Unreal 4's Oculus input sets the ThumbUp axis (games animate the hand's thumb with it) from Meta's near-touch sensing, which the Frame never reports: the thumb always points up. Uses the touches instead (left X/Y/stick/thumb rest, right A/B/stick/thumb rest). Changes three instructions in OculusInput::SendControllerEvents, only where the code matches exactly (UE4 Oculus games of one engine generation, for example Vader Immortal, Robo Recall). Found by Klownicle (GitHub #49).
|
||||
|
||||
### <a id="frame-usb_midi_watcher"></a>USB MIDI: don't poll for USB devices
|
||||
|
||||
Lets apps with a USB MIDI driver start on the Frame (they'd crash looking for USB devices); USB MIDI devices aren't available there.
|
||||
|
||||
- `frame.usb_midi_watcher` · also for 2D apps
|
||||
- **Changes:** Changes the APK (a rebuild and reinstall apply it).
|
||||
- **Suggested (on):** kshoji's USB MIDI driver polls Android's USB service, which the Frame's Android lacks: the app would crash a few seconds after start.
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `usb-midi-watcher` (fatal): The app's USB MIDI driver (kshoji's, used by Unity MIDI plugins, for example PianoVision) asked Android's USB service for MIDI devices; the Frame's Android has no USB service, so the app crashed.
|
||||
- **Source:** [patches/frame/usb_midi_watcher.py](../src/frameport/patches/frame/usb_midi_watcher.py)
|
||||
|
||||
> kshoji's USB MIDI driver (Unity MIDI plugins, for example PianoVision) polls Android's USB service for MIDI devices; the Frame's Android has no USB service, so the app crashes a few seconds after start (NullPointerException on MidiDeviceConnectionWatchThread). The poll returns at once instead, so no USB MIDI device is ever found (an in-place edit of classes.dex).
|
||||
|
||||
### <a id="frame-vermillion_scene_canvas"></a>Vermillion: paint canvases in the scene
|
||||
|
||||
Keeps the hand and brush visible over Vermillion's painting canvas (the canvas is drawn in the scene instead of as a layer in front).
|
||||
@@ -1219,7 +1310,7 @@ Repairs shaders that hang the graphics chip at certain effects, from the game's
|
||||
- `frame.zink_shader_fix`
|
||||
- **Changes:** Changes the APK (a rebuild and reinstall apply it).
|
||||
- **Suggested:** not automatically; set on the game page (Customize), by a recipe or after a launch test.
|
||||
- **Catalog games (1):** Vader Immortal: Episode I.
|
||||
- **Catalog games (2):** Star Wars: Tales from the Galaxy's Edge, Vader Immortal: Episode I.
|
||||
- **Source:** [patches/frame/zink_shader_fix.py](../src/frameport/patches/frame/zink_shader_fix.py)
|
||||
|
||||
> Loads FramePort's shader-fix Vulkan layer into an OpenGL ES game. On the Frame, OpenGL ES runs on Zink (Mesa's GL on Vulkan); the layer sits between Zink and the driver and inserts the words of the adapter setting zink_shader_fix into the SPIR-V modules whose size and SHA-256 match (every other module is untouched), for example stores that set loop counters and accumulators a shader reads before writing, which hang the GPU (Vader Immortal's lightspeed jump; found by Klownicle, GitHub #49). Does nothing without zink_shader_fix (or zink_shader_dump) in the recipe. The layer adds itself to Android's Vulkan debug layer list for the game's process only.
|
||||
@@ -1228,6 +1319,20 @@ Repairs shaders that hang the graphics chip at certain effects, from the game's
|
||||
|
||||
Settings of FrameBridge, FramePort's OpenXR layer inside every converted Quest game. Most can be changed on the Frame later without a rebuild (game page → Game settings).
|
||||
|
||||
### <a id="adapter-action_dedup"></a>Unique controller action names
|
||||
|
||||
Stops games from dropping back to the home environment at start because two of their controller actions share a name (for example Scared By Squares). Leave it on.
|
||||
|
||||
- `adapter.action_dedup`
|
||||
- **Changes:** Game setting: stored in the build and on the Frame (settings.conf); can be changed without a rebuild.
|
||||
- **Suggested:** not automatically; set on the game page (Customize), by a recipe or after a launch test.
|
||||
- **Options:**
|
||||
- Value: int, default `1`.
|
||||
- Game settings → Troubleshooting → "Unique controller action names" (advanced).
|
||||
- **Source:** [patches/settings.py](../src/frameport/patches/settings.py)
|
||||
|
||||
> Gives a controller action whose name already exists in its action set a free name ("turn" -> "turn_2"). The Frame's runtime accepts duplicate names but then can't load the game's input manifest and treats the game as closed: black, then the home environment while the game keeps running with sound (for example Scared By Squares, whose Unreal project has an action and an axis both called Turn; GitHub #323).
|
||||
|
||||
### <a id="adapter-aim_forward"></a>Pointer start
|
||||
|
||||
Moves where the pointer starts, forward or back.
|
||||
@@ -1270,6 +1375,20 @@ Turns the pointer left or right.
|
||||
|
||||
> Turns the controllers' pointing ray left (+) or right (−).
|
||||
|
||||
### <a id="adapter-alpha_blend_emul"></a>Fix inside-out mixed reality
|
||||
|
||||
For games that show your room on their objects and darkness where your room should be.
|
||||
|
||||
- `adapter.alpha_blend_emul`
|
||||
- **Changes:** Game setting: stored in the build and on the Frame (settings.conf); can be changed without a rebuild.
|
||||
- **Suggested:** not automatically; set on the game page (Customize), by a recipe or after a launch test.
|
||||
- **Options:**
|
||||
- Value: int, default `1`.
|
||||
- Game settings → Mixed reality → "Fix inside-out mixed reality" (advanced); shown while `adapter.passthrough_emul` is on.
|
||||
- **Source:** [patches/settings.py](../src/frameport/patches/settings.py)
|
||||
|
||||
> With emulated passthrough, honours the eye layer's XR_FB_composition_layer_alpha_blend, which the Frame's runtime ignores: Unreal games keep inverted alpha and ask for inverse blending, so the room showed where the game drew and black where it should show the room (for example Star Wars: Beyond Victory). The alpha is inverted in the game's image before it is composited (Vulkan).
|
||||
|
||||
### <a id="adapter-controller_fix"></a>Use controllers
|
||||
|
||||
Turn off only for games you play with your hands instead of controllers.
|
||||
@@ -1340,7 +1459,7 @@ Video players' virtual theaters and 360° videos would otherwise stay black.
|
||||
- **Options:**
|
||||
- Value: int, default `0`.
|
||||
- Game settings → 360° pictures and video → "Show 360° backgrounds and videos".
|
||||
- **Catalog games (5):** 4XVR Video Player, Into The Radius 2, Pinball FX VR, Riven, Tea For God.
|
||||
- **Catalog games (7):** 4XVR Video Player, EndoparasiticVR, Into The Radius 2, Pinball FX VR, Puzzling Places, Riven, Tea For God.
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `equirect-layers-dropped` (warning): The game's 360° pictures (for example a video player's theater or 360° videos) are missing because the Frame's runtime can't show equirect layers.
|
||||
- **Source:** [patches/settings.py](../src/frameport/patches/settings.py)
|
||||
@@ -1621,7 +1740,7 @@ Logs details when flat panels stay black. No effect on the game.
|
||||
- Game settings → Troubleshooting → "Flat panel diagnostics (log)" (advanced).
|
||||
- **Source:** [patches/settings.py](../src/frameport/patches/settings.py)
|
||||
|
||||
> Diagnostics for frame.gl_multiview_fbo: checks for GL errors after every single-view draw of a multiview shader and logs counters every 5 seconds (tag GLMV in launch.log).
|
||||
> Diagnostics for frame.gl_multiview_fbo: checks for GL errors after every single-view draw of a multiview shader and logs counters every 5 seconds (tag GLMV in launch.log). 2 (frameport settings) also checks every draw and logs the draw state, failed texture uploads and shader compiles and, for idTech 4 engines, the game clock.
|
||||
|
||||
### <a id="adapter-haptic_fix"></a>Fix freezes when controllers vibrate
|
||||
|
||||
@@ -1633,7 +1752,7 @@ For games that freeze the Frame when a controller vibrates (for example Lucky's
|
||||
- **Options:**
|
||||
- Value: int, default `0`.
|
||||
- Game settings → Controllers → "Fix freezes when controllers vibrate" (advanced).
|
||||
- **Catalog games (88):** AgeOfJoy, Ancient_Dungeon, Attack on Titan VR: Unbreakable, Audica, AugmentedEmpire, Battlemarked, BattleSisters, Beat Saber and 80 more.
|
||||
- **Catalog games (94):** AgeOfJoy, Ancient_Dungeon, Attack on Titan VR: Unbreakable, Audica, AugmentedEmpire, Battlemarked, BattleSisters, Beat Saber and 86 more.
|
||||
- **Source:** [patches/settings.py](../src/frameport/patches/settings.py)
|
||||
|
||||
> Routes OVRPlugin through FramePort's extension shim, which turns Meta's amplitude-envelope vibrations into plain ones: OVRPort's loader reads their nanosecond duration as seconds and allocates gigabytes, freezing the Frame when the game vibrates a controller (for example Lucky's Tale's save slots, GitHub #9). Needs a rebuild.
|
||||
@@ -1652,6 +1771,22 @@ Turn it down if controller vibrations are too strong.
|
||||
|
||||
> Scales every controller vibration the game asks for (0-1): plain vibrations, Meta's amplitude envelopes and PCM buffers. For games whose vibrations feel much stronger than on a Quest.
|
||||
|
||||
### <a id="adapter-hide_fb_foveation"></a>Turn off Quest Vulkan foveation
|
||||
|
||||
Diagnostic for Vulkan games that fail on their first frames with missing Quest foveation images.
|
||||
|
||||
- `adapter.hide_fb_foveation`
|
||||
- **Changes:** Game setting: stored in the build and on the Frame (settings.conf); can be changed without a rebuild.
|
||||
- **Suggested:** not automatically; set on the game page (Customize), by a recipe or after a launch test.
|
||||
- **Options:**
|
||||
- Value: int, default `0`.
|
||||
- Game settings → Troubleshooting → "Turn off Quest Vulkan foveation" (advanced).
|
||||
- **Suggested by launch-test signatures:**
|
||||
- `quest-foveation-image-missing` (info): OVRPlugin enabled Quest Vulkan foveation but received no density image.
|
||||
- **Source:** [patches/settings.py](../src/frameport/patches/settings.py)
|
||||
|
||||
> Hides Quest FB foveation extensions from the game and OVRPort, removes Vulkan foveation image/create chains, and refuses foveation profile updates. Diagnostic for first-frame failures with missing density images (for example Transformers Beyond Reality: Redux). Device verification pending; does not disable Valve foveation.
|
||||
|
||||
### <a id="adapter-hide_space_warp"></a>Turn off space warp
|
||||
|
||||
For games whose picture flickers or smears (for example Into The Radius 2).
|
||||
@@ -1811,7 +1946,7 @@ For games whose hands trail the controllers when you move them (for example Batt
|
||||
- **Options:**
|
||||
- Value: int, default `0`.
|
||||
- Game settings → Controllers → "Fix hands lagging behind controllers" (advanced).
|
||||
- **Catalog games (14):** Battlemarked, BattleSisters, Beat Saber, Dance Central, Dungeons of Eternity, Mini Motor Racing X, Phantom: Covert Ops, Quantum Void and 6 more.
|
||||
- **Catalog games (15):** Battlemarked, BattleSisters, Beat Saber, Dance Central, Dungeons of Eternity, Mini Motor Racing X, OrbusVR, Phantom: Covert Ops and 7 more.
|
||||
- **Source:** [patches/settings.py](../src/frameport/patches/settings.py)
|
||||
|
||||
> Poses a game asks for at a CLOCK_MONOTONIC time, or more than 0.5 s before the frame's display time, are located at the same moment in the runtime's time (or now). Meta's OVRPlugin passes the monotonic clock on as the OpenXR time, which on the Frame runs seconds behind the runtime's clock, so its "now" poses (Unity's physics step, controller poses) came from the past: hands trailing the controllers (for example BattleSisters, Sniper Elite VR).
|
||||
@@ -1828,7 +1963,7 @@ For apps that only know Quest 3/Pro controllers: without it they get no buttons.
|
||||
- Game settings → Controllers → "Treat newer Quest controllers as Touch" (advanced).
|
||||
- **Source:** [patches/settings.py](../src/frameport/patches/settings.py)
|
||||
|
||||
> Apps that suggest controller bindings only for Meta's newer profiles (Touch Plus, Touch Pro), which the Frame's runtime rejects (XR_ERROR_PATH_UNSUPPORTED), get the same bindings as oculus/touch_controller instead (components Touch lacks are dropped). Without it such apps get no controller input.
|
||||
> Apps that suggest controller bindings only for Meta's newer profiles (Touch Plus, Touch Pro), which the Frame's runtime rejects (XR_ERROR_PATH_UNSUPPORTED), get the same bindings as oculus/touch_controller instead (components Touch lacks are dropped), and the runtime's answer for each hand is reported to them as their own profile (Unity's OpenXR input only connects controllers of a profile it knows). Meta's detached-controller paths (XR_META_detached_controllers, which the Frame lacks) are left out of the app's actions and bindings: one such path made Unity attach no controller input at all. Without it such apps get no controller input.
|
||||
|
||||
### <a id="adapter-proximity_emul"></a>Animate fingers from touch
|
||||
|
||||
@@ -1846,7 +1981,7 @@ For games whose hands' thumbs never move when you touch the buttons or thumbstic
|
||||
|
||||
### <a id="adapter-rect_clamp"></a>Keep pictures in bounds
|
||||
|
||||
Stops games from hanging when their eye picture is a little too big (for example PowerWash Simulator). Leave it on.
|
||||
Stops games from hanging when their eye picture is a little too big or empty (for example PowerWash Simulator). Leave it on.
|
||||
|
||||
- `adapter.rect_clamp`
|
||||
- **Changes:** Game setting: stored in the build and on the Frame (settings.conf); can be changed without a rebuild.
|
||||
@@ -1856,7 +1991,7 @@ Stops games from hanging when their eye picture is a little too big (for example
|
||||
- Game settings → Troubleshooting → "Keep pictures in bounds" (advanced).
|
||||
- **Source:** [patches/settings.py](../src/frameport/patches/settings.py)
|
||||
|
||||
> Keeps every submitted image rect inside its swapchain. Unity can size the eye area a few pixels past the image on some Frames; SteamVR then rejects every frame (xrEndFrame -25, XR_ERROR_SWAPCHAIN_RECT_INVALID) and the game stops drawing (for example PowerWash Simulator stuck at "Waiting").
|
||||
> Keeps every submitted image rect inside its swapchain. Unity can size the eye area a few pixels past the image on some Frames; SteamVR then rejects every frame (xrEndFrame -25, XR_ERROR_SWAPCHAIN_RECT_INVALID) and the game stops drawing (for example PowerWash Simulator stuck at "Waiting"). An empty rect (0x0, e.g. BattleTalent's first frames, GitHub #293) is rejected the same way and becomes the whole swapchain image.
|
||||
|
||||
### <a id="adapter-refresh_rate"></a>Refresh rate
|
||||
|
||||
@@ -1871,7 +2006,7 @@ How often the picture updates. Higher is smoother if the game can keep up.
|
||||
- **Catalog games (3):** Does it Stack?, Majora's Mask VR, Vacation Simulator.
|
||||
- **Source:** [patches/settings.py](../src/frameport/patches/settings.py)
|
||||
|
||||
> Display refresh rate for this game (72, 80, 90, 96, 108, 120 or 144; 0 = the game's choice). A video's frame rate that divides the refresh rate plays smoothest (for example 30 fps at 90 Hz, 24 fps at 72 Hz).
|
||||
> Display refresh rate for this game (72, 80, 90, 96, 108, 120 or 144; 0 = the game's choice). Applied through SteamVR before the game starts. A video's frame rate that divides the refresh rate plays smoothest (for example 30 fps at 90 Hz, 24 fps at 72 Hz).
|
||||
|
||||
### <a id="adapter-release_wait"></a>Wait for the game's GPU
|
||||
|
||||
@@ -1911,7 +2046,7 @@ Higher looks sharper but needs more power; lower runs smoother. 1.0× is the gam
|
||||
- **Options:**
|
||||
- Value: float, default `1.0` (always written).
|
||||
- Game settings → Picture → "Sharpness": slider 0.5–2 in steps of 0.1.
|
||||
- **Catalog games (4):** 4XVR Video Player, BlazeRush, cubism, Walkabout Mini Golf.
|
||||
- **Catalog games (8):** 4XVR Video Player, BlazeRush, cubism, FGO VR, I Expect You To Die 2, The 7th Guest VR, Vampire: The Masquerade - Justice, Walkabout Mini Golf.
|
||||
- **Source:** [patches/settings.py](../src/frameport/patches/settings.py)
|
||||
|
||||
> Multiplies the recommended eye-buffer width and height (0.5–2.0). 1.5 ≈ 2.25× pixels.
|
||||
@@ -2127,6 +2262,20 @@ For Unreal Engine 5 games that crash on the Frame (for example Metro Awakening).
|
||||
|
||||
> Vulkan shim (frame.vk_sanitize): the game doesn't see VK_EXT_fragment_density_map(2). Unreal Engine 5 turns on fragment-density-map foveation when the driver offers it and expects the density map from the headset, which the Frame doesn't provide: image views and barriers for a missing image, then a crash in the Frame's Vulkan driver (for example Metro Awakening). Valve's own foveation layer isn't affected.
|
||||
|
||||
### <a id="adapter-vk_pipeline_log"></a>Vulkan pipeline failures (log)
|
||||
|
||||
Logs graphics pipelines the Frame's driver refuses. No effect on the game.
|
||||
|
||||
- `adapter.vk_pipeline_log`
|
||||
- **Changes:** Game setting: stored in the build and on the Frame (settings.conf); can be changed without a rebuild.
|
||||
- **Suggested:** not automatically; set on the game page (Customize), by a recipe or after a launch test.
|
||||
- **Options:**
|
||||
- Value: int, default `0`.
|
||||
- Game settings → Troubleshooting → "Vulkan pipeline failures (log)" (advanced).
|
||||
- **Source:** [patches/settings.py](../src/frameport/patches/settings.py)
|
||||
|
||||
> Vulkan shim (frame.vk_sanitize): logs every failing graphics/compute pipeline creation with its shader stages (named like the vk_shader_dump files), structure types and any sampler Y'CbCr conversion involved, to find the pipeline behind Unreal's "Shader compilation failures are Fatal." No effect on the game.
|
||||
|
||||
### <a id="adapter-vk_query_slots"></a>Stop objects popping in and out
|
||||
|
||||
For Vulkan games whose models flicker or vanish while you look at them (for example Into The Radius 2). Needs a rebuild.
|
||||
@@ -2230,7 +2379,7 @@ Repairs OpenGL ES shaders that hang the graphics chip, from the game's recipe.
|
||||
- **Options:**
|
||||
- Value: str, default empty.
|
||||
- Not in the Game settings dialog (set by a recipe or the CLI).
|
||||
- **Catalog games (1):** Vader Immortal: Episode I.
|
||||
- **Catalog games (2):** Star Wars: Tales from the Galaxy's Edge, Vader Immortal: Episode I.
|
||||
- **Source:** [patches/settings.py](../src/frameport/patches/settings.py)
|
||||
|
||||
> Shader-fix Vulkan layer (frame.zink_shader_fix) for OpenGL ES games, whose GLSL the Frame's GL driver (Zink) turns into SPIR-V: modules matching size + SHA-256 get words inserted at a byte offset, for example stores that set loop counters and accumulators a shader reads before writing (Vader Immortal's lightspeed jump hung the GPU; found by Klownicle, GitHub #49). Same format as vk_shader_fix. Comes from a game's recipe; the driver's output can change with a Frame update, then the fix no longer matches (logged).
|
||||
@@ -2288,7 +2437,7 @@ Render less detail outside your gaze; adjust the full-resolution area or darken
|
||||
- `mode`: str, default empty — tracked, fixed or off (empty = Valve's default)
|
||||
- `radius`: float, default `0.0`, 0–0.45 — Full-resolution radius; 0 keeps the current runtime default
|
||||
- `test`: bool, default `False` — Darken lower-resolution regions (diagnostic)
|
||||
- **Catalog games (3):** Ocean Rift, Quantum Void, Tea For God.
|
||||
- **Catalog games (5):** Ocean Rift, Quantum Void, Tea For God, The 7th Guest VR, Vampire: The Masquerade - Justice.
|
||||
- **Source:** [patches/settings.py](../src/frameport/patches/settings.py)
|
||||
|
||||
> Reduces shading away from the full-resolution area, following each eye's gaze. Default area size keeps the runtime's current profile unchanged. Custom radius is a fraction of the shorter eye-image dimension; the transition ends at twice that radius. Larger areas retain more detail but save less GPU work. Fixed stops the area following your eyes. The optional test darkens actual coarse-shaded fragments; rebuild/reinstall to toggle it. Tested on RE4, Deadpool and Asgard's Wrath 2. The Climb 2 gets a version-guarded private bridge at 1.0 scale; Batman gets its hash-verified allocation fix (unsupported OVRPlugin versions are refused). Other games may need additional fixes; turn this off if artifacts appear.
|
||||
@@ -2335,7 +2484,7 @@ Lets typing reach this app from Steam's on-screen keyboard or your PC's keyboard
|
||||
- `device.text_input_window`
|
||||
- **Changes:** Install only: written on the Frame when the game is installed; the APK isn't changed.
|
||||
- **Suggested (on):** App with text fields: key presses only reach a shown Android window.
|
||||
- **Catalog games (110):** AFFECTED: The Manor, AgeOfJoy, AllInOneSports, Ancient_Dungeon, Arcsmith, Arkio, Assassin's Creed Nexus, Attack on Titan VR: Unbreakable and 102 more.
|
||||
- **Catalog games (112):** AFFECTED: The Manor, AgeOfJoy, AllInOneSports, Ancient_Dungeon, Arcsmith, Arkio, Assassin's Creed Nexus, Attack on Titan VR: Unbreakable and 104 more.
|
||||
- **Source:** [patches/settings.py](../src/frameport/patches/settings.py)
|
||||
|
||||
> Lepton runs VR apps headless: their Android window is never shown, so it never gets keyboard focus and no key press (Steam's on-screen keyboard, a USB/Bluetooth keyboard, Type on Frame) reaches the app's text fields. With Lepton's lepton-show-flatscreen marker the window is shown (behind the VR view, which keeps working) and Steam's keyboard opens for a selected text field. Steam lists the shown window as "Gamescope" (the Frame's compositor). Pairs with "Make Unity text fields work without a system keyboard".
|
||||
|
||||
@@ -21,11 +21,14 @@ version is `catalog/triage.yaml` (used by `frameport test` / the Job screen); ke
|
||||
| A launch test suggests a patch (for example triage `sdl-no-clipboard` → `frame.sdl_clipboard`) but the game page doesn't show it / lists it as not applicable; or a game added long ago lacks warnings newer ones get (Android version, web wrapper, missing OBB) (GitHub #104, Dramatic Shape) | the library entry was analyzed by an older FramePort: the analysis field the patch reads (`sdl_java`, `min_sdk`, `web_wrapper`, `expects_obb`, …) is missing, so `applies()` is false | entries whose `analysis.extra.analysis_version` is below `detect.ANALYSIS_VERSION` are analyzed again at the GUI's start (background) and before a build (`pipeline.refresh_analyses`); by hand: game menu → "Analyze again", then Update on Frame. An unreadable APK is marked `analysis_failed` (retried after the next version bump). Adding an analysis field: bump `ANALYSIS_VERSION` |
|
||||
| FDM layer loads but diagnostic logging reports `fdm_injection_CreateInstance: skipped` | Layer loading alone does not enable injection on the tested SteamOS 0.4.5 build; a skipped helper instance alone also does not establish game-wide inactivity | Opt-in `device.foveation` mode `tracked`: loads Valve's layer and sets `FDM_DEBUG=enable`. Batman probe reached foveated render passes with changing per-eye offsets. Validate graphics and matched gameplay GPU time; do not enable globally. Use `debug` only for brief diagnostics, preserving existing flags; never benchmark with debug spam. See FRAME_RUNTIME.md. |
|
||||
| One eye (usually the right) shimmers or jitters in the 3D view while menus and panels look steady; pacing is clean (GitHub #69, e.g. RTCWQuest, Moss) | Valve's eye-tracked foveation layer (`VALVE_fdm_injection`) moves its low-density regions with each eye's gaze, and the right eye's gaze filter restarts often (`CEyePoseUKF R: Large dt … Bootstrapped` in `~/.local/share/Steam/logs/eyetracking.txt`) | Customize → "Eye-tracked foveation (Valve)" (`device.foveation`): **Fixed** (`FDM_DEBUG=disable_offsets`; verify injection remains active on the installed runtime) or **Off** (`VK_INSTANCE_LAYERS=""`); catalog field `foveation:` |
|
||||
| With `device.foveation` Eye-tracked/Fixed, the sharp area looks right but everything around it is black with scattered coloured blocks (menus on quads too); pacing fine (GitHub #303, Medieval Dynasty; Vampire Survivors reported the same) | Unity's Oculus XR plugin asks for SUBSAMPLED eye images (`XR_META_vulkan_swapchain_create_info`, `VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT`); under Valve's FDM their coarse areas stay in the compact subsampled layout, which the compositor reads as an ordinary image. `foveation_fix=1` only dropped the `XrSwapchainCreateInfoFoveationFB` nodes and passed the META node on. With `foveation_fix=0` + `foveation_storage_fix=1` the adapter logs `foveation_storage_fix: shared allocation SUBSAMPLED cleared` for the eye swapchains | `device.foveation` (tracked/fixed) now also sets `foveation_storage_fix=1`, which clears SUBSAMPLED whatever `foveation_fix` is (generic version of Batman's OVRPlugin allocation fix). Rebuild + reinstall (new adapter). Headless-checked only (72 fps, bit cleared); picture needs the headset |
|
||||
| A Unity OpenXR game closes right after the OpenXR instance is created: `F VrApiLoader: vrapi_SetPropertyInt was called before vrapi_Initialize()!`, SIGABRT on UnityMain (GitHub #62, Jurassic World Aftermath) | the APK still ships Meta's VrApi loader; OVRPlugin (1.89, on OpenXR) calls it without starting VrApi and Meta's loader aborts. The VrApi bridge can't replace it (39 of the loader's 114 functions: OVRPlugin wouldn't link) | `frame.vrapi_stub` (same exports, each returns 0); triage `vrapi-before-init` |
|
||||
| A VrApi game exits at once: `UnsatisfiedLinkError … dlopen failed: cannot locate symbol "vrapi_PollEvent"` (GitHub #57, BlazeRush) | the engine imports a VrApi function the VrApi bridge didn't implement | the bridge has `vrapi_PollEvent`, `RecenterPose`, `SetDisplayRefreshRate`, `GetSystemPropertyFloatArray` (rebuild the game); the static check "VrApi functions resolvable" names any other missing one; triage `vrapi-symbol-missing` |
|
||||
| A Team Beef port (Lambda1VR, RTCWQuest, …) exits at once: `UnsatisfiedLinkError: dlopen failed: library "libopenxr_loader_valve.so" not found` (GitHub #59) | TBXR loads `openxr_loader_<Build.MANUFACTURER>` (Lepton: valve) and takes the Meta path only when `strstr(OPENXR_HMD, "meta")` matches, else Pico's | `frame.tbxr_vendor` (empty `libopenxr_loader_valve.so` + the "meta" literal → "alve"). Game data (`xash/`, …) goes to /sdcard: upload it with the Files tab to the game's storage. Black eyes with `TBXR: Incomplete frame buffer object: GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE`: TBXR always uses multisampled render-to-texture (even `--msaa 1`); `frame.tbxr_vendor` links the GL shim, which hands it single-sampled versions (log `GL shim: multisampled render-to-texture … drawn single-sampled`) |
|
||||
| A Quest game renders, then logs `Entitlement check failed` / `ovrPlatformInitialize_NotEntitled` (often with retries) and quits, e.g. `SIG: 9` after `[Photon] Disconnected` (GitHub #322, Deadly Delivery) | The game's Meta licence check (entitlement) needs Meta's online login, which the Frame doesn't have; online-only games quit (triage `meta-entitlement`) | None: FramePort doesn't get around entitlement checks. Offline games that log it and play on are fine |
|
||||
| Black screen after VR starts; `Asset status error (code 100)` in `DLC_Manager:AssetStatusCallback` (GitHub #203, e.g. PixelRipped 1995) | Meta asset-file status fails after entitlement succeeds; the log does not identify the native call or asset ID | Try `frame.asset_files_stub` (opt-in, triage-only): native/langpack answers GetList with an empty successful list and StatusById with installed status, an empty path and the requested ID. No DLC files are supplied; download requests retain their existing behavior. Disable with `FRAMEPORT_ASSET_FILES_STUB=0`. Host-tested only; whether this fixes startup needs a game/device test |
|
||||
| A Unity Quest game stays on a loading screen or doesn't go on; `An unknown error occurred. Request failed.` from `Oculus.Platform.Request`1:OnComplete` (GitHub #346 Eleven, #360 Spectre, #368 Thief Simulator; triage `meta-request-failed`) | A Meta platform call the game waits for got no usable answer: OVRPort's platform library answers some calls without Meta's services (request id 0) and Meta's Unity wrapper drops the callback | Find the call in the stack (the game's own coroutine after `OnComplete`); a per-game fix that skips it when it isn't needed to play (e.g. an analytics id request). Calls the game needs online stay unsupported |
|
||||
| Game aborts at start: `OVRPlatform-Loader: DisplayErrorAndExit: Failed to launch SystemActivities` after an `ActivityNotFoundException` stack (GitHub #357 Breachers; triage `meta-system-activities`) | The game ships its own renamed copy of Meta's platform loader (e.g. `libovr_custom.so`), which bypasses OVRPort's dispatcher and tries to open Meta's system activities (Horizon OS) | None in general: such games are online games built on Meta's services. Serving OVRPort's dispatcher under that name is possible but unlikely to make them playable |
|
||||
| Missing sound or extra content in a game whose OBB folder has separate `*.pak` files (GitHub #61, Star Wars: Tales from the Galaxy's Edge: seasons + Wwise banks) | the game asks Meta's platform for these asset files (`ovr_AssetFile_GetList` / `DownloadById`); OVRPort's loader doesn't list them | copy every content/sound-bank PAK and use `frame.asset_files` (native/langpack lists the data's `*.pak` as installed `default` assets, IAP `free`, and answers DownloadById at once with the path; off: env FRAMEPORT_ASSET_FILES=0). Tales also needs the splash and depth-size fixes below |
|
||||
| A SideQuest backup has `apk/` and a sibling `obb/` with content/sound-bank PAKs, but the Frame only has the main OBB (GitHub #61, Tales from the Galaxy's Edge) | older scans treated that layout as loose expansion files and selected only the named OBBs; the asset-file patch then found no PAKs | the scanner chooses the OBB folder by version first, then keeps the whole sibling data folder when all its expansion files are selected for this APK; app updates repair affected library entries and refresh asset/language-pack detection. Reinstall to copy the missing files, or scan the backup again first. Folders with other packages or unselected OBB versions still send only the selected OBBs |
|
||||
| Tales from the Galaxy's Edge stops during map loading (GitHub #61): game thread in `FlushRenderingCommands` / `UEngine::LoadMap`, render thread in `FSplash::RenderFrame_RenderThread` / `ovrp_WaitToBeginFrame` / SteamVR `WaitFrame` | the separate Oculus loading splash waits for an unbegun frame while map travel waits for rendering | `frame.unreal_splash_bypass`: returns from the splash renderer, with a checked symbol, size and prologue. The last image stays visible during loading; the normal renderer and menu layers continue. Headset test with the depth-size fix: gameplay, both eyes, controller input and sound work |
|
||||
@@ -45,6 +48,7 @@ version is `catalog/triage.yaml` (used by `frameport test` / the Job screen); ke
|
||||
| Launch test "failed" although the game runs in the headset: frames paced, then `OVRPortVrApi: EnterVrMode: no tracked head pose before deadline`, then a crash (e.g. `zink: DEVICE LOST` + SIGSEGV in a `gdrv` thread) (GitHub #57, BlazeRush) | the VrApi bridge ends the VR session after 30 s without head tracking, which only happens without a worn headset; the game's renderer then crashes while tearing down | none needed: launch tests (`triage(..., headless=True)`) treat an exit or crash after a `headless_end` line (catalog/triage.yaml) as a pass when frames were paced before it (info finding `headless-end`); play sessions ignore it. Add new such markers to `headless_end` |
|
||||
| Launch test EXITED, launch.log has `Target app (<pkg>) did not start` and no `Start proc …:<pkg>` (GitHub #179) | Lepton occasionally doesn't start the app on the first start after an APK change; Android's `WebViewLoader-: System.exit` at boot is not the game (triage `app-not-started`) | start it again |
|
||||
| A game keeps no progress between starts although it saves (its storage gets a new `Profiles/Oculus/<id>/`-style folder per start; Walkabout Mini Golf, GitHub #182) | OVRPort's platform loader answers `ovr_GetLoggedInUserID` with a made-up id (6e18 + `random()`), new at every start; games file saves under the user id | `frame.ovr_stable_user` (default for games with the platform library): a fixed id per game and keystore. Old progress: copy the newest old profile into the new id's folder |
|
||||
| A Cortopia game (Escaping Wonderland, GitHub #360) stays on its loading screen (frames paced); launch.log: `E Unity: An unknown error occurred. Request failed.` with `OculusPlatformExtension:ToUniTask` / `Cortopia.Scripts.Platform.Meta.<Initialize>d__13` | after the licence check and the logged-in user, the game asks for `Users.GetOrgScopedID` when on Wi-Fi (its analytics id); OVRPort's `ovr_User_GetOrgScopedID` returns request id 0, Meta's C# wrapper logs that line and never calls back, so the awaited start-up never finishes | `frame.cortopia_org_id` (suggested from the analysis, triage `cortopia-org-id-wait`): the `b.ne` after `cmp w0, #2` on `get_internetReachability` in `<Initialize>d__13.MoveNext` -> `b` (Cpp2IL), the game's own no-Wi-Fi path; the same "Request failed." line in another game = another request OVRPort doesn't implement |
|
||||
| A Unity app's text field shows a caret for a moment and loses focus; no keyboard appears (for example Stremio VR login) | Unity's TMP_InputField/InputField wait for Android's on-screen keyboard and close themselves without one (Lepton has none); headless VR apps also have no focused Android window, so no key press reaches them | `frame.unity_text_input` (Cpp2IL finds `TouchScreenKeyboardShouldBeUsed`/`isKeyboardUsingEvents`, rewritten to false/true) + `device.text_input_window` (lepton-show-flatscreen: Steam's keyboard and Type on Frame work) |
|
||||
| FramePort's games disappear after Steam restarts, especially after a devkit registration (GitHub #263) | Steam saves `Shortcuts` / `AppName` with capital letters; older FramePort reads them case-sensitively and writes a second shortcut map that Steam ignores | agent v86 reads and updates keys case-insensitively, keeping Steam's spelling, appids and tags; update FramePort and add the missing games to the library again |
|
||||
| Play gives Steam's "Game configuration unavailable"; Steam's console_log: `GameAction [AppID <id>] … RequestingLicense → UpdatingAppInfo → LaunchApp failed with AppError_9` | this Frame's Steam never loaded FramePort's shortcuts.vdf entry (it treats the id as a store app); see the casing fix above, other causes remain unconfirmed (GitHub #21/#30) | automatic since agent v43: Play registers the game through Steam's devkit interface ("Devkit Game: …", `devkit_register`) and starts that; uninstall removes it. Agent v58: a devkit entry Steam forgot after a restart is added again live on Play (no NOT_IN_LIBRARY → no Steam restart), and installs/art updates of devkit games only copy art (no Steam restart, GitHub #41) |
|
||||
@@ -80,6 +84,7 @@ version is `catalog/triage.yaml` (used by `frameport test` / the Job screen); ke
|
||||
| Unreal game still stays on `DownloaderActivity` with CRC checking off (`bVerifyOBBOnStartUp=false`) and a fully uploaded matching OBB (GitHub #283, Into The Radius) | The separate Java `expansionFilesDelivered()` name and size gate can reject an OBB through Android external storage in Lepton; disabling CRC does not bypass it | Try `frame.unreal_skip_obb_delivery` (opt-in, experimental, triage-only). It returns true from known Unreal/package delivery predicates in every dex, preserving normal downloader success and main init. Analysis `unreal_obb_delivery` (version 16) controls applicability. The native engine still needs complete, matching, readable OBB data; unverified on a device |
|
||||
| `INSTALL_FAILED_NO_MATCHING_ABIS` | 32-bit-only APK (Gear VR / Go / early Quest); Frame has no AArch32 | `frame.a32_bridge` (suggested for every 32-bit-only APK, experimental): the a32 translator runs the game's 32-bit libraries inside the 64-bit app (native/a32translator/bridge) |
|
||||
| a32 bridge faults at a low Thumb PC while loading a library, with the same unrelocated pointer in `.init_array` (e.g. Journey of the Gods: `0x1259e9` in OVRPlugin) | The guest loader ignored the older `DT_ANDROID_RELR` / `DT_ANDROID_RELRSZ` tags, leaving relative pointers at their link addresses | Fixed in the guest loader: both Android and standard RELR tags use the existing RELR decoder. Rebuild the a32 runtime and APK; host regression tests cover both tag families, but game startup still needs a Frame run |
|
||||
| 32-bit game on the bridge quits right after its loading screen with `a32: block at 0x… overflowed the code buffer` (exit 127; Pinball FX2 VR, GitHub #342: OpenSSL's `sha1_block_data_order_armv8`, ~60 SHA-1 crypto instructions in a row, reached from `RAND_poll`) | Every instruction the JIT hands to the interpreter needs an exit stub; the translator only ended a block at 96 instructions or half its code buffer, so a dense run of such instructions overflowed the 64-entry stub table and `fatal()` ended the process | Fixed in the translator (jit.c `STUB_RESERVE`: a block ends while 8 stubs are left); rebuild the game. Find the code with the logged address minus the library's load address (`a32rt: loaded …`) and `A32_BREAK=<addr>` for its caller; `tests/programs/sha1ce.c` covers it |
|
||||
| 32-bit game on the bridge: framerate falls over minutes, purple/garbled geometry, then `Could not allocate memory: System out of memory!` (Spunky Dungeon) | The bridge's guest copies of mapped GL buffers were tracked per buffer target: a second buffer mapped on the same target lost the first one's copy (never written back: garbage vertices; never freed: ~10 MB/s until the guest's 4 GiB were full) | Fixed in the bridge (gl.c: mappings per buffer object). Check: the guest's `[anon:scudo:*]` maps below 4 GiB in /proc/<pid>/maps must stay flat |
|
||||
| 32-bit game on the bridge loads, leaves VR and its engine threads end, no crash, no finish() (Gunjack) | The game checks its own APK signature (UE4 `AndroidThunkJava_GetSignature` = Base64 of the signing certificate's SHA-1, compared in AndroidMain): every FramePort build is re-signed | `frame.a32_bridge` stores the original APK's value in `assets/fp_a32_signature.txt` (Unreal games) and the bridge answers the guest's call with it (log `AndroidThunkJava_GetSignature: original signature returned`). Find other such checks with `A32_BREAK` on the game's exit path (vrapi_LeaveVrMode logs its caller) |
|
||||
| 32-bit NativeActivity game on the bridge ignores every controller (Gunjack, UE 4.10 Gear VR: no vrapi input functions, it reads the Gear VR touchpad/back button as Android input events from its AInputQueue) | The bridge sent its controller events through `Activity.dispatchKeyEvent`, which a NativeActivity never passes to native code | input.c puts synthetic touchpad (motion, touchscreen source) and back-key events in front of the game's AInputQueue: `ALooper_pollAll/pollOnce` return the queue's ident while one waits, `AInputQueue_getEvent` hands it out, the AInputEvent/AKeyEvent/AMotionEvent imports answer for it. Right trigger = hold the touchpad, A = tap, right stick = swipe (up/down = swipe forward/back along the touchpad's X axis: Gunjack's `OnFlick` takes flick angles <45°/>315° as reload, 135-225° as special weapon), B/left menu = back (log `controllers: the game reads its AInputQueue`) |
|
||||
@@ -87,6 +92,7 @@ version is `catalog/triage.yaml` (used by `frameport test` / the Job screen); ke
|
||||
| 32-bit Unity game on the bridge: player stands in the floor (Spunky Dungeon) | Unity's floor-level tracking origin: `vrapi_SetTrackingSpace(1)` (LOCAL_FLOOR) was ignored | The VrApi bridge puts the origin on the STAGE floor for LOCAL_FLOOR/STAGE |
|
||||
| Crash at start: `NoClassDefFoundError: … Landroid/window/OnBackInvokedCallback;` or `NoSuchMethodError: No static method storeStoreFence()V in class Ljava/lang/invoke/VarHandle;` (GitHub #71/#72, triage `android-too-new`) | The APK needs Android 13+ (minSdk 33 or more; those were 34) and calls its classes at start; Lepton's Android is 11 (API 30). OVRPort lowers minSdk to 29, so it installs anyway. minSdk ≤ 32 (Quest's Android 12L) is fine: 16 working catalog games declare 32 | None (analysis `extra.min_sdk` > 32 → a warning on the game page/CLI and in the recipe notes; never unsupported from the manifest alone, the launch test's triage decides). Waits for Valve to update Lepton's Android |
|
||||
| Nothing opens; `TWALauncherActivity: Using URL from Manifest (https://…)`, `Creating TwaLauncher for com.oculus.browser`, `NameNotFoundException: com.oculus.browser` (GitHub #86 Mahjong Table VR, triage `web-wrapper`) | The APK is a Trusted Web Activity (Bubblewrap / Meta's PWA packaging): a website that opens in Meta's browser, which Lepton doesn't have | None: open the URL in a browser. Analysis `extra.web_wrapper` (manifest meta-data `android.support.customtabs.trusted.DEFAULT_URL`, resolved through resources.arsc, or androidbrowserhelper's LauncherActivity) → a warning with the URL (not unsupported: the manifest alone never decides) |
|
||||
| A flat window, no VR and no way to interact; `Google VR Error [Daydream]: Google VR had a fatal issue while loading`, `class com/google/vr/sdk/base/CardboardViewNativeImpl not found` (32-bit bridge), `Unable to start service Intent { act=com.google.vr.vrcore.… }` (GitHub #335 Blade Runner: Revelations, triage `gvr-not-supported`) | A Google Daydream / Cardboard build: Google's VR SDK (GVR, `libgvr.so`) or the Cardboard SDK. Daydream needs Google's VrCore service, Cardboard draws a distorted side-by-side image for a phone screen; neither reaches OpenXR, the Frame's only way into the headset | None: get the game's Oculus build (Quest, Go or Gear VR), which goes through the normal path. Analysis `extra.google_vr` (`daydream`/`cardboard`: manifest categories `com.google.intent.category.DAYDREAM`/`CARDBOARD`, `enableVrMode="com.google.vr.vrcore/…"`, `libgvr.so`/Cardboard SDK libraries, GVR Java classes, Unity `vr-device-list`; not `libgvraudio.so`, which Quest games ship too) → a warning on the game page/CLI and in the recipe notes, only when the APK has no Oculus support; never unsupported from the manifest alone. A GVR → OpenXR shim (like the VrApi bridge) is possible in principle but not built |
|
||||
| `UnsatisfiedLinkError` / `cannot locate symbol "ovr_…"` | overport's platform loader lacks Meta platform functions | `frame.ovrstubs` (automatic, generated stubs) |
|
||||
| missing `ovrMessageType_ToString` | same, but the game needs a real string | `frame.ovrplatformcompat` (automatic) |
|
||||
| The game stays in its built-in language or waits at start although its OBB / files hold language packs (`<tag>.lang`, for example `de.lang`) | overport's platform loader answers `ovr_LanguagePack_GetCurrent/SetCurrent` with request id 0, so the game never gets the pack's path | `frame.langpacks` (opt-in, experimental, shown for games whose data has `*.lang`; `native/langpack`, build it with `python native/build.py --only langpack`). Default pack: the one the game applies, else env `FRAMEPORT_LANGPACK=<tag>`, else the only pack; search path override `FRAMEPORT_LANGPACK_DIRS`. Unreal games (Deadpool VR) gray out a pack whose asset `Metadata` differs from the game's version string: the patch writes the APK's versionName as Metadata (env `FRAMEPORT_LANGPACK_META` overrides) and reports the pack under the `/storage/emulated/0/Android/obb/<pkg>/` spelling of its path; with `/sdcard/…` the text switched but the dialogue stayed silent (verified in the headset with Deadpool VR) |
|
||||
@@ -111,11 +117,14 @@ version is `catalog/triage.yaml` (used by `frameport test` / the Job screen); ke
|
||||
| Menu/screen jumps to where you look (for example 4XVR) | the app re-creates LOCAL spaces (4XVR: every 2–4 s) and the Frame places them at the current head yaw, or the app recenters after the Frame's brief focus dips | turn on `adapter.layer_debug`, check `that LOCAL space sits at … deg` vs `focus_hold: hid a … ms focus dip`; patches: `adapter.stable_local` (new LOCAL spaces line up with the first) / `adapter.focus_hold` (on by default: hides dips up to `focus_hold_ms` once the game has been focused for a second; never at start-up: a global debounce broke AC Nexus) |
|
||||
| Pointer misses menu items | the Frame's aim pose differs from Touch's | `adapter.layer_debug` logs `aim in grip … pitch/yaw`; correct with `aim_pitch`/`aim_yaw`/`aim_forward` (`frameport settings`, no rebuild) |
|
||||
| Video stutters although fps is steady | video frame rate doesn't divide the refresh rate (30 fps at 72 Hz) | `adapter.refresh_rate` (for example 90 for 30 fps, 72 for 24 fps); `layer_debug` logs the offered rates and the app's own requests |
|
||||
| A saved 90 Hz refresh setting still launches at 72 Hz (for example Jurassic World Aftermath); FrameBridge reads `refresh_rate=90` but logs result `-1000101000` | The Frame's OpenXR runtime only enumerates its current rate and rejects requests for another mode (`XR_ERROR_DISPLAY_REFRESH_RATE_UNSUPPORTED_FB`) | Agent v92 applies `adapter.refresh_rate` to SteamVR's per-game `preferredRefreshRate` through IVRSettings, on save/install and before Lepton starts (existing launchers upgrade on connection). `0` clears the override; unavailable SteamVR is retried at launch. Device-tested: Aftermath selected 90 Hz and sustained 90.2 fps |
|
||||
| PC VR game judders/stutters although the GPU keeps up; vrcompositor.txt "Timed out. N total" high or frames dropped | the game misses the headset's refresh (for example 96 Hz = 10.4 ms; Stormland's slow frames take 10.7 ms) | `pcvr.steamvr_tuning` (default on): next Play sets SteamVR per-app `preferredRefreshRate` + `motionSmoothingOverride` via `fp_vrsettings.exe` |
|
||||
| Quest app keeps recentering / snapping the view when you turn your head; log shows session state 5→4→3→4→5 within a second | the Frame briefly takes focus; the app recenters on focus changes | adapter `focus_hold` (on by default; an earlier global debounce made AC Nexus stay black and was removed) |
|
||||
| Video player / app finds no local videos; MediaProvider "Requested path /home/steamos/... doesn't appear under ..." | Lepton's /sdcard is a symlink to a host path, so Android's media index rejects every file | upload in the Files tab (Videos = /sdcard/Movies) and browse folders in the app |
|
||||
| Batman: Arkham Shadow closes during smoke-bomb effects; later input-tree corruption | Meta XR Audio Wwise deletes queued metadata still referenced by the current audio frame, then writes through the stale pointer | FrameBridge automatically retires metadata after current-frame references disappear, for the verified AArch64 SDK build only; see [AUDIO_METADATA.md](AUDIO_METADATA.md) |
|
||||
| Game stays on a loading or "Waiting" box although it reached FOCUSED; log `FrameBridge: xrEndFrame failed -25` then no more `pacing:` lines (for example PowerWash Simulator on some Frames, GitHub #39) | The eye image rect ends a few pixels past its swapchain (Unity rounds the swapchain width, the runtime's recommended size differs per Frame); SteamVR rejects every frame with XR_ERROR_SWAPCHAIN_RECT_INVALID | FrameBridge clamps every projection/quad image rect to its swapchain (`rect_clamp`, default on since 0.11.0; log `rect_clamp: view N image rect clamped`): rebuild + reinstall the game |
|
||||
| Black from the start, `projection view 0: ... rect=0,0 0x0` then `xrEndFrame failed -25` twice and OVRPlugin "Unable to submit Oculus frame" (BattleTalent, GitHub #293; right after Unity's "Switching to the recommended level" MSAA line) | The game submits its first projection views with an empty image rect; SteamVR rejects them and OVRPlugin gives up submitting | `rect_clamp` replaces an empty rect with the whole swapchain image (log `rect_clamp: view N empty image rect -> full swapchain WxH`): rebuild + reinstall. Check the build output for a WARN from the Unity IL2CPP fixes (`frame.unity_runtime_msaa_off` etc. "code not found in this game"): turned on, they may still change nothing |
|
||||
| Black flash, then the SteamVR home environment while the game keeps running (sound plays); vrserver.txt `[OpenXR] SetXrInputConfig failed. Failed to load manifest provided by SetXrInputConfig`, then the app "has exited" and reconnects as `VRApplication_OpenXRInstance`; headless launch tests pace at 10 fps (for example Scared By Squares, GitHub #323) | Two controller actions in one action set share a name (Unreal: an action mapping and an axis mapping both called "Turn"). The Frame's runtime accepts the duplicate but can't load the input manifest it builds and drops the app as a scene app | FrameBridge gives the later duplicate a free name (`action_dedup`, default on; log `action_dedup: action "turn" ("Turn") already exists in its set: created as "turn_2"`): rebuild + reinstall the game. `input_diag=1` logs every action set and action the game creates |
|
||||
| Unity game (OVRPlugin, GLES or Vulkan) crashes ~10 s in: `FrameBridge: xrCreateSwapchain … faces=6 … result=-2`, OVRPlugin `CreateSwapchain for eye 0: 0x0, 0 stages`, then render-thread SIGSEGV in memset ← libOVRPlugin ← `ovrp_EndFrame4` (libgallium/ANR follow; for example Budget Cuts Ultimate, GitHub #107); triage `cube-swapchain-refused` | The game shows a cube-map layer (OVROverlay cubemap); the Frame's runtime has no cube layers and refuses cube swapchains (XR_ERROR_RUNTIME_FAILURE); OVRPlugin doesn't check and writes into the image list it never got | FrameBridge `cube_standin` (default on): a refused cube swapchain is served as a GL cube map in the game's context or a device-local Vulkan cube image transitioned to COLOR_ATTACHMENT_OPTIMAL, and its layers are dropped (log `cube_standin: runtime refused …`): rebuild + reinstall. Vulkan path covers UNDERDOGS (GitHub #296); host-tested, headset verification pending |
|
||||
| Game (Unity, GLES) freezes, `zink: DEVICE LOST` | multisampled render-to-texture hangs the GPU | `frame.unity_no_msaa`; if it persists: unfixable → PC version |
|
||||
| Unreal GLES game crashes ~3 s after start: `Fatal signal 11 … fault addr 0x10000 in tid … (RHIThread)`, `#01 … libgallium_dri.so` (GitHub #83 Star Wars Pinball VR, triage `unreal-msrtt-crash`) | Unreal's mobile MSAA renders through multisampled render-to-texture; Zink's `find_rp_state` then indexes `rendering_state_cache[6]` one past its end (sample count ≥ 32) and calls a junk hash function (0x10000). Mesa bug (no bounds check) | `frame.unreal_gl_shim` (GL shim with `gl_hide_msrtt`, multiview kept for Unreal: Unreal 4.25 only enables multiview with GL_OVR_multiview, GL_OVR_multiview2 **and** GL_OVR_multiview_multisampled_render_to_texture, so the shim keeps the last one visible for Unreal and maps glFramebufferTextureMultisampleMultiviewOVR to the single-sampled glFramebufferTextureMultiviewOVR; log `multiview multisampled render-to-texture (N samples) drawn single-sampled`) |
|
||||
@@ -136,11 +145,17 @@ version is `catalog/triage.yaml` (used by `frameport test` / the Job screen); ke
|
||||
| SDL / LÖVE app crashes at start: `NullPointerException … ClipboardManager.addPrimaryClipChangedListener` in `SDLClipboardHandler.<init>` (for example Dramatic Shape) | Lepton's Android has no clipboard service (`service check clipboard`: not found) | `frame.sdl_clipboard` (that call → nops in classes.dex, in place, `apk/dex.py`); reproduced and verified with LÖVE for Android 11.5 |
|
||||
| Godot 4 app crashes at start: `java.lang.NullPointerException: null cannot be cast to non-null type android.content.ClipboardManager` at `org.godotengine.godot.Godot.<init>` (Godot 4.3/4.4; 4.2 when the clipboard is first used, in `Godot$mClipboard$2.invoke`) (for example EndoparasiticVR, GitHub #134); triage `godot-no-clipboard` | Lepton's Android has no clipboard service and Godot's Kotlin code casts it with a non-null `as ClipboardManager` (`Intrinsics.checkNotNull` before the check-cast). Godot 4.1 (Java) and 4.5+ (`as?`) don't throw | `frame.godot_clipboard` (suggested by analysis `godot_clipboard`): that checkNotNull call → nops in classes.dex (check-cast accepts null), and Godot's getClipboard/hasClipboard/setClipboard return at once ("" / false / nothing; `Dex.return_early`), in place; matched exactly, other dex files untouched. Checked against the Maven godot-lib 4.2.2/4.3.0/4.4.1 and the 4.3/4.4.1 release export templates (D8 re-reads the result); not yet run on the device |
|
||||
| Game crashes at start: `java.lang.NoSuchMethodError: No virtual method getAvailableCommunicationDevices()… in class Landroid/media/AudioManager` at `com.vivox.sdk.AudioChangeListener.checkAudioRouteAndApplyChanges` (for example Green Hell VR, GitHub #101); triage `vivox-api31` | Newer Vivox (voice chat) builds call Android 12 audio-routing methods without a version check; Lepton is Android 11. Older Vivox builds (Eleven Table Tennis, BattleSisters) don't have that code | `frame.vivox_audio_route` (suggested by analysis `vivox_api31`): every AudioChangeListener method that calls one of them returns at once (`Dex.return_early`: return-void / `const/4 v0, 0; return v0`, in place); voice chat keeps the default audio route |
|
||||
| Game crashes when voice chat starts (Table Troopers: at the tutorial's start): `java.lang.NoSuchMethodError: No virtual method getAvailableCommunicationDevices()… in class Landroid/media/AudioManager` at `com.exitgames.photon.audioinaec.AudioInAEC.updateAudioDevice` ← `AudioInAEC$1.run` (GitHub #362/#325); triage `photon-voice-api31` (the same error from another library: `audio-api31`, report it) | Photon Voice's Android microphone plugin picks the audio device with Android 12 methods (getAvailableCommunicationDevices / setCommunicationDevice) and has no version check (it logs "Start: SDK >= 31, using BroadcastReceiver" on every Android); Lepton is Android 11. `frame.vivox_audio_route` only edits Vivox's class, so it can't help here | `frame.photon_voice_audio_route` (suggested by analysis `photon_voice_api31`): AudioInAEC.updateAudioDevice (void, the only caller) returns at once (`Dex.return_early`, in place); the microphone thread goes on (communication mode, echo canceller, AudioRecord) on the default route. Checked against Table Troopers' classes.dex; not yet run on the device |
|
||||
| A game on a microSD card or another drive doesn't start, loses its saves or loops at start; launch.log has `ln: cannot create symbolic link from 'Frame' to '/data/data/<pkg>'` or `Couldn't create directory for SharedPreferences file /data/user/0/<pkg>/…` (GitHub #213/#214/#215/#221: a card named "Steam Frame 512g"); triage `lepton-data-link-failed` | Valve's Lepton pastes `STEAM_COMPAT_DATA_PATH` unquoted into `sh -c "ln -s …/internal/<pkg> /data/data/<pkg>"` (liblepton mounting.sh) and APK paths into unquoted substitutions, so a path with a space never gets the app's internal storage | agent v83: the Quest launcher links the game folder to `~/.local/share/frameport/lepton-paths/<pkg>` at every start and gives Lepton that path (`app_dir_lines`); `upgrade_launchers` converts existing launchers at the next connection; deployment.json keeps the real path |
|
||||
| Start never finishes, 100 % CPU, launch.log of gigabytes repeating `EOSSDK.createKeychain` / `resetKeychain` (Beyond Sandbox, GitHub #214); triage `eos-keychain-loop` | Epic Online Services' Java keychain can't write its SharedPreferences and resets/creates without end (seen when the app had no internal storage, row above) | fix the storage first; `frame.eos_keychain_loop` (opt-in, offered by triage; analysis `eos_keychain`) makes `EOSSDK.resetKeychain` return at once (`Dex.return_early`) |
|
||||
| Game quits ~20 s after start (Titan Isles, GitHub #310); launch.log has `FATAL EXCEPTION: GoogleApiHandler` `java.lang.NoSuchMethodError: No virtual method permitUnsafeIntentLaunch()` at `com.google.android.gms.common.internal.zzp` (play-services-basement); triage `gms-android12-call` | Not the missing Play services: the APK was built for minSdk 32, so R8 folded Play services' `PlatformVersion.isAtLeastS()`/`isAtLeastSv2()` to `return true`; OVRPort lowers minSdk, the folded checks stay, and Lepton (Android 11) lacks the Android 12 method | `frame.gms_platform_version` (suggested by analysis `gms_folded_sdk_checks`): those constant checks return false again (in-place dex edit) |
|
||||
| App quits a few seconds after OpenXR starts (PianoVision, GitHub #297, after `frame.unity_appui_vibrator`); launch.log has `FATAL EXCEPTION: MidiDeviceConnectionWatchThread` `NullPointerException: … UsbManager.getDeviceList()' on a null object reference` at `jp.kshoji.driver.midi.device.MidiDeviceConnectionWatcher$MidiDeviceConnectionWatchThread.checkConnectedDevices`; triage `usb-midi-watcher` | Lepton's Android has no USB service (`getSystemService("usb")` is null); kshoji's USB MIDI driver polls it | `frame.usb_midi_watcher` (suggested by analysis `usb_midi_watcher`): the poll returns at once; no USB MIDI on the Frame |
|
||||
| Unity app quits ~1 s after start, before any OpenXR line (PianoVision, GitHub #297); launch.log has `FATAL EXCEPTION: main` `java.lang.NoClassDefFoundError: Failed resolution of: Landroid/os/VibratorManager;` at `com.unity3d.player.appui.AppUIGameActivity.onCreate`; triage `unity-appui-vibrator` | Unity's App UI package (its own GameActivity) gets the vibrator through Android 12's VibratorManager without a version check; Lepton runs Android 11 | `frame.unity_appui_vibrator` (suggested by analysis `unity_appui_vibrator`): that sequence leaves the vibrator null and the activity's vibrate methods return at once (in-place dex edit) |
|
||||
| Unity game freezes on its loading screen ~10-15 s in (Yupitergrad, GitHub #235); launch.log has `GrantPermissionsActivity: Permission grant result … permission=android.permission.BLUETOOTH_CONNECT`, then OVRPlugin `SetupDisplayObjects(): Unable to find EGLConfig for configId 0` and no more frames; triage `bhaptics-permission-prompt` | bHaptics' vest SDK (`com.bhaptics.commons.PermissionUtils.requestBluetoothPermission`) asks for Android 12's BLUETOOTH_CONNECT; on Lepton's Android 11 it can't be granted at install, so Android's permission screen takes the foreground for a moment, the game pauses/resumes and OVRPlugin's GLES compositor stops drawing | `frame.bhaptics_permission` (suggested by analysis `bhaptics_permission`): the request returns at once (`Dex.return_early`) |
|
||||
| Unity game aborts at start: `Abort message: 'cannot create thread specific key for __cxa_get_globals()'` (SIGABRT in a library such as `libFirebaseCppApp-*.so`, for example Wander 0.3570, GitHub #198); triage `pthread-keys-exhausted` | Bionic allows 128 pthread keys per process; Unity 6 takes ~40 (most without a destructor), large native libraries (Gecko `libxul.so`, Firebase, avatar SDKs) and the Frame's own libraries (Mesa/Zink, FrameBridge, OVRPort, Valve's Vulkan layers) take the rest | `frame.unity_tls_key_pool` (opt-in; suggested for Unity 6 with Firebase C++ or Gecko): libunity.so's `pthread_key_*`/`pthread_get/setspecific` imports are renamed to `fp_tkey_*` (`elf.rename_imports`, versions set global) and `libfp_tkeys.so` (`native/tlskeys`) is added to its DT_NEEDED; destructor-less keys become slots behind one real key (logs `fp_tkeys: pooling Unity's thread keys`). Approach by Klownicle (#198) |
|
||||
| Controllers do nothing (for example stuck on a setup screen); log: `xrSuggestInteractionProfileBindings … XR_ERROR_PATH_UNSUPPORTED` | the game only suggests bindings for Meta's newer profiles (Touch Plus / Touch Pro); the Frame's Android runtime knows `oculus/touch_controller`, not those | adapter `profile_remap` (default on): the bindings are suggested again for Touch (log: `controller profile … -> oculus/touch_controller`) |
|
||||
| Controllers "don't sync": virtual hands/controllers lie on the floor below you, no buttons (Unity OpenXR games that only suggest Touch Plus/Pro, e.g. Hotel Infinity #327); log with `input_diag=1`: only `meta/touch_controller_plus` (or Pro) suggested, `controller profile … -> oculus/touch_controller` | the runtime then reports `oculus/touch_controller` for each hand, a profile the game never suggested: Unity's OpenXR input creates no device for it | adapter `profile_remap` (default on) reports the game's own profile for such hands (log: `profile_remap: /user/hand/left reported as meta/touch_controller_plus`) |
|
||||
| Controllers "don't sync": hands on the floor below you, no buttons, in a Unity OpenXR game with Meta's OpenXR features (e.g. Spatial Zombies #328); log: `xrCreateAction: XR_ERROR_PATH_UNSUPPORTED` (input_diag: `xrCreateAction -> XR_ERROR_PATH_UNSUPPORTED (thumbstick)`), then `xrGetCurrentInteractionProfile: XR_ERROR_ACTIONSET_NOT_ATTACHED` | Meta's "Detached … Controller" devices add `/user/detached_controller_meta/left|right` to Unity's merged actions; the Frame has no XR_META_detached_controllers, the action fails and Unity attaches no action set (OVRPlugin's input goes with it) | adapter `profile_remap` (default on) leaves those paths out of actions and bindings (log: `profile_remap: action thumbstick without 2 detached-controller path(s)`) |
|
||||
| Some buttons do nothing or the wrong thing (for example a Quest game's X/Y on the Frame's left controller) | the game binds only Quest Touch and SteamVR maps Touch onto the Frame controllers with its own remap (Touch left X/Y land on the d-pad, right X and Y repeat B), or the runtime rejected a profile or an input call | turn on adapter `input_diag` (diagnostics, off by default; `frameport settings <pkg> input_diag=1`) and look for `input_diag:` lines: `bindings: <profile> accepted` or `unsupported: interaction profile <profile> -> <result>` with the rejected paths, `bindings: /user/hand/<hand> uses <profile>`, `unsupported: function <name>`, `unsupported: xrCreateAction -> <result> (<action>)` |
|
||||
| Unity game hangs or the whole Frame restarts (for example in a menu); log: `The current MSAA level is 0, but the recommended MSAA level is 4. Switching to the recommended level.` (for example Lucky's Tale) | Meta's OVRManager (`useRecommendedMSAALevel`) turns 4x MSAA on at runtime, past QualitySettings; multisampled render-to-texture on GLES/Zink hangs the GPU | `frame.unity_runtime_msaa_off` (Cpp2IL: `OVRDisplay.get_recommendedMSAALevel` → 0) |
|
||||
| Unity game: one eye shows only effects or gray, the other is fine (for example I Am Cat, Oculus XR Plugin on GLES) | the game's single-pass multiview rendering goes wrong for array slice 1 (the adapter submits both slices correctly) | `frame.unity_multipass` (Cpp2IL: `OculusSettings.GetStereoRenderingMode` → MultiPass); `swap_eyes=1` tells whether the game or the adapter is at fault |
|
||||
@@ -171,9 +186,11 @@ version is `catalog/triage.yaml` (used by `frameport test` / the Job screen); ke
|
||||
| Black screen, audio works, log `Unsupported VrApi layer type N` | bridge drops frames containing that layer | extend the bridge (cylinder=3 is converted to a quad already) |
|
||||
| Only some draws visible (for example controllers) + `glGetError 0x502` | multiview shaders used on single-view FBOs | GL shim `gl_hide_multiview=1` (default) |
|
||||
| Own GLES engine (OpenXR, not VrApi): eye view fine, but HUD / menu / PDA panels black (for example Doom3Quest, GitHub #77; no error in the log) | every shader declares `layout(num_views=2) in;`, also the ones drawn into the engine's single-layer offscreen framebuffers (2D textures/renderbuffers); OVR_multiview makes such draws INVALID_OPERATION and Mesa drops them (`draw_validate.c`), Quest's driver doesn't | `frame.gl_multiview_fbo` (opt-in, experimental: `libfpglmv.so` interposes GLES and draws those cases with a single-view twin of the program; logs `GLMV: twin built: program N -> M`, per-5-s `single-view draws` counters; `gl_mv_debug=1` adds glGetError checks; triage `gl-multiview-twin-failed`). Alternative: the game's own fix (two-layer multiview pool, Xandrix's patch in #77) |
|
||||
| Team Beef idTech 4 port (PreyVR, GitHub #306): main menu black except the mouse cursor, loading screen fine, 72 fps, no GL error; one game thread at 100 % CPU | the game clock runs 1000 / refresh ms per tic (`USERCMD_MSEC`, from xrGetDisplayRefreshRateFB). The Frame's runtime lacks XR_FB_display_refresh_rate and OVRPort's dispatcher answered 0 Hz: 0 ms tics, the async thread spins (millions of tics/s) and `com_frameTime` stays 0, so the menu GUI stays at its first animation step (everything hidden) | FrameBridge (default, no setting) answers xrGetDisplayRefreshRateFB with the measured rate (1 / predictedDisplayPeriod, else 72 Hz); log `refresh rate: runtime reported 0.0 Hz (result -7), reporting 72.0 Hz`. Found with `gl_mv_debug=2` (`frameport settings <pkg> gl_mv_debug=2`, needs `frame.gl_multiview_fbo`): only 2 draws per frame (backdrop + cursor) and `trace clocks: com_frameTime=0` |
|
||||
| Upside-down image in a GL bridge game | GL images start at the bottom row | fixed in the bridge (swap angleUp/Down for GL chains) |
|
||||
| UI panels upside down (AC Nexus) | XrCompositionLayerImageLayoutFB VERTICAL_FLIP unsupported | adapter `flip_emul=1` (default); rotating quads makes them vanish |
|
||||
| Passthrough black (BAM) | XR_FB_passthrough missing | adapter `passthrough_emul=1` (default) + `patch_force_passthrough` for MR-only games |
|
||||
| Mixed reality inside out: the room shows on the game's objects, black where the room should be (Unreal, for example Star Wars: Beyond Victory, GitHub #329) | Unreal keeps 1 - coverage in the scene alpha and OVRPlugin chains XrCompositionLayerAlphaBlendFB (colour factors ONE_MINUS_SRC_ALPHA / SRC_ALPHA, `layer_debug` shows `n=1000041001(3,2/3,2)`) to the eye layer; the Frame's runtime ignores it | adapter `alpha_blend_emul=1` (default, Vulkan): inverts the alpha of the eye images in place while passthrough is emulated; logs `alpha_blend: inverting the alpha of swapchain=…` |
|
||||
| Quest Touch controllers (or none) shown in a game that uses Meta's runtime controller models | XR_FB_render_model missing on the Frame | adapter `controller_models=1`: the agent converts the Frame's SteamVR controller models to glb at install, the adapter serves them. Games with their own controller meshes aren't affected (none of the 34 catalog games use runtime models) |
|
||||
| `overportOXR: Unknown proc addr: xr…` for a function the adapter emulates | overport's dispatcher only forwards functions in its own table | route the plugin's lookups through `native/xrshim` (done for XR_FB_render_model when `controller_models=1`) |
|
||||
| MR game stuck waiting for room data (Demeter) | no Meta scene API | adapter `scene_emul=1` (+ `frame.meta_permissions`) |
|
||||
@@ -187,6 +204,8 @@ version is `catalog/triage.yaml` (used by `frameport test` / the Job screen); ke
|
||||
| Unity game crashes or hangs right as Vulkan starts, after `SLZ Graphics plugin loading!` and OVRPlugin's pre-init `xrDestroyInstance`: SIGSEGV with pc 0 (or pc == fault address in an unloaded library), x16/x23 in `libSLZQuestNative.so` (BONELAB 1.2974) | Stress Level Zero's graphics plugin hooks Unity's Vulkan start-up (IUnityGraphicsVulkanV2 interception: vkCreateInstance/vkCreateDevice) and vkCreateSampler; its vkCreateInstance wrapper calls an invalid pointer on the Frame | `frame.slz_vulkan_hooks` (its two registrations become no-ops; Unity starts Vulkan itself; ~35 s of shader prewarming without its pipeline cache) |
|
||||
| Unity game shows a picture but the player body is frozen: no head tracking, the controllers stay on the model, no buttons, although OpenXR input works (BONELAB 1.2068, Oculus XR Plugin) | OVRPlugin reports the headset as not worn (`ovrp_GetUserPresent2` → 0) a few seconds after start, and the game's rig only follows a present user (Marrow `XRHMD.IsUserPresent` = Unity's HMD `UserPresence`) | `frame.unity_user_presence` (the Oculus XR Plugin's lookup → `libfp_ovrp.so`, reports present; log `user presence: OVRPlugin 0 …`) |
|
||||
| Unreal 5 game crashes at its first render pass, backtrace `vulkan.freedreno.so` ← `libVkLayer_fossilize.so` ← `libfp_vk.so (create_render_pass2)` (Metro Awakening) | a subpass without a depth attachment names a depth/stencil resolve attachment; the Frame's Turnip reads the missing depth attachment (NULL) | the Vulkan shim drops that resolve (always, FramePort after 0.11.0; log `dropped the depth resolve of subpass N (no depth attachment)`); triage `unreal-vulkan-driver-crash` |
|
||||
| Unreal game crashes before its first frame: SIGSEGV `fault addr 0x10` on the main thread, backtrace all `libUnreal.so` above the linker's `soinfo::call_constructors` (inside `System.loadLibrary`), right after `Parsing commandline` (GitHub #349, Transformers Beyond Reality) | The game is built with Unreal's Binned3 allocator, which reserves its whole range while the library loads: one `mmap(NULL, 76 GiB, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS)`. Quest grants it; the Frame's kernel (heuristic overcommit, mode 0) refuses a writable private mapping larger than RAM + swap, and Unreal's out-of-memory handler ("Ran out of memory allocating ...") dereferences its not-yet-created log | `frame.unreal_noreserve` (suggested from analysis `unreal_binned3`): every such anonymous read/write mmap in the engine library gets `MAP_NORESERVE` (one instruction each: `mov w3, #0x22` → `#0x4022`); triage `unreal-reserve-refused`. Found by disassembling the crash pc (the OOM handler; its UTF-16 format string) and the caller's `mov x0, #0x1300000000` |
|
||||
| Unreal Vulkan game fails on its first frames and OVRPlugin reports `foveationImage = 0x0, width = 0, height = 0` (for example Transformers Beyond Reality: Redux, #349) | Quest FB foveation remains advertised by OVRPort's dispatcher despite `foveation_fix=1`. This is a hypothesis for the failure, not a confirmed cause: Redux's alternate no-ForceQuit build dereferences a null graphics-pipeline-state object during Vulkan pipeline binding, not a density image | Diagnostic `adapter.hide_fb_foveation=1` (off by default, Vulkan): filters the dispatcher and runtime extension lists/instance requests, removes foveation create/image chains and refuses profile creation/updates. Rebuild with the adapter **and xrshim** artifacts, then compare first-frame survival and Unreal's original fatal log. Does not disable Valve FDM injection. Device verification pending |
|
||||
| Unreal 5 game crashes in `vulkan.freedreno.so` called straight from `libUnreal.so` right after its swapchains, or a few seconds into the first frames (Metro Awakening) | Unreal turns on fragment-density-map foveation because Turnip offers VK_EXT_fragment_density_map, then records barriers (to `FRAGMENT_DENSITY_MAP_OPTIMAL`) and image views (2D array R8G8) for a density map the Frame never provides (VK_NULL_HANDLE); Turnip dereferences it | adapter `vk_hide_fdm=1` (the game doesn't see the extension) + `vk_spec_fixes=1` (leaves out null-image barriers, refuses null-image views); triage `unreal-fdm-missing`. Found by disassembling the driver at the crash pc: the struct offsets (0x58 = VkSubpassDescription2, 0x48/0x60 = image barriers, viewType/format in registers) name the call |
|
||||
| Own-engine game crashes in `je_free` from its own library on the first frames (Roblox) | the game frees memory it doesn't own; not the Vulkan shim or the format fallback | unsupported |
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 215 KiB After Width: | Height: | Size: 216 KiB |
@@ -32,6 +32,12 @@ extern void jit_exit(void);
|
||||
#define HASH_BITS 18
|
||||
#define LTAB_BITS 18
|
||||
#define MAX_INSNS 96
|
||||
/* stubs one more instruction (up to 3: a helper or side exit, a conditional skip, its fall-through exit) and the
|
||||
* block's final exit may still need; a block ends before fewer than this are left of MAX_STUBS. Without it, runs of
|
||||
* helper-translated instructions (each needs a stub) overflowed the table: OpenSSL's sha1_block_data_order_armv8
|
||||
* (~60 SHA1 crypto instructions in a row, Pinball FX2 VR, GitHub #342) killed the game (fatal "overflowed the code
|
||||
* buffer"). */
|
||||
#define STUB_RESERVE 8
|
||||
|
||||
static uint32_t *cache, *cache_cur, *cache_end;
|
||||
static jit_block *htab[1u << HASH_BITS];
|
||||
@@ -1381,7 +1387,8 @@ static jit_block *translate(uint32_t pc, int thumb, uint32_t it, int *fault, int
|
||||
x->it = it_after;
|
||||
if (x->ended || b->overflow) break;
|
||||
/* a fused VCMP needs its VMRS in the same block (x->next is set, so it is within MAX_INSNS) */
|
||||
if ((!x->skip_vmrs && (n + 1 >= MAX_INSNS || (size_t)(b->p - b->start) > (CACHE_MARGIN / 4) / 2)) ||
|
||||
if ((!x->skip_vmrs && (n + 1 >= MAX_INSNS || (size_t)(b->p - b->start) > (CACHE_MARGIN / 4) / 2 ||
|
||||
x->nstubs > MAX_STUBS - STUB_RESERVE)) ||
|
||||
!(len = nlen ? nlen : decode_guest(cur, thumb, x->it, &in))) {
|
||||
jx_exit_direct(x, cur, thumb, x->it);
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/* The ARMv8 crypto instructions (SHA1C/P/M/H/SU0/SU1), which the JIT translates through the interpreter (one exit
|
||||
* stub each): dense() = 72 of them in a row, as dense as OpenSSL's sha1_block_data_order_armv8, whose block
|
||||
* overflowed the JIT's stub table (fatal "overflowed the code buffer"; GitHub #342, Pinball FX2 VR); then a fully
|
||||
* unrolled SHA-1 checked against known digests. Built with -march=armv8-a -mfpu=crypto-neon-fp-armv8. */
|
||||
#include <arm_neon.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define K0 0x5A827999u
|
||||
#define K1 0x6ED9EBA1u
|
||||
#define K2 0x8F1BBCDCu
|
||||
#define K3 0xCA62C1D6u
|
||||
|
||||
/* 4 rounds: e1 = sha1h(a), abcd = sha1{c,p,m}(abcd, e0, w + k); then the message schedule */
|
||||
#define R(op, k, e_in, e_out, w) do { \
|
||||
e_out = vsha1h_u32(vgetq_lane_u32(abcd, 0)); \
|
||||
abcd = op(abcd, e_in, vaddq_u32(w, vdupq_n_u32(k))); \
|
||||
} while (0)
|
||||
#define SCHED(w0, w1, w2, w3) (w0 = vsha1su1q_u32(vsha1su0q_u32(w0, w1, w2), w3))
|
||||
|
||||
static void block(uint32_t st[5], const uint8_t *p)
|
||||
{
|
||||
uint32x4_t abcd = vld1q_u32(st), abcd0 = abcd;
|
||||
uint32_t e0 = st[4], e1, e00 = e0;
|
||||
uint32x4_t w0 = vreinterpretq_u32_u8(vrev32q_u8(vld1q_u8(p)));
|
||||
uint32x4_t w1 = vreinterpretq_u32_u8(vrev32q_u8(vld1q_u8(p + 16)));
|
||||
uint32x4_t w2 = vreinterpretq_u32_u8(vrev32q_u8(vld1q_u8(p + 32)));
|
||||
uint32x4_t w3 = vreinterpretq_u32_u8(vrev32q_u8(vld1q_u8(p + 48)));
|
||||
R(vsha1cq_u32, K0, e0, e1, w0); SCHED(w0, w1, w2, w3);
|
||||
R(vsha1cq_u32, K0, e1, e0, w1); SCHED(w1, w2, w3, w0);
|
||||
R(vsha1cq_u32, K0, e0, e1, w2); SCHED(w2, w3, w0, w1);
|
||||
R(vsha1cq_u32, K0, e1, e0, w3); SCHED(w3, w0, w1, w2);
|
||||
R(vsha1cq_u32, K0, e0, e1, w0); SCHED(w0, w1, w2, w3);
|
||||
R(vsha1pq_u32, K1, e1, e0, w1); SCHED(w1, w2, w3, w0);
|
||||
R(vsha1pq_u32, K1, e0, e1, w2); SCHED(w2, w3, w0, w1);
|
||||
R(vsha1pq_u32, K1, e1, e0, w3); SCHED(w3, w0, w1, w2);
|
||||
R(vsha1pq_u32, K1, e0, e1, w0); SCHED(w0, w1, w2, w3);
|
||||
R(vsha1pq_u32, K1, e1, e0, w1); SCHED(w1, w2, w3, w0);
|
||||
R(vsha1mq_u32, K2, e0, e1, w2); SCHED(w2, w3, w0, w1);
|
||||
R(vsha1mq_u32, K2, e1, e0, w3); SCHED(w3, w0, w1, w2);
|
||||
R(vsha1mq_u32, K2, e0, e1, w0); SCHED(w0, w1, w2, w3);
|
||||
R(vsha1mq_u32, K2, e1, e0, w1); SCHED(w1, w2, w3, w0);
|
||||
R(vsha1mq_u32, K2, e0, e1, w2); SCHED(w2, w3, w0, w1);
|
||||
R(vsha1pq_u32, K3, e1, e0, w3); SCHED(w3, w0, w1, w2);
|
||||
R(vsha1pq_u32, K3, e0, e1, w0);
|
||||
R(vsha1pq_u32, K3, e1, e0, w1);
|
||||
R(vsha1pq_u32, K3, e0, e1, w2);
|
||||
R(vsha1pq_u32, K3, e1, e0, w3);
|
||||
vst1q_u32(st, vaddq_u32(abcd, abcd0));
|
||||
st[4] = e0 + e00;
|
||||
}
|
||||
|
||||
static void sha1(const char *msg, uint8_t out[20])
|
||||
{
|
||||
uint32_t st[5] = {0x67452301u, 0xEFCDAB89u, 0x98BADCFEu, 0x10325476u, 0xC3D2E1F0u};
|
||||
uint8_t buf[128] = {0};
|
||||
size_t n = strlen(msg), blocks = (n + 9 + 63) / 64;
|
||||
memcpy(buf, msg, n);
|
||||
buf[n] = 0x80;
|
||||
unsigned long long bits = (unsigned long long)n * 8;
|
||||
for (int k = 0; k < 8; k++) buf[blocks * 64 - 1 - k] = (uint8_t)(bits >> (8 * k));
|
||||
for (size_t b = 0; b < blocks; b++) block(st, buf + 64 * b);
|
||||
for (int k = 0; k < 20; k++) out[k] = (uint8_t)(st[k / 4] >> (24 - 8 * (k % 4)));
|
||||
}
|
||||
|
||||
/* 72 crypto instructions with nothing between them: denser than the compiler's code above, as dense as OpenSSL's
|
||||
* hand-written rounds */
|
||||
__attribute__((noinline)) static void dense(uint32_t v[12])
|
||||
{
|
||||
__asm__ volatile("vld1.32 {d0-d3}, [%0]!\n\t"
|
||||
"vld1.32 {d4-d5}, [%0]\n\t"
|
||||
".rept 24\n\t"
|
||||
"sha1c.32 q0, q1, q2\n\t"
|
||||
"sha1h.32 q1, q0\n\t"
|
||||
"sha1su0.32 q2, q0, q1\n\t"
|
||||
".endr\n\t"
|
||||
"vst1.32 {d4-d5}, [%0]\n\t"
|
||||
"sub %0, %0, #32\n\t"
|
||||
"vst1.32 {d0-d3}, [%0]"
|
||||
: "+r"(v)
|
||||
:
|
||||
: "memory", "d0", "d1", "d2", "d3", "d4", "d5");
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
uint32_t v[12];
|
||||
for (int k = 0; k < 12; k++) v[k] = 0x9e3779b9u * (k + 1);
|
||||
for (int r = 0; r < 3; r++) dense(v);
|
||||
printf("dense:");
|
||||
for (int k = 0; k < 12; k++) printf(" %08x", v[k]);
|
||||
printf("\n");
|
||||
|
||||
static const char *const msgs[] = {"", "abc", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"};
|
||||
static const char *const want[] = {"da39a3ee5e6b4b0d3255bfef95601890afd80709",
|
||||
"a9993e364706816aba3e25717850c26c9cd0d89d",
|
||||
"84983e441c3bd26ebaae4aa1f95129e5e54670f1"};
|
||||
int bad = 0;
|
||||
for (int m = 0; m < 3; m++) {
|
||||
uint8_t d[20];
|
||||
char hex[41];
|
||||
sha1(msgs[m], d);
|
||||
for (int k = 0; k < 20; k++) sprintf(hex + 2 * k, "%02x", d[k]);
|
||||
printf("sha1(\"%s\") = %s %s\n", msgs[m], hex, strcmp(hex, want[m]) ? "WRONG" : "ok");
|
||||
bad |= strcmp(hex, want[m]) != 0;
|
||||
}
|
||||
return bad;
|
||||
}
|
||||
@@ -31,7 +31,9 @@ PROGRAMS = { # name -> (source, variants, args)
|
||||
"jitguest": ("jitguest.c", ["arm", "thumb"], []),
|
||||
"exec": ("exec.c", ["arm", "thumb"], []),
|
||||
"bench": ("bench.c", ["arm", "thumb"], []),
|
||||
"sha1ce": ("sha1ce.c", ["arm", "thumb"], []),
|
||||
}
|
||||
EXTRA_FLAGS = {"sha1ce.c": ["-march=armv8-a", "-mfpu=crypto-neon-fp-armv8"]} # ARMv8 crypto instructions
|
||||
JIT_ONLY = {"bench"} # far too slow for the interpreter under emulation
|
||||
|
||||
|
||||
@@ -42,7 +44,7 @@ def build(name, src, variant):
|
||||
return out
|
||||
BUILD.mkdir(parents=True, exist_ok=True)
|
||||
cc = NDK_BIN / ("armv7a-linux-androideabi29-clang++" if src.endswith(".cpp") else "armv7a-linux-androideabi29-clang")
|
||||
cmd = [str(cc), *VARIANTS[variant], "-mfpu=neon-vfpv4", "-static", "-g", str(srcp), "-lm", "-o", str(out)]
|
||||
cmd = [str(cc), *VARIANTS[variant], "-mfpu=neon-vfpv4", *EXTRA_FLAGS.get(src, []), "-static", "-g", str(srcp), "-lm", "-o", str(out)]
|
||||
if src.endswith(".cpp"):
|
||||
cmd += ["-static-libstdc++", "-std=c++17"]
|
||||
subprocess.run(cmd, check=True)
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// action_dedup (session_fixes.c, GitHub #323): a free name for a controller action whose name or localized name is
|
||||
// already used in its action set. No OpenXR types, so the host tests can compile it.
|
||||
#pragma once
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
static size_t action_name_len(const char *s, size_t max) { // strnlen (not in plain C11)
|
||||
size_t n = 0;
|
||||
while (n < max && s[n]) ++n;
|
||||
return n;
|
||||
}
|
||||
|
||||
// taken(ctx, name, localized): 1 when `name` or `localized` is already used in the set.
|
||||
typedef int (*action_name_taken_fn)(void *ctx, const char *name, const char *localized);
|
||||
|
||||
// Writes "<name>_N" / "<localized> N" (N = 2..99, the first pair not taken; cut to fit name_size/localized_size
|
||||
// including the terminator) and returns 1; 0 when the original names are free or no free pair exists.
|
||||
static int action_unique_names(const char *name, const char *localized, action_name_taken_fn taken, void *ctx,
|
||||
char *out_name, size_t name_size, char *out_localized, size_t localized_size) {
|
||||
if (!taken(ctx, name, localized) || name_size < 8 || localized_size < 8) return 0;
|
||||
for (int n = 2; n < 100; ++n) {
|
||||
char suffix[8], lsuffix[8];
|
||||
snprintf(suffix, sizeof(suffix), "_%d", n);
|
||||
snprintf(lsuffix, sizeof(lsuffix), " %d", n);
|
||||
size_t keep = action_name_len(name, name_size - 1);
|
||||
if (keep + strlen(suffix) > name_size - 1) keep = name_size - 1 - strlen(suffix);
|
||||
snprintf(out_name, name_size, "%.*s%s", (int)keep, name, suffix);
|
||||
size_t lkeep = action_name_len(localized, localized_size - 1);
|
||||
if (lkeep + strlen(lsuffix) > localized_size - 1) lkeep = localized_size - 1 - strlen(lsuffix);
|
||||
snprintf(out_localized, localized_size, "%.*s%s", (int)lkeep, localized, lsuffix);
|
||||
if (!taken(ctx, out_name, out_localized)) return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
#version 450
|
||||
// alpha_blend_vk.c: with blending (one minus destination alpha, zero) and only alpha written, the image's alpha
|
||||
// becomes 1 - alpha.
|
||||
layout(location=0) out vec4 outputColor;
|
||||
void main(){outputColor=vec4(0,0,0,1);}
|
||||
@@ -0,0 +1,3 @@
|
||||
#version 450
|
||||
// A triangle that covers the whole viewport (alpha_blend_vk.c).
|
||||
void main(){vec2 p=vec2((gl_VertexIndex<<1)&2,gl_VertexIndex&2);gl_Position=vec4(p*2-1,0,1);}
|
||||
@@ -0,0 +1,42 @@
|
||||
// Generated from alpha_blend.vert and alpha_blend.frag.
|
||||
static const uint32_t alpha_blend_vert_spv[] = {
|
||||
0x07230203,0x00010000,0x000d000a,0x0000002c,0x00000000,0x00020011,0x00000001,0x0006000b,
|
||||
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
|
||||
0x0007000f,0x00000000,0x00000004,0x6e69616d,0x00000000,0x0000000c,0x0000001d,0x00040047,
|
||||
0x0000000c,0x0000000b,0x0000002a,0x00050048,0x0000001b,0x00000000,0x0000000b,0x00000000,
|
||||
0x00050048,0x0000001b,0x00000001,0x0000000b,0x00000001,0x00050048,0x0000001b,0x00000002,
|
||||
0x0000000b,0x00000003,0x00050048,0x0000001b,0x00000003,0x0000000b,0x00000004,0x00030047,
|
||||
0x0000001b,0x00000002,0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00030016,
|
||||
0x00000006,0x00000020,0x00040017,0x00000007,0x00000006,0x00000002,0x00040015,0x0000000a,
|
||||
0x00000020,0x00000001,0x00040020,0x0000000b,0x00000001,0x0000000a,0x0004003b,0x0000000b,
|
||||
0x0000000c,0x00000001,0x0004002b,0x0000000a,0x0000000e,0x00000001,0x0004002b,0x0000000a,
|
||||
0x00000010,0x00000002,0x00040017,0x00000017,0x00000006,0x00000004,0x00040015,0x00000018,
|
||||
0x00000020,0x00000000,0x0004002b,0x00000018,0x00000019,0x00000001,0x0004001c,0x0000001a,
|
||||
0x00000006,0x00000019,0x0006001e,0x0000001b,0x00000017,0x00000006,0x0000001a,0x0000001a,
|
||||
0x00040020,0x0000001c,0x00000003,0x0000001b,0x0004003b,0x0000001c,0x0000001d,0x00000003,
|
||||
0x0004002b,0x0000000a,0x0000001e,0x00000000,0x0004002b,0x00000006,0x00000020,0x40000000,
|
||||
0x0004002b,0x00000006,0x00000022,0x3f800000,0x0004002b,0x00000006,0x00000025,0x00000000,
|
||||
0x00040020,0x00000029,0x00000003,0x00000017,0x0005002c,0x00000007,0x0000002b,0x00000022,
|
||||
0x00000022,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,
|
||||
0x0004003d,0x0000000a,0x0000000d,0x0000000c,0x000500c4,0x0000000a,0x0000000f,0x0000000d,
|
||||
0x0000000e,0x000500c7,0x0000000a,0x00000011,0x0000000f,0x00000010,0x0004006f,0x00000006,
|
||||
0x00000012,0x00000011,0x000500c7,0x0000000a,0x00000014,0x0000000d,0x00000010,0x0004006f,
|
||||
0x00000006,0x00000015,0x00000014,0x00050050,0x00000007,0x00000016,0x00000012,0x00000015,
|
||||
0x0005008e,0x00000007,0x00000021,0x00000016,0x00000020,0x00050083,0x00000007,0x00000024,
|
||||
0x00000021,0x0000002b,0x00050051,0x00000006,0x00000026,0x00000024,0x00000000,0x00050051,
|
||||
0x00000006,0x00000027,0x00000024,0x00000001,0x00070050,0x00000017,0x00000028,0x00000026,
|
||||
0x00000027,0x00000025,0x00000022,0x00050041,0x00000029,0x0000002a,0x0000001d,0x0000001e,
|
||||
0x0003003e,0x0000002a,0x00000028,0x000100fd,0x00010038,
|
||||
};
|
||||
static const uint32_t alpha_blend_frag_spv[] = {
|
||||
0x07230203,0x00010000,0x000d000a,0x0000000d,0x00000000,0x00020011,0x00000001,0x0006000b,
|
||||
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
|
||||
0x0006000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x00000009,0x00030010,0x00000004,
|
||||
0x00000007,0x00040047,0x00000009,0x0000001e,0x00000000,0x00020013,0x00000002,0x00030021,
|
||||
0x00000003,0x00000002,0x00030016,0x00000006,0x00000020,0x00040017,0x00000007,0x00000006,
|
||||
0x00000004,0x00040020,0x00000008,0x00000003,0x00000007,0x0004003b,0x00000008,0x00000009,
|
||||
0x00000003,0x0004002b,0x00000006,0x0000000a,0x00000000,0x0004002b,0x00000006,0x0000000b,
|
||||
0x3f800000,0x0007002c,0x00000007,0x0000000c,0x0000000a,0x0000000a,0x0000000a,0x0000000b,
|
||||
0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0003003e,
|
||||
0x00000009,0x0000000c,0x000100fd,0x00010038,
|
||||
};
|
||||
@@ -0,0 +1,301 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Included by frame_adapter.c after flip_vk.c. XR_FB_composition_layer_alpha_blend for emulated passthrough
|
||||
// (setting alpha_blend_emul, Vulkan sessions).
|
||||
//
|
||||
// Passthrough is emulated by compositing the game's projection layer over the Frame's cameras with its texture alpha
|
||||
// (ALPHA_BLEND environment). Unreal's mobile renderer keeps 1 - coverage in the scene alpha (0 where it drew, 1 where
|
||||
// it drew nothing), and Meta's OVRPlugin compensates with an XrCompositionLayerAlphaBlendFB on the eye layer
|
||||
// (source colour factor ONE_MINUS_SRC_ALPHA, destination SRC_ALPHA). The Frame's runtime ignores that struct, so the
|
||||
// cameras showed through the scene and the empty background stayed black (GitHub #329, Star Wars: Beyond Victory).
|
||||
// Blending src * (1 - a) + dst * a is the same as the runtime's standard blend with alpha 1 - a, so the alpha of the
|
||||
// layer's image rectangles is inverted in place, once per acquired image, by a tiny render pass (blend: one minus
|
||||
// destination alpha, zero; only alpha written) before the frame goes to the runtime. Our work is queued on the app's
|
||||
// queue ahead of the runtime's xrEndFrame submission; command buffers come from a ring and are only waited for when
|
||||
// reused, several frames later.
|
||||
#include "alpha_blend_spv.h"
|
||||
|
||||
#define AB_RING 4
|
||||
#define AB_TARGETS 32
|
||||
|
||||
static struct {
|
||||
VkDevice device; // the session's device these objects belong to
|
||||
int state; // 0 = not set up, 1 = ready, -1 = failed
|
||||
VkFormat format; // the pipeline's colour format
|
||||
PFN_vkCreateShaderModule CreateShaderModule;
|
||||
PFN_vkDestroyShaderModule DestroyShaderModule;
|
||||
PFN_vkCreatePipelineLayout CreatePipelineLayout;
|
||||
PFN_vkCreateRenderPass CreateRenderPass;
|
||||
PFN_vkDestroyRenderPass DestroyRenderPass;
|
||||
PFN_vkCreateGraphicsPipelines CreateGraphicsPipelines;
|
||||
PFN_vkDestroyPipeline DestroyPipeline;
|
||||
PFN_vkCreateImageView CreateImageView;
|
||||
PFN_vkDestroyImageView DestroyImageView;
|
||||
PFN_vkCreateFramebuffer CreateFramebuffer;
|
||||
PFN_vkDestroyFramebuffer DestroyFramebuffer;
|
||||
PFN_vkCmdBeginRenderPass CmdBeginRenderPass;
|
||||
PFN_vkCmdEndRenderPass CmdEndRenderPass;
|
||||
PFN_vkCmdBindPipeline CmdBindPipeline;
|
||||
PFN_vkCmdSetViewport CmdSetViewport;
|
||||
PFN_vkCmdSetScissor CmdSetScissor;
|
||||
PFN_vkCmdDraw CmdDraw;
|
||||
VkShaderModule vs, fs;
|
||||
VkPipelineLayout layout;
|
||||
VkRenderPass pass;
|
||||
VkPipeline pipeline;
|
||||
VkCommandBuffer cmd[AB_RING];
|
||||
VkFence fence[AB_RING];
|
||||
int pending[AB_RING], next;
|
||||
struct { XrSwapchain swapchain; VkImage image; uint32_t layer, w, h; VkImageView view; VkFramebuffer fb; } targets[AB_TARGETS];
|
||||
} ab;
|
||||
|
||||
static int ab_functions(void) {
|
||||
#define AB_DEV(name) ab.name = (PFN_vk##name)vk.GetDeviceProcAddr(vk.device, "vk" #name); if (!ab.name) return 0;
|
||||
AB_DEV(CreateShaderModule) AB_DEV(DestroyShaderModule) AB_DEV(CreatePipelineLayout) AB_DEV(CreateRenderPass)
|
||||
AB_DEV(DestroyRenderPass) AB_DEV(CreateGraphicsPipelines) AB_DEV(DestroyPipeline) AB_DEV(CreateImageView)
|
||||
AB_DEV(DestroyImageView) AB_DEV(CreateFramebuffer) AB_DEV(DestroyFramebuffer) AB_DEV(CmdBeginRenderPass)
|
||||
AB_DEV(CmdEndRenderPass) AB_DEV(CmdBindPipeline) AB_DEV(CmdSetViewport) AB_DEV(CmdSetScissor) AB_DEV(CmdDraw)
|
||||
#undef AB_DEV
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Command buffers, fences and shaders: once per session device.
|
||||
static int ab_ready(void) {
|
||||
if (ab.device != vk.device) { // a new session (the old device's objects went with it)
|
||||
memset(&ab, 0, sizeof(ab));
|
||||
ab.device = vk.device;
|
||||
}
|
||||
if (ab.state) return ab.state > 0;
|
||||
ab.state = -1;
|
||||
if (!vk_ready() || !ab_functions()) return 0;
|
||||
VkCommandBufferAllocateInfo alloc = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, NULL, vk.pool,
|
||||
VK_COMMAND_BUFFER_LEVEL_PRIMARY, AB_RING};
|
||||
if (vk.AllocateCommandBuffers(vk.device, &alloc, ab.cmd) != VK_SUCCESS) return 0;
|
||||
for (int i = 0; i < AB_RING; ++i) {
|
||||
VkFenceCreateInfo fence = {VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, NULL, 0};
|
||||
if (vk.CreateFence(vk.device, &fence, NULL, &ab.fence[i]) != VK_SUCCESS) return 0;
|
||||
}
|
||||
VkShaderModuleCreateInfo vs = {VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO, NULL, 0, sizeof(alpha_blend_vert_spv),
|
||||
alpha_blend_vert_spv};
|
||||
VkShaderModuleCreateInfo fs = {VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO, NULL, 0, sizeof(alpha_blend_frag_spv),
|
||||
alpha_blend_frag_spv};
|
||||
if (ab.CreateShaderModule(vk.device, &vs, NULL, &ab.vs) != VK_SUCCESS ||
|
||||
ab.CreateShaderModule(vk.device, &fs, NULL, &ab.fs) != VK_SUCCESS) return 0;
|
||||
VkPipelineLayoutCreateInfo layout = {VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, NULL, 0, 0, NULL, 0, NULL};
|
||||
if (ab.CreatePipelineLayout(vk.device, &layout, NULL, &ab.layout) != VK_SUCCESS) return 0;
|
||||
ab.state = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Render pass + pipeline for one colour format (the eye swapchains': rebuilt only if it changes).
|
||||
static int ab_pipeline(VkFormat format) {
|
||||
if (ab.pipeline && ab.format == format) return 1;
|
||||
if (ab.pipeline) { ab.DestroyPipeline(vk.device, ab.pipeline, NULL); ab.pipeline = VK_NULL_HANDLE; }
|
||||
if (ab.pass) { ab.DestroyRenderPass(vk.device, ab.pass, NULL); ab.pass = VK_NULL_HANDLE; }
|
||||
VkAttachmentDescription color = {0, format, VK_SAMPLE_COUNT_1_BIT, VK_ATTACHMENT_LOAD_OP_LOAD,
|
||||
VK_ATTACHMENT_STORE_OP_STORE, VK_ATTACHMENT_LOAD_OP_DONT_CARE,
|
||||
VK_ATTACHMENT_STORE_OP_DONT_CARE, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
|
||||
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL};
|
||||
VkAttachmentReference ref = {0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL};
|
||||
VkSubpassDescription subpass = {0, VK_PIPELINE_BIND_POINT_GRAPHICS, 0, NULL, 1, &ref, NULL, NULL, 0, NULL};
|
||||
VkSubpassDependency deps[2] = {
|
||||
// the app's rendering into the image (any stage) before our read-modify-write
|
||||
{VK_SUBPASS_EXTERNAL, 0, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
|
||||
VK_ACCESS_MEMORY_WRITE_BIT, VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, 0},
|
||||
// and ours before whatever the runtime does with it next
|
||||
{0, VK_SUBPASS_EXTERNAL, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
|
||||
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT, 0},
|
||||
};
|
||||
VkRenderPassCreateInfo rp = {VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, NULL, 0, 1, &color, 1, &subpass, 2, deps};
|
||||
if (ab.CreateRenderPass(vk.device, &rp, NULL, &ab.pass) != VK_SUCCESS) { ab.pass = VK_NULL_HANDLE; return 0; }
|
||||
VkPipelineShaderStageCreateInfo stages[2] = {
|
||||
{VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, NULL, 0, VK_SHADER_STAGE_VERTEX_BIT, ab.vs, "main", NULL},
|
||||
{VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, NULL, 0, VK_SHADER_STAGE_FRAGMENT_BIT, ab.fs, "main", NULL},
|
||||
};
|
||||
VkPipelineVertexInputStateCreateInfo input = {VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO};
|
||||
VkPipelineInputAssemblyStateCreateInfo assembly = {VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, NULL,
|
||||
0, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_FALSE};
|
||||
VkPipelineViewportStateCreateInfo viewport = {VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, NULL, 0, 1, NULL,
|
||||
1, NULL};
|
||||
VkPipelineRasterizationStateCreateInfo raster = {VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO};
|
||||
raster.polygonMode = VK_POLYGON_MODE_FILL;
|
||||
raster.cullMode = VK_CULL_MODE_NONE;
|
||||
raster.lineWidth = 1.0f;
|
||||
VkPipelineMultisampleStateCreateInfo multisample = {VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO};
|
||||
multisample.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT;
|
||||
VkPipelineColorBlendAttachmentState blend = {VK_TRUE, VK_BLEND_FACTOR_ZERO, VK_BLEND_FACTOR_ONE, VK_BLEND_OP_ADD,
|
||||
VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA, VK_BLEND_FACTOR_ZERO,
|
||||
VK_BLEND_OP_ADD, VK_COLOR_COMPONENT_A_BIT};
|
||||
VkPipelineColorBlendStateCreateInfo blending = {VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO};
|
||||
blending.attachmentCount = 1;
|
||||
blending.pAttachments = &blend;
|
||||
VkDynamicState dynamic_states[2] = {VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR};
|
||||
VkPipelineDynamicStateCreateInfo dynamic = {VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO, NULL, 0, 2,
|
||||
dynamic_states};
|
||||
VkGraphicsPipelineCreateInfo pipeline = {VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO};
|
||||
pipeline.stageCount = 2;
|
||||
pipeline.pStages = stages;
|
||||
pipeline.pVertexInputState = &input;
|
||||
pipeline.pInputAssemblyState = &assembly;
|
||||
pipeline.pViewportState = &viewport;
|
||||
pipeline.pRasterizationState = &raster;
|
||||
pipeline.pMultisampleState = &multisample;
|
||||
pipeline.pColorBlendState = &blending;
|
||||
pipeline.pDynamicState = &dynamic;
|
||||
pipeline.layout = ab.layout;
|
||||
pipeline.renderPass = ab.pass;
|
||||
if (ab.CreateGraphicsPipelines(vk.device, VK_NULL_HANDLE, 1, &pipeline, NULL, &ab.pipeline) != VK_SUCCESS) {
|
||||
ab.pipeline = VK_NULL_HANDLE;
|
||||
return 0;
|
||||
}
|
||||
ab.format = format;
|
||||
// framebuffers were made for the old render pass (compatible only with the same format): drop them
|
||||
for (int i = 0; i < AB_TARGETS; ++i)
|
||||
if (ab.targets[i].fb) {
|
||||
ab.DestroyFramebuffer(vk.device, ab.targets[i].fb, NULL);
|
||||
ab.DestroyImageView(vk.device, ab.targets[i].view, NULL);
|
||||
memset(&ab.targets[i], 0, sizeof(ab.targets[i]));
|
||||
}
|
||||
LOG("alpha_blend: Vulkan alpha inversion ready (format %d)", (int)format);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void ab_wait_all(void) {
|
||||
for (int i = 0; i < AB_RING; ++i)
|
||||
if (ab.pending[i]) {
|
||||
vk.WaitForFences(vk.device, 1, &ab.fence[i], VK_TRUE, 1000000000ull);
|
||||
vk.ResetFences(vk.device, 1, &ab.fence[i]);
|
||||
ab.pending[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// The view + framebuffer of one array layer of a swapchain image.
|
||||
static VkFramebuffer ab_target(XrSwapchain swapchain, VkImage image, uint32_t layer, VkFormat format, uint32_t w, uint32_t h) {
|
||||
int free_slot = -1;
|
||||
for (int i = 0; i < AB_TARGETS; ++i) {
|
||||
if (ab.targets[i].fb && ab.targets[i].image == image && ab.targets[i].layer == layer &&
|
||||
ab.targets[i].swapchain == swapchain) return ab.targets[i].fb;
|
||||
if (!ab.targets[i].fb && free_slot < 0) free_slot = i;
|
||||
}
|
||||
if (free_slot < 0) return VK_NULL_HANDLE;
|
||||
VkImageViewCreateInfo vi = {VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, NULL, 0, image, VK_IMAGE_VIEW_TYPE_2D, format,
|
||||
{VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY,
|
||||
VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY},
|
||||
{VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, layer, 1}};
|
||||
VkImageView view;
|
||||
if (ab.CreateImageView(vk.device, &vi, NULL, &view) != VK_SUCCESS) return VK_NULL_HANDLE;
|
||||
VkFramebufferCreateInfo fi = {VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, NULL, 0, ab.pass, 1, &view, w, h, 1};
|
||||
VkFramebuffer fb;
|
||||
if (ab.CreateFramebuffer(vk.device, &fi, NULL, &fb) != VK_SUCCESS) {
|
||||
ab.DestroyImageView(vk.device, view, NULL);
|
||||
return VK_NULL_HANDLE;
|
||||
}
|
||||
ab.targets[free_slot].swapchain = swapchain;
|
||||
ab.targets[free_slot].image = image;
|
||||
ab.targets[free_slot].layer = layer;
|
||||
ab.targets[free_slot].w = w;
|
||||
ab.targets[free_slot].h = h;
|
||||
ab.targets[free_slot].view = view;
|
||||
ab.targets[free_slot].fb = fb;
|
||||
return fb;
|
||||
}
|
||||
|
||||
// xrDestroySwapchain (before the runtime's): our views and framebuffers of its images go first.
|
||||
static void ab_on_destroy(XrSwapchain swapchain) {
|
||||
if (ab.state <= 0 || ab.device != vk.device) return;
|
||||
int any = 0;
|
||||
for (int i = 0; i < AB_TARGETS; ++i) any |= ab.targets[i].fb && ab.targets[i].swapchain == swapchain;
|
||||
if (!any) return;
|
||||
ab_wait_all();
|
||||
for (int i = 0; i < AB_TARGETS; ++i)
|
||||
if (ab.targets[i].fb && ab.targets[i].swapchain == swapchain) {
|
||||
ab.DestroyFramebuffer(vk.device, ab.targets[i].fb, NULL);
|
||||
ab.DestroyImageView(vk.device, ab.targets[i].view, NULL);
|
||||
memset(&ab.targets[i], 0, sizeof(ab.targets[i]));
|
||||
}
|
||||
}
|
||||
|
||||
// Inverts the alpha of one projection view's rectangle in the image the app last acquired from its swapchain
|
||||
// (Vulkan; once per acquire). Returns 1 when done or already done for this image, 0 when it couldn't be done.
|
||||
static int ab_invert_view(const XrSwapchainSubImage *sub) {
|
||||
if (!vk.device) return 0; // not a Vulkan session
|
||||
int ok = 0;
|
||||
pthread_mutex_lock(&flip_lock);
|
||||
tracked_swapchain *t = find_tracked(sub->swapchain, 0);
|
||||
uint32_t index = t ? t->last_acquired : 0, layer = sub->imageArrayIndex;
|
||||
XrRect2Di rect = sub->imageRect;
|
||||
if (!t || !t->image_count || index >= t->image_count || layer >= 32 || rect.extent.width <= 0 ||
|
||||
rect.extent.height <= 0 || t->info.sampleCount > 1 ||
|
||||
!(t->info.usageFlags & XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT))
|
||||
goto done;
|
||||
if (t->alpha_inverted[index] & (1u << layer)) { ok = 1; goto done; } // a static frame submitted again
|
||||
if (!ab_ready() || !ab_pipeline((VkFormat)t->info.format)) goto done;
|
||||
VkFramebuffer fb = ab_target(sub->swapchain, t->images[index], layer, (VkFormat)t->info.format, t->info.width,
|
||||
t->info.height);
|
||||
if (!fb) goto done;
|
||||
int slot = ab.next;
|
||||
if (ab.pending[slot]) { // submitted AB_RING calls ago: normally long finished
|
||||
if (vk.WaitForFences(vk.device, 1, &ab.fence[slot], VK_TRUE, 100000000ull) != VK_SUCCESS) goto done;
|
||||
vk.ResetFences(vk.device, 1, &ab.fence[slot]);
|
||||
ab.pending[slot] = 0;
|
||||
}
|
||||
VkCommandBuffer cmd = ab.cmd[slot];
|
||||
VkCommandBufferBeginInfo begin = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, NULL,
|
||||
VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT, NULL};
|
||||
vk.ResetCommandBuffer(cmd, 0);
|
||||
vk.BeginCommandBuffer(cmd, &begin);
|
||||
VkRect2D area = {{rect.offset.x, rect.offset.y}, {(uint32_t)rect.extent.width, (uint32_t)rect.extent.height}};
|
||||
VkRenderPassBeginInfo rb = {VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, NULL, ab.pass, fb, area, 0, NULL};
|
||||
ab.CmdBeginRenderPass(cmd, &rb, VK_SUBPASS_CONTENTS_INLINE);
|
||||
ab.CmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, ab.pipeline);
|
||||
VkViewport vp = {(float)rect.offset.x, (float)rect.offset.y, (float)rect.extent.width, (float)rect.extent.height,
|
||||
0.0f, 1.0f};
|
||||
ab.CmdSetViewport(cmd, 0, 1, &vp);
|
||||
ab.CmdSetScissor(cmd, 0, 1, &area);
|
||||
ab.CmdDraw(cmd, 3, 1, 0, 0);
|
||||
ab.CmdEndRenderPass(cmd);
|
||||
vk.EndCommandBuffer(cmd);
|
||||
VkSubmitInfo submit = {VK_STRUCTURE_TYPE_SUBMIT_INFO, NULL, 0, NULL, NULL, 1, &cmd, 0, NULL};
|
||||
if (vk.QueueSubmit(vk.queue, 1, &submit, ab.fence[slot]) != VK_SUCCESS) goto done;
|
||||
ab.pending[slot] = 1;
|
||||
ab.next = (slot + 1) % AB_RING;
|
||||
t->alpha_inverted[index] |= 1u << layer;
|
||||
ok = 1;
|
||||
static int logged;
|
||||
if (!logged++)
|
||||
LOG("alpha_blend: inverting the alpha of swapchain=%p (rect %dx%d at %d,%d, layer %u) for passthrough",
|
||||
(void *)(uintptr_t)sub->swapchain, rect.extent.width, rect.extent.height, rect.offset.x, rect.offset.y, layer);
|
||||
done:
|
||||
pthread_mutex_unlock(&flip_lock);
|
||||
return ok;
|
||||
}
|
||||
|
||||
// xrEndFrame, emulated passthrough: what the projection layer's XrCompositionLayerAlphaBlendFB asks for, done with
|
||||
// the runtime's standard blend. 0 = nothing to do (no such struct, or factors that can't be expressed), 1 = straight
|
||||
// alpha (inverted when asked), 2 = premultiplied colour (alpha inverted when asked).
|
||||
static int alpha_blend_apply(const XrCompositionLayerProjection *p) {
|
||||
const XrCompositionLayerAlphaBlendFB *f = NULL;
|
||||
for (const XrBaseInStructure *n = (const XrBaseInStructure *)p->next; n; n = n->next)
|
||||
if (n->type == XR_TYPE_COMPOSITION_LAYER_ALPHA_BLEND_FB) f = (const XrCompositionLayerAlphaBlendFB *)n;
|
||||
if (!f) return 0;
|
||||
int src = f->srcFactorColor, dst = f->dstFactorColor;
|
||||
int straight = src == XR_BLEND_FACTOR_SRC_ALPHA_FB, premultiplied = src == XR_BLEND_FACTOR_ONE_FB,
|
||||
inverse = src == XR_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA_FB;
|
||||
static int logged;
|
||||
if (!logged++)
|
||||
LOG("alpha_blend: projection layer asks for colour %d/%d alpha %d/%d (src/dst factors)", src, dst,
|
||||
f->srcFactorAlpha, f->dstFactorAlpha);
|
||||
if ((straight || premultiplied) && dst == XR_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA_FB) return straight ? 1 : 2;
|
||||
if (!(inverse || premultiplied) || dst != XR_BLEND_FACTOR_SRC_ALPHA_FB) {
|
||||
static int warned;
|
||||
if (!warned++) LOG("alpha_blend: these factors can't be emulated, the layer is blended normally");
|
||||
return 0;
|
||||
}
|
||||
int done = 1; // src * (1 - a) + dst * a: the standard blend with the alpha inverted
|
||||
for (uint32_t v = 0; v < p->viewCount && v < 2; ++v) done &= ab_invert_view(&p->views[v].subImage);
|
||||
if (!done) {
|
||||
static int warned;
|
||||
if (!warned++) LOG("alpha_blend: inverse alpha asked for, but the image couldn't be changed (not Vulkan?)");
|
||||
return 0;
|
||||
}
|
||||
return inverse ? 1 : 2;
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Included by session_fixes.c: Meta's detached controllers (XR_META_detached_controllers: a controller put down while
|
||||
// hand tracking runs) on a runtime without that extension. Uses profile_remap, runtime_has_detached_controllers,
|
||||
// active_instance, lookup and LOG.
|
||||
//
|
||||
// Meta's Unity OpenXR features add "Detached ... Controller" devices for /user/detached_controller_meta/left|right.
|
||||
// Unity merges same-named actions of every enabled device into one action, so the first action with such a subaction
|
||||
// path (e.g. "thumbstick") fails with XR_ERROR_PATH_UNSUPPORTED on the Frame's runtime, Unity attaches no action set
|
||||
// at all and neither Unity nor OVRPlugin get controller input: hands lying at the play-space origin on the floor, no
|
||||
// buttons (Spatial Zombies, GitHub #328). With profile_remap on and the runtime lacking the extension, these paths are
|
||||
// left out of the game's actions and suggested bindings, and xrGetCurrentInteractionProfile answers "no profile"
|
||||
// for them (a detached controller that never shows up) instead of XR_ERROR_PATH_UNSUPPORTED.
|
||||
|
||||
#define DETACHED_PREFIX "/user/detached_controller_meta/"
|
||||
|
||||
static int detached_filter_on(void) { return profile_remap && !runtime_has_detached_controllers && active_instance; }
|
||||
|
||||
// 1 if `path` is a detached controller's top-level path or one of its input/output paths
|
||||
static int detached_path(XrPath path) {
|
||||
PFN_xrPathToString to_string = (PFN_xrPathToString)lookup(active_instance, "xrPathToString");
|
||||
char name[XR_MAX_PATH_LENGTH];
|
||||
uint32_t size = 0;
|
||||
return path && to_string && XR_SUCCEEDED(to_string(active_instance, path, sizeof(name), &size, name)) &&
|
||||
!strncmp(name, DETACHED_PREFIX, strlen(DETACHED_PREFIX));
|
||||
}
|
||||
|
||||
// xrCreateAction: `info` without the detached subaction paths, in *copy (paths in `kept`, room for all of them).
|
||||
// Returns `info` itself when there is nothing to leave out.
|
||||
static const XrActionCreateInfo *detached_strip_action(const XrActionCreateInfo *info, XrActionCreateInfo *copy,
|
||||
XrPath *kept) {
|
||||
if (!info || !info->countSubactionPaths || !info->subactionPaths || !kept || !detached_filter_on()) return info;
|
||||
uint32_t n = 0;
|
||||
for (uint32_t i = 0; i < info->countSubactionPaths; ++i)
|
||||
if (!detached_path(info->subactionPaths[i])) kept[n++] = info->subactionPaths[i];
|
||||
if (n == info->countSubactionPaths) return info;
|
||||
*copy = *info;
|
||||
copy->countSubactionPaths = n;
|
||||
copy->subactionPaths = kept;
|
||||
static int logged;
|
||||
if (logged++ < 3)
|
||||
LOG("profile_remap: action %s without %u detached-controller path(s) (the runtime has no "
|
||||
"XR_META_detached_controllers)", info->actionName, info->countSubactionPaths - n);
|
||||
return copy;
|
||||
}
|
||||
|
||||
// xrSuggestInteractionProfileBindings: `suggested` without bindings of detached controllers, in *copy (bindings in
|
||||
// `kept`, room for all of them). Returns `suggested` itself when there is nothing to leave out.
|
||||
static const XrInteractionProfileSuggestedBinding *detached_strip_bindings(
|
||||
const XrInteractionProfileSuggestedBinding *suggested, XrInteractionProfileSuggestedBinding *copy,
|
||||
XrActionSuggestedBinding *kept) {
|
||||
if (!suggested || !suggested->countSuggestedBindings || !suggested->suggestedBindings || !kept ||
|
||||
!detached_filter_on())
|
||||
return suggested;
|
||||
uint32_t n = 0;
|
||||
for (uint32_t i = 0; i < suggested->countSuggestedBindings; ++i)
|
||||
if (!detached_path(suggested->suggestedBindings[i].binding)) kept[n++] = suggested->suggestedBindings[i];
|
||||
if (n == suggested->countSuggestedBindings) return suggested;
|
||||
*copy = *suggested;
|
||||
copy->countSuggestedBindings = n;
|
||||
copy->suggestedBindings = kept;
|
||||
static int logged;
|
||||
if (logged++ < 8) {
|
||||
PFN_xrPathToString to_string = (PFN_xrPathToString)lookup(active_instance, "xrPathToString");
|
||||
char profile[XR_MAX_PATH_LENGTH] = "?";
|
||||
uint32_t size = 0;
|
||||
if (to_string) to_string(active_instance, suggested->interactionProfile, sizeof(profile), &size, profile);
|
||||
LOG("profile_remap: %s bindings without %u detached-controller path(s)", profile,
|
||||
suggested->countSuggestedBindings - n);
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
|
||||
// xrGetCurrentInteractionProfile: a detached controller's path the runtime doesn't know has no profile.
|
||||
static XrResult detached_current_profile(XrPath user, XrInteractionProfileState *state, XrResult result) {
|
||||
if (result != XR_ERROR_PATH_UNSUPPORTED || !state || !detached_filter_on() || !detached_path(user)) return result;
|
||||
state->interactionProfile = XR_NULL_PATH;
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
@@ -74,6 +74,7 @@ typedef struct {
|
||||
// submitted again without a new acquire: flipping them again would undo it)
|
||||
struct { XrRect2Di rect; uint32_t layer; } flipped[MAX_IMAGES][4];
|
||||
uint32_t flipped_count[MAX_IMAGES];
|
||||
uint32_t alpha_inverted[MAX_IMAGES]; // alpha_blend_vk.c: array layers whose alpha was inverted since the acquire
|
||||
int dumped; // flip_dump saved this swapchain's quad
|
||||
int logged; // its first in-place flip was logged
|
||||
} tracked_swapchain;
|
||||
@@ -136,6 +137,7 @@ static void flip_on_acquire(XrSwapchain handle, uint32_t index) {
|
||||
if (t) {
|
||||
t->last_acquired = index;
|
||||
if (index < MAX_IMAGES) t->flipped_count[index] = 0; // new content: upside down again
|
||||
if (index < MAX_IMAGES) t->alpha_inverted[index] = 0;
|
||||
if(t->acquired_count<MAX_IMAGES)t->acquired[t->acquired_count++]=index;
|
||||
}
|
||||
pthread_mutex_unlock(&flip_lock);
|
||||
|
||||
@@ -34,3 +34,35 @@ static int fb_foveation_storage(XrSwapchainCreateInfo *info, FbStorageNode nodes
|
||||
}
|
||||
return p ? -1 : 0;
|
||||
}
|
||||
|
||||
// Strip FB nodes behind known Vulkan allocation nodes without changing const app memory.
|
||||
// An unknown prefix may be retained only when its entire tail is free of FB create info.
|
||||
static int fb_hide_swapchain_foveation(XrSwapchainCreateInfo *info, FbStorageNode nodes[16]) {
|
||||
const XrBaseInStructure *p = info->next;
|
||||
unsigned n = 0;
|
||||
int removed = 0;
|
||||
unsigned visited = 0;
|
||||
while (p) {
|
||||
if (++visited > 256) return -1;
|
||||
if (p->type == XR_TYPE_SWAPCHAIN_CREATE_INFO_FOVEATION_FB) {
|
||||
removed = 1;
|
||||
p = p->next;
|
||||
continue;
|
||||
}
|
||||
if (p->type != XR_TYPE_VULKAN_SWAPCHAIN_CREATE_INFO_META || n == 16) {
|
||||
for (const XrBaseInStructure *tail = p; tail; tail = tail->next) {
|
||||
if (++visited > 256 || tail->type == XR_TYPE_SWAPCHAIN_CREATE_INFO_FOVEATION_FB) return -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
nodes[n].vk = *(const FbVulkanSwapchainCreateInfo *)p;
|
||||
// Foveation-only subsampled allocations are invalid without FB foveation.
|
||||
nodes[n].vk.additionalCreateFlags &= ~0x4000u;
|
||||
if (n) nodes[n - 1].base.next = &nodes[n].base;
|
||||
++n;
|
||||
p = p->next;
|
||||
}
|
||||
if (n) nodes[n - 1].base.next = p;
|
||||
info->next = n ? &nodes[0] : (const void *)p;
|
||||
return removed;
|
||||
}
|
||||
+123
-25
@@ -15,6 +15,8 @@
|
||||
// * drops requested instance extensions the runtime lacks (e.g. XR_FB_passthrough);
|
||||
// * retries rejected swapchains with 1 sample / a supported format (swapchain_fix, overport #71);
|
||||
// * drops composition layers that reference swapchains that failed to create (layer_fix);
|
||||
// * answers xrGetDisplayRefreshRateFB with the measured display rate when the runtime lacks it or reports 0 Hz
|
||||
// (session_fixes.c);
|
||||
// * serves cube swapchains the runtime refuses as GL/Vulkan cube maps and drops their layers (cube_standin, cube_standin.c);
|
||||
// * optionally requests mutable-format swapchain images (mutable_fix, off by default);
|
||||
// * optionally swaps left/right images of stereo projection layers (swap_eyes, off by default);
|
||||
@@ -91,10 +93,13 @@ static void surf_on_destroy(XrSwapchain handle);
|
||||
|
||||
static float scale = 1.0f;
|
||||
static int foveation_fix = 1;
|
||||
static int foveation_storage_fix; // opt-in ordinary shared storage for native Vulkan foveation
|
||||
static int foveation_storage_fix; // ordinary (not SUBSAMPLED) swapchain storage; on with device.foveation
|
||||
static int foveation_eye; // experimental profile upgrade; does not inject Vulkan gaze offsets
|
||||
static int foveation_eye_enabled, foveation_eye_supported;
|
||||
#include "foveation_storage.h"
|
||||
#include "hide_fb_foveation.h"
|
||||
static int hide_fb_foveation;
|
||||
static int hide_fb_foveation_vulkan;
|
||||
// hide XR_FB_space_warp: games then render every frame themselves (UE5 Application SpaceWarp flickered on the Frame,
|
||||
// e.g. Into The Radius 2; OVRPort's patch_disable_space_warp doesn't reach UE5's OpenXR plugin)
|
||||
static int hide_space_warp = 0;
|
||||
@@ -113,6 +118,10 @@ static void snap_on_enumerate(XrSwapchain handle, uint32_t count, const XrSwapch
|
||||
static void snap_on_acquire(XrSwapchain handle, uint32_t index);
|
||||
static void snap_end_frame(const XrFrameEndInfo *info);
|
||||
static int frame_balance = 0; // end a still-open frame before the next xrBeginFrame
|
||||
// diagnostics (headless launch tests, GitHub #323): report shouldRender=TRUE from xrWaitFrame. Without a worn headset the
|
||||
// session never becomes VISIBLE, the runtime answers shouldRender=FALSE and engines that honour it (Unreal's OpenXR
|
||||
// plugin) submit no layers at all, so a headless run never exercises the game's real frame submission.
|
||||
static int force_render = 0;
|
||||
static int frame_begins, frame_discarded, frame_ends, frame_balanced; // per pacing period (layer_debug)
|
||||
static int frame_open;
|
||||
static int sc_acquires, sc_waits, sc_releases, sc_wait_fails; // per pacing period (layer_debug) // drop XrCompositionLayerColorScaleBiasKHR (the runtime's color pass)
|
||||
@@ -120,6 +129,7 @@ static int controller_fix = 1;
|
||||
static int swapchain_fix = 1;
|
||||
static int cube_standin = 1; // cube swapchains the runtime refuses: served by the adapter (cube_standin.c)
|
||||
static int rect_clamp = 1;
|
||||
static int action_dedup = 1; // rename duplicate action names in a set (session_fixes.c; GitHub #323)
|
||||
static int pose_consistency = 0; // repeat xrLocateViews queries for one display time get the same poses (GitHub #8) // clamp submitted image rects to their swapchain (SteamVR rejects a 1 px overrun)
|
||||
static int pose_time_fix; // poses asked for at CLOCK_MONOTONIC "now" or far in the past: at XrTime "now" (pose_time.c)
|
||||
static int pose_debug; // diagnostics: requested pose times vs the predicted display time (pose_time.c)
|
||||
@@ -127,6 +137,7 @@ static int layer_fix = 1;
|
||||
static int mutable_fix = 0;
|
||||
static int swap_eyes = 0;
|
||||
static int passthrough_emul = 1;
|
||||
static int alpha_blend_emul = 1; // alpha_blend_vk.c: honour XR_FB_composition_layer_alpha_blend with passthrough
|
||||
static int respace_kick = 0;
|
||||
static int strip_depth = 0;
|
||||
static int flip_quads = 0;
|
||||
@@ -147,6 +158,7 @@ static int sync_guard; // xrSyncActions one at a time with xrPollEvent, pa
|
||||
static int profile_remap = 1; // Meta's newer controller profiles (rejected by the Frame) -> oculus/touch_controller
|
||||
static int proximity_emul; // finger proximity from capacitive touch: 1 thumb, 2 thumb + index (session_fixes.c)
|
||||
static int runtime_has_proximity; // the runtime has XR_FB_touch_controller_proximity itself
|
||||
static int runtime_has_detached_controllers; // the runtime has XR_META_detached_controllers (detached_controllers.c)
|
||||
static int layer_debug; // diagnostics: layers, swapchains, session states, spaces, aim/grip, refresh rates
|
||||
static int input_diag; // diagnostics: controller profiles, bindings, missing functions, failing input calls
|
||||
static int stable_local; // keep every LOCAL space the app creates on the session-start origin
|
||||
@@ -174,10 +186,12 @@ static void read_settings(const char *path) {
|
||||
if (sscanf(line, "foveation_fix=%f", &value) == 1) foveation_fix = value != 0;
|
||||
if (sscanf(line, "foveation_storage_fix=%f", &value) == 1) foveation_storage_fix = value != 0;
|
||||
if (sscanf(line, "foveation_eye=%f", &value) == 1) foveation_eye = value != 0;
|
||||
if (sscanf(line, "hide_fb_foveation=%f", &value) == 1) hide_fb_foveation = value != 0;
|
||||
if (sscanf(line, "hide_space_warp=%f", &value) == 1) hide_space_warp = value != 0;
|
||||
if (sscanf(line, "strip_color_bias=%f", &value) == 1) strip_color_bias = (int)value;
|
||||
if (sscanf(line, "fade_quad=%f", &value) == 1) fade_quad = value > 0 ? (int)value : 0;
|
||||
if (sscanf(line, "frame_balance=%f", &value) == 1) frame_balance = value != 0;
|
||||
if (sscanf(line, "force_render=%f", &value) == 1) force_render = value != 0;
|
||||
if (sscanf(line, "snapshot=%f", &value) == 1) snapshot = value > 0 ? (int)value : 0;
|
||||
if (sscanf(line, "flip_dump=%f", &value) == 1) flip_dump = value > 0 ? (int)value : 0;
|
||||
if (sscanf(line, "gl_error_clear=%f", &value) == 1) gl_error_clear = value != 0;
|
||||
@@ -185,6 +199,7 @@ static void read_settings(const char *path) {
|
||||
if (sscanf(line, "swapchain_fix=%f", &value) == 1) swapchain_fix = value != 0;
|
||||
if (sscanf(line, "cube_standin=%f", &value) == 1) cube_standin = value != 0;
|
||||
if (sscanf(line, "rect_clamp=%f", &value) == 1) rect_clamp = value != 0;
|
||||
if (sscanf(line, "action_dedup=%f", &value) == 1) action_dedup = value != 0;
|
||||
if (sscanf(line, "pose_consistency=%f", &value) == 1) pose_consistency = value != 0;
|
||||
if (sscanf(line, "pose_debug=%f", &value) == 1) pose_debug = value != 0;
|
||||
if (sscanf(line, "pose_time_fix=%f", &value) == 1) pose_time_fix = value != 0;
|
||||
@@ -192,6 +207,7 @@ static void read_settings(const char *path) {
|
||||
if (sscanf(line, "mutable_fix=%f", &value) == 1) mutable_fix = value != 0;
|
||||
if (sscanf(line, "swap_eyes=%f", &value) == 1) swap_eyes = value != 0;
|
||||
if (sscanf(line, "passthrough_emul=%f", &value) == 1) passthrough_emul = value != 0;
|
||||
if (sscanf(line, "alpha_blend_emul=%f", &value) == 1) alpha_blend_emul = value != 0;
|
||||
if (sscanf(line, "respace_kick=%f", &value) == 1) respace_kick = value != 0;
|
||||
if (sscanf(line, "strip_depth=%f", &value) == 1) strip_depth = value != 0;
|
||||
if (sscanf(line, "flip_quads=%f", &value) == 1) flip_quads = value != 0;
|
||||
@@ -272,11 +288,13 @@ static void initialize(void) {
|
||||
if (input_diag) LOG("per-game: input_diag=1 (controller-input diagnostics)");
|
||||
if (proximity_emul) LOG("per-game: proximity_emul=%d (finger proximity from capacitive touch: %s)", proximity_emul,
|
||||
proximity_emul > 1 ? "thumb + index" : "thumb");
|
||||
if (hide_fb_foveation) LOG("per-game: hide_fb_foveation=1 (Quest Vulkan foveation suppressed)");
|
||||
if (hide_space_warp) LOG("per-game: hide_space_warp=1 (XR_FB_space_warp hidden, space warp info removed)");
|
||||
if (strip_color_bias) LOG("per-game: strip_color_bias=%d (layer color scale/bias removed)", strip_color_bias);
|
||||
if (fade_quad) LOG("per-game: fade_quad=%d (colour-scale fades drawn as a black quad%s)", fade_quad,
|
||||
fade_quad > 1 ? "; the layer's own scale removed" : "");
|
||||
if (frame_balance) LOG("per-game: frame_balance=1 (an open frame is ended before the next one begins)");
|
||||
if (force_render) LOG("per-game: force_render=1 (xrWaitFrame reports shouldRender=TRUE; diagnostics)");
|
||||
if (eye_debug || release_wait) LOG("per-game: eye_debug=%d release_wait=%d log_file=%s", eye_debug, release_wait,
|
||||
log_file ? path : "none");
|
||||
if (controller_models && *process && !strchr(process, '/')) render_model_init(process);
|
||||
@@ -307,6 +325,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrCreateInstance(const XrInstanceCreateInfo *info
|
||||
if (!fn) return XR_ERROR_INITIALIZATION_FAILED;
|
||||
if (!info) return XR_ERROR_VALIDATION_FAILURE;
|
||||
|
||||
hide_fb_foveation_vulkan = hide_fb_foveation && fb_instance_uses_vulkan(info);
|
||||
int chained = 0, enabled = 0;
|
||||
for (const XrBaseInStructure *p = (const XrBaseInStructure *)info->next; p; p = p->next)
|
||||
if (p->type == XR_TYPE_INSTANCE_CREATE_INFO_ANDROID_KHR) {
|
||||
@@ -342,6 +361,10 @@ XRAPI_ATTR XrResult XRAPI_CALL xrCreateInstance(const XrInstanceCreateInfo *info
|
||||
int supported = !available; // if we could not enumerate, pass everything through
|
||||
for (uint32_t j = 0; available && j < available_count && !supported; ++j)
|
||||
supported = !strcmp(available[j].extensionName, ext);
|
||||
if (hide_fb_foveation_vulkan && fb_is_foveation_extension(ext)) {
|
||||
LOG("hide_fb_foveation: %s not enabled", ext);
|
||||
continue;
|
||||
}
|
||||
if (hide_space_warp && !strcmp(ext, "XR_FB_space_warp")) {
|
||||
LOG("hide_space_warp: XR_FB_space_warp not enabled");
|
||||
continue;
|
||||
@@ -382,7 +405,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrCreateInstance(const XrInstanceCreateInfo *info
|
||||
if (!requested && offered) { names[kept++] = "XR_FB_display_refresh_rate"; LOG("added XR_FB_display_refresh_rate (refresh_rate)"); }
|
||||
}
|
||||
foveation_eye_enabled = 0;
|
||||
if (foveation_eye && !foveation_fix) {
|
||||
if (foveation_eye && !foveation_fix && !hide_fb_foveation_vulkan) {
|
||||
int fb = 0, config = 0, offered = 0;
|
||||
for (uint32_t i = 0; i < kept; ++i) {
|
||||
fb |= !strcmp(names[i], "XR_FB_foveation");
|
||||
@@ -398,7 +421,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrCreateInstance(const XrInstanceCreateInfo *info
|
||||
}
|
||||
// Adapter-owned video outputs need an explicit full-rate profile even when
|
||||
// the shared injection layer enables foveation for application swapchains.
|
||||
if (surface_emul) {
|
||||
if (surface_emul && !hide_fb_foveation_vulkan) {
|
||||
const char *video_extensions[] = {"XR_FB_foveation", "XR_FB_foveation_configuration",
|
||||
"XR_FB_swapchain_update_state"};
|
||||
for (unsigned e = 0; e < 3; ++e) {
|
||||
@@ -422,6 +445,8 @@ XRAPI_ATTR XrResult XRAPI_CALL xrCreateInstance(const XrInstanceCreateInfo *info
|
||||
for (uint32_t j = 0; available && j < available_count; ++j)
|
||||
if (!strcmp(available[j].extensionName, "XR_FB_composition_layer_image_layout")) runtime_has_image_layout = 1;
|
||||
else if (!strcmp(available[j].extensionName, "XR_FB_touch_controller_proximity")) runtime_has_proximity = 1;
|
||||
else if (!strcmp(available[j].extensionName, "XR_META_detached_controllers"))
|
||||
runtime_has_detached_controllers = 1;
|
||||
// Layer types are only valid if their extension ends up enabled; some apps submit them regardless.
|
||||
int has_equirect = 0, has_equirect2 = 0, has_cylinder = 0, has_cube = 0;
|
||||
for (uint32_t i = 0; i < kept; ++i) {
|
||||
@@ -537,9 +562,18 @@ static int swapchain_size(XrSwapchain handle, uint32_t *w, uint32_t *h) {
|
||||
return found;
|
||||
}
|
||||
|
||||
// Clamp `r` to a w x h image; returns whether it changed.
|
||||
// Clamp `r` to a w x h image; returns whether it changed (2 = it was empty and now covers the whole image).
|
||||
static int clamp_rect(XrRect2Di *r, uint32_t w, uint32_t h) {
|
||||
XrRect2Di c = *r;
|
||||
// An empty rect (BattleTalent's first frames after Unity switched its MSAA level: 0,0 0x0, GitHub #293) is
|
||||
// rejected the same way, and the game stops submitting after two rejections: show the whole image instead.
|
||||
if (c.extent.width <= 0 || c.extent.height <= 0) {
|
||||
if (!w || !h || w > INT32_MAX || h > INT32_MAX) return 0;
|
||||
r->offset.x = r->offset.y = 0;
|
||||
r->extent.width = (int32_t)w;
|
||||
r->extent.height = (int32_t)h;
|
||||
return 2;
|
||||
}
|
||||
if (c.offset.x < 0) { c.extent.width += c.offset.x; c.offset.x = 0; }
|
||||
if (c.offset.y < 0) { c.extent.height += c.offset.y; c.offset.y = 0; }
|
||||
if ((uint32_t)c.offset.x >= w || (uint32_t)c.offset.y >= h) return 0; // nothing sensible to keep: leave it
|
||||
@@ -562,6 +596,7 @@ static void flip_on_create_swapchain(XrSwapchain handle, const XrSwapchainCreate
|
||||
static int flip_wants_transfer(const XrSwapchainCreateInfo *info);
|
||||
static void clear_gl_errors(const char *where);
|
||||
static void flip_on_destroy(XrSwapchain handle);
|
||||
static void ab_on_destroy(XrSwapchain handle);
|
||||
static void emul_on_create_swapchain(XrSwapchain handle, const XrSwapchainCreateInfo *info);
|
||||
static void emul_on_destroy_swapchain(XrSwapchain handle);
|
||||
static int emul_virtual_create(XrSession session, const XrSwapchainCreateInfo *info, XrSwapchain *out);
|
||||
@@ -584,6 +619,7 @@ static int known_swapchain(XrSwapchain handle) {
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrCreateFoveationProfileFB(XrSession session,
|
||||
const XrFoveationProfileCreateInfoFB *info, XrFoveationProfileFB *profile) {
|
||||
if (hide_fb_foveation_vulkan) return XR_ERROR_FEATURE_UNSUPPORTED;
|
||||
PFN_xrCreateFoveationProfileFB fn = (PFN_xrCreateFoveationProfileFB)lookup(active_instance, "xrCreateFoveationProfileFB");
|
||||
if (!fn) return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
if (!info) return XR_ERROR_VALIDATION_FAILURE;
|
||||
@@ -609,6 +645,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrCreateFoveationProfileFB(XrSession session,
|
||||
}
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrGetFoveationEyeTrackedStateMETA(XrSession session, XrFoveationEyeTrackedStateMETA *state) {
|
||||
if (hide_fb_foveation_vulkan) return XR_ERROR_FEATURE_UNSUPPORTED;
|
||||
PFN_xrGetFoveationEyeTrackedStateMETA fn = (PFN_xrGetFoveationEyeTrackedStateMETA)lookup(active_instance, "xrGetFoveationEyeTrackedStateMETA");
|
||||
if (!fn) return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
XrResult result = fn(session, state);
|
||||
@@ -626,11 +663,18 @@ XRAPI_ATTR XrResult XRAPI_CALL xrCreateSwapchain(XrSession session, const XrSwap
|
||||
if (!info) return XR_ERROR_VALIDATION_FAILURE;
|
||||
XrSwapchainCreateInfo fixed = *info;
|
||||
FbStorageNode storage_nodes[16];
|
||||
if (!foveation_fix && foveation_storage_fix) {
|
||||
// Also with foveation_fix: Valve's injected FDM (device.foveation) stores a SUBSAMPLED image's coarse bins
|
||||
// unscaled, and the compositor reads them as garbage around the sharp area (GitHub #303, Medieval Dynasty).
|
||||
if (!hide_fb_foveation_vulkan && foveation_storage_fix) {
|
||||
int changed = fb_foveation_storage(&fixed, storage_nodes);
|
||||
LOG("foveation_storage_fix: shared allocation %s", changed > 0 ? "SUBSAMPLED cleared" :
|
||||
changed < 0 ? "unchanged (unsupported chain prefix)" : "already ordinary or no META node");
|
||||
}
|
||||
if (hide_fb_foveation_vulkan) {
|
||||
int stripped = fb_hide_swapchain_foveation(&fixed, storage_nodes);
|
||||
if (stripped < 0) return XR_ERROR_VALIDATION_FAILURE;
|
||||
if (stripped) LOG("hide_fb_foveation: removed swapchain foveation create info");
|
||||
}
|
||||
if (foveation_fix) {
|
||||
// Drop leading foveation structs; the chain is const so only a prefix can be skipped.
|
||||
const XrBaseInStructure *p = (const XrBaseInStructure *)fixed.next;
|
||||
@@ -703,6 +747,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrDestroySwapchain(XrSwapchain swapchain) {
|
||||
surf_scene_destroy(swapchain);
|
||||
forget_swapchain(swapchain);
|
||||
surf_on_destroy(swapchain);
|
||||
ab_on_destroy(swapchain);
|
||||
flip_on_destroy(swapchain);
|
||||
emul_on_destroy_swapchain(swapchain);
|
||||
snap_on_destroy(swapchain);
|
||||
@@ -884,6 +929,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrGetSystemProperties(XrInstance instance, XrSyst
|
||||
}
|
||||
|
||||
#include "flip_vk.c"
|
||||
#include "alpha_blend_vk.c"
|
||||
#include "pose_time.c"
|
||||
|
||||
// XR_KHR_convert_timespec_time for runtimes that lack it (Frame): XrTime is derived from the monotonic clock
|
||||
@@ -1223,12 +1269,15 @@ XRAPI_ATTR XrResult XRAPI_CALL xrApplyHapticFeedback(XrSession session, const Xr
|
||||
return result;
|
||||
}
|
||||
|
||||
#include "hide_foveation_images.h"
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateSwapchainImages(XrSwapchain swapchain, uint32_t capacity, uint32_t *count,
|
||||
XrSwapchainImageBaseHeader *images) {
|
||||
PFN_xrEnumerateSwapchainImages fn = (PFN_xrEnumerateSwapchainImages)lookup(active_instance, "xrEnumerateSwapchainImages");
|
||||
if (!fn) return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
if (is_standin(swapchain)) return standin_enumerate(swapchain, capacity, count, images);
|
||||
XrResult result = equirect_emul && emul_is_virtual(swapchain) ? emul_virtual_enumerate(swapchain, capacity, count, images)
|
||||
: hide_fb_foveation_vulkan ? fb_hide_foveation_images(fn, swapchain, capacity, count, images)
|
||||
: fn(swapchain, capacity, count, images);
|
||||
if (XR_SUCCEEDED(result) && images && capacity && count) {
|
||||
flip_on_enumerate_images(swapchain, *count, images);
|
||||
@@ -1414,6 +1463,16 @@ XRAPI_ATTR XrResult XRAPI_CALL xrWaitFrame(XrSession session, const XrFrameWaitI
|
||||
pose_time_display(state->predictedDisplayTime);
|
||||
pose_time_note_offset((long long)(state->predictedDisplayTime - mono));
|
||||
if (layer_debug) debug_aim_vs_grip(state->predictedDisplayTime);
|
||||
// shouldRender changes (a few): a game that submits no layers while the runtime says not to render shows
|
||||
// nothing, e.g. Unreal's OpenXR plugin in a headless launch test
|
||||
static int last_should_render = -1, should_render_logged;
|
||||
if ((int)state->shouldRender != last_should_render && should_render_logged < 12) {
|
||||
++should_render_logged;
|
||||
LOG("xrWaitFrame: shouldRender=%d period=%.2f ms%s", (int)state->shouldRender,
|
||||
state->predictedDisplayPeriod / 1e6, force_render && !state->shouldRender ? " (force_render: reported as 1)" : "");
|
||||
}
|
||||
last_should_render = (int)state->shouldRender;
|
||||
if (force_render) state->shouldRender = XR_TRUE;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -1630,8 +1689,14 @@ XRAPI_ATTR XrResult XRAPI_CALL xrEndFrame(XrSession session, const XrFrameEndInf
|
||||
q->radius, q->subImage.imageRect.offset.x, q->subImage.imageRect.offset.y,
|
||||
q->subImage.imageRect.extent.width, q->subImage.imageRect.extent.height);
|
||||
}
|
||||
for (const XrBaseInStructure *n = (const XrBaseInStructure *)l->next; n && used < sizeof(now) - 32; n = n->next)
|
||||
for (const XrBaseInStructure *n = (const XrBaseInStructure *)l->next; n && used < sizeof(now) - 48; n = n->next) {
|
||||
used += (size_t)snprintf(now + used, sizeof(now) - used, " n=%d", n->type);
|
||||
if (n->type == XR_TYPE_COMPOSITION_LAYER_ALPHA_BLEND_FB) { // src/dst factors: colour, then alpha
|
||||
const XrCompositionLayerAlphaBlendFB *ab = (const XrCompositionLayerAlphaBlendFB *)n;
|
||||
used += (size_t)snprintf(now + used, sizeof(now) - used, "(%d,%d/%d,%d)", ab->srcFactorColor,
|
||||
ab->dstFactorColor, ab->srcFactorAlpha, ab->dstFactorAlpha);
|
||||
}
|
||||
}
|
||||
used += (size_t)snprintf(now + used, sizeof(now) - used, "]");
|
||||
}
|
||||
if (strcmp(now, last)) {
|
||||
@@ -1759,6 +1824,10 @@ XRAPI_ATTR XrResult XRAPI_CALL xrEndFrame(XrSession session, const XrFrameEndInf
|
||||
projections[count] = *(const XrCompositionLayerProjection *)layer;
|
||||
projections[count].layerFlags |= XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT |
|
||||
XR_COMPOSITION_LAYER_UNPREMULTIPLIED_ALPHA_BIT;
|
||||
// the game's XR_FB_composition_layer_alpha_blend factors (ignored by the Frame's runtime), e.g. Unreal's
|
||||
// inverted scene alpha: the camera showed where the game drew and black where it didn't (GitHub #329)
|
||||
if (alpha_blend_emul && alpha_blend_apply(&projections[count]) == 2)
|
||||
projections[count].layerFlags &= ~(XrCompositionLayerFlags)XR_COMPOSITION_LAYER_UNPREMULTIPLIED_ALPHA_BIT;
|
||||
layer = (const XrCompositionLayerBaseHeader *)&projections[count];
|
||||
}
|
||||
if (strip_depth && layer->type == XR_TYPE_COMPOSITION_LAYER_PROJECTION &&
|
||||
@@ -1878,9 +1947,14 @@ XRAPI_ATTR XrResult XRAPI_CALL xrEndFrame(XrSession session, const XrFrameEndInf
|
||||
if (layer != (const XrCompositionLayerBaseHeader *)&projections[count]) projections[count] = *cur;
|
||||
if (projections[count].views != views[count])
|
||||
for (uint32_t v = 0; v < cur->viewCount; ++v) views[count][v] = cur->views[v];
|
||||
for (uint32_t v = 0; v < cur->viewCount; ++v)
|
||||
if (swapchain_size(views[count][v].subImage.swapchain, &w, &h) &&
|
||||
clamp_rect(&views[count][v].subImage.imageRect, w, h)) {
|
||||
for (uint32_t v = 0; v < cur->viewCount; ++v) {
|
||||
int how = swapchain_size(views[count][v].subImage.swapchain, &w, &h)
|
||||
? clamp_rect(&views[count][v].subImage.imageRect, w, h) : 0;
|
||||
if (how == 2) {
|
||||
static int logged_empty;
|
||||
if (logged_empty++ < 3)
|
||||
LOG("rect_clamp: view %u empty image rect -> full swapchain %ux%u", v, w, h);
|
||||
} else if (how) {
|
||||
static int logged;
|
||||
if (logged++ < 3)
|
||||
LOG("rect_clamp: view %u image rect clamped to %dx%d at %d,%d (swapchain %ux%u)", v,
|
||||
@@ -1889,6 +1963,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrEndFrame(XrSession session, const XrFrameEndInf
|
||||
views[count][v].subImage.imageRect.offset.x,
|
||||
views[count][v].subImage.imageRect.offset.y, w, h);
|
||||
}
|
||||
}
|
||||
projections[count].views = views[count];
|
||||
layer = (const XrCompositionLayerBaseHeader *)&projections[count];
|
||||
++swapped;
|
||||
@@ -1896,13 +1971,17 @@ XRAPI_ATTR XrResult XRAPI_CALL xrEndFrame(XrSession session, const XrFrameEndInf
|
||||
} else if (layer->type == XR_TYPE_COMPOSITION_LAYER_QUAD) {
|
||||
const XrCompositionLayerQuad *q = (const XrCompositionLayerQuad *)layer;
|
||||
XrRect2Di r = q->subImage.imageRect;
|
||||
if (swapchain_size(q->subImage.swapchain, &w, &h) && clamp_rect(&r, w, h)) {
|
||||
int how = swapchain_size(q->subImage.swapchain, &w, &h) ? clamp_rect(&r, w, h) : 0;
|
||||
if (how) {
|
||||
if (layer != (const XrCompositionLayerBaseHeader *)&quads[count]) quads[count] = *q;
|
||||
quads[count].subImage.imageRect = r;
|
||||
layer = (const XrCompositionLayerBaseHeader *)&quads[count];
|
||||
++swapped;
|
||||
static int logged;
|
||||
if (!logged++) LOG("rect_clamp: quad image rect clamped (swapchain %ux%u)", w, h);
|
||||
static int logged, logged_empty;
|
||||
if (how == 2 && logged_empty++ < 3)
|
||||
LOG("rect_clamp: quad empty image rect -> full swapchain %ux%u", w, h);
|
||||
else if (how == 1 && !logged++)
|
||||
LOG("rect_clamp: quad image rect clamped (swapchain %ux%u)", w, h);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2004,7 +2083,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrGetCurrentInteractionProfile(XrSession session,
|
||||
PFN_xrGetCurrentInteractionProfile fn =
|
||||
(PFN_xrGetCurrentInteractionProfile)lookup(active_instance, "xrGetCurrentInteractionProfile");
|
||||
if (!fn) return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
XrResult result = fn(session, user, state);
|
||||
XrResult result = detached_current_profile(user, state, fn(session, user, state));
|
||||
if (input_diag && XR_SUCCEEDED(result) && state) input_diag_current_profile(user, state->interactionProfile);
|
||||
if (layer_debug && active_instance) { // which device each hand has, as the runtime reports it
|
||||
PFN_xrPathToString str = (PFN_xrPathToString)lookup(active_instance, "xrPathToString");
|
||||
@@ -2018,16 +2097,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrGetCurrentInteractionProfile(XrSession session,
|
||||
static int logged;
|
||||
if (logged++ < 40) LOG("layer_debug: interaction profile of %s: %s (result %d)", who, what, result);
|
||||
}
|
||||
if (!controller_fix || XR_FAILED(result) || !state || !state->interactionProfile || !active_instance)
|
||||
return result;
|
||||
PFN_xrPathToString to_string = (PFN_xrPathToString)lookup(active_instance, "xrPathToString");
|
||||
PFN_xrStringToPath to_path = (PFN_xrStringToPath)lookup(active_instance, "xrStringToPath");
|
||||
char name[XR_MAX_PATH_LENGTH];
|
||||
uint32_t size = 0;
|
||||
if (to_string && to_path &&
|
||||
XR_SUCCEEDED(to_string(active_instance, state->interactionProfile, sizeof(name), &size, name)) &&
|
||||
(strstr(name, "/valve/") || strstr(name, "/khr/generic_controller")))
|
||||
to_path(active_instance, "/interaction_profiles/oculus/touch_controller", &state->interactionProfile);
|
||||
if (XR_SUCCEEDED(result) && state) current_profile_fix(user, state);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -2037,7 +2107,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateInstanceExtensionProperties(const char
|
||||
XR_NULL_HANDLE, "xrEnumerateInstanceExtensionProperties");
|
||||
if (!fn) return XR_ERROR_INITIALIZATION_FAILED;
|
||||
if (!count) return XR_ERROR_VALIDATION_FAILURE;
|
||||
if ((!foveation_fix && !hide_space_warp && !passthrough_emul && !scene_emul && !controller_models) || layer)
|
||||
if ((!foveation_fix && !hide_fb_foveation && !hide_space_warp && !passthrough_emul && !scene_emul && !controller_models) || layer)
|
||||
return fn(layer, capacity, count, properties);
|
||||
|
||||
uint32_t total = 0;
|
||||
@@ -2053,6 +2123,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateInstanceExtensionProperties(const char
|
||||
for (uint32_t i = 0; i < total; ++i) {
|
||||
if (!strcmp(all[i].extensionName, "XR_FB_passthrough")) runtime_has_fb_passthrough = 1;
|
||||
if (!strcmp(all[i].extensionName, XR_FB_RENDER_MODEL_EXTENSION_NAME)) runtime_has_render_model = 1;
|
||||
if (hide_fb_foveation && fb_is_foveation_extension(all[i].extensionName)) continue;
|
||||
if (foveation_fix && strstr(all[i].extensionName, "foveation")) continue;
|
||||
if (hide_space_warp && !strcmp(all[i].extensionName, "XR_FB_space_warp")) continue;
|
||||
if (properties && kept < capacity) properties[kept] = all[i];
|
||||
@@ -2092,9 +2163,29 @@ XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateApiLayerProperties(uint32_t capacity,
|
||||
return fn ? fn(capacity, count, properties) : XR_ERROR_INITIALIZATION_FAILED;
|
||||
}
|
||||
|
||||
static XRAPI_ATTR int XRAPI_CALL framebridge_hide_fb_foveation(void) {
|
||||
pthread_once(&init_once, initialize);
|
||||
return hide_fb_foveation;
|
||||
}
|
||||
|
||||
static XRAPI_ATTR XrResult XRAPI_CALL fb_hide_update_swapchain(XrSwapchain swapchain, const XrSwapchainStateBaseHeaderFB *state) {
|
||||
if (state && state->type == XR_TYPE_SWAPCHAIN_STATE_FOVEATION_FB) {
|
||||
LOG("hide_fb_foveation: refused foveation profile update");
|
||||
return XR_ERROR_FEATURE_UNSUPPORTED;
|
||||
}
|
||||
PFN_xrUpdateSwapchainFB fn = (PFN_xrUpdateSwapchainFB)lookup(active_instance, "xrUpdateSwapchainFB");
|
||||
return fn ? fn(swapchain, state) : XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
}
|
||||
|
||||
// For native/xrshim: emulated functions that overport's dispatcher doesn't know (it never asks us for them).
|
||||
__attribute__((visibility("default"))) PFN_xrVoidFunction framebridge_extension_proc(const char *name) {
|
||||
pthread_once(&init_once, initialize);
|
||||
if (name && !strcmp(name, "framebridge_hide_fb_foveation"))
|
||||
return (PFN_xrVoidFunction)framebridge_hide_fb_foveation;
|
||||
if (hide_fb_foveation_vulkan && name) {
|
||||
if (!strcmp(name, "xrCreateFoveationProfileFB")) return (PFN_xrVoidFunction)xrCreateFoveationProfileFB;
|
||||
if (!strcmp(name, "xrUpdateSwapchainFB")) return (PFN_xrVoidFunction)fb_hide_update_swapchain;
|
||||
}
|
||||
if (name && !foveation_fix && (foveation_storage_fix || foveation_eye)) {
|
||||
if (!strcmp(name, "xrCreateFoveationProfileFB")) return (PFN_xrVoidFunction)xrCreateFoveationProfileFB;
|
||||
if (!strcmp(name, "xrGetFoveationEyeTrackedStateMETA")) return (PFN_xrVoidFunction)xrGetFoveationEyeTrackedStateMETA;
|
||||
@@ -2135,6 +2226,10 @@ XRAPI_ATTR XrResult XRAPI_CALL xrGetInstanceProcAddr(XrInstance instance, const
|
||||
if (!emulated) emulated = render_model_emulation(name);
|
||||
if (!emulated && emulate_scene && !strcmp(name, "xrLocateSpacesKHR")) emulated = (PFN_xrVoidFunction)emu_locate_spaces_khr;
|
||||
if (emulated) { *function = emulated; return XR_SUCCESS; }
|
||||
if (hide_fb_foveation_vulkan && !strcmp(name, "xrUpdateSwapchainFB")) {
|
||||
*function = (PFN_xrVoidFunction)fb_hide_update_swapchain;
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
HOOK(xrGetSystemProperties)
|
||||
HOOK(xrApplyHapticFeedback)
|
||||
HOOK(xrCreateReferenceSpace)
|
||||
@@ -2177,6 +2272,9 @@ XRAPI_ATTR XrResult XRAPI_CALL xrGetInstanceProcAddr(XrInstance instance, const
|
||||
if (layer_debug || refresh_rate > 0) {
|
||||
HOOK_AS(xrRequestDisplayRefreshRateFB, hook_request_refresh_rate)
|
||||
}
|
||||
// The Frame's runtime has no XR_FB_display_refresh_rate, but OVRPort's dispatcher offers it to the game and answers
|
||||
// 0 Hz without it: the measured rate instead (the runtime's own answer when it has one).
|
||||
if (instance != XR_NULL_HANDLE) HOOK_AS(xrGetDisplayRefreshRateFB, hook_get_refresh_rate)
|
||||
if (surface_emul) HOOK_AS(xrCreateSwapchainAndroidSurfaceKHR, hook_xrCreateSwapchainAndroidSurfaceKHR)
|
||||
if (eye_debug || release_wait) HOOK_AS(xrReleaseSwapchainImage, eye_hook_xrReleaseSwapchainImage)
|
||||
if (layer_debug || cube_standin) { // counters + cube stand-ins; every other wait/release hook above takes precedence
|
||||
@@ -2199,7 +2297,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrGetInstanceProcAddr(XrInstance instance, const
|
||||
if (layer_debug) HOOK_AS(xrGetActionStateBoolean, hook_xrGetActionStateBoolean)
|
||||
if (layer_debug || aim_correction_on() || profile_remap || input_diag || proximity_emul)
|
||||
HOOK_AS(xrSuggestInteractionProfileBindings, hook_xrSuggestInteractionProfileBindings)
|
||||
if (proximity_emul) HOOK_AS(xrCreateAction, hook_xrCreateAction)
|
||||
if (action_dedup || proximity_emul || profile_remap || input_diag) HOOK_AS(xrCreateAction, hook_xrCreateAction)
|
||||
if (layer_debug || aim_correction_on()) {
|
||||
HOOK_AS(xrCreateActionSpace, hook_xrCreateActionSpace)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Shared by the adapter and its shim above OVRPort's synthetic extension list.
|
||||
static int fb_is_foveation_extension(const char *name) {
|
||||
return !strcmp(name, "XR_FB_foveation_vulkan") || !strcmp(name, "XR_FB_foveation") ||
|
||||
!strcmp(name, "XR_FB_foveation_configuration") || !strcmp(name, "XR_META_foveation_eye_tracked");
|
||||
}
|
||||
|
||||
static int fb_instance_uses_vulkan(const XrInstanceCreateInfo *info) {
|
||||
for (uint32_t i = 0; info && i < info->enabledExtensionCount; ++i)
|
||||
if (!strcmp(info->enabledExtensionNames[i], "XR_KHR_vulkan_enable") ||
|
||||
!strcmp(info->enabledExtensionNames[i], "XR_KHR_vulkan_enable2")) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline XrResult fb_hide_enumerate(PFN_xrEnumerateInstanceExtensionProperties fn, const char *layer,
|
||||
uint32_t capacity, uint32_t *count, XrExtensionProperties *properties) {
|
||||
if (!count || (capacity && !properties)) return XR_ERROR_VALIDATION_FAILURE;
|
||||
uint32_t total = 0;
|
||||
XrResult r = fn(layer, 0, &total, NULL);
|
||||
if (XR_FAILED(r)) return r;
|
||||
XrExtensionProperties *all = calloc(total ? total : 1, sizeof(*all));
|
||||
if (!all) return XR_ERROR_OUT_OF_MEMORY;
|
||||
for (uint32_t i = 0; i < total; ++i) all[i].type = XR_TYPE_EXTENSION_PROPERTIES;
|
||||
r = fn(layer, total, &total, all);
|
||||
if (XR_SUCCEEDED(r)) {
|
||||
uint32_t kept = 0;
|
||||
for (uint32_t i = 0; i < total; ++i) {
|
||||
if (fb_is_foveation_extension(all[i].extensionName)) continue;
|
||||
if (kept < capacity) properties[kept] = all[i];
|
||||
++kept;
|
||||
}
|
||||
*count = kept;
|
||||
if (capacity && capacity < kept) r = XR_ERROR_SIZE_INSUFFICIENT;
|
||||
}
|
||||
free(all);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline XrResult fb_hide_create_instance(PFN_xrCreateInstance fn, const XrInstanceCreateInfo *info,
|
||||
XrInstance *instance) {
|
||||
if (!info) return XR_ERROR_VALIDATION_FAILURE;
|
||||
if (!fb_instance_uses_vulkan(info)) return fn(info, instance);
|
||||
const char **names = calloc(info->enabledExtensionCount ? info->enabledExtensionCount : 1, sizeof(*names));
|
||||
if (!names) return XR_ERROR_OUT_OF_MEMORY;
|
||||
XrInstanceCreateInfo fixed = *info;
|
||||
fixed.enabledExtensionCount = 0;
|
||||
fixed.enabledExtensionNames = names;
|
||||
for (uint32_t i = 0; i < info->enabledExtensionCount; ++i)
|
||||
if (!fb_is_foveation_extension(info->enabledExtensionNames[i]))
|
||||
names[fixed.enabledExtensionCount++] = info->enabledExtensionNames[i];
|
||||
XrResult r = fn(&fixed, instance);
|
||||
free(names);
|
||||
return r;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Output chains are writable. Unlink FB nodes during enumeration and restore every
|
||||
// app-owned link on both success and failure; preserve unrelated output structures.
|
||||
static XrResult fb_hide_foveation_images(PFN_xrEnumerateSwapchainImages fn, XrSwapchain swapchain,
|
||||
uint32_t capacity, uint32_t *count, XrSwapchainImageBaseHeader *images) {
|
||||
if (!images || !capacity || images->type != XR_TYPE_SWAPCHAIN_IMAGE_VULKAN_KHR)
|
||||
return fn(swapchain, capacity, count, images);
|
||||
XrSwapchainImageVulkanKHR *vk_images = (void *)images;
|
||||
size_t total = 0;
|
||||
for (uint32_t i = 0; i < capacity; ++i)
|
||||
for (XrBaseOutStructure *p = vk_images[i].next; p; p = p->next)
|
||||
total += p->type == XR_TYPE_SWAPCHAIN_IMAGE_FOVEATION_VULKAN_FB;
|
||||
struct FbImageLink { XrBaseOutStructure *parent, *node; };
|
||||
struct FbImageLink *links = calloc(total ? total : 1, sizeof(*links));
|
||||
if (!links) return XR_ERROR_OUT_OF_MEMORY;
|
||||
size_t n = 0;
|
||||
for (uint32_t i = 0; i < capacity; ++i) {
|
||||
XrBaseOutStructure *parent = (void *)&vk_images[i];
|
||||
while (parent->next) {
|
||||
XrBaseOutStructure *p = parent->next;
|
||||
if (p->type == XR_TYPE_SWAPCHAIN_IMAGE_FOVEATION_VULKAN_FB) {
|
||||
links[n++] = (struct FbImageLink){parent, p};
|
||||
parent->next = p->next;
|
||||
} else parent = p;
|
||||
}
|
||||
}
|
||||
XrResult result = fn(swapchain, capacity, count, images);
|
||||
while (n) { --n; links[n].parent->next = links[n].node; }
|
||||
free(links);
|
||||
if (total) LOG("hide_fb_foveation: removed %zu Vulkan foveation image node(s)", total);
|
||||
return result;
|
||||
}
|
||||
@@ -107,8 +107,6 @@ static const char *diag_perf_detail(XrPerfSettingsDomainEXT domain, XrPerfSettin
|
||||
}
|
||||
DIAG_CHECKED(xrStringToPath, (XrInstance instance, const char *path, XrPath *out), (instance, path, out),
|
||||
diag_name_detail(path))
|
||||
DIAG_CHECKED(xrCreateAction, (XrActionSet set, const XrActionCreateInfo *info, XrAction *action), (set, info, action),
|
||||
diag_name_detail(info ? info->actionName : NULL))
|
||||
DIAG_CHECKED(xrAttachSessionActionSets, (XrSession session, const XrSessionActionSetsAttachInfo *info),
|
||||
(session, info), NULL)
|
||||
DIAG_CHECKED(xrPerfSettingsSetPerformanceLevelEXT,
|
||||
@@ -116,11 +114,46 @@ DIAG_CHECKED(xrPerfSettingsSetPerformanceLevelEXT,
|
||||
(session, domain, level), diag_perf_detail(domain, level))
|
||||
#undef DIAG_CHECKED
|
||||
|
||||
// Every action set and action the game creates, with its localized name: SteamVR turns them into an input manifest and
|
||||
// drops a game whose manifest it can't load ("SetXrInputConfig failed. Failed to load manifest" in vrserver.txt; the
|
||||
// app then counts as exited: home environment while the game keeps running, GitHub #323). Bytes outside printable
|
||||
// ASCII and the JSON specials " and \ are written as \xNN.
|
||||
static const char *diag_escaped(const char *in, char *out, size_t size) {
|
||||
size_t used = 0;
|
||||
for (const unsigned char *c = (const unsigned char *)(in ? in : "(null)"); *c && used + 5 < size; ++c) {
|
||||
int special = *c < 0x20 || *c > 0x7e || *c == '"' || *c == '\\';
|
||||
used += (size_t)(special ? snprintf(out + used, size - used, "\\x%02x", *c)
|
||||
: snprintf(out + used, size - used, "%c", *c));
|
||||
}
|
||||
out[used] = 0;
|
||||
return out;
|
||||
}
|
||||
static XRAPI_ATTR XrResult XRAPI_CALL diag_xrCreateActionSet(XrInstance instance, const XrActionSetCreateInfo *info,
|
||||
XrActionSet *set) {
|
||||
PFN_xrCreateActionSet fn = (PFN_xrCreateActionSet)lookup(instance, "xrCreateActionSet");
|
||||
if (!fn) return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
XrResult result = fn(instance, info, set);
|
||||
char a[XR_MAX_ACTION_SET_NAME_SIZE * 4 + 8], b[XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE * 4 + 8];
|
||||
if (info)
|
||||
LOG("input_diag: action set \"%s\" (\"%s\") priority %u -> %d", diag_escaped(info->actionSetName, a, sizeof(a)),
|
||||
diag_escaped(info->localizedActionSetName, b, sizeof(b)), info->priority, (int)result);
|
||||
return result;
|
||||
}
|
||||
// Called by session_fixes.c's hook_xrCreateAction (hooked whenever input_diag is on), with the names it created.
|
||||
static void diag_log_action(const XrActionCreateInfo *info, XrResult result) {
|
||||
char a[XR_MAX_ACTION_NAME_SIZE * 4 + 8], b[XR_MAX_LOCALIZED_ACTION_NAME_SIZE * 4 + 8];
|
||||
if (info)
|
||||
LOG("input_diag: action \"%s\" (\"%s\") type %d, %u subaction path(s) -> %d",
|
||||
diag_escaped(info->actionName, a, sizeof(a)), diag_escaped(info->localizedActionName, b, sizeof(b)),
|
||||
(int)info->actionType, info->countSubactionPaths, (int)result);
|
||||
if (XR_FAILED(result)) diag_call_failed("xrCreateAction", result, diag_name_detail(info ? info->actionName : NULL));
|
||||
}
|
||||
|
||||
// xrGetInstanceProcAddr: our wrapper for `name`, NULL if it isn't one of ours.
|
||||
static PFN_xrVoidFunction input_diag_hook(const char *name) {
|
||||
#define DIAG(fn) if (!strcmp(name, #fn)) return (PFN_xrVoidFunction)diag_##fn;
|
||||
DIAG(xrStringToPath)
|
||||
DIAG(xrCreateAction)
|
||||
DIAG(xrCreateActionSet)
|
||||
DIAG(xrAttachSessionActionSets)
|
||||
DIAG(xrPerfSettingsSetPerformanceLevelEXT)
|
||||
#undef DIAG
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Included by session_fixes.c (after TOUCH_PROFILE and app_suggested_touch): what xrGetCurrentInteractionProfile
|
||||
// tells the game about each hand. Uses controller_fix, profile_remap, active_instance, lookup and LOG.
|
||||
// * controller_fix: SteamVR's own profiles (valve/..., khr/generic_controller) are reported as oculus/touch_controller,
|
||||
// the profile Quest games have bindings for.
|
||||
// * profile_remap: when the game suggested bindings only for one of Meta's newer profiles (Touch Plus/Pro) and
|
||||
// hook_xrSuggestInteractionProfileBindings suggested them again for Touch, the runtime reports
|
||||
// oculus/touch_controller, a profile the game never suggested. Unity's OpenXR plugin creates its input devices by
|
||||
// the reported profile, finds none for Touch and leaves the controllers unconnected: hands lying at the play-space
|
||||
// origin on the floor, no buttons (e.g. Hotel Infinity, GitHub #327). Such a hand is reported with the game's own
|
||||
// profile instead (the last one remapped: the Touch bindings the runtime uses are that profile's).
|
||||
|
||||
static char remapped_profile[XR_MAX_PATH_LENGTH]; // set by hook_xrSuggestInteractionProfileBindings
|
||||
|
||||
static void current_profile_fix(XrPath user, XrInteractionProfileState *state) {
|
||||
if ((!controller_fix && !profile_remap) || !state->interactionProfile || !active_instance) return;
|
||||
PFN_xrPathToString to_string = (PFN_xrPathToString)lookup(active_instance, "xrPathToString");
|
||||
PFN_xrStringToPath to_path = (PFN_xrStringToPath)lookup(active_instance, "xrStringToPath");
|
||||
char name[XR_MAX_PATH_LENGTH];
|
||||
uint32_t size = 0;
|
||||
if (!to_string || !to_path ||
|
||||
XR_FAILED(to_string(active_instance, state->interactionProfile, sizeof(name), &size, name)))
|
||||
return;
|
||||
int touch = !strcmp(name, TOUCH_PROFILE);
|
||||
if (controller_fix && (strstr(name, "/valve/") || strstr(name, "/khr/generic_controller")) &&
|
||||
XR_SUCCEEDED(to_path(active_instance, TOUCH_PROFILE, &state->interactionProfile)))
|
||||
touch = 1;
|
||||
if (!touch || !profile_remap || !*remapped_profile || app_suggested_touch ||
|
||||
XR_FAILED(to_path(active_instance, remapped_profile, &state->interactionProfile)))
|
||||
return;
|
||||
static int logged;
|
||||
if (logged++ < 4) {
|
||||
char who[XR_MAX_PATH_LENGTH] = "?";
|
||||
to_string(active_instance, user, sizeof(who), &size, who);
|
||||
LOG("profile_remap: %s reported as %s (the app's profile) instead of oculus/touch_controller", who,
|
||||
remapped_profile + strlen("/interaction_profiles/"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Display refresh rate for xrGetDisplayRefreshRateFB when the runtime doesn't give one (session_fixes.c). Pure, so the
|
||||
// host test (tests/fixtures/src/refresh_rate_test.c) can check it.
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
// The rate the frame timing shows (1 / predictedDisplayPeriod of the last xrWaitFrame, whole Hz), else the
|
||||
// refresh_rate setting, else 72 Hz (the Frame's rate for Android apps).
|
||||
static inline float fb_refresh_rate(int64_t display_period_ns, float setting) {
|
||||
if (display_period_ns > 0) {
|
||||
double hz = 1e9 / (double)display_period_ns;
|
||||
if (hz >= 30.0 && hz <= 240.0) return (float)(int)(hz + 0.5);
|
||||
}
|
||||
return setting > 0 ? setting : 72.0f;
|
||||
}
|
||||
@@ -9,6 +9,7 @@
|
||||
// * aim_pitch / aim_yaw / aim_forward: correct the aim pose of controllers (pointer rays) by a fixed offset;
|
||||
// * refresh_rate: display refresh rate requested at session start (and instead of the app's own requests).
|
||||
#include "layer_math.h"
|
||||
#include "refresh_rate.h"
|
||||
|
||||
static void emul_on_begin_session(const XrSessionBeginInfo *info); // layer_emul_gl.c
|
||||
|
||||
@@ -296,6 +297,8 @@ static const char *const TOUCH_LEFT[] = {"input/x/click", "input/x/touch", "inpu
|
||||
static const char *const TOUCH_RIGHT[] = {"input/a/click", "input/a/touch", "input/b/click", "input/b/touch",
|
||||
"input/system/click"};
|
||||
static int app_suggested_touch;
|
||||
#include "profile_report.c" // remapped_profile, current_profile_fix (xrGetCurrentInteractionProfile)
|
||||
#include "detached_controllers.c" // detached controllers' paths on a runtime without them
|
||||
|
||||
static int in_list(const char *s, const char *const *list, size_t n) {
|
||||
for (size_t i = 0; i < n; ++i)
|
||||
@@ -328,12 +331,70 @@ static int touch_has(const char *path) {
|
||||
// rest touched; index (proximity_emul=2) = trigger touched. Only when the runtime lacks the extension itself.
|
||||
static XrAction thumb_proximity_action, trigger_proximity_action;
|
||||
|
||||
// ---------------------------------------------------------------- duplicate action names (action_dedup)
|
||||
// OpenXR requires action names and localized names to be unique within an action set (XR_ERROR_NAME_DUPLICATED), but
|
||||
// the Frame's runtime accepts duplicates and then can't load the input manifest it builds from them: vrserver logs
|
||||
// "SetXrInputConfig failed. Failed to load manifest", drops the app's connection and treats it as exited, so the
|
||||
// headset goes back to the home environment while the game keeps running with sound (GitHub #323, Scared By Squares:
|
||||
// Unreal's OpenXR plugin creates "turn" twice, from an action mapping and an axis mapping of the same name). The
|
||||
// game only uses the handles, so a later duplicate is created under a free name ("turn_2", "Turn 2").
|
||||
#include "action_names.h"
|
||||
#define DEDUP_MAX 512
|
||||
static struct { XrActionSet set; char name[XR_MAX_ACTION_NAME_SIZE]; char localized[XR_MAX_LOCALIZED_ACTION_NAME_SIZE]; }
|
||||
dedup_seen[DEDUP_MAX];
|
||||
static int dedup_count;
|
||||
static pthread_mutex_t dedup_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
static int dedup_taken(void *ctx, const char *name, const char *localized) { // caller holds dedup_lock
|
||||
XrActionSet set = *(XrActionSet *)ctx;
|
||||
for (int i = 0; i < dedup_count; ++i)
|
||||
if (dedup_seen[i].set == set && (!strcmp(dedup_seen[i].name, name) || !strcmp(dedup_seen[i].localized, localized)))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Fills `out` (a copy of `info`) with free names when `info`'s are taken in `set`; 1 if it did.
|
||||
static int dedup_rename(XrActionSet set, const XrActionCreateInfo *info, XrActionCreateInfo *out,
|
||||
char name[XR_MAX_ACTION_NAME_SIZE], char localized[XR_MAX_LOCALIZED_ACTION_NAME_SIZE]) {
|
||||
if (!action_unique_names(info->actionName, info->localizedActionName, dedup_taken, &set, name,
|
||||
XR_MAX_ACTION_NAME_SIZE, localized, XR_MAX_LOCALIZED_ACTION_NAME_SIZE))
|
||||
return 0;
|
||||
*out = *info;
|
||||
memcpy(out->actionName, name, XR_MAX_ACTION_NAME_SIZE);
|
||||
memcpy(out->localizedActionName, localized, XR_MAX_LOCALIZED_ACTION_NAME_SIZE);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void dedup_note(XrActionSet set, const XrActionCreateInfo *info) { // caller holds dedup_lock
|
||||
if (dedup_count >= DEDUP_MAX) return;
|
||||
dedup_seen[dedup_count].set = set;
|
||||
snprintf(dedup_seen[dedup_count].name, XR_MAX_ACTION_NAME_SIZE, "%s", info->actionName);
|
||||
snprintf(dedup_seen[dedup_count].localized, XR_MAX_LOCALIZED_ACTION_NAME_SIZE, "%s", info->localizedActionName);
|
||||
++dedup_count;
|
||||
}
|
||||
|
||||
static XRAPI_ATTR XrResult XRAPI_CALL hook_xrCreateAction(XrActionSet set, const XrActionCreateInfo *info,
|
||||
XrAction *action) {
|
||||
PFN_xrCreateAction fn = (PFN_xrCreateAction)lookup(active_instance, "xrCreateAction");
|
||||
if (!fn) return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
XrResult r = fn(set, info, action);
|
||||
if (XR_SUCCEEDED(r) && info && action) { // OVRPlugin's action names
|
||||
XrActionCreateInfo copy, renamed;
|
||||
XrPath *kept = info && info->countSubactionPaths ? calloc(info->countSubactionPaths, sizeof(*kept)) : NULL;
|
||||
const XrActionCreateInfo *use = detached_strip_action(info, ©, kept);
|
||||
char name[XR_MAX_ACTION_NAME_SIZE], localized[XR_MAX_LOCALIZED_ACTION_NAME_SIZE];
|
||||
if (action_dedup && info) pthread_mutex_lock(&dedup_lock);
|
||||
if (action_dedup && info && dedup_rename(set, use, &renamed, name, localized)) {
|
||||
LOG("action_dedup: action \"%s\" (\"%s\") already exists in its set: created as \"%s\" (\"%s\")",
|
||||
info->actionName, info->localizedActionName, name, localized);
|
||||
use = &renamed;
|
||||
}
|
||||
XrResult r = fn(set, use, action);
|
||||
if (action_dedup && info) {
|
||||
if (XR_SUCCEEDED(r)) dedup_note(set, use);
|
||||
pthread_mutex_unlock(&dedup_lock);
|
||||
}
|
||||
if (input_diag) diag_log_action(use, r); // this hook replaces input_diag's wrapper of xrCreateAction
|
||||
free(kept);
|
||||
if (proximity_emul && XR_SUCCEEDED(r) && info && action) { // OVRPlugin's action names
|
||||
if (!strcmp(info->actionName, "hand_thumb_proximity")) thumb_proximity_action = *action;
|
||||
else if (!strcmp(info->actionName, "hand_trigger_proximity")) trigger_proximity_action = *action;
|
||||
else return r;
|
||||
@@ -429,11 +490,26 @@ static XrResult remap_to_touch(XrInstance instance, PFN_xrSuggestInteractionProf
|
||||
return r;
|
||||
}
|
||||
|
||||
static XrResult suggest_bindings(XrInstance instance, PFN_xrSuggestInteractionProfileBindings fn,
|
||||
const XrInteractionProfileSuggestedBinding *suggested);
|
||||
|
||||
static XRAPI_ATTR XrResult XRAPI_CALL hook_xrSuggestInteractionProfileBindings(XrInstance instance,
|
||||
const XrInteractionProfileSuggestedBinding *suggested) {
|
||||
PFN_xrSuggestInteractionProfileBindings fn =
|
||||
(PFN_xrSuggestInteractionProfileBindings)lookup(instance, "xrSuggestInteractionProfileBindings");
|
||||
if (!fn) return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
XrInteractionProfileSuggestedBinding copy;
|
||||
XrActionSuggestedBinding *kept = suggested && suggested->countSuggestedBindings
|
||||
? calloc(suggested->countSuggestedBindings, sizeof(*kept)) : NULL;
|
||||
const XrInteractionProfileSuggestedBinding *use = detached_strip_bindings(suggested, ©, kept);
|
||||
// a profile with only detached-controller bindings: nothing the runtime could bind
|
||||
XrResult r = use != suggested && !use->countSuggestedBindings ? XR_SUCCESS : suggest_bindings(instance, fn, use);
|
||||
free(kept);
|
||||
return r;
|
||||
}
|
||||
|
||||
static XrResult suggest_bindings(XrInstance instance, PFN_xrSuggestInteractionProfileBindings fn,
|
||||
const XrInteractionProfileSuggestedBinding *suggested) {
|
||||
PFN_xrPathToString to_string = (PFN_xrPathToString)lookup(instance, "xrPathToString");
|
||||
if (suggested && to_string && (layer_debug || aim_correction_on()))
|
||||
for (uint32_t i = 0; i < suggested->countSuggestedBindings; ++i) {
|
||||
@@ -456,6 +532,7 @@ static XRAPI_ATTR XrResult XRAPI_CALL hook_xrSuggestInteractionProfileBindings(X
|
||||
}
|
||||
if (r != XR_ERROR_PATH_UNSUPPORTED || app_suggested_touch || !IN(profile, NEWER_TOUCH)) return r;
|
||||
XrResult remapped = remap_to_touch(instance, fn, to_string, suggested, profile);
|
||||
if (XR_SUCCEEDED(remapped)) snprintf(remapped_profile, sizeof(remapped_profile), "%s", profile);
|
||||
return XR_SUCCEEDED(remapped) ? XR_SUCCESS : r;
|
||||
}
|
||||
|
||||
@@ -552,6 +629,26 @@ static XRAPI_ATTR XrResult XRAPI_CALL hook_request_refresh_rate(XrSession sessio
|
||||
return XR_FAILED(result) && refresh_rate > 0 ? XR_SUCCESS : result;
|
||||
}
|
||||
|
||||
// Always on: the Frame's runtime has no XR_FB_display_refresh_rate; OVRPort's dispatcher still offers the extension and
|
||||
// its xrGetDisplayRefreshRateFB then answers 0 Hz. idTech 4 VR ports (Team Beef's Doom3Quest engine: PreyVR, GitHub
|
||||
// #306) run their game clock at 1000 / refresh ms per tic: with 0 Hz the tic length is 0, the async thread spins and
|
||||
// the frame/GUI time never advances (main menu stuck at its first animation step: black, only the cursor). A rate the
|
||||
// runtime doesn't give is replaced by the one the frame timing shows (refresh_rate.h).
|
||||
static XRAPI_ATTR XrResult XRAPI_CALL hook_get_refresh_rate(XrSession session, float *rate) {
|
||||
if (!rate) return XR_ERROR_VALIDATION_FAILURE;
|
||||
PFN_xrGetDisplayRefreshRateFB fn = (PFN_xrGetDisplayRefreshRateFB)lookup(active_instance, "xrGetDisplayRefreshRateFB");
|
||||
XrResult result = fn ? fn(session, rate) : XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
if ((XR_SUCCEEDED(result) && *rate > 0.0f) || result == XR_ERROR_HANDLE_INVALID) return result;
|
||||
float runtime = XR_SUCCEEDED(result) ? *rate : 0.0f;
|
||||
*rate = fb_refresh_rate((int64_t)last_display_period, refresh_rate);
|
||||
static int logs;
|
||||
if (logs < 4) {
|
||||
++logs;
|
||||
LOG("refresh rate: runtime reported %.1f Hz (result %d), reporting %.1f Hz", runtime, result, *rate);
|
||||
}
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
|
||||
static XRAPI_ATTR XrResult XRAPI_CALL hook_xrBeginSession(XrSession session, const XrSessionBeginInfo *info) {
|
||||
PFN_xrBeginSession fn = (PFN_xrBeginSession)lookup(active_instance, "xrBeginSession");
|
||||
if (!fn) return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// FramePort FrameBridge: eye-image snapshots for headless diagnostics (setting snapshot=<seconds>, GLES games only).
|
||||
// Every <seconds>, at xrEndFrame, the left-eye image the game just submitted (projection layer, view 0: its swapchain
|
||||
// image and array layer) is read back on the game's own GL context and written at a quarter of its size as
|
||||
// image and array layer; without a projection layer the first quad/cylinder layer's) is read back on the game's own GL context and written at a quarter of its size as
|
||||
// /sdcard/Android/data/<package>/files/fb_snap_<n>.ppm (n = 0-7, the oldest is overwritten). Nobody wears the headset
|
||||
// in a launch test, so the headset view stays black: this shows what the game itself draws (e.g. which screen it is
|
||||
// stuck on). The game's framebuffer, pack-buffer and pack-alignment bindings are restored afterwards.
|
||||
@@ -118,18 +118,27 @@ static void snap_end_frame(const XrFrameEndInfo *info) {
|
||||
int64_t t = (int64_t)now.tv_sec * 1000000000ll + now.tv_nsec;
|
||||
if (t < next_ns) return;
|
||||
next_ns = t + (int64_t)snapshot * 1000000000ll;
|
||||
const XrCompositionLayerProjection *proj = NULL;
|
||||
for (uint32_t i = 0; i < info->layerCount && !proj; ++i)
|
||||
// The projection layer's left eye; a frame without one (e.g. a menu shown only as a quad or cylinder layer) gives
|
||||
// its first quad/cylinder layer's image instead.
|
||||
const XrSwapchainSubImage *sub = NULL;
|
||||
int type = 0;
|
||||
for (uint32_t i = 0; i < info->layerCount && !sub; ++i)
|
||||
if (info->layers[i] && info->layers[i]->type == XR_TYPE_COMPOSITION_LAYER_PROJECTION &&
|
||||
((const XrCompositionLayerProjection *)info->layers[i])->viewCount)
|
||||
proj = (const XrCompositionLayerProjection *)info->layers[i];
|
||||
if (!proj || !snap_load_gl()) return;
|
||||
sub = &((const XrCompositionLayerProjection *)info->layers[i])->views[0].subImage, type = info->layers[i]->type;
|
||||
for (uint32_t i = 0; i < info->layerCount && !sub; ++i) {
|
||||
const XrCompositionLayerBaseHeader *layer = info->layers[i];
|
||||
if (layer && layer->type == XR_TYPE_COMPOSITION_LAYER_QUAD)
|
||||
sub = &((const XrCompositionLayerQuad *)layer)->subImage, type = layer->type;
|
||||
else if (layer && layer->type == XR_TYPE_COMPOSITION_LAYER_CYLINDER_KHR)
|
||||
sub = &((const XrCompositionLayerCylinderKHR *)layer)->subImage, type = layer->type;
|
||||
}
|
||||
if (!sub || !snap_load_gl()) return;
|
||||
if (!s_eglGetCurrentContext()) {
|
||||
static int logged;
|
||||
if (!logged++) LOG("snapshot: no GL context current in xrEndFrame, no snapshot");
|
||||
return;
|
||||
}
|
||||
const XrSwapchainSubImage *sub = &proj->views[0].subImage;
|
||||
pthread_mutex_lock(&snap_lock);
|
||||
int i = snap_find(sub->swapchain, 0);
|
||||
GLuint tex = 0;
|
||||
@@ -167,6 +176,21 @@ static void snap_end_frame(const XrFrameEndInfo *info) {
|
||||
s_glDeleteFramebuffers(1, &fb);
|
||||
while (s_glGetError() != GL_NO_ERROR) {} // our calls must not leave errors for the game to find
|
||||
if (rgba) {
|
||||
// brightness of the submitted area: tells a black image from a drawn one without fetching the file
|
||||
uint64_t sum = 0, n = 0;
|
||||
unsigned max = 0;
|
||||
const XrRect2Di *r = &sub->imageRect;
|
||||
for (int32_t y = r->offset.y; y < r->offset.y + r->extent.height; y += 4)
|
||||
for (int32_t x = r->offset.x; x < r->offset.x + r->extent.width; x += 4) {
|
||||
if (x < 0 || y < 0 || (uint32_t)x >= w || (uint32_t)y >= h) continue;
|
||||
const unsigned char *p = rgba + ((size_t)y * w + (size_t)x) * 4;
|
||||
unsigned v = p[0] > p[1] ? (p[0] > p[2] ? p[0] : p[2]) : (p[1] > p[2] ? p[1] : p[2]);
|
||||
sum += v, ++n;
|
||||
if (v > max) max = v;
|
||||
}
|
||||
LOG("snapshot: layer type=%d image %u array=%u rect=%d,%d %dx%d of %ux%u: mean %.1f max %u",
|
||||
type, tex, sub->imageArrayIndex, r->offset.x, r->offset.y, r->extent.width, r->extent.height, w, h,
|
||||
n ? (double)sum / (double)n : 0.0, max);
|
||||
snap_write(rgba, w, h, taken++ % 8);
|
||||
free(rgba);
|
||||
}
|
||||
|
||||
+14
-12
@@ -136,18 +136,20 @@ def build_adapter(tc: Path):
|
||||
src = HERE / "adapter"
|
||||
shader_tools = tc.parents[3] / "shader-tools" / tc.name
|
||||
suffix = ".exe" if os.name == "nt" else ""
|
||||
sections = ["// Generated from surface_composite.vert and surface_composite.frag.\n"]
|
||||
for stage in ("vert", "frag"):
|
||||
binary = CACHE / f"surface_composite_{stage}.spv"
|
||||
run([shader_tools / ("glslc" + suffix), "--target-env=vulkan1.0", "-O",
|
||||
src / f"surface_composite.{stage}", "-o", binary])
|
||||
run([shader_tools / ("spirv-val" + suffix), "--target-env", "vulkan1.0", binary])
|
||||
data = binary.read_bytes()
|
||||
words = struct.unpack(f"<{len(data)//4}I", data)
|
||||
sections.append(f"static const uint32_t surface_composite_{stage}_spv[] = {{\n" +
|
||||
"\n".join(" " + ",".join(f"0x{v:08x}" for v in words[i:i+8]) + ","
|
||||
for i in range(0, len(words), 8)) + "\n};\n")
|
||||
(src / "surface_composite_spv.h").write_text("".join(sections), encoding="utf-8")
|
||||
for header, shaders in (("surface_composite", ("vert", "frag")), ("alpha_blend", ("vert", "frag"))):
|
||||
names = " and ".join(f"{header}.{stage}" for stage in shaders)
|
||||
sections = [f"// Generated from {names}.\n"]
|
||||
for stage in shaders:
|
||||
binary = CACHE / f"{header}_{stage}.spv"
|
||||
run([shader_tools / ("glslc" + suffix), "--target-env=vulkan1.0", "-O",
|
||||
src / f"{header}.{stage}", "-o", binary])
|
||||
run([shader_tools / ("spirv-val" + suffix), "--target-env", "vulkan1.0", binary])
|
||||
data = binary.read_bytes()
|
||||
words = struct.unpack(f"<{len(data)//4}I", data)
|
||||
sections.append(f"static const uint32_t {header}_{stage}_spv[] = {{\n" +
|
||||
"\n".join(" " + ",".join(f"0x{v:08x}" for v in words[i:i+8]) + ","
|
||||
for i in range(0, len(words), 8)) + "\n};\n")
|
||||
(src / f"{header}_spv.h").write_text("".join(sections), encoding="utf-8")
|
||||
run([sys.executable, src / "gen_forwarders.py"])
|
||||
inc = openxr_include("adapter")
|
||||
common = ["-shared", "-fPIC", "-O2", "-Wall", "-Wextra", "-Werror", "-Wno-gnu-conditional-omitted-operand",
|
||||
|
||||
+277
-6
@@ -16,7 +16,8 @@
|
||||
// block bindings and default-block uniform values (copied before every such draw), then the original is bound again.
|
||||
//
|
||||
// Logcat tag GLMV. Setting gl_mv_debug=1 (libframe_settings.so / framebridge.conf / FRAMEBRIDGE_CONFIG, as the GL
|
||||
// shim): glGetError after every twin draw, and per-5-s counters.
|
||||
// shim): glGetError after every twin draw, and per-5-s counters. gl_mv_debug=2 (trace) also checks every draw and
|
||||
// logs the state of the first draws of each 5 s window, failed texture uploads/copies and shader compiles.
|
||||
#define _GNU_SOURCE
|
||||
#include <EGL/egl.h>
|
||||
#include <GLES3/gl32.h>
|
||||
@@ -111,7 +112,27 @@
|
||||
X(void, UniformMatrix2x4fv, (GLint, GLsizei, GLboolean, const GLfloat *)) \
|
||||
X(void, UniformMatrix4x2fv, (GLint, GLsizei, GLboolean, const GLfloat *)) \
|
||||
X(void, UniformMatrix3x4fv, (GLint, GLsizei, GLboolean, const GLfloat *)) \
|
||||
X(void, UniformMatrix4x3fv, (GLint, GLsizei, GLboolean, const GLfloat *))
|
||||
X(void, UniformMatrix4x3fv, (GLint, GLsizei, GLboolean, const GLfloat *)) \
|
||||
TRACE_LIST(X)
|
||||
|
||||
// gl_mv_debug=2 (trace): the draw state and texture/shader calls behind black output
|
||||
#define TRACE_LIST(X) \
|
||||
X(GLboolean, IsEnabled, (GLenum)) \
|
||||
X(void, GetBooleanv, (GLenum, GLboolean *)) \
|
||||
X(GLenum, CheckFramebufferStatus, (GLenum)) \
|
||||
X(void, GetTexLevelParameteriv, (GLenum, GLint, GLenum, GLint *)) \
|
||||
X(void, GetTexParameteriv, (GLenum, GLenum, GLint *)) \
|
||||
X(void, Clear, (GLbitfield)) \
|
||||
X(void, Viewport, (GLint, GLint, GLsizei, GLsizei)) \
|
||||
X(void, TexImage2D, (GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void *)) \
|
||||
X(void, TexSubImage2D, (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const void *)) \
|
||||
X(void, CompressedTexImage2D, (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const void *)) \
|
||||
X(void, TexStorage2D, (GLenum, GLsizei, GLenum, GLsizei, GLsizei)) \
|
||||
X(void, CopyTexImage2D, (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)) \
|
||||
X(void, CopyTexSubImage2D, (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)) \
|
||||
X(void, GenerateMipmap, (GLenum)) \
|
||||
X(void, BindTexture, (GLenum, GLuint)) \
|
||||
X(void, TexParameteri, (GLenum, GLenum, GLint))
|
||||
|
||||
#define DECL(ret, name, args) static ret(*r_##name) args;
|
||||
REAL_LIST(DECL)
|
||||
@@ -515,6 +536,147 @@ static void stats(void) {
|
||||
twin_draws = mv_draws = uniform_sets = 0;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- trace (gl_mv_debug=2, diagnostics)
|
||||
// Every draw is checked with glGetError (this also consumes errors the game would read), counted per draw
|
||||
// framebuffer, and the first draws of every 5 s window are logged with the state that decides whether they write
|
||||
// anything: framebuffer status and views, program, viewport/scissor, colour/depth/stencil/blend state and the texture
|
||||
// on the active unit. Texture uploads, copies and shader compiles that fail are logged too.
|
||||
#define TRACE_DETAIL 12 // detailed draws per window
|
||||
#define TRACE_WINDOWS 40 // windows with detail
|
||||
#define NTFB 16
|
||||
struct tfb { GLint fb; unsigned long draws, errors, clears; };
|
||||
static int trace_detail, trace_windows;
|
||||
static unsigned long trace_draws, trace_errors, trace_clears;
|
||||
static GLenum trace_first_error;
|
||||
static struct tfb tfb[NTFB];
|
||||
static struct timespec trace_last;
|
||||
static pthread_mutex_t trace_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
static struct tfb *tfb_slot(GLint fb) {
|
||||
for (int i = 0; i < NTFB; ++i)
|
||||
if (tfb[i].fb == fb && (tfb[i].draws || tfb[i].clears)) return &tfb[i];
|
||||
for (int i = 0; i < NTFB; ++i)
|
||||
if (!tfb[i].draws && !tfb[i].clears) { tfb[i].fb = fb; return &tfb[i]; }
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void trace_window(void) { // under trace_lock
|
||||
struct timespec now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
if (!trace_last.tv_sec) trace_last = now;
|
||||
if (now.tv_sec - trace_last.tv_sec < 5) return;
|
||||
trace_last = now;
|
||||
char buf[700];
|
||||
int n = 0;
|
||||
for (int i = 0; i < NTFB && n < (int)sizeof(buf) - 60; ++i)
|
||||
if (tfb[i].draws || tfb[i].clears)
|
||||
n += snprintf(buf + n, sizeof(buf) - n, " fb%d:d%lu/e%lu/c%lu", tfb[i].fb, tfb[i].draws, tfb[i].errors,
|
||||
tfb[i].clears);
|
||||
LOG("trace 5s: %lu draws, %lu with a GL error (first 0x%x), %lu clears;%s", trace_draws, trace_errors,
|
||||
trace_first_error, trace_clears, n ? buf : " none");
|
||||
{ // idTech 4 engines (Doom3Quest, PreyVR) export their clocks; GUI animations run on com_frameTime, so one that
|
||||
// stands still leaves menus at their first step (PreyVR, GitHub #306: 0 Hz refresh rate -> 0 ms per tic)
|
||||
static int *frame_time, *tic_number, *frame_number, looked;
|
||||
if (!looked) {
|
||||
looked = 1;
|
||||
frame_time = dlsym(RTLD_DEFAULT, "com_frameTime");
|
||||
tic_number = dlsym(RTLD_DEFAULT, "com_ticNumber");
|
||||
frame_number = dlsym(RTLD_DEFAULT, "com_frameNumber");
|
||||
}
|
||||
if (frame_time && tic_number && frame_number)
|
||||
LOG("trace clocks: com_frameTime=%d com_ticNumber=%d com_frameNumber=%d", *frame_time, *tic_number,
|
||||
*frame_number);
|
||||
}
|
||||
memset(tfb, 0, sizeof(tfb));
|
||||
trace_draws = trace_errors = trace_clears = 0;
|
||||
trace_first_error = 0;
|
||||
if (trace_windows < TRACE_WINDOWS) {
|
||||
++trace_windows;
|
||||
trace_detail = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void trace_state(const char *what, GLenum mode, GLsizei count, GLenum err) {
|
||||
GLint fb = 0, prog = 0, vp[4] = {0}, sc[4] = {0}, unit = 0, tex = 0, dfunc = 0, bsrc = 0, bdst = 0, bsrca = 0,
|
||||
bdsta = 0, cullmode = 0;
|
||||
GLboolean cmask[4] = {0}, dmask = 0;
|
||||
r_GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &fb);
|
||||
r_GetIntegerv(GL_CURRENT_PROGRAM, &prog);
|
||||
r_GetIntegerv(GL_VIEWPORT, vp);
|
||||
r_GetIntegerv(GL_SCISSOR_BOX, sc);
|
||||
r_GetIntegerv(GL_ACTIVE_TEXTURE, &unit);
|
||||
r_GetIntegerv(GL_DEPTH_FUNC, &dfunc);
|
||||
r_GetIntegerv(GL_BLEND_SRC_RGB, &bsrc);
|
||||
r_GetIntegerv(GL_BLEND_DST_RGB, &bdst);
|
||||
r_GetIntegerv(GL_BLEND_SRC_ALPHA, &bsrca);
|
||||
r_GetIntegerv(GL_BLEND_DST_ALPHA, &bdsta);
|
||||
r_GetIntegerv(GL_CULL_FACE_MODE, &cullmode);
|
||||
r_GetBooleanv(GL_COLOR_WRITEMASK, cmask);
|
||||
r_GetBooleanv(GL_DEPTH_WRITEMASK, &dmask);
|
||||
GLenum status = r_CheckFramebufferStatus(GL_DRAW_FRAMEBUFFER);
|
||||
GLint linked = 0;
|
||||
if (prog) r_GetProgramiv((GLuint)prog, GL_LINK_STATUS, &linked);
|
||||
struct prog *p = prog ? find_prog((GLuint)prog, 0) : NULL;
|
||||
r_GetIntegerv(GL_TEXTURE_BINDING_2D, &tex); // (on the active unit)
|
||||
GLint tw = 0, th = 0, tfmt = 0, minf = 0, maxl = 0, imm = 0;
|
||||
if (tex) {
|
||||
r_GetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &tw);
|
||||
r_GetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &th);
|
||||
r_GetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &tfmt);
|
||||
r_GetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, &minf);
|
||||
r_GetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, &maxl);
|
||||
r_GetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_IMMUTABLE_LEVELS, &imm);
|
||||
}
|
||||
r_GetError(); // (the queries above must not count as the game's)
|
||||
LOG("trace %s(mode=0x%x n=%d) err=0x%x fb=%d status=0x%x views=%d prog=%d linked=%d mv=%d vp=%d,%d %dx%d "
|
||||
"scissor=%d %d,%d %dx%d cmask=%d%d%d%d blend=%d 0x%x/0x%x,0x%x/0x%x depth=%d f=0x%x w=%d stencil=%d cull=%d "
|
||||
"0x%x unit=0x%x tex2d=%d %dx%d fmt=0x%x min=0x%x maxl=%d imm=%d",
|
||||
what, mode, count, err, fb, status, draw_fb_views(), prog, linked, p ? p->multiview : -1, vp[0], vp[1], vp[2],
|
||||
vp[3], r_IsEnabled(GL_SCISSOR_TEST), sc[0], sc[1], sc[2], sc[3], cmask[0], cmask[1], cmask[2], cmask[3],
|
||||
r_IsEnabled(GL_BLEND), bsrc, bdst, bsrca, bdsta, r_IsEnabled(GL_DEPTH_TEST), dfunc, dmask,
|
||||
r_IsEnabled(GL_STENCIL_TEST), r_IsEnabled(GL_CULL_FACE), cullmode, unit, tex, tw, th, tfmt, minf, maxl, imm);
|
||||
}
|
||||
|
||||
static void trace_before(void) {
|
||||
if (debug >= 2) r_GetError();
|
||||
}
|
||||
|
||||
static void trace_after(const char *what, GLenum mode, GLsizei count) {
|
||||
if (debug < 2) return;
|
||||
GLenum err = r_GetError();
|
||||
GLint fb = 0;
|
||||
r_GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &fb);
|
||||
int detail;
|
||||
pthread_mutex_lock(&trace_lock);
|
||||
++trace_draws;
|
||||
if (err) {
|
||||
++trace_errors;
|
||||
if (!trace_first_error) trace_first_error = err;
|
||||
}
|
||||
struct tfb *e = tfb_slot(fb);
|
||||
if (e) {
|
||||
++e->draws;
|
||||
if (err) ++e->errors;
|
||||
}
|
||||
detail = trace_windows < TRACE_WINDOWS && trace_detail < TRACE_DETAIL;
|
||||
if (detail) ++trace_detail;
|
||||
trace_window();
|
||||
pthread_mutex_unlock(&trace_lock);
|
||||
if (detail) trace_state(what, mode, count, err);
|
||||
}
|
||||
|
||||
static int trace_logs;
|
||||
#define TRACE_CALL(fmt, ...) \
|
||||
do { \
|
||||
if (debug >= 2) { \
|
||||
GLenum e_ = r_GetError(); \
|
||||
if ((e_ || trace_logs < 40) && trace_logs < 400) { \
|
||||
++trace_logs; \
|
||||
LOG("trace " fmt " err=0x%x", __VA_ARGS__, e_); \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
// Before a draw: bind the twin when the program is multiview and the framebuffer has no views. 1 = twin bound.
|
||||
static int begin_draw(void) {
|
||||
struct prog *p = cur_prog;
|
||||
@@ -558,6 +720,14 @@ EXPORT void glLinkProgram(GLuint program) {
|
||||
INIT();
|
||||
note_program(program);
|
||||
r_LinkProgram(program);
|
||||
if (debug >= 2) {
|
||||
GLint ok = 0;
|
||||
r_GetProgramiv(program, GL_LINK_STATUS, &ok);
|
||||
char log[700] = {0};
|
||||
r_GetProgramInfoLog(program, sizeof(log) - 1, NULL, log);
|
||||
struct prog *p = find_prog(program, 0);
|
||||
LOG("trace glLinkProgram(%u) ok=%d multiview=%d log: %s", program, ok, p ? p->multiview : -1, log);
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT void glDeleteProgram(GLuint program) {
|
||||
@@ -626,43 +796,143 @@ static void w_ftmsmv(GLenum target, GLenum attachment, GLuint texture, GLint lev
|
||||
#define DRAW(name, call) \
|
||||
INIT(); \
|
||||
if (!r_##name) return; \
|
||||
trace_before(); \
|
||||
if (begin_draw()) { \
|
||||
r_##name call; \
|
||||
end_draw("gl" #name); \
|
||||
} else { \
|
||||
r_##name call; \
|
||||
}
|
||||
} \
|
||||
trace_after("gl" #name, call_mode, call_count);
|
||||
|
||||
EXPORT void glDrawArrays(GLenum mode, GLint first, GLsizei count) { DRAW(DrawArrays, (mode, first, count)) }
|
||||
EXPORT void glDrawArrays(GLenum mode, GLint first, GLsizei count) {
|
||||
GLenum call_mode = mode; GLsizei call_count = count;
|
||||
DRAW(DrawArrays, (mode, first, count))
|
||||
}
|
||||
EXPORT void glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices) {
|
||||
GLenum call_mode = mode; GLsizei call_count = count;
|
||||
DRAW(DrawElements, (mode, count, type, indices))
|
||||
}
|
||||
EXPORT void glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instances) {
|
||||
GLenum call_mode = mode; GLsizei call_count = count;
|
||||
DRAW(DrawArraysInstanced, (mode, first, count, instances))
|
||||
}
|
||||
EXPORT void glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instances) {
|
||||
GLenum call_mode = mode; GLsizei call_count = count;
|
||||
DRAW(DrawElementsInstanced, (mode, count, type, indices, instances))
|
||||
}
|
||||
EXPORT void glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type,
|
||||
const void *indices) {
|
||||
GLenum call_mode = mode; GLsizei call_count = count;
|
||||
DRAW(DrawRangeElements, (mode, start, end, count, type, indices))
|
||||
}
|
||||
EXPORT void glDrawArraysIndirect(GLenum mode, const void *indirect) { DRAW(DrawArraysIndirect, (mode, indirect)) }
|
||||
EXPORT void glDrawArraysIndirect(GLenum mode, const void *indirect) {
|
||||
GLenum call_mode = mode; GLsizei call_count = -1;
|
||||
DRAW(DrawArraysIndirect, (mode, indirect))
|
||||
}
|
||||
EXPORT void glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect) {
|
||||
GLenum call_mode = mode; GLsizei call_count = -1;
|
||||
DRAW(DrawElementsIndirect, (mode, type, indirect))
|
||||
}
|
||||
EXPORT void glDrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLint base) {
|
||||
GLenum call_mode = mode; GLsizei call_count = count;
|
||||
DRAW(DrawElementsBaseVertex, (mode, count, type, indices, base))
|
||||
}
|
||||
EXPORT void glDrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type,
|
||||
const void *indices, GLint base) {
|
||||
GLenum call_mode = mode; GLsizei call_count = count;
|
||||
DRAW(DrawRangeElementsBaseVertex, (mode, start, end, count, type, indices, base))
|
||||
}
|
||||
EXPORT void glDrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices,
|
||||
GLsizei instances, GLint base) {
|
||||
GLenum call_mode = mode; GLsizei call_count = count;
|
||||
DRAW(DrawElementsInstancedBaseVertex, (mode, count, type, indices, instances, base))
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- traced calls (pass-through unless gl_mv_debug=2)
|
||||
EXPORT void glClear(GLbitfield mask) {
|
||||
INIT();
|
||||
if (debug >= 2) r_GetError();
|
||||
r_Clear(mask);
|
||||
if (debug >= 2) {
|
||||
GLenum err = r_GetError();
|
||||
GLint fb = 0;
|
||||
r_GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &fb);
|
||||
pthread_mutex_lock(&trace_lock);
|
||||
++trace_clears;
|
||||
struct tfb *e = tfb_slot(fb);
|
||||
if (e) ++e->clears;
|
||||
pthread_mutex_unlock(&trace_lock);
|
||||
if (err) LOG("trace glClear(0x%x) fb=%d err=0x%x", mask, fb, err);
|
||||
}
|
||||
}
|
||||
EXPORT void glTexImage2D(GLenum t, GLint l, GLint ifmt, GLsizei w, GLsizei h, GLint b, GLenum f, GLenum ty,
|
||||
const void *px) {
|
||||
INIT();
|
||||
if (debug >= 2) r_GetError();
|
||||
r_TexImage2D(t, l, ifmt, w, h, b, f, ty, px);
|
||||
GLint tex = 0;
|
||||
if (debug >= 2) r_GetIntegerv(GL_TEXTURE_BINDING_2D, &tex);
|
||||
TRACE_CALL("glTexImage2D(target=0x%x tex=%d level=%d ifmt=0x%x %dx%d fmt=0x%x type=0x%x data=%d)", t, tex, l, ifmt,
|
||||
w, h, f, ty, px != NULL);
|
||||
}
|
||||
EXPORT void glTexSubImage2D(GLenum t, GLint l, GLint x, GLint y, GLsizei w, GLsizei h, GLenum f, GLenum ty,
|
||||
const void *px) {
|
||||
INIT();
|
||||
if (debug >= 2) r_GetError();
|
||||
r_TexSubImage2D(t, l, x, y, w, h, f, ty, px);
|
||||
TRACE_CALL("glTexSubImage2D(target=0x%x level=%d %d,%d %dx%d fmt=0x%x type=0x%x)", t, l, x, y, w, h, f, ty);
|
||||
}
|
||||
EXPORT void glCompressedTexImage2D(GLenum t, GLint l, GLenum ifmt, GLsizei w, GLsizei h, GLint b, GLsizei size,
|
||||
const void *data) {
|
||||
INIT();
|
||||
if (debug >= 2) r_GetError();
|
||||
r_CompressedTexImage2D(t, l, ifmt, w, h, b, size, data);
|
||||
TRACE_CALL("glCompressedTexImage2D(target=0x%x level=%d ifmt=0x%x %dx%d size=%d)", t, l, ifmt, w, h, size);
|
||||
}
|
||||
EXPORT void glTexStorage2D(GLenum t, GLsizei levels, GLenum ifmt, GLsizei w, GLsizei h) {
|
||||
INIT();
|
||||
if (debug >= 2) r_GetError();
|
||||
r_TexStorage2D(t, levels, ifmt, w, h);
|
||||
TRACE_CALL("glTexStorage2D(target=0x%x levels=%d ifmt=0x%x %dx%d)", t, levels, ifmt, w, h);
|
||||
}
|
||||
EXPORT void glCopyTexImage2D(GLenum t, GLint l, GLenum ifmt, GLint x, GLint y, GLsizei w, GLsizei h, GLint b) {
|
||||
INIT();
|
||||
if (debug >= 2) r_GetError();
|
||||
r_CopyTexImage2D(t, l, ifmt, x, y, w, h, b);
|
||||
GLint rfb = 0;
|
||||
if (debug >= 2) r_GetIntegerv(GL_READ_FRAMEBUFFER_BINDING, &rfb);
|
||||
TRACE_CALL("glCopyTexImage2D(target=0x%x level=%d ifmt=0x%x %d,%d %dx%d read fb=%d)", t, l, ifmt, x, y, w, h, rfb);
|
||||
}
|
||||
EXPORT void glCopyTexSubImage2D(GLenum t, GLint l, GLint xo, GLint yo, GLint x, GLint y, GLsizei w, GLsizei h) {
|
||||
INIT();
|
||||
if (debug >= 2) r_GetError();
|
||||
r_CopyTexSubImage2D(t, l, xo, yo, x, y, w, h);
|
||||
GLint rfb = 0;
|
||||
if (debug >= 2) r_GetIntegerv(GL_READ_FRAMEBUFFER_BINDING, &rfb);
|
||||
TRACE_CALL("glCopyTexSubImage2D(target=0x%x level=%d %d,%d from %d,%d %dx%d read fb=%d)", t, l, xo, yo, x, y, w, h,
|
||||
rfb);
|
||||
}
|
||||
EXPORT void glGenerateMipmap(GLenum t) {
|
||||
INIT();
|
||||
if (debug >= 2) r_GetError();
|
||||
r_GenerateMipmap(t);
|
||||
TRACE_CALL("glGenerateMipmap(target=0x%x)", t);
|
||||
}
|
||||
EXPORT void glCompileShader(GLuint sh) {
|
||||
INIT();
|
||||
r_CompileShader(sh);
|
||||
if (debug < 2) return;
|
||||
GLint ok = 0;
|
||||
r_GetShaderiv(sh, GL_COMPILE_STATUS, &ok);
|
||||
char log[700] = {0};
|
||||
r_GetShaderInfoLog(sh, sizeof(log) - 1, NULL, log);
|
||||
if (!ok || (log[0] && trace_logs < 400)) {
|
||||
++trace_logs;
|
||||
LOG("trace glCompileShader(%u) ok=%d log: %s", sh, ok, log);
|
||||
}
|
||||
}
|
||||
|
||||
// A context made current on this thread (engines with a render thread move theirs between threads, e.g. Doom3Quest's
|
||||
// GLimp_ActivateContext): what this thread knew about the bound program and framebuffer may be another context's.
|
||||
EXPORT EGLBoolean eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx) {
|
||||
@@ -698,7 +968,8 @@ EXPORT __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *na
|
||||
OWN(glFramebufferTexture) OWN(glDrawBuffers) OWN(glDrawArrays) OWN(glDrawElements) OWN(glDrawArraysInstanced)
|
||||
OWN(glDrawElementsInstanced) OWN(glDrawRangeElements) OWN(glDrawArraysIndirect) OWN(glDrawElementsIndirect)
|
||||
OWN(glDrawElementsBaseVertex) OWN(glDrawRangeElementsBaseVertex) OWN(glDrawElementsInstancedBaseVertex)
|
||||
OWN(eglMakeCurrent)
|
||||
OWN(eglMakeCurrent) OWN(glClear) OWN(glTexImage2D) OWN(glTexSubImage2D) OWN(glCompressedTexImage2D)
|
||||
OWN(glTexStorage2D) OWN(glCopyTexImage2D) OWN(glCopyTexSubImage2D) OWN(glGenerateMipmap) OWN(glCompileShader)
|
||||
#undef OWN
|
||||
return fn;
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Pipeline log for the Vulkan shim (adapter setting vk_pipeline_log=1, diagnostics; GitHub #349): when
|
||||
// vkCreateGraphicsPipelines / vkCreateComputePipelines fail (a result other than VK_SUCCESS, or a NULL pipeline), the
|
||||
// create infos are logged: per pipeline its flags, layout, render pass/subpass, the pNext structure types, sample count
|
||||
// and vertex formats, and per stage its stage bit, shader module (as the vk_shader_dump file name <size>_<sha256>.spv,
|
||||
// remembered at vkCreateShaderModule), entry point and pNext types. Sampler Y'CbCr conversions are followed through
|
||||
// samplers, descriptor set layouts (immutable samplers) and pipeline layouts, so a failing pipeline says whether it
|
||||
// samples through one ("ycbcr"). Conversions and samplers using one are logged when created.
|
||||
// Unreal treats a NULL pipeline as "Shader compilation failures are Fatal." (PipelineStateCache.cpp) without saying
|
||||
// why; this names the pipeline. Needs LOG(...), sha256() and readable() before inclusion (vkshim.c; the host test in
|
||||
// tests/test_vk_pipeline_log.py provides its own).
|
||||
#pragma once
|
||||
#include <inttypes.h>
|
||||
#include <pthread.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
#define PL_MODULES 16384 // shader modules remembered (a power of two)
|
||||
#define PL_SET 4096 // handles per kind that involve a Y'CbCr conversion (a power of two)
|
||||
static int pl_on; // vk_pipeline_log
|
||||
static pthread_mutex_t pl_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
static struct { uint64_t handle; uint32_t size; uint8_t sha[32]; } pl_modules[PL_MODULES];
|
||||
enum { PL_CONV, PL_SAMPLER, PL_SET_LAYOUT, PL_LAYOUT, PL_KINDS };
|
||||
static uint64_t pl_sets[PL_KINDS][PL_SET]; // 0 = empty
|
||||
static unsigned pl_created, pl_failed, pl_logged_ycbcr;
|
||||
|
||||
static unsigned pl_hash(uint64_t h, unsigned mask) { return (unsigned)((h * 0x9E3779B97F4A7C15ull) >> 40) & mask; }
|
||||
|
||||
static void pl_module_add(VkShaderModule module, const uint32_t *code, size_t size) {
|
||||
uint64_t h = (uint64_t)module;
|
||||
if (!h || !code) return;
|
||||
uint8_t digest[32];
|
||||
sha256((const uint8_t *)code, size, digest);
|
||||
pthread_mutex_lock(&pl_lock);
|
||||
for (unsigned i = pl_hash(h, PL_MODULES - 1), n = 0; n < PL_MODULES; i = (i + 1) & (PL_MODULES - 1), n++) {
|
||||
if (pl_modules[i].handle && pl_modules[i].handle != h) continue;
|
||||
pl_modules[i].handle = h; // a handle reused after vkDestroyShaderModule is simply overwritten
|
||||
pl_modules[i].size = (uint32_t)size;
|
||||
memcpy(pl_modules[i].sha, digest, 32);
|
||||
break;
|
||||
}
|
||||
pthread_mutex_unlock(&pl_lock);
|
||||
}
|
||||
|
||||
// "<size>_<sha256>.spv" of a module, else "unknown(0x...)" / "none"
|
||||
static void pl_module_name(VkShaderModule module, char *out, size_t cap) {
|
||||
uint64_t h = (uint64_t)module;
|
||||
if (!h) { snprintf(out, cap, "none"); return; }
|
||||
snprintf(out, cap, "unknown(0x%" PRIx64 ")", h);
|
||||
pthread_mutex_lock(&pl_lock);
|
||||
for (unsigned i = pl_hash(h, PL_MODULES - 1), n = 0; n < PL_MODULES && pl_modules[i].handle;
|
||||
i = (i + 1) & (PL_MODULES - 1), n++) {
|
||||
if (pl_modules[i].handle != h) continue;
|
||||
int len = snprintf(out, cap, "%u_", pl_modules[i].size);
|
||||
for (int b = 0; b < 32 && len > 0 && (size_t)len < cap; b++)
|
||||
len += snprintf(out + len, cap - (size_t)len, "%02x", pl_modules[i].sha[b]);
|
||||
if (len > 0 && (size_t)len < cap) snprintf(out + len, cap - (size_t)len, ".spv");
|
||||
break;
|
||||
}
|
||||
pthread_mutex_unlock(&pl_lock);
|
||||
}
|
||||
|
||||
static void pl_set_add(int kind, uint64_t h) {
|
||||
if (!h) return;
|
||||
pthread_mutex_lock(&pl_lock);
|
||||
for (unsigned i = pl_hash(h, PL_SET - 1), n = 0; n < PL_SET; i = (i + 1) & (PL_SET - 1), n++)
|
||||
if (!pl_sets[kind][i] || pl_sets[kind][i] == h) { pl_sets[kind][i] = h; break; }
|
||||
pthread_mutex_unlock(&pl_lock);
|
||||
}
|
||||
|
||||
static int pl_set_has(int kind, uint64_t h) {
|
||||
if (!h) return 0;
|
||||
int found = 0;
|
||||
pthread_mutex_lock(&pl_lock);
|
||||
for (unsigned i = pl_hash(h, PL_SET - 1), n = 0; n < PL_SET && pl_sets[kind][i]; i = (i + 1) & (PL_SET - 1), n++)
|
||||
if (pl_sets[kind][i] == h) { found = 1; break; }
|
||||
pthread_mutex_unlock(&pl_lock);
|
||||
return found;
|
||||
}
|
||||
|
||||
// The sTypes of a pNext chain, e.g. " 1000053000,1000044002" (at most 8; "!" marks an unreadable link)
|
||||
static void pl_chain(const void *next, char *out, size_t cap) {
|
||||
size_t len = 0;
|
||||
out[0] = 0;
|
||||
for (int n = 0; next && n < 8 && len + 16 < cap; n++) {
|
||||
if (!readable(next, sizeof(VkBaseInStructure))) { snprintf(out + len, cap - len, "%s!", n ? "," : " "); return; }
|
||||
const VkBaseInStructure *b = next;
|
||||
len += (size_t)snprintf(out + len, cap - len, "%s%u", n ? "," : " ", (unsigned)b->sType);
|
||||
next = b->pNext;
|
||||
}
|
||||
}
|
||||
|
||||
// A Y'CbCr conversion in a sampler's pNext chain (VkSamplerYcbcrConversionInfo), else 0
|
||||
static uint64_t pl_sampler_conversion(const VkSamplerCreateInfo *ci) {
|
||||
for (const VkBaseInStructure *b = ci ? ci->pNext : NULL; b; b = b->pNext) {
|
||||
if (!readable(b, sizeof *b)) return 0;
|
||||
if (b->sType == VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO)
|
||||
return (uint64_t)((const VkSamplerYcbcrConversionInfo *)b)->conversion;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void pl_conversion_created(const VkSamplerYcbcrConversionCreateInfo *ci, VkResult r, VkSamplerYcbcrConversion c) {
|
||||
uint64_t external = 0;
|
||||
for (const VkBaseInStructure *b = ci ? ci->pNext : NULL; b; b = b->pNext) {
|
||||
if (!readable(b, sizeof *b)) break;
|
||||
if (b->sType == 1000129005 /* VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID */)
|
||||
external = ((const struct { VkStructureType s; const void *n; uint64_t f; } *)(const void *)b)->f;
|
||||
}
|
||||
if (r == VK_SUCCESS) pl_set_add(PL_CONV, (uint64_t)c);
|
||||
if (pl_logged_ycbcr++ < 20 && ci)
|
||||
LOG("vk shim: vkCreateSamplerYcbcrConversion format %d externalFormat 0x%" PRIx64 " model %d range %d "
|
||||
"chroma offsets %d/%d filter %d explicit %u: %d -> 0x%" PRIx64, ci->format, external, ci->ycbcrModel,
|
||||
ci->ycbcrRange, ci->xChromaOffset, ci->yChromaOffset, ci->chromaFilter, ci->forceExplicitReconstruction, r,
|
||||
r == VK_SUCCESS ? (uint64_t)c : 0);
|
||||
}
|
||||
|
||||
static void pl_sampler_created(const VkSamplerCreateInfo *ci, VkResult r, VkSampler s) {
|
||||
uint64_t conv = pl_sampler_conversion(ci);
|
||||
if (!conv) return;
|
||||
if (r == VK_SUCCESS) pl_set_add(PL_SAMPLER, (uint64_t)s);
|
||||
if (pl_logged_ycbcr++ < 20)
|
||||
LOG("vk shim: vkCreateSampler with Y'CbCr conversion 0x%" PRIx64 "%s: %d", conv,
|
||||
pl_set_has(PL_CONV, conv) ? "" : " (not created through the shim)", r);
|
||||
}
|
||||
|
||||
static void pl_set_layout_created(const VkDescriptorSetLayoutCreateInfo *ci, VkResult r, VkDescriptorSetLayout l) {
|
||||
if (r != VK_SUCCESS || !ci || !ci->pBindings) return;
|
||||
for (uint32_t i = 0; i < ci->bindingCount; i++) {
|
||||
const VkDescriptorSetLayoutBinding *b = &ci->pBindings[i];
|
||||
if (!b->pImmutableSamplers) continue;
|
||||
for (uint32_t j = 0; j < b->descriptorCount; j++)
|
||||
if (pl_set_has(PL_SAMPLER, (uint64_t)b->pImmutableSamplers[j])) {
|
||||
pl_set_add(PL_SET_LAYOUT, (uint64_t)l);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void pl_layout_created(const VkPipelineLayoutCreateInfo *ci, VkResult r, VkPipelineLayout l) {
|
||||
if (r != VK_SUCCESS || !ci || !ci->pSetLayouts) return;
|
||||
for (uint32_t i = 0; i < ci->setLayoutCount; i++)
|
||||
if (pl_set_has(PL_SET_LAYOUT, (uint64_t)ci->pSetLayouts[i])) { pl_set_add(PL_LAYOUT, (uint64_t)l); return; }
|
||||
}
|
||||
|
||||
static void pl_stage(int index, const VkPipelineShaderStageCreateInfo *s) {
|
||||
char module[96], chain[128];
|
||||
pl_module_name(s->module, module, sizeof module);
|
||||
pl_chain(s->pNext, chain, sizeof chain);
|
||||
LOG("vk shim: [%d] stage 0x%x module %s entry %s flags 0x%x specialization %u pNext%s", index, s->stage, module,
|
||||
s->pName && readable(s->pName, 1) ? s->pName : "?", s->flags,
|
||||
s->pSpecializationInfo ? s->pSpecializationInfo->mapEntryCount : 0, chain[0] ? chain : " -");
|
||||
}
|
||||
|
||||
// Called after vkCreateGraphicsPipelines; logs only failures (and a running count now and then)
|
||||
static void pl_graphics(uint32_t count, const VkGraphicsPipelineCreateInfo *ci, const VkPipeline *out, VkResult r) {
|
||||
int bad = r != VK_SUCCESS;
|
||||
for (uint32_t i = 0; !bad && out && i < count; i++) bad = !out[i];
|
||||
pthread_mutex_lock(&pl_lock);
|
||||
unsigned created = bad ? pl_created : (pl_created += count), failed = bad ? ++pl_failed : pl_failed;
|
||||
pthread_mutex_unlock(&pl_lock);
|
||||
if (!bad) {
|
||||
if (created == count || created / 500 != (created - count) / 500)
|
||||
LOG("vk shim: %u pipeline(s) created so far, %u failed call(s)", created, failed);
|
||||
return;
|
||||
}
|
||||
if (failed > 50) return;
|
||||
LOG("vk shim: vkCreateGraphicsPipelines failed: %d (%u pipeline(s); failure %u)", r, count, failed);
|
||||
for (uint32_t i = 0; ci && i < count && i < 8; i++) {
|
||||
const VkGraphicsPipelineCreateInfo *p = &ci[i];
|
||||
char chain[128], formats[160] = "";
|
||||
pl_chain(p->pNext, chain, sizeof chain);
|
||||
const VkPipelineVertexInputStateCreateInfo *vi = p->pVertexInputState;
|
||||
size_t len = 0;
|
||||
for (uint32_t a = 0; vi && vi->pVertexAttributeDescriptions && a < vi->vertexAttributeDescriptionCount &&
|
||||
len + 12 < sizeof formats; a++)
|
||||
len += (size_t)snprintf(formats + len, sizeof formats - len, "%s%d", a ? "," : "",
|
||||
vi->pVertexAttributeDescriptions[a].format);
|
||||
LOG("vk shim: pipeline %u: %s flags 0x%x layout 0x%" PRIx64 "%s renderPass 0x%" PRIx64 " subpass %u samples %d "
|
||||
"colour attachments %u vertex formats [%s] pNext%s", i, out && out[i] ? "ok" : "NULL", p->flags,
|
||||
(uint64_t)p->layout, pl_set_has(PL_LAYOUT, (uint64_t)p->layout) ? " (ycbcr)" : "", (uint64_t)p->renderPass,
|
||||
p->subpass, p->pMultisampleState ? (int)p->pMultisampleState->rasterizationSamples : 0,
|
||||
p->pColorBlendState ? p->pColorBlendState->attachmentCount : 0, formats, chain[0] ? chain : " -");
|
||||
for (uint32_t s = 0; p->pStages && s < p->stageCount && s < 6; s++) pl_stage((int)s, &p->pStages[s]);
|
||||
}
|
||||
}
|
||||
|
||||
static void pl_compute(uint32_t count, const VkComputePipelineCreateInfo *ci, const VkPipeline *out, VkResult r) {
|
||||
int bad = r != VK_SUCCESS;
|
||||
for (uint32_t i = 0; !bad && out && i < count; i++) bad = !out[i];
|
||||
if (!bad) return;
|
||||
pthread_mutex_lock(&pl_lock);
|
||||
unsigned failed = ++pl_failed;
|
||||
pthread_mutex_unlock(&pl_lock);
|
||||
if (failed > 50) return;
|
||||
LOG("vk shim: vkCreateComputePipelines failed: %d (%u pipeline(s); failure %u)", r, count, failed);
|
||||
for (uint32_t i = 0; ci && i < count && i < 8; i++) {
|
||||
char chain[128];
|
||||
pl_chain(ci[i].pNext, chain, sizeof chain);
|
||||
LOG("vk shim: pipeline %u: %s flags 0x%x layout 0x%" PRIx64 "%s pNext%s", i, out && out[i] ? "ok" : "NULL",
|
||||
ci[i].flags, (uint64_t)ci[i].layout, pl_set_has(PL_LAYOUT, (uint64_t)ci[i].layout) ? " (ycbcr)" : "",
|
||||
chain[0] ? chain : " -");
|
||||
pl_stage(0, &ci[i].stage);
|
||||
}
|
||||
}
|
||||
+98
-4
@@ -18,6 +18,8 @@
|
||||
// Shader dump (vk_shader_dump=1, diagnostics): every distinct module the game creates is written once to the app's
|
||||
// files/fp_vk_shaders/ with an index of every creation (order, time), to find the shader behind a GPU hang
|
||||
// (shader_dump.h).
|
||||
// Pipeline log (vk_pipeline_log=1, diagnostics): failing vkCreateGraphicsPipelines/vkCreateComputePipelines calls are
|
||||
// logged with their stages' modules (vk_shader_dump names) and any sampler Y'CbCr conversion involved (pipeline_log.h).
|
||||
//
|
||||
// Query slots (adapter setting vk_query_slots=2, per game): with multiview, Vulkan counts a query that runs in a
|
||||
// multiview render pass as one query per view (N consecutive indices). Mesa's drivers (the Frame's Turnip) write a
|
||||
@@ -103,6 +105,7 @@ static int spec_fixes; // vk_spec_fixes: make two Unreal habits valid Vulk
|
||||
static int validation; // vk_validation: add Khronos' validation layer (bundled in the APK) to the instance
|
||||
static int hide_fdm; // vk_hide_fdm: the game doesn't see VK_EXT_fragment_density_map(2)
|
||||
static int want_dump; // vk_shader_dump: write the game's SPIR-V modules to files/fp_vk_shaders/
|
||||
static int want_pipeline_log; // vk_pipeline_log: log failing pipeline creations (pipeline_log.h)
|
||||
static char app_files[400]; // /sdcard/Android/data/<package>/files
|
||||
|
||||
static void read_settings(const char *path) {
|
||||
@@ -115,6 +118,7 @@ static void read_settings(const char *path) {
|
||||
if (!strncmp(line, "vk_hide_fdm=", 12)) hide_fdm = atoi(line + 12) != 0;
|
||||
if (!strncmp(line, "vk_spec_fixes=", 14)) spec_fixes = atoi(line + 14) != 0;
|
||||
if (!strncmp(line, "vk_shader_dump=", 15)) want_dump = atoi(line + 15) != 0;
|
||||
if (!strncmp(line, "vk_pipeline_log=", 16)) want_pipeline_log = atoi(line + 16) != 0;
|
||||
if (!strncmp(line, "vk_query_slots=", 15)) {
|
||||
int v = atoi(line + 15);
|
||||
query_slots = v == 1 ? 2 : v >= 2 && v <= 4 ? v : 1; // 1 = on (the settings dialog's switch) = 2 slots
|
||||
@@ -155,8 +159,10 @@ static void read_all_settings(void) {
|
||||
if (env && *env) read_settings(env);
|
||||
}
|
||||
|
||||
static int readable(const void *p, size_t n);
|
||||
#include "sha256.h" // only run for modules whose size matches a fix, or every module with vk_shader_dump
|
||||
#include "shader_dump.h"
|
||||
#include "pipeline_log.h"
|
||||
|
||||
// The fixed copy of `code` (caller frees) and its size, or NULL when no fix matches.
|
||||
static uint32_t *fixed_shader(const uint32_t *code, size_t size, size_t *out_size) {
|
||||
@@ -184,6 +190,10 @@ static void init(void) {
|
||||
if (validation) LOG("vk shim: adding %s to the instance", VALIDATION_LAYER);
|
||||
if (hide_fdm) LOG("vk shim: fragment density map extensions hidden from the game");
|
||||
if (want_dump && !dump_init(app_files)) LOG("vk shim: shader dump not possible (no package name or files dir)");
|
||||
if (want_pipeline_log) {
|
||||
pl_on = 1;
|
||||
LOG("vk shim: logging failed pipeline creations and sampler Y'CbCr conversions");
|
||||
}
|
||||
if (spec_fixes) LOG("vk shim: Vulkan spec fixes on (depth images can be cleared, no depth resolve in shader-resolve "
|
||||
"subpasses)");
|
||||
real_vk = dlopen("libvulkan.so", RTLD_NOW | RTLD_LOCAL);
|
||||
@@ -401,12 +411,15 @@ static VkRenderPassCreateInfo2 clean_create_info(Arena *a, const VkRenderPassCre
|
||||
|
||||
#define MAX_DEVICES 8
|
||||
enum { FN_RP2, FN_RP2KHR, FN_CSM, FN_CIMG, FN_CQP, FN_DQP, FN_BQ, FN_EQ, FN_CRQP, FN_RQP, FN_RQPEXT, FN_GQPR, FN_CCQPR,
|
||||
FN_PB, FN_PB2, FN_PB2KHR, FN_EDEP, FN_CDEV, FN_CIV, FN_COUNT };
|
||||
FN_PB, FN_PB2, FN_PB2KHR, FN_EDEP, FN_CDEV, FN_CIV, FN_CGP, FN_CCP, FN_CSAMP, FN_CDSL, FN_CPL, FN_CYC, FN_CYCKHR,
|
||||
FN_COUNT };
|
||||
static const char *const FN_NAMES[FN_COUNT] = {
|
||||
"vkCreateRenderPass2", "vkCreateRenderPass2KHR", "vkCreateShaderModule", "vkCreateImage", "vkCreateQueryPool", "vkDestroyQueryPool",
|
||||
"vkCmdBeginQuery", "vkCmdEndQuery", "vkCmdResetQueryPool", "vkResetQueryPool", "vkResetQueryPoolEXT",
|
||||
"vkGetQueryPoolResults", "vkCmdCopyQueryPoolResults", "vkCmdPipelineBarrier", "vkCmdPipelineBarrier2",
|
||||
"vkCmdPipelineBarrier2KHR", "vkEnumerateDeviceExtensionProperties", "vkCreateDevice", "vkCreateImageView"};
|
||||
"vkCmdPipelineBarrier2KHR", "vkEnumerateDeviceExtensionProperties", "vkCreateDevice", "vkCreateImageView",
|
||||
"vkCreateGraphicsPipelines", "vkCreateComputePipelines", "vkCreateSampler", "vkCreateDescriptorSetLayout",
|
||||
"vkCreatePipelineLayout", "vkCreateSamplerYcbcrConversion", "vkCreateSamplerYcbcrConversionKHR"};
|
||||
static struct { VkDevice device; PFN_vkVoidFunction fn[FN_COUNT]; } devices[MAX_DEVICES];
|
||||
static PFN_vkCreateRenderPass2 fallback_rp2khr; // from vkGetInstanceProcAddr
|
||||
static pthread_mutex_t dev_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
@@ -468,11 +481,19 @@ EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateShaderModule(VkDevice device, cons
|
||||
if (dump_on && ci) dump_module(ci->pCode, ci->codeSize); // the game's own module, before any fix
|
||||
size_t size = 0;
|
||||
uint32_t *code = nfixes && ci && ci->pCode ? fixed_shader(ci->pCode, ci->codeSize, &size) : NULL;
|
||||
if (!code) return real(device, ci, alloc, module);
|
||||
if (!code) {
|
||||
VkResult r = real(device, ci, alloc, module);
|
||||
if (pl_on && ci && module) {
|
||||
if (r == VK_SUCCESS) pl_module_add(*module, ci->pCode, ci->codeSize);
|
||||
else LOG("vk shim: vkCreateShaderModule failed: %d (%zu bytes)", r, ci->codeSize);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
VkShaderModuleCreateInfo copy = *ci; // the caller's create info and code stay untouched
|
||||
copy.codeSize = size;
|
||||
copy.pCode = code;
|
||||
VkResult r = real(device, ©, alloc, module);
|
||||
if (pl_on && module && r == VK_SUCCESS) pl_module_add(*module, ci->pCode, ci->codeSize); // named as the game's
|
||||
free(code);
|
||||
if (fixes_applied++ < 20) LOG("vk shim: fixed shader module (%zu -> %zu bytes): %d", ci->codeSize, size, r);
|
||||
return r;
|
||||
@@ -845,6 +866,72 @@ static VKAPI_ATTR void VKAPI_CALL cmd_pipeline_barrier2_khr(VkCommandBuffer cb,
|
||||
pipeline_barrier2(cb, info, FN_PB2KHR);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- pipeline log (vk_pipeline_log, diagnostics)
|
||||
|
||||
static VKAPI_ATTR VkResult VKAPI_CALL create_graphics_pipelines(VkDevice device, VkPipelineCache cache, uint32_t count,
|
||||
const VkGraphicsPipelineCreateInfo *ci,
|
||||
const VkAllocationCallbacks *alloc, VkPipeline *out) {
|
||||
PFN_vkCreateGraphicsPipelines real = (PFN_vkCreateGraphicsPipelines)any_fn(device, FN_CGP);
|
||||
if (!real) return VK_ERROR_INITIALIZATION_FAILED;
|
||||
VkResult r = real(device, cache, count, ci, alloc, out);
|
||||
pl_graphics(count, ci, out, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
static VKAPI_ATTR VkResult VKAPI_CALL create_compute_pipelines(VkDevice device, VkPipelineCache cache, uint32_t count,
|
||||
const VkComputePipelineCreateInfo *ci,
|
||||
const VkAllocationCallbacks *alloc, VkPipeline *out) {
|
||||
PFN_vkCreateComputePipelines real = (PFN_vkCreateComputePipelines)any_fn(device, FN_CCP);
|
||||
if (!real) return VK_ERROR_INITIALIZATION_FAILED;
|
||||
VkResult r = real(device, cache, count, ci, alloc, out);
|
||||
pl_compute(count, ci, out, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
static VKAPI_ATTR VkResult VKAPI_CALL create_sampler(VkDevice device, const VkSamplerCreateInfo *ci,
|
||||
const VkAllocationCallbacks *alloc, VkSampler *sampler) {
|
||||
PFN_vkCreateSampler real = (PFN_vkCreateSampler)any_fn(device, FN_CSAMP);
|
||||
if (!real) return VK_ERROR_INITIALIZATION_FAILED;
|
||||
VkResult r = real(device, ci, alloc, sampler);
|
||||
pl_sampler_created(ci, r, sampler ? *sampler : VK_NULL_HANDLE);
|
||||
return r;
|
||||
}
|
||||
|
||||
static VKAPI_ATTR VkResult VKAPI_CALL create_set_layout(VkDevice device, const VkDescriptorSetLayoutCreateInfo *ci,
|
||||
const VkAllocationCallbacks *alloc, VkDescriptorSetLayout *l) {
|
||||
PFN_vkCreateDescriptorSetLayout real = (PFN_vkCreateDescriptorSetLayout)any_fn(device, FN_CDSL);
|
||||
if (!real) return VK_ERROR_INITIALIZATION_FAILED;
|
||||
VkResult r = real(device, ci, alloc, l);
|
||||
pl_set_layout_created(ci, r, l ? *l : VK_NULL_HANDLE);
|
||||
return r;
|
||||
}
|
||||
|
||||
static VKAPI_ATTR VkResult VKAPI_CALL create_pipeline_layout(VkDevice device, const VkPipelineLayoutCreateInfo *ci,
|
||||
const VkAllocationCallbacks *alloc, VkPipelineLayout *l) {
|
||||
PFN_vkCreatePipelineLayout real = (PFN_vkCreatePipelineLayout)any_fn(device, FN_CPL);
|
||||
if (!real) return VK_ERROR_INITIALIZATION_FAILED;
|
||||
VkResult r = real(device, ci, alloc, l);
|
||||
pl_layout_created(ci, r, l ? *l : VK_NULL_HANDLE);
|
||||
return r;
|
||||
}
|
||||
|
||||
static VkResult create_conversion(VkDevice device, const VkSamplerYcbcrConversionCreateInfo *ci,
|
||||
const VkAllocationCallbacks *alloc, VkSamplerYcbcrConversion *c, int which) {
|
||||
PFN_vkCreateSamplerYcbcrConversion real = (PFN_vkCreateSamplerYcbcrConversion)any_fn(device, which);
|
||||
if (!real) return VK_ERROR_INITIALIZATION_FAILED;
|
||||
VkResult r = real(device, ci, alloc, c);
|
||||
pl_conversion_created(ci, r, c ? *c : VK_NULL_HANDLE);
|
||||
return r;
|
||||
}
|
||||
static VKAPI_ATTR VkResult VKAPI_CALL create_conversion_core(VkDevice d, const VkSamplerYcbcrConversionCreateInfo *ci,
|
||||
const VkAllocationCallbacks *a, VkSamplerYcbcrConversion *c) {
|
||||
return create_conversion(d, ci, a, c, FN_CYC);
|
||||
}
|
||||
static VKAPI_ATTR VkResult VKAPI_CALL create_conversion_khr(VkDevice d, const VkSamplerYcbcrConversionCreateInfo *ci,
|
||||
const VkAllocationCallbacks *a, VkSamplerYcbcrConversion *c) {
|
||||
return create_conversion(d, ci, a, c, FN_CYCKHR);
|
||||
}
|
||||
|
||||
static int wrapped_index(const char *name) {
|
||||
for (int i = 0; i < FN_COUNT; i++)
|
||||
if (!strcmp(name, FN_NAMES[i])) return i;
|
||||
@@ -855,7 +942,7 @@ static PFN_vkVoidFunction wrap(const char *name) {
|
||||
switch (wrapped_index(name)) {
|
||||
case FN_RP2: return (PFN_vkVoidFunction)vkCreateRenderPass2;
|
||||
case FN_RP2KHR: return (PFN_vkVoidFunction)create_render_pass2_khr;
|
||||
case FN_CSM: return nfixes || dump_on ? (PFN_vkVoidFunction)vkCreateShaderModule : NULL; // else no detour
|
||||
case FN_CSM: return nfixes || dump_on || pl_on ? (PFN_vkVoidFunction)vkCreateShaderModule : NULL; // else no detour
|
||||
case FN_CIMG: return spec_fixes ? (PFN_vkVoidFunction)create_image : NULL;
|
||||
case FN_PB: return spec_fixes ? (PFN_vkVoidFunction)cmd_pipeline_barrier : NULL;
|
||||
case FN_PB2: return spec_fixes ? (PFN_vkVoidFunction)cmd_pipeline_barrier2 : NULL;
|
||||
@@ -863,6 +950,13 @@ static PFN_vkVoidFunction wrap(const char *name) {
|
||||
case FN_EDEP: return hide_fdm ? (PFN_vkVoidFunction)vkEnumerateDeviceExtensionProperties : NULL;
|
||||
case FN_CDEV: return hide_fdm || spec_fixes ? (PFN_vkVoidFunction)vkCreateDevice : NULL;
|
||||
case FN_CIV: return spec_fixes ? (PFN_vkVoidFunction)create_image_view : NULL;
|
||||
case FN_CGP: return pl_on ? (PFN_vkVoidFunction)create_graphics_pipelines : NULL;
|
||||
case FN_CCP: return pl_on ? (PFN_vkVoidFunction)create_compute_pipelines : NULL;
|
||||
case FN_CSAMP: return pl_on ? (PFN_vkVoidFunction)create_sampler : NULL;
|
||||
case FN_CDSL: return pl_on ? (PFN_vkVoidFunction)create_set_layout : NULL;
|
||||
case FN_CPL: return pl_on ? (PFN_vkVoidFunction)create_pipeline_layout : NULL;
|
||||
case FN_CYC: return pl_on ? (PFN_vkVoidFunction)create_conversion_core : NULL;
|
||||
case FN_CYCKHR: return pl_on ? (PFN_vkVoidFunction)create_conversion_khr : NULL;
|
||||
default: break;
|
||||
}
|
||||
if (query_slots < 2) return NULL; // no query remapping: no detours
|
||||
|
||||
+45
-1
@@ -22,6 +22,8 @@
|
||||
#include <math.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "../adapter/hide_fb_foveation.h"
|
||||
|
||||
#define TAG "FrameBridge"
|
||||
#define EXPORT __attribute__((visibility("default")))
|
||||
@@ -45,14 +47,42 @@ static void resolve_overport(void) {
|
||||
static PFN_xrVoidFunction adapter_proc(const char *name) {
|
||||
static PFN_extension_proc fn;
|
||||
if (!fn) {
|
||||
// Loaded by overport's dispatcher once an instance exists; NOLOAD so the shim never loads it by itself.
|
||||
// Normally loaded by OVRPort; only the global settings query may load it early.
|
||||
void *h = dlopen("libopenxr_loader_generic.so", RTLD_NOW | RTLD_NOLOAD);
|
||||
// Global enumeration can be answered entirely by the dispatcher. Load the
|
||||
// adapter for its settings query even before an OpenXR instance exists.
|
||||
if (!h && !strcmp(name, "framebridge_hide_fb_foveation"))
|
||||
h = dlopen("libopenxr_loader_generic.so", RTLD_NOW | RTLD_LOCAL);
|
||||
if (h) fn = (PFN_extension_proc)dlsym(h, "framebridge_extension_proc");
|
||||
if (!fn) return NULL;
|
||||
}
|
||||
return fn(name);
|
||||
}
|
||||
|
||||
// OVRPort advertises FB extensions itself, above the runtime adapter. Filter the
|
||||
// synthetic list too, including when the dispatcher never enumerates the runtime.
|
||||
static int hide_fb_enabled(void) {
|
||||
typedef int (*Query)(void);
|
||||
Query query = (Query)adapter_proc("framebridge_hide_fb_foveation");
|
||||
return query && query();
|
||||
}
|
||||
static PFN_xrEnumerateInstanceExtensionProperties dispatcher_enumerate;
|
||||
static PFN_xrCreateInstance dispatcher_create;
|
||||
static XrResult XRAPI_CALL enumerate_extensions(const char *layer, uint32_t capacity,
|
||||
uint32_t *count, XrExtensionProperties *properties) {
|
||||
uint32_t ignored = 0;
|
||||
XrResult r = dispatcher_enumerate(layer, 0, &ignored, NULL);
|
||||
if (XR_FAILED(r)) return r;
|
||||
if (!hide_fb_enabled()) return dispatcher_enumerate(layer, capacity, count, properties);
|
||||
__android_log_print(ANDROID_LOG_INFO, TAG, "hide_fb_foveation: filtering dispatcher extensions");
|
||||
return fb_hide_enumerate(dispatcher_enumerate, layer, capacity, count, properties);
|
||||
}
|
||||
static XrResult XRAPI_CALL create_instance(const XrInstanceCreateInfo *info, XrInstance *instance) {
|
||||
if (!hide_fb_enabled() || !fb_instance_uses_vulkan(info)) return dispatcher_create(info, instance);
|
||||
__android_log_print(ANDROID_LOG_INFO, TAG, "hide_fb_foveation: filtering dispatcher instance extensions");
|
||||
return fb_hide_create_instance(dispatcher_create, info, instance);
|
||||
}
|
||||
|
||||
static PFN_xrApplyHapticFeedback overport_haptics;
|
||||
static int haptics_logged;
|
||||
|
||||
@@ -96,6 +126,20 @@ static XRAPI_ATTR XrResult XRAPI_CALL apply_haptic_feedback(XrSession session, c
|
||||
EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrGetInstanceProcAddr(XrInstance instance, const char *name,
|
||||
PFN_xrVoidFunction *function) {
|
||||
pthread_once(&once, resolve_overport);
|
||||
if (name && function && overport_gipa &&
|
||||
(!strcmp(name, "xrEnumerateInstanceExtensionProperties") || !strcmp(name, "xrCreateInstance"))) {
|
||||
PFN_xrVoidFunction real = NULL;
|
||||
XrResult r = overport_gipa(instance, name, &real);
|
||||
if (XR_FAILED(r) || !real) return r;
|
||||
if (!strcmp(name, "xrCreateInstance")) {
|
||||
dispatcher_create = (PFN_xrCreateInstance)real;
|
||||
*function = (PFN_xrVoidFunction)create_instance;
|
||||
} else {
|
||||
dispatcher_enumerate = (PFN_xrEnumerateInstanceExtensionProperties)real;
|
||||
*function = (PFN_xrVoidFunction)enumerate_extensions;
|
||||
}
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
if (name && function && instance != XR_NULL_HANDLE && overport_gipa && !strcmp(name, "xrApplyHapticFeedback")) {
|
||||
PFN_xrVoidFunction real = NULL;
|
||||
XrResult r = overport_gipa(instance, name, &real);
|
||||
|
||||
@@ -135,6 +135,9 @@ class FakeFS:
|
||||
return {"shots": shots, "total": len(shots), "games": list(games.values())}
|
||||
if command == "take_screenshot": # the Screenshots tab's button: a new shot of the running game
|
||||
return self.take_screenshot()
|
||||
if command == "saves_info": # Restore saves…: what the Frame has now, and the copy from the last restore
|
||||
return {"package": args.get("package"), "files": 14, "bytes": 2_310_000, "skipped": [],
|
||||
"running": False, "version": "1.0", "rollback": {"size": 812_000, "time": time.time() - 86400}}
|
||||
raise RuntimeError(f"fake Frame: {command} not available")
|
||||
|
||||
@property
|
||||
@@ -598,6 +601,28 @@ def scan_job(app, folder: str, entries: list[dict], pace: float = 1.0):
|
||||
return app.submit(f"Scan {folder.rstrip('/').rsplit('/', 1)[-1]}", run, None, "scan")
|
||||
|
||||
|
||||
def fake_save_backups(pkg: str) -> None:
|
||||
"""Two pretend save backups of `pkg` on this PC (yesterday's and last week's), for the Restore saves… dialog."""
|
||||
import io
|
||||
import json
|
||||
import tarfile
|
||||
|
||||
from frameport.install import saves
|
||||
|
||||
d = saves.backups_dir(pkg)
|
||||
d.mkdir(parents=True, exist_ok=True)
|
||||
for days, n, size in ((1, 14, 2_300_000), (7, 11, 1_900_000)):
|
||||
created = time.time() - days * 86400
|
||||
path = d / time.strftime("%Y%m%d-%H%M%S.tar.gz", time.localtime(created))
|
||||
manifest = {"format": 1, "package": pkg, "created": created, "version": "1.0",
|
||||
"files": [{"path": f"external/files/save{i}.dat", "size": size // n} for i in range(n)]}
|
||||
raw = json.dumps(manifest).encode()
|
||||
with tarfile.open(path, "w:gz") as tar:
|
||||
ti = tarfile.TarInfo(saves.MANIFEST)
|
||||
ti.size = len(raw)
|
||||
tar.addfile(ti, io.BytesIO(raw))
|
||||
|
||||
|
||||
def attach_fake_frame(app: FramePortApp, monitor_session=None) -> None:
|
||||
"""Connect `app` to a FakeTarget (the shared monitor stream, used by the Monitor tab and the Frame card, too)."""
|
||||
app.monitor_hub.session_factory = monitor_session or FakeMonitorSession
|
||||
|
||||
@@ -27,6 +27,7 @@ from showcase.fakes import ( # noqa: E402,F401
|
||||
add_fake_linux_apps,
|
||||
attach_fake_frame,
|
||||
fake_live_stream,
|
||||
fake_save_backups,
|
||||
install_fakes,
|
||||
open_monitor_details,
|
||||
open_type_tab,
|
||||
@@ -140,6 +141,7 @@ def main() -> int:
|
||||
("tools", lambda a: a.go("settings")),
|
||||
# the index on the left: "This PC" scrolls the page there
|
||||
("settings-index", lambda a: a.page.run_task(a.settings_view.show_section, "pc")),
|
||||
("settings-folders", lambda a: a.page.run_task(a.settings_view.show_section, "folders")),
|
||||
("settings-installing", lambda a: a.page.run_task(a.settings_view.show_section, "installing"))]
|
||||
if game:
|
||||
steps.insert(1, ("game", lambda a: a.open_game(game)))
|
||||
@@ -153,6 +155,9 @@ def main() -> int:
|
||||
if args.fake_frame: # GitHub #90: the Move to… dialog (drives load in the background)
|
||||
steps.append(("move-dialog", lambda a: (a.page.pop_dialog(), a.move_game(game))))
|
||||
steps.append(("uninstall-dialog", lambda a: (a.page.pop_dialog(), a.uninstall(game))))
|
||||
# discussion #352: pick a save backup (two pretend ones) to restore, "Undo last restore" from the Frame
|
||||
steps.append(("restore-saves-dialog", lambda a: (a.page.pop_dialog(), fake_save_backups(game),
|
||||
a.restore_saves(game))))
|
||||
# last: the menus stay open over whatever comes next (the page's "…" menu, then the right-click menu)
|
||||
steps.append(("game-menu", lambda a: (a.show_activity(False), a.open_game_menu(game))))
|
||||
steps.append(("library-menu", lambda a: (a.show_activity(False), a.navigate(0), time.sleep(3),
|
||||
@@ -321,6 +326,14 @@ def main() -> int:
|
||||
("links-settings", lambda a: (a.page.pop_dialog(), a.go("settings")))]
|
||||
if game:
|
||||
steps.append(("links-display-mode", lambda a: a.open_game(game, advanced=True)))
|
||||
# a newer version offered by the game's install link: the Library bar, the game page, the question
|
||||
library.upsert_game(game, link={"source": fake.source, "name": "Example Game", "version": "1.3.0"},
|
||||
link_update={"version": "1.4.0", "checked": time.time()})
|
||||
newer = deeplink.Manifest("Example Game", fake.files, fake.source, version="1.4.0")
|
||||
steps += [("links-update-library", lambda a: a.navigate(0)),
|
||||
("links-update-game", lambda a: a.open_game(game)),
|
||||
("links-update-confirm", lambda a: link_dialog._confirm_updates(
|
||||
a, [(game, "1.3.0", newer, None)], []))]
|
||||
def add_menu_open(page):
|
||||
page.mouse.click(1194, 94) # Add games (1280-wide viewport)
|
||||
time.sleep(2)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"schema": "framedrop.install/v1",
|
||||
"name": "Cool Game",
|
||||
"version": "1.0.0",
|
||||
"frameport": {
|
||||
"description": "A placeholder game for the example \"Install with FramePort\" button. FramePort recognises this link and shows a demo: nothing is downloaded or installed.",
|
||||
"icon": "https://frameport.app/demo/cool-game.svg"
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{
|
||||
"adapter.action_dedup": {
|
||||
"anchor": "adapter-action_dedup",
|
||||
"title": "Unique controller action names",
|
||||
"group": "Game settings"
|
||||
},
|
||||
"adapter.aim_forward": {
|
||||
"anchor": "adapter-aim_forward",
|
||||
"title": "Pointer start",
|
||||
@@ -14,6 +19,11 @@
|
||||
"title": "Pointer turn",
|
||||
"group": "Game settings"
|
||||
},
|
||||
"adapter.alpha_blend_emul": {
|
||||
"anchor": "adapter-alpha_blend_emul",
|
||||
"title": "Fix inside-out mixed reality",
|
||||
"group": "Game settings"
|
||||
},
|
||||
"adapter.controller_fix": {
|
||||
"anchor": "adapter-controller_fix",
|
||||
"title": "Use controllers",
|
||||
@@ -144,6 +154,11 @@
|
||||
"title": "Vibration strength",
|
||||
"group": "Game settings"
|
||||
},
|
||||
"adapter.hide_fb_foveation": {
|
||||
"anchor": "adapter-hide_fb_foveation",
|
||||
"title": "Turn off Quest Vulkan foveation",
|
||||
"group": "Game settings"
|
||||
},
|
||||
"adapter.hide_space_warp": {
|
||||
"anchor": "adapter-hide_space_warp",
|
||||
"title": "Turn off space warp",
|
||||
@@ -304,6 +319,11 @@
|
||||
"title": "Hide Vulkan foveation",
|
||||
"group": "Game settings"
|
||||
},
|
||||
"adapter.vk_pipeline_log": {
|
||||
"anchor": "adapter-vk_pipeline_log",
|
||||
"title": "Vulkan pipeline failures (log)",
|
||||
"group": "Game settings"
|
||||
},
|
||||
"adapter.vk_query_slots": {
|
||||
"anchor": "adapter-vk_query_slots",
|
||||
"title": "Stop objects popping in and out",
|
||||
@@ -414,6 +434,11 @@
|
||||
"title": "BlazeRush: controllers without Meta avatars, own shader cache",
|
||||
"group": "Steam Frame patches"
|
||||
},
|
||||
"frame.cortopia_org_id": {
|
||||
"anchor": "frame-cortopia_org_id",
|
||||
"title": "Cortopia games: don't wait for Meta's org-scoped id",
|
||||
"group": "Steam Frame patches"
|
||||
},
|
||||
"frame.eos_keychain_loop": {
|
||||
"anchor": "frame-eos_keychain_loop",
|
||||
"title": "Epic Online Services: stop the keychain retry loop",
|
||||
@@ -429,6 +454,11 @@
|
||||
"title": "GL shim (Mesa GLSL compatibility)",
|
||||
"group": "Steam Frame patches"
|
||||
},
|
||||
"frame.gms_platform_version": {
|
||||
"anchor": "frame-gms_platform_version",
|
||||
"title": "Play services: Android 11 version checks",
|
||||
"group": "Steam Frame patches"
|
||||
},
|
||||
"frame.godot_clipboard": {
|
||||
"anchor": "frame-godot_clipboard",
|
||||
"title": "Godot apps: start without a clipboard service",
|
||||
@@ -509,6 +539,11 @@
|
||||
"title": "Unpaired pointer-authentication checks",
|
||||
"group": "Steam Frame patches"
|
||||
},
|
||||
"frame.photon_voice_audio_route": {
|
||||
"anchor": "frame-photon_voice_audio_route",
|
||||
"title": "Photon Voice: skip Android 12 audio routing",
|
||||
"group": "Steam Frame patches"
|
||||
},
|
||||
"frame.sdl_clipboard": {
|
||||
"anchor": "frame-sdl_clipboard",
|
||||
"title": "SDL apps: start without a clipboard service",
|
||||
@@ -534,6 +569,11 @@
|
||||
"title": "Team Beef ports: treat the Frame as a Meta headset",
|
||||
"group": "Steam Frame patches"
|
||||
},
|
||||
"frame.unity_appui_vibrator": {
|
||||
"anchor": "frame-unity_appui_vibrator",
|
||||
"title": "Unity App UI: no Android 12 vibrator",
|
||||
"group": "Steam Frame patches"
|
||||
},
|
||||
"frame.unity_gl_shim": {
|
||||
"anchor": "frame-unity_gl_shim",
|
||||
"title": "GL shim for Unity (no multisampled render-to-texture)",
|
||||
@@ -589,6 +629,11 @@
|
||||
"title": "Unreal: match multiview depth to the eye size",
|
||||
"group": "Steam Frame patches"
|
||||
},
|
||||
"frame.unreal_noreserve": {
|
||||
"anchor": "frame-unreal_noreserve",
|
||||
"title": "Unreal: reserve memory like on Quest",
|
||||
"group": "Steam Frame patches"
|
||||
},
|
||||
"frame.unreal_ovrp_entrypoints": {
|
||||
"anchor": "frame-unreal_ovrp_entrypoints",
|
||||
"title": "Unreal: stand-ins for OVRPlugin functions OVRPort lacks",
|
||||
@@ -624,6 +669,11 @@
|
||||
"title": "Unreal: thumb follows the capacitive touches",
|
||||
"group": "Steam Frame patches"
|
||||
},
|
||||
"frame.usb_midi_watcher": {
|
||||
"anchor": "frame-usb_midi_watcher",
|
||||
"title": "USB MIDI: don't poll for USB devices",
|
||||
"group": "Steam Frame patches"
|
||||
},
|
||||
"frame.vermillion_scene_canvas": {
|
||||
"anchor": "frame-vermillion_scene_canvas",
|
||||
"title": "Vermillion: paint canvases in the scene",
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# The FramePort version: the single source (pyproject reads it via hatch; CI checks a release tag matches it).
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.2.1"
|
||||
@@ -43,7 +43,18 @@ IL2CPP_METADATA = "assets/bin/Data/Managed/Metadata/global-metadata.dat"
|
||||
# 17: headset (the Meta headset a VR app was made for: Gear VR / Go games run through frame.a32_bridge) (2026-10)
|
||||
# 18: headset "quest" also for 32-bit apps that require 6DoF head tracking (Santa Cruz builds, e.g. Sports
|
||||
# Scramble: Touch controllers on the a32 bridge) (2026-10)
|
||||
ANALYSIS_VERSION = 19
|
||||
# 19: unreal_obb_delivery also for obfuscated DownloaderActivity predicates (GitHub #159) (2026-10)
|
||||
# 20: google_vr (Google Daydream / Cardboard builds: GVR or Cardboard SDK, no path to the Frame's headset,
|
||||
# GitHub #335) (2026-10)
|
||||
# 21: photon_voice_api31 (Photon Voice's AudioInAEC calls Android 12 AudioManager methods:
|
||||
# frame.photon_voice_audio_route, GitHub #362/#325); cortopia_org_id (Cortopia's Meta start-up waits for
|
||||
# Users.GetOrgScopedID: frame.cortopia_org_id, GitHub #360); unity_appui_vibrator (Unity App UI's activity uses
|
||||
# Android 12's VibratorManager: frame.unity_appui_vibrator, GitHub #297); gms_folded_sdk_checks (Play services'
|
||||
# Android 12 checks folded to true by R8: frame.gms_platform_version, GitHub #310); usb_midi_watcher (kshoji's
|
||||
# USB MIDI driver polls the missing USB service: frame.usb_midi_watcher, GitHub #297) (2026-10)
|
||||
# 22: unreal_binned3 (Unreal built with FMallocBinned3 reserves tens of GiB at load: frame.unreal_noreserve,
|
||||
# GitHub #349) (2026-10)
|
||||
ANALYSIS_VERSION = 22
|
||||
|
||||
|
||||
# Android versions by API level (for messages); the Frame's Lepton container runs Android 11 (API 30)
|
||||
@@ -87,6 +98,13 @@ def cryengine_project(data: bytes) -> bool:
|
||||
UE_VERIFY_OBB_KEY = ".GameActivity.bVerifyOBBOnStartUp"
|
||||
|
||||
|
||||
def unreal_binned3(engine: bytes) -> bool:
|
||||
"""Unreal built with FMallocBinned3 as its allocator (its own messages and source path are compiled in; other
|
||||
builds only name its console variables). It reserves its whole range while the library loads (GitHub #349)."""
|
||||
return (b"/HAL/MallocBinned3.cpp\0" in engine
|
||||
or "FMallocBinned3 Attempt to free".encode("utf-16-le") in engine)
|
||||
|
||||
|
||||
def unreal_verify_obb(meta: dict) -> bool:
|
||||
"""Unreal's DownloaderActivity checks every OBB entry's CRC at the first start (a full read; on a mismatch it waits
|
||||
on an error screen). Only a real boolean counts: GameActivity reads it with Bundle.getBoolean."""
|
||||
@@ -197,6 +215,32 @@ def vr_kind(libs: set[str], manifest_strings: list[str]) -> str:
|
||||
return "none"
|
||||
|
||||
|
||||
# Google VR (Daydream / Cardboard): the manifest categories of a Daydream / Cardboard app, Daydream's VR service
|
||||
# (android:enableVrMode="com.google.vr.vrcore/..."), the GVR SDK's library and the Cardboard SDK's
|
||||
# (github.com/googlevr/cardboard), and the GVR SDK's Java classes. Not libgvraudio.so / Unity's
|
||||
# libaudioplugingvrunity.so: Google's spatial audio, which Quest games ship too (e.g. Shadow Point).
|
||||
DAYDREAM_CATEGORY = "com.google.intent.category.DAYDREAM"
|
||||
CARDBOARD_CATEGORY = "com.google.intent.category.CARDBOARD"
|
||||
GOOGLE_VR_LIBS = {"libgvr.so", "libcardboard_api.so", "libGfxPluginCardboard.so"}
|
||||
GVR_DEX_MARKERS = (b"Lcom/google/vr/ndk/base/GvrLayout;", b"Lcom/google/vr/sdk/base/GvrView;",
|
||||
b"Lcom/google/vr/sdk/base/GvrActivity;", b"Lcom/google/cardboard/sdk/")
|
||||
|
||||
|
||||
def google_vr(libs: set[str], cats: set[str], manifest_strings: list[str], gvr_java: bool = False,
|
||||
boot: str = "") -> str:
|
||||
"""A Google VR app: "daydream" (Daydream: needs Google's VR services, VrCore), "cardboard" (Cardboard: draws
|
||||
both eyes side by side with lens distortion onto a phone screen) or "" (neither). Neither has a path to the
|
||||
Frame's headset: a Lepton app only reaches it through OpenXR (VrApi / OVRPlugin games are translated to it).
|
||||
`boot` = Unity's boot.config (vr-device-list=, where Unity builds list their VR devices)."""
|
||||
devices = next((ln.split("=", 1)[1].lower() for ln in boot.splitlines() if ln.startswith("vr-device-list=")), "")
|
||||
if (DAYDREAM_CATEGORY in cats or any(s.startswith("com.google.vr.vrcore") for s in manifest_strings)
|
||||
or "daydream" in devices):
|
||||
return "daydream"
|
||||
if CARDBOARD_CATEGORY in cats or "cardboard" in devices or libs & GOOGLE_VR_LIBS or gvr_java:
|
||||
return "cardboard"
|
||||
return ""
|
||||
|
||||
|
||||
# Kotlin's message for a failed non-null cast to ClipboardManager (Godot 4.2-4.4; 4.1 is Java, 4.5+ uses `as?`)
|
||||
GODOT_CLIPBOARD_CAST = b"null cannot be cast to non-null type android.content.ClipboardManager"
|
||||
|
||||
@@ -242,6 +286,21 @@ def analyze(path: Path, deep: bool = True, data_bytes: int | None = None) -> Ana
|
||||
godot_clipboard = any(b"Lorg/godotengine/godot/Godot;" in d and GODOT_CLIPBOARD_CAST in d for d in dexes)
|
||||
# Vivox voice chat calling Android 12 audio-routing methods: crashes in Lepton (Android 11)
|
||||
vivox_api31 = any(b"Lcom/vivox/sdk/AudioChangeListener;" in d and b"CommunicationDevice" in d for d in dexes)
|
||||
# Photon Voice's microphone plugin does the same (frame.photon_voice_audio_route, GitHub #362)
|
||||
photon_voice_api31 = any(b"Lcom/exitgames/photon/audioinaec/AudioInAEC;" in d and b"CommunicationDevice" in d
|
||||
for d in dexes)
|
||||
# Unity App UI's activity gets Android 12's VibratorManager in onCreate: crashes in Lepton (Android 11)
|
||||
unity_appui_vibrator = any(b"Lcom/unity3d/player/appui/" in d and b"Landroid/os/VibratorManager;" in d
|
||||
and b"vibrator_manager" in d for d in dexes)
|
||||
# kshoji's USB MIDI driver polls Android's USB service, which Lepton lacks (frame.usb_midi_watcher)
|
||||
usb_midi_watcher = any(b"Ljp/kshoji/driver/midi/device/MidiDeviceConnectionWatcher"
|
||||
b"$MidiDeviceConnectionWatchThread;"
|
||||
in d for d in dexes)
|
||||
# Play services' PlatformVersion.isAtLeastS() & co. folded to `return true` (minSdk 31+ builds): crash on
|
||||
# Android 11 (frame.gms_platform_version)
|
||||
from ..patches.frame.gms_platform_version import has_folded_checks
|
||||
|
||||
gms_folded_sdk_checks = has_folded_checks(dexes)
|
||||
# Epic Online Services' keychain (it can retry without end when it can't write: frame.eos_keychain_loop)
|
||||
eos_keychain = any(b"Lcom/epicgames/mobile/eossdk/EOSSDK;" in d and b"resetKeychain" in d for d in dexes)
|
||||
# bHaptics asks for an Android 12 permission; the prompt interrupts the game (frame.bhaptics_permission)
|
||||
@@ -249,6 +308,8 @@ def analyze(path: Path, deep: bool = True, data_bytes: int | None = None) -> Ana
|
||||
for d in dexes)
|
||||
# video through Android's decoders (frame.hw_video_decode): Java MediaCodec, ExoPlayer/Media3, or libVLC
|
||||
media_codec = any(m in d for d in dexes for m in MEDIA_CODEC_MARKERS) or "libvlc.so" in libs
|
||||
# Google VR's Java side (GvrLayout / GvrView, the Cardboard SDK): a Daydream / Cardboard app (google_vr)
|
||||
gvr_java = any(m in d for d in dexes for m in GVR_DEX_MARKERS)
|
||||
from ..patches.frame.unreal_obb_check import has_delivery_check
|
||||
|
||||
# Includes obfuscated DownloaderActivity predicates; CRC verification is a separate manifest switch.
|
||||
@@ -372,15 +433,25 @@ def analyze(path: Path, deep: bool = True, data_bytes: int | None = None) -> Ana
|
||||
"xr_layer_exts": sorted(layer_exts), # composition-layer extensions the game's own libraries request
|
||||
"vr_kind": vr_kind(libset, manifest_strings),
|
||||
"headset": headset(meta, abis, vr_kind(libset, manifest_strings), requires_6dof(manifest)),
|
||||
# a Google Daydream / Cardboard build (GVR / Cardboard SDK): no path to the Frame's headset (GitHub #335)
|
||||
"google_vr": google_vr(libset, cats, manifest_strings, gvr_java, boot),
|
||||
# the base of a split APK set (Play "app bundle" installs): the code/libraries live in split APKs
|
||||
"split_apk": bool({"isSplitRequired", "requiredSplitTypes"} & set(manifest_strings)),
|
||||
# Unity (IL2CPP) text fields: they close at once on the Frame (frame.unity_text_input)
|
||||
"text_fields": unity_text_fields(il2cpp_meta) if il2cpp_meta else [],
|
||||
# Meta's OVRManager raises MSAA at runtime (frame.unity_runtime_msaa_off); Oculus XR Plugin (multiview)
|
||||
"ovr_runtime_msaa": bool(il2cpp_meta) and b"\0useRecommendedMSAALevel\0" in il2cpp_meta,
|
||||
# Cortopia's Meta platform start-up awaits an org-scoped user id OVRPort never answers
|
||||
# (frame.cortopia_org_id, GitHub #360)
|
||||
"cortopia_org_id": bool(il2cpp_meta) and b"\0Cortopia.Scripts.Platform.Meta\0" in il2cpp_meta
|
||||
and b"\0GetOrgScopedID\0" in il2cpp_meta,
|
||||
"sdl_java": sdl_java,
|
||||
"godot_clipboard": godot_clipboard,
|
||||
"vivox_api31": vivox_api31,
|
||||
"photon_voice_api31": photon_voice_api31,
|
||||
"unity_appui_vibrator": unity_appui_vibrator,
|
||||
"gms_folded_sdk_checks": gms_folded_sdk_checks,
|
||||
"usb_midi_watcher": usb_midi_watcher,
|
||||
"eos_keychain": eos_keychain,
|
||||
"bhaptics_permission": bhaptics_permission,
|
||||
"media_codec": media_codec,
|
||||
@@ -410,6 +481,10 @@ def analyze(path: Path, deep: bool = True, data_bytes: int | None = None) -> Ana
|
||||
# Unreal CRC-checks the OBB before the game starts (frame.unreal_skip_obb_check, GitHub #159)
|
||||
"unreal_verify_obb": unreal_verify_obb(meta),
|
||||
"unreal_obb_delivery": unreal_obb_delivery,
|
||||
# Unreal's Binned3 allocator reserves more address space than the Frame's kernel grants in one writable
|
||||
# mapping (frame.unreal_noreserve, GitHub #349)
|
||||
"unreal_binned3": (unreal_binned3(lib_bytes.get(engine_lib.rsplit("/", 1)[1], b""))
|
||||
if engine_lib else False),
|
||||
# Unreal's Oculus module needs every OVRPlugin function it looks up (frame.unreal_ovrp_entrypoints)
|
||||
"unreal_ovrp_lookups": (ovrp_lookups(lib_bytes.get(engine_lib.rsplit("/", 1)[1], b""))
|
||||
if engine_lib and "libOVRPlugin.so" in libset else []),
|
||||
|
||||
@@ -20,6 +20,23 @@ def _elf(data: bytes) -> ELFFile:
|
||||
return ELFFile(io.BytesIO(data))
|
||||
|
||||
|
||||
def dynsym_section(elf: ELFFile):
|
||||
"""The dynamic symbol table, found by section type: some shipped libraries have a scrambled section name table
|
||||
(GitHub #349: Transformers Beyond Reality's libOVRPlugin.so calls .dynsym "text"), types and links are intact."""
|
||||
sec = elf.get_section_by_name(".dynsym")
|
||||
if isinstance(sec, SymbolTableSection) and sec["sh_type"] == "SHT_DYNSYM":
|
||||
return sec
|
||||
return next((s for s in elf.iter_sections() if s["sh_type"] == "SHT_DYNSYM"), None)
|
||||
|
||||
|
||||
def dynstr_section(elf: ELFFile, dynsym=None):
|
||||
"""The string table of the dynamic symbols (dynsym's sh_link; by name as a fallback)."""
|
||||
dynsym = dynsym if dynsym is not None else dynsym_section(elf)
|
||||
if dynsym is not None and 0 < dynsym["sh_link"] < elf.num_sections():
|
||||
return elf.get_section(dynsym["sh_link"])
|
||||
return elf.get_section_by_name(".dynstr")
|
||||
|
||||
|
||||
def needed(data: bytes) -> list[str]:
|
||||
elf = _elf(data)
|
||||
for sec in elf.iter_sections():
|
||||
@@ -48,7 +65,7 @@ def dyn_symbols(data: bytes, defined: bool) -> set[str]:
|
||||
@lru_cache(maxsize=256)
|
||||
def _dyn_symbols_cached(data: bytes, defined: bool) -> frozenset[str]:
|
||||
elf = _elf(data)
|
||||
sec = elf.get_section_by_name(".dynsym")
|
||||
sec = dynsym_section(elf)
|
||||
out = set()
|
||||
if isinstance(sec, SymbolTableSection):
|
||||
for sym in sec.iter_symbols():
|
||||
@@ -69,7 +86,8 @@ def find_symbols(data: bytes, names) -> dict[str, tuple[int, int]]:
|
||||
if not is_elf(data) or data[4] != 2 or data[5] != 1:
|
||||
return {}
|
||||
elf = _elf(data)
|
||||
dynsym, dynstr = elf.get_section_by_name(".dynsym"), elf.get_section_by_name(".dynstr")
|
||||
dynsym = dynsym_section(elf)
|
||||
dynstr = dynstr_section(elf, dynsym)
|
||||
if dynsym is None or dynstr is None:
|
||||
return {}
|
||||
sym_off, sym_size = dynsym["sh_offset"], dynsym["sh_size"]
|
||||
@@ -147,7 +165,7 @@ def hide_exports(data: bytes, names) -> tuple[bytes, list[str]]:
|
||||
(native/langpack) still finds the original address. Returns (data, names actually hidden); ELF64 only."""
|
||||
if not is_elf(data) or not is_64bit(data) or data[5] != 1:
|
||||
return data, []
|
||||
sec = _elf(data).get_section_by_name(".dynsym")
|
||||
sec = dynsym_section(_elf(data))
|
||||
if not isinstance(sec, SymbolTableSection):
|
||||
return data, []
|
||||
wanted = set(names)
|
||||
@@ -171,7 +189,7 @@ def redirect_exports(data: bytes, names) -> tuple[bytes, list[str]]:
|
||||
"""
|
||||
if not is_elf(data) or not is_64bit(data) or data[5] != 1:
|
||||
return data, []
|
||||
sec = _elf(data).get_section_by_name(".dynsym")
|
||||
sec = dynsym_section(_elf(data))
|
||||
if not isinstance(sec, SymbolTableSection):
|
||||
return data, []
|
||||
wanted = set(names)
|
||||
@@ -201,10 +219,11 @@ def rename_imports(data: bytes, renames: dict[str, str]) -> tuple[bytes, list[st
|
||||
if len(new) > len(old):
|
||||
raise ValueError(f"{new} is longer than {old}")
|
||||
elf = _elf(data)
|
||||
dynsym, dynstr = elf.get_section_by_name(".dynsym"), elf.get_section_by_name(".dynstr")
|
||||
dynsym = dynsym_section(elf)
|
||||
dynstr = dynstr_section(elf, dynsym)
|
||||
if not isinstance(dynsym, SymbolTableSection) or dynstr is None:
|
||||
return data, []
|
||||
versym = elf.get_section_by_name(".gnu.version")
|
||||
versym = next((s for s in elf.iter_sections() if s["sh_type"] == "SHT_GNU_versym"), None)
|
||||
str_off = dynstr["sh_offset"]
|
||||
targets, refs = {}, {} # dynsym index -> st_name of an import to rename; st_name -> referencing dynsym indices
|
||||
for i, sym in enumerate(dynsym.iter_symbols()):
|
||||
@@ -376,24 +395,23 @@ def add_needed(data: bytes, library: str) -> bytes:
|
||||
write_ph(i, p)
|
||||
|
||||
# section headers: point .dynamic / .dynstr at the new copies (for tools; the loader uses program headers)
|
||||
# Found by type and link, not by name: some shipped libraries have a scrambled section name table (GitHub #349,
|
||||
# Transformers Beyond Reality's libOVRPlugin.so names .dynamic "dding"), whose types and links are still right.
|
||||
if shoff and shnum:
|
||||
shstrndx = eh[13]
|
||||
SHT_DYNAMIC = 6
|
||||
def sh(i):
|
||||
return list(struct.unpack_from(sh_fmt, buf, shoff + i * shentsize))
|
||||
names_hdr = sh(shstrndx)
|
||||
names_off = names_hdr[4]
|
||||
def sec_name(h):
|
||||
end = buf.index(b"\0", names_off + h[0])
|
||||
return bytes(buf[names_off + h[0]:end]).decode()
|
||||
for i in range(shnum):
|
||||
h = sh(i)
|
||||
n = sec_name(h)
|
||||
if n == ".dynstr":
|
||||
h[3], h[4], h[5] = va_start + str_off, file_end + str_off, len(new_str)
|
||||
elif n == ".dynamic":
|
||||
h[3], h[4], h[5] = va_start + dyn_off, file_end + dyn_off, len(dyn_bytes)
|
||||
else:
|
||||
continue
|
||||
headers = [sh(i) for i in range(shnum)] # sh_name, sh_type, sh_flags, sh_addr, sh_offset, sh_size, sh_link
|
||||
dyn_secs = [i for i, h in enumerate(headers) if h[1] == SHT_DYNAMIC]
|
||||
str_secs = {headers[i][6] for i in dyn_secs if 0 < headers[i][6] < shnum}
|
||||
str_secs |= {i for i, h in enumerate(headers) if h[3] == strtab_va and h[3]} # .dynstr by address
|
||||
for i in dyn_secs:
|
||||
h = headers[i]
|
||||
h[3], h[4], h[5] = va_start + dyn_off, file_end + dyn_off, len(dyn_bytes)
|
||||
struct.pack_into(sh_fmt, buf, shoff + i * shentsize, *h)
|
||||
for i in str_secs - set(dyn_secs):
|
||||
h = headers[i]
|
||||
h[3], h[4], h[5] = va_start + str_off, file_end + str_off, len(new_str)
|
||||
struct.pack_into(sh_fmt, buf, shoff + i * shentsize, *h)
|
||||
result = bytes(buf)
|
||||
got = needed(result)
|
||||
|
||||
@@ -9,6 +9,7 @@ from __future__ import annotations
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import tempfile
|
||||
@@ -67,19 +68,22 @@ def find_methods(lib: bytes, metadata: bytes, unity_version: str, wanted: dict[s
|
||||
cache_file = _cache_file(lib, metadata)
|
||||
from ..tools import cpp2il as tool
|
||||
|
||||
nightly = False # Cpp2IL's development build: for metadata newer than its release reads (Unity 6.5+)
|
||||
# a caller's own Cpp2IL or the user's FRAMEPORT_CPP2IL override: never swapped for another build
|
||||
explicit = cpp2il is not None or bool(os.environ.get("FRAMEPORT_CPP2IL"))
|
||||
nightly = False # Cpp2IL's development build: reads metadata (Unity 6.5+) and games the release crashes on
|
||||
try:
|
||||
cached = json.loads(cache_file.read_text())
|
||||
if cached.get("error"): # Cpp2IL can't read this build (e.g. an old Unity): don't run it again per patch
|
||||
if cpp2il is not None or cached.get("nightly") or not tool.unsupported_metadata(cached["error"]):
|
||||
if cached.get("error"): # Cpp2IL couldn't read this build: don't run it again per patch
|
||||
if explicit or cached.get("nightly"):
|
||||
raise RuntimeError(cached["error"])
|
||||
nightly = True # only the release couldn't: the development build gets one try
|
||||
elif _poisoned(cached, wanted):
|
||||
pass # an older FramePort took a Cpp2IL crash for "no such classes": run it again
|
||||
elif all(cls in cached.get("classes", {}) or cls in cached.get("missing", []) for cls in wanted):
|
||||
return {cls: {m: tuple(v) for m, v in cached["classes"][cls].items() if m in names}
|
||||
for cls, names in wanted.items() if cls in cached.get("classes", {})}
|
||||
except (OSError, ValueError, KeyError):
|
||||
pass
|
||||
explicit = cpp2il is not None
|
||||
exe = cpp2il or (tool.ensure_nightly() if nightly else tool.ensure())
|
||||
while True:
|
||||
try:
|
||||
@@ -87,7 +91,7 @@ def find_methods(lib: bytes, metadata: bytes, unity_version: str, wanted: dict[s
|
||||
break
|
||||
except _Unreadable as exc:
|
||||
error = "Cpp2IL couldn't read this game's code: " + str(exc)
|
||||
if not explicit and not nightly and tool.unsupported_metadata(error):
|
||||
if not explicit and not nightly: # e.g. BattleTalent (Unity 2021.3): the release crashes, nightly reads it
|
||||
nightly, exe = True, tool.ensure_nightly()
|
||||
continue
|
||||
cache_file.parent.mkdir(parents=True, exist_ok=True)
|
||||
@@ -99,8 +103,14 @@ def find_methods(lib: bytes, metadata: bytes, unity_version: str, wanted: dict[s
|
||||
return out
|
||||
|
||||
|
||||
def _poisoned(cached: dict, wanted: dict) -> bool:
|
||||
"""A cache entry written when Cpp2IL crashed after making its folders (GitHub #293): no class found at all and
|
||||
every wanted one recorded missing. A real game always has some of them (UnityEngine's QualitySettings)."""
|
||||
return not cached.get("classes") and bool(wanted) and all(c in cached.get("missing", []) for c in wanted)
|
||||
|
||||
|
||||
class _Unreadable(Exception):
|
||||
"""Cpp2IL wrote no output; the message is its last exception line."""
|
||||
"""Cpp2IL failed or wrote no class files; the message is its last exception line."""
|
||||
|
||||
|
||||
def _run(cpp2il: Path, lib: bytes, metadata: bytes, unity_version: str, wanted: dict[str, list[str]],
|
||||
@@ -116,8 +126,10 @@ def _run(cpp2il: Path, lib: bytes, metadata: bytes, unity_version: str, wanted:
|
||||
"--output-to", str(t / "out")], capture_output=True, text=True, errors="replace",
|
||||
timeout=timeout, cwd=tmp)
|
||||
root = t / "out" / "DiffableCs"
|
||||
if not root.is_dir():
|
||||
raise _Unreadable(_last_error(proc.stdout + proc.stderr))
|
||||
# a crash after Cpp2IL made the folder tree (exit 134, no .cs files: GitHub #293) isn't "no such classes"
|
||||
if proc.returncode != 0 or not root.is_dir() or next(root.rglob("*.cs"), None) is None:
|
||||
error = _last_error(proc.stdout + proc.stderr)
|
||||
raise _Unreadable(error if proc.returncode == 0 else f"{error} (exit code {proc.returncode})")
|
||||
out, missing = {}, []
|
||||
for cls, names in wanted.items():
|
||||
f = root / cls
|
||||
|
||||
@@ -66,9 +66,9 @@ def _when(value, end_of_day: bool = False) -> float:
|
||||
except ValueError as exc:
|
||||
raise AnnouncementError(f"not a date: {value!r}") from exc
|
||||
if isinstance(value, dt.datetime):
|
||||
return (value if value.tzinfo else value.replace(tzinfo=dt.timezone.utc)).timestamp()
|
||||
return (value if value.tzinfo else value.replace(tzinfo=dt.UTC)).timestamp()
|
||||
if isinstance(value, dt.date):
|
||||
day = dt.datetime(value.year, value.month, value.day, tzinfo=dt.timezone.utc)
|
||||
day = dt.datetime(value.year, value.month, value.day, tzinfo=dt.UTC)
|
||||
return (day + dt.timedelta(days=1 if end_of_day else 0)).timestamp()
|
||||
raise AnnouncementError(f"not a date: {value!r}")
|
||||
|
||||
|
||||
@@ -67,6 +67,12 @@ class Dex:
|
||||
cls, _proto, name = struct.unpack_from("<HHI", self.data, self.methods_off + 8 * idx)
|
||||
return self.type_name(cls), self.string(name)
|
||||
|
||||
def field(self, idx: int) -> tuple[str, str, str]:
|
||||
"""(class, type, name) of field id `idx`."""
|
||||
fields_off = struct.unpack_from("<I", self.data, 84)[0]
|
||||
cls, typ, name = struct.unpack_from("<HHI", self.data, fields_off + 8 * idx)
|
||||
return self.type_name(cls), self.type_name(typ), self.string(name)
|
||||
|
||||
def return_type(self, idx: int) -> str:
|
||||
proto = struct.unpack_from("<HHI", self.data, self.methods_off + 8 * idx)[1]
|
||||
protos_off = struct.unpack_from("<I", self.data, 76)[0]
|
||||
|
||||
@@ -54,7 +54,7 @@ def apply_frame_fixes(apk_in: Path, apk_out_unsigned: Path, analysis: Analysis,
|
||||
if patch.apply(ctx):
|
||||
applied.append(patch.id)
|
||||
reporter.log(f"applied {patch.id}" + (f" ({'; '.join(ctx.notes)})" if ctx.notes else ""))
|
||||
for name, ok, detail in patch.validate(ctx):
|
||||
for name, ok, detail in [*ctx.checks, *patch.validate(ctx)]:
|
||||
checks.append({"name": name, "ok": ok, "detail": detail})
|
||||
ws.write(apk_out_unsigned)
|
||||
return applied, checks, selection.superseded
|
||||
|
||||
+208
-2
@@ -22,6 +22,8 @@ Errors are one line on stderr; FRAMEPORT_DEBUG=1 shows the traceback.
|
||||
frameport diag report <pkg> # zip + prefilled GitHub problem report
|
||||
frameport share-recipe <pkg> --status works # prefilled GitHub issue submitting a working recipe
|
||||
frameport open-link "<install link>" # FrameDrop button / frameport:// link: download, add, install
|
||||
frameport link-updates [--install] # newer versions of games installed from install links
|
||||
frameport saves backup <pkg>|--all # Quest games' saves from the Frame to this PC (list, restore, undo)
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -50,7 +52,9 @@ tools_app = typer.Typer(help="Manage the portable toolchain.")
|
||||
frame_app = typer.Typer(help="Find and connect to a Steam Frame.")
|
||||
pc_app = typer.Typer(help="This PC as a target for PC VR games (Steam and SteamVR; Revive for Oculus games).")
|
||||
diag_app = typer.Typer(help="Diagnostics bundles and problem reports.")
|
||||
saves_app = typer.Typer(help="Back up Quest games' saves from the Frame to this PC and restore them.")
|
||||
app.add_typer(tools_app, name="tools")
|
||||
app.add_typer(saves_app, name="saves")
|
||||
app.add_typer(frame_app, name="frame")
|
||||
app.add_typer(pc_app, name="pc")
|
||||
app.add_typer(diag_app, name="diag")
|
||||
@@ -227,13 +231,78 @@ def tools_import_keys(dirs: list[Path] = typer.Argument(..., help="folders with
|
||||
# ------------------------------------------------------------------------------------------ library
|
||||
@app.command()
|
||||
def scan(path: Path = typer.Argument(..., help="a folder with game backups (APKs or PC VR game folders), or an APK")):
|
||||
"""Find games under PATH, analyze them and suggest patches."""
|
||||
"""Find games under PATH, analyze them and suggest patches. A folder is remembered for `frameport rescan`
|
||||
(`frameport folders` lists them). Games of the library found here after a move get their new place."""
|
||||
from .core import folders
|
||||
|
||||
if path.is_dir():
|
||||
folders.remember(path)
|
||||
_scan(path, only_new=False)
|
||||
|
||||
|
||||
def _scan(path: Path, only_new: bool) -> None:
|
||||
rep = printing_reporter(verbose=False)
|
||||
for g in pipeline.add_path(path, rep):
|
||||
report = pipeline.ScanReport()
|
||||
for g in pipeline.add_path(path, rep, only_new=only_new, report=report):
|
||||
r = g["recipe"]
|
||||
typer.echo(f"{g['package']:40} {g.get('title', '')[:34]:34} {r['status']:11} {r['source']}")
|
||||
for warning in pipeline.analysis_warnings(g):
|
||||
typer.echo(f" ! {warning}")
|
||||
labels = {"moved": "moved here (location updated)", "updated": "another version here: now used",
|
||||
"other_version": "another version here: left alone (frameport new-version <package> <path>)",
|
||||
"other_copy": "another copy here: the library keeps its own"}
|
||||
for kind, label in labels.items():
|
||||
for item in getattr(report, kind):
|
||||
typer.echo(f"{item['package']:40} {item['title'][:34]:34} {label}: {item['path']}")
|
||||
if report.moved:
|
||||
typer.echo(f"Updated the location of {len(report.moved)} game(s)")
|
||||
|
||||
|
||||
@app.command()
|
||||
def rescan():
|
||||
"""Scan the library folders again (`frameport folders`) for new games and for games that moved there."""
|
||||
from .core import folders
|
||||
|
||||
roots = folders.rescan_roots()
|
||||
if not roots:
|
||||
typer.echo("no folders to rescan yet: frameport scan <folder> or frameport folders --add <folder>")
|
||||
return
|
||||
for root in roots:
|
||||
typer.echo(f"== {root}")
|
||||
_scan(Path(root), only_new=True)
|
||||
|
||||
|
||||
@app.command()
|
||||
def folders(add: list[Path] = typer.Option([], "--add", help="a folder to scan from now on (repeatable)"),
|
||||
remove: list[Path] = typer.Option([], "--remove", help="stop scanning this folder; its games stay in "
|
||||
"the library (repeatable)"),
|
||||
as_json: bool = typer.Option(False, "--json", help=JSON_HELP)):
|
||||
"""The library folders `frameport rescan` (and the GUI's Rescan folders) look in: status, add, remove."""
|
||||
import dataclasses
|
||||
import json
|
||||
|
||||
from .core import folders as lib_folders
|
||||
|
||||
for p in add:
|
||||
try:
|
||||
lib_folders.add(p)
|
||||
except ValueError as exc:
|
||||
raise typer.BadParameter(str(exc)) from None
|
||||
typer.echo(f"added {p}")
|
||||
for p in remove:
|
||||
if lib_folders.remove(p):
|
||||
typer.echo(f"removed {p} (its games stay in the library)")
|
||||
else:
|
||||
typer.echo(f"{p} isn't a library folder", err=True)
|
||||
raise typer.Exit(1)
|
||||
status = lib_folders.status()
|
||||
if as_json:
|
||||
typer.echo(json.dumps([dataclasses.asdict(s) for s in status], indent=1))
|
||||
return
|
||||
if not status:
|
||||
typer.echo("no library folders yet (frameport scan <folder> or frameport folders --add <folder>)")
|
||||
for s in status:
|
||||
typer.echo(f"{'ok' if s.exists else 'MISSING':8} {s.games:4} game(s) {s.path}")
|
||||
|
||||
|
||||
@app.command("catalog-update")
|
||||
@@ -248,6 +317,39 @@ def catalog_update():
|
||||
typer.echo(f" skipped {pkg}: {why}")
|
||||
|
||||
|
||||
@app.command("link-updates")
|
||||
def link_updates(install: bool = typer.Option(False, "--install", help="download the updates and install them on "
|
||||
"the Frame (asks first unless --yes)"),
|
||||
yes: bool = typer.Option(False, "--yes", "-y", help="don't ask before downloading"),
|
||||
frame: Optional[str] = typer.Option(None, help=FRAME_HELP)):
|
||||
"""Check games installed from install links for newer versions (manifests that name a `version`; the GUI checks
|
||||
at start, every 6 h)."""
|
||||
from . import deeplink
|
||||
|
||||
pkgs = pipeline.check_link_updates(force=True, reporter=printing_reporter())
|
||||
if not pkgs:
|
||||
typer.echo("all games from install links are up to date")
|
||||
return
|
||||
for pkg in pkgs:
|
||||
g = library.game(pkg)
|
||||
typer.echo(f"{pkg}: {(g.get('link') or {}).get('version') or '?'} -> {g['link_update']['version']}"
|
||||
f" ({g['link']['source']})")
|
||||
if not install or not (yes or typer.confirm(f"Download and install {len(pkgs)} update(s)?")):
|
||||
return
|
||||
target = _target(frame)
|
||||
for pkg in pkgs:
|
||||
m = deeplink.check_update(library.game(pkg)["link"])
|
||||
if not m:
|
||||
continue
|
||||
rep = printing_reporter(verbose=False)
|
||||
g = pipeline.add_from_link(m, deeplink.download(m, rep), rep, icon=deeplink.fetch_icon(m))
|
||||
if not pipeline.build_game(g["package"], rep)["ok"]:
|
||||
typer.echo(f"{pkg}: the game didn't pass its checks", err=True)
|
||||
continue
|
||||
pipeline.install_game(g["package"], target, rep)
|
||||
typer.echo(f"updated {pkg} to {m.version} on {target.label}")
|
||||
|
||||
|
||||
@app.command("add-linux")
|
||||
def add_linux(path: Path = typer.Argument(..., help="an arm64 AppImage, a folder, or a .zip/.tar.gz with the app"),
|
||||
exe: Optional[str] = typer.Option(None, help="the program to start (relative to the app's folder)")):
|
||||
@@ -709,6 +811,110 @@ def frame_move(package: str = typer.Argument(..., help="an installed game"),
|
||||
typer.echo(f"moved to {st.get('base') or st.get('to')}")
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------------------ save backups (#352)
|
||||
def _save_pkg(package: str) -> str:
|
||||
"""A library game (package or part of its title), else a package name as it is (installed from another PC)."""
|
||||
import re
|
||||
|
||||
try:
|
||||
return _pkgs(package, False)[0]
|
||||
except typer.BadParameter:
|
||||
if re.match(r"^[A-Za-z][A-Za-z0-9_]*(\.[A-Za-z0-9_]+)+$", package):
|
||||
return package
|
||||
raise
|
||||
|
||||
|
||||
@saves_app.command("backup")
|
||||
def saves_backup(package: Optional[str] = typer.Argument(None, help="the game (package or part of its title)"),
|
||||
all_: bool = typer.Option(False, "--all", help="every Quest game installed on the Frame"),
|
||||
frame: Optional[str] = typer.Option(None, help=FRAME_HELP)):
|
||||
"""Copy a Quest game's saves from the Frame to this PC (caches and big downloaded content stay out). The newest
|
||||
backups are kept (10 per game, setting saves.keep). The game must be closed."""
|
||||
from .install import saves
|
||||
|
||||
target = _target(frame)
|
||||
if all_:
|
||||
pkgs = [g["package"] for g in target.installed() if g.get("kind") not in ("pcvr", "linux")
|
||||
and not g.get("overlay")]
|
||||
elif package:
|
||||
pkgs = [_save_pkg(package)]
|
||||
else:
|
||||
raise typer.BadParameter("give a package or --all")
|
||||
failed = 0
|
||||
for pkg in pkgs:
|
||||
try:
|
||||
b = saves.backup(target.frame, pkg, printing_reporter(verbose=False))
|
||||
except saves.SavesError as exc:
|
||||
failed += 1
|
||||
typer.echo(f"{pkg}: not backed up: {exc}", err=True)
|
||||
continue
|
||||
typer.echo(f"{pkg}: {b.files} file(s), {b.bytes / 2**20:.1f} MiB of saves -> {b.path}"
|
||||
+ (f" ({b.skipped} large file(s) left out)" if b.skipped else ""))
|
||||
if failed:
|
||||
raise typer.Exit(1)
|
||||
|
||||
|
||||
@saves_app.command("list")
|
||||
def saves_list(package: str = typer.Argument(..., help="the game (package or part of its title)"),
|
||||
as_json: bool = typer.Option(False, "--json", help=JSON_HELP)):
|
||||
"""This PC's backups of a game, newest first (the number is what `saves restore` takes)."""
|
||||
from .install import saves
|
||||
|
||||
pkg = _save_pkg(package)
|
||||
found = saves.list_backups(pkg)
|
||||
if as_json:
|
||||
typer.echo(json.dumps([{"path": str(b.path), "created": b.created, "size": b.size, "files": b.files,
|
||||
"bytes": b.bytes, "version": b.version, "skipped": b.skipped} for b in found],
|
||||
indent=1))
|
||||
return
|
||||
if not found:
|
||||
typer.echo(f"{pkg}: no backups yet (frameport saves backup {pkg}); folder: {saves.backups_dir(pkg)}")
|
||||
return
|
||||
for i, b in enumerate(found, 1):
|
||||
when = time.strftime("%Y-%m-%d %H:%M", time.localtime(b.created))
|
||||
typer.echo(f"{i:3} {when} {b.files:5} file(s) {b.bytes / 2**20:8.1f} MiB"
|
||||
+ (f" v{b.version}" if b.version else "") + f" {b.path.name}")
|
||||
|
||||
|
||||
@saves_app.command("restore")
|
||||
def saves_restore(package: str = typer.Argument(..., help="the game (package or part of its title)"),
|
||||
backup: Optional[str] = typer.Argument(None, help="a number from `saves list` (default 1 = the "
|
||||
"newest) or a backup file"),
|
||||
yes: bool = typer.Option(False, "--yes", "-y", help="don't ask"),
|
||||
frame: Optional[str] = typer.Option(None, help=FRAME_HELP)):
|
||||
"""Put a backup's saves back on the Frame. The game's current saves there are replaced; the Frame keeps a copy of
|
||||
them (`saves undo` puts them back). The game must be closed."""
|
||||
from .install import saves
|
||||
|
||||
pkg = _save_pkg(package)
|
||||
if backup and not backup.isdigit():
|
||||
path = Path(backup)
|
||||
if not path.is_file():
|
||||
raise typer.BadParameter(f"no such file: {backup}")
|
||||
else:
|
||||
found = saves.list_backups(pkg)
|
||||
n = int(backup or 1)
|
||||
if not 1 <= n <= len(found):
|
||||
raise typer.BadParameter(f"{pkg} has {len(found)} backup(s) (frameport saves list {pkg})")
|
||||
path = found[n - 1].path
|
||||
if not yes:
|
||||
typer.confirm(f"Replace {pkg}'s saves on the Frame with {path.name}?", abort=True)
|
||||
r = saves.restore(_target(frame).frame, pkg, path, printing_reporter(verbose=False))
|
||||
typer.echo(f"{pkg}: restored {r.get('restored', 0)} file(s), removed {r.get('removed', 0)}; the saves from "
|
||||
f"before are kept on the Frame (frameport saves undo {pkg})")
|
||||
|
||||
|
||||
@saves_app.command("undo")
|
||||
def saves_undo(package: str = typer.Argument(..., help="the game (package or part of its title)"),
|
||||
frame: Optional[str] = typer.Option(None, help=FRAME_HELP)):
|
||||
"""Put back the saves the last `saves restore` replaced (they're kept on the Frame)."""
|
||||
from .install import saves
|
||||
|
||||
pkg = _save_pkg(package)
|
||||
r = saves.undo_restore(_target(frame).frame, pkg)
|
||||
typer.echo(f"{pkg}: the saves from before the last restore are back ({r.get('restored', 0)} file(s))")
|
||||
|
||||
|
||||
@frame_app.command("info")
|
||||
def frame_info(frame: Optional[str] = typer.Option(None, help=FRAME_HELP)):
|
||||
"""The Frame's SteamOS build, runtimes, storage and installed games (JSON)."""
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
"""Library folders (GitHub discussion #351): the folders "Rescan folders" scans again (library setting `scan.roots`).
|
||||
|
||||
Every "Scan a folder…" remembers its folder; Settings → Library folders and `frameport folders` list them with their
|
||||
status and let the user add or remove one. Removing a folder only stops it being scanned: the games already in the
|
||||
library stay. No Flet here (the CLI uses it too)."""
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
|
||||
from . import library
|
||||
|
||||
SETTING = "scan.roots"
|
||||
|
||||
|
||||
@dataclass
|
||||
class FolderStatus:
|
||||
path: str
|
||||
exists: bool
|
||||
games: int # library games whose files (APK, data or game folder) are in it
|
||||
|
||||
|
||||
def roots() -> list[str]:
|
||||
"""The remembered folders, in the order they were added (missing ones too)."""
|
||||
return [str(r) for r in (library.setting(SETTING) or [])]
|
||||
|
||||
|
||||
def _same(a: str, b: str) -> bool:
|
||||
if a == b:
|
||||
return True
|
||||
try:
|
||||
return Path(a).resolve() == Path(b).resolve()
|
||||
except OSError:
|
||||
return False
|
||||
|
||||
|
||||
def remember(path: str | Path) -> list[str]:
|
||||
"""Add a folder to the list (a scanned one): moved to the end if it's there already. Returns the new list."""
|
||||
path = str(path)
|
||||
return library.update_setting(SETTING, lambda cur: [r for r in (cur or []) if not _same(str(r), path)] + [path],
|
||||
[])
|
||||
|
||||
|
||||
def add(path: str | Path) -> list[str]:
|
||||
"""Settings/CLI "Add folder…": like remember, but only an existing folder."""
|
||||
p = Path(path).expanduser()
|
||||
if not p.is_dir():
|
||||
raise ValueError(f"{p} isn't a folder")
|
||||
if any(_same(r, str(p)) for r in roots()):
|
||||
return roots()
|
||||
return remember(p)
|
||||
|
||||
|
||||
def remove(path: str | Path) -> bool:
|
||||
"""Stop scanning a folder (its games stay in the library). False if it wasn't in the list."""
|
||||
path = str(path)
|
||||
found = {"hit": False}
|
||||
|
||||
def drop(cur):
|
||||
keep = [r for r in (cur or []) if not _same(str(r), path)]
|
||||
found["hit"] = len(keep) != len(cur or [])
|
||||
return keep
|
||||
library.update_setting(SETTING, drop, [])
|
||||
return found["hit"]
|
||||
|
||||
|
||||
def game_paths(entry: dict) -> list[Path]:
|
||||
"""Where a library game's files are (APK, data folder, game folder)."""
|
||||
out = []
|
||||
for key in ("apk", "data_dir", "game_dir"):
|
||||
if entry.get(key):
|
||||
out.append(Path(entry[key]))
|
||||
return out
|
||||
|
||||
|
||||
def _inside(p: Path, folder: Path) -> bool:
|
||||
try:
|
||||
return p == folder or p.is_relative_to(folder)
|
||||
except (OSError, ValueError):
|
||||
return False
|
||||
|
||||
|
||||
def games_in(folder: str | Path, games: list[dict] | None = None) -> list[dict]:
|
||||
"""Library games whose files are in the folder (by path, no disk access)."""
|
||||
folder = Path(folder)
|
||||
games = library.games() if games is None else games
|
||||
return [g for g in games if g.get("kind") != "linux" and any(_inside(p, folder) for p in game_paths(g))]
|
||||
|
||||
|
||||
def status() -> list[FolderStatus]:
|
||||
"""Each remembered folder: whether it's there now and how many library games come from it. Touches the disk
|
||||
(exists): call it off the UI thread."""
|
||||
games = library.games()
|
||||
out = []
|
||||
for r in roots():
|
||||
try:
|
||||
exists = Path(r).is_dir()
|
||||
except OSError:
|
||||
exists = False
|
||||
out.append(FolderStatus(r, exists, len(games_in(r, games))))
|
||||
return out
|
||||
|
||||
|
||||
def rescan_roots() -> list[str]:
|
||||
"""Folders "Rescan folders" scans: the remembered ones that exist now. Before anything was remembered (libraries
|
||||
from older versions), the folders the library's games came from (one level up from each game folder). A folder
|
||||
inside another one is scanned with it."""
|
||||
saved = library.setting(SETTING)
|
||||
if saved is not None:
|
||||
found = [r for r in saved if Path(r).exists()]
|
||||
else:
|
||||
seen = set()
|
||||
for g in library.games():
|
||||
if g.get("kind") == "linux": # added one by one (its origin may be e.g. Downloads)
|
||||
continue
|
||||
origin = g.get("origin") or (str(Path(g["apk"]).parent) if g.get("apk") else None)
|
||||
if origin and Path(origin).parent.exists():
|
||||
seen.add(str(Path(origin).parent))
|
||||
found = sorted(seen)
|
||||
return [r for r in found if not any(o != r and Path(r).is_relative_to(o) for o in found)]
|
||||
@@ -9,6 +9,11 @@ pasted into "Install from link…"), follows the same
|
||||
rules (https only, http only on this PC, no credentials, no LAN addresses, a URL that ends in a file name) and
|
||||
always asks before it downloads anything a web page sent. `urlhandler.py` registers the schemes.
|
||||
|
||||
Updates: a manifest may name the build's `version` (top level, or `"frameport": {"version": …}`). FramePort stores it
|
||||
with the game (library entry `link`) and, at start, fetches each remembered manifest URL again (pipeline.
|
||||
check_link_updates, at most every LINK_CHECK_HOURS): a newer `version` marks the game `link_update` and the GUI
|
||||
offers to download and install it.
|
||||
|
||||
The homepage's example button points at one fixed demo manifest (DEMO_MANIFEST, also published on the site): every
|
||||
form of that link becomes a request flagged `demo`, which never touches the network (fetch_manifest answers with
|
||||
demo_manifest(), download refuses it) and the GUI answers with a placeholder dialog (ui/views/link_dialog.py).
|
||||
@@ -34,6 +39,7 @@ MAX_MANIFEST = 256 << 10
|
||||
MAX_FILES = 16
|
||||
MAX_DESCRIPTION = 2000
|
||||
MAX_ICON = 2 << 20
|
||||
MAX_VERSION = 64
|
||||
LOOPBACK = ("localhost", "127.0.0.1", "[::1]", "::1")
|
||||
APK, LINUX, EXE, OBB = "apk", "linux", "exe", "obb"
|
||||
DEMO_MANIFEST = "https://frameport.app/demo/cool-game.json" # the homepage's example button
|
||||
@@ -80,6 +86,7 @@ class Manifest:
|
||||
# FramePort-only extension (FrameDrop ignores it): "frameport": {"description": "…", "icon": "https://….png"}
|
||||
description: str = ""
|
||||
icon: str | None = None
|
||||
version: str = "" # the build's version ("1.4.2"), "" = not given: then updates can't be detected
|
||||
demo: bool = False # demo_manifest(): never downloaded
|
||||
|
||||
@property
|
||||
@@ -175,7 +182,7 @@ def demo_manifest() -> Manifest:
|
||||
return Manifest(DEMO_NAME, [ManifestFile("https://frameport.app/demo/cool-game-arm64.apk")], DEMO_MANIFEST,
|
||||
description="A placeholder game for the example \"Install with FramePort\" button. FramePort "
|
||||
"recognises this link and shows a demo: nothing is downloaded or installed.",
|
||||
demo=True)
|
||||
version="1.0.0", demo=True)
|
||||
|
||||
|
||||
def parse(text: str) -> InstallRequest:
|
||||
@@ -224,6 +231,63 @@ def make_link(manifest_url: str | None = None, file_url: str | None = None, sche
|
||||
return f"{scheme}://install?{key}={quote(value or '', safe='')}"
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------------------------- versions
|
||||
def _version_text(value) -> str:
|
||||
if isinstance(value, bool) or not isinstance(value, (str, int, float)):
|
||||
return ""
|
||||
text = " ".join(str(value).split())
|
||||
return text if len(text) <= MAX_VERSION else ""
|
||||
|
||||
|
||||
def _version_key(text: str) -> tuple:
|
||||
"""Sort key for free-form build versions: the dotted numbers ("v1.10.2" → 1, 10, 2; missing parts are 0), then a
|
||||
release above anything after it ("1.2.0-beta3" < "1.2.0"), suffixes compared number-aware ("rc2" < "rc10")."""
|
||||
m = re.match(r"\s*[vV]?(\d+(?:\.\d+)*)(.*)$", text or "")
|
||||
if not m:
|
||||
return ((), 0, (("s", (text or "").lower()),))
|
||||
nums = [int(n) for n in m.group(1).split(".")]
|
||||
while len(nums) > 1 and nums[-1] == 0:
|
||||
nums.pop()
|
||||
rest = m.group(2).strip(" .-_+")
|
||||
parts = tuple(("n", int(p)) if p.isdigit() else ("s", p.lower()) for p in re.findall(r"\d+|[A-Za-z]+", rest))
|
||||
return (tuple(nums), 0 if parts else 1, parts)
|
||||
|
||||
|
||||
def compare_versions(a: str, b: str) -> int:
|
||||
"""-1, 0 or 1: how version a compares to version b (see _version_key)."""
|
||||
ka, kb = _version_key(a), _version_key(b)
|
||||
try:
|
||||
return (ka > kb) - (ka < kb)
|
||||
except TypeError: # a number against a word at the same place: compare as text
|
||||
return (str(ka) > str(kb)) - (str(ka) < str(kb))
|
||||
|
||||
|
||||
def is_newer_version(candidate: str, current: str) -> bool:
|
||||
"""Whether a manifest's version is newer than the installed one (False when either is unknown)."""
|
||||
return bool(candidate and current) and compare_versions(candidate, current) > 0
|
||||
|
||||
|
||||
def can_check_updates(link: dict | None) -> bool:
|
||||
"""Whether a library entry's `link` record can be checked for updates: a manifest fetched from the web (not a bare
|
||||
file link, a dropped local file or the demo) that named a version."""
|
||||
if not isinstance(link, dict) or not link.get("version") or link.get("direct"):
|
||||
return False
|
||||
source = link.get("source") or ""
|
||||
if not source.lower().startswith(("https://", "http://")) or is_demo(source):
|
||||
return False
|
||||
try:
|
||||
return classify(filename_of(source)) is None and bool(check_url(source)) # a file URL isn't a manifest
|
||||
except LinkError:
|
||||
return False
|
||||
|
||||
|
||||
def check_update(link: dict) -> Manifest | None:
|
||||
"""The remembered manifest fetched again: returned when it names a newer version than the one installed, else
|
||||
None. Raises LinkError/network errors like fetch_manifest."""
|
||||
m = fetch_manifest(InstallRequest(manifest_url=link["source"]))
|
||||
return m if is_newer_version(m.version, link.get("version") or "") else None
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------------------------- manifest
|
||||
def title_from_filename(filename: str) -> str:
|
||||
"""A readable guess from a file name: "net.sourceforge.opencamera_96.apk" → "Opencamera",
|
||||
@@ -263,7 +327,9 @@ def manifest_from_data(data, source: str = "") -> Manifest:
|
||||
m = Manifest(" ".join(name.split())[:120], out, source)
|
||||
m.main # noqa: B018 - raises when nothing installable is listed
|
||||
extra = data.get("frameport") # FramePort-only fields; anything wrong in them is ignored (they're optional)
|
||||
m.version = _version_text(data.get("version"))
|
||||
if isinstance(extra, dict):
|
||||
m.version = _version_text(extra.get("version")) or m.version
|
||||
desc = extra.get("description")
|
||||
if isinstance(desc, str):
|
||||
m.description = desc.strip()[:MAX_DESCRIPTION]
|
||||
|
||||
@@ -358,6 +358,15 @@ def save_target(target: FrameTarget) -> None:
|
||||
FAST_LINKS = {"usb0": "USB cable", "wlanap": "the Frame's own Wi-Fi hotspot"}
|
||||
|
||||
|
||||
def install_key_command(pub: str) -> str:
|
||||
"""Shell command that adds `pub` to ~/.ssh/authorized_keys once. A file without a final newline would glue the key
|
||||
onto its last line, where sshd never matches it (GitHub #242: OpenSSH uploads refused FramePort's key)."""
|
||||
q, f = sh_quote(pub), "~/.ssh/authorized_keys"
|
||||
return (f"mkdir -p ~/.ssh && chmod 700 ~/.ssh && touch {f} && "
|
||||
f"{{ grep -qxF {q} {f} || {{ [ -n \"$(tail -c1 {f})\" ] && echo >> {f}; echo {q} >> {f}; }}; }}"
|
||||
f" && chmod 600 {f}")
|
||||
|
||||
|
||||
def bundled_agent_version() -> int | None:
|
||||
"""AGENT_VERSION of the agent this app ships (it's uploaded to the Frame whenever it differs)."""
|
||||
try:
|
||||
@@ -675,10 +684,7 @@ class Frame:
|
||||
|
||||
def install_key(self) -> None:
|
||||
"""After a password login: add FramePort's public key to authorized_keys."""
|
||||
pub = app_public_key()
|
||||
self.run("mkdir -p ~/.ssh && chmod 700 ~/.ssh && touch ~/.ssh/authorized_keys && "
|
||||
f"grep -qxF {sh_quote(pub)} ~/.ssh/authorized_keys || echo {sh_quote(pub)} >> ~/.ssh/authorized_keys"
|
||||
" && chmod 600 ~/.ssh/authorized_keys")
|
||||
self.run(install_key_command(app_public_key()))
|
||||
|
||||
# ------------------------------------------------------------------ agent
|
||||
def ensure_agent(self) -> str:
|
||||
|
||||
@@ -0,0 +1,301 @@
|
||||
"""Save backups of Quest games (GitHub discussion #352: Steam doesn't sync them).
|
||||
|
||||
The Frame agent streams a game's saves as one tar.gz over an SSH exec channel (`_backup_saves`: its internal
|
||||
/data/data/<pkg> folder and its /sdcard/Android/data/<pkg> folder, caches and big content left out; the archive's
|
||||
last member `frameport-saves.json` lists every file with size and sha256). Backups live on this PC in
|
||||
<user data>/save-backups/<pkg>/<YYYYmmdd-HHMMSS>.tar.gz with a <same>.json sidecar (the manifest without the file
|
||||
list); the newest `keep_count()` per game are kept (setting `saves.keep`). Restoring streams one back
|
||||
(`_restore_saves`): the agent checks the whole archive first (paths, links, sizes, hashes), keeps the Frame's current
|
||||
saves as <base>/saves-before-restore.tar.gz (one copy: `undo_restore`), then swaps the files in. Both refuse while the
|
||||
game runs. No Flet here: the GUI and the CLI share it.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import re
|
||||
import tarfile
|
||||
import time
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
|
||||
from ..core import library
|
||||
from ..core.events import Reporter
|
||||
from ..core.paths import user_data_dir
|
||||
|
||||
KEEP_DEFAULT = 10
|
||||
KEEP_CHOICES = (3, 5, 10, 20, 50)
|
||||
MANIFEST = "frameport-saves.json"
|
||||
_NAME = re.compile(r"^\d{8}-\d{6}(-\d+)?\.tar\.gz$")
|
||||
_PKG = re.compile(r"^[A-Za-z][A-Za-z0-9_]*(\.[A-Za-z0-9_]+)+$")
|
||||
CHUNK = 1 << 16
|
||||
EXEC_TIMEOUT = 600 # s without data from the Frame (a dead link must not hang a job)
|
||||
|
||||
|
||||
class SavesError(RuntimeError):
|
||||
"""The Frame refused or failed (its own sentence, e.g. "the game is running")."""
|
||||
|
||||
|
||||
@dataclass
|
||||
class Backup:
|
||||
package: str
|
||||
path: Path
|
||||
created: float
|
||||
size: int # the archive on this PC
|
||||
files: int = 0
|
||||
bytes: int = 0 # the save files' size (uncompressed)
|
||||
version: str = ""
|
||||
title: str = ""
|
||||
skipped: int = 0 # large files left out
|
||||
|
||||
@property
|
||||
def sidecar(self) -> Path:
|
||||
return sidecar_of(self.path)
|
||||
|
||||
|
||||
def root_dir() -> Path:
|
||||
return user_data_dir() / "save-backups"
|
||||
|
||||
|
||||
def backups_dir(pkg: str) -> Path:
|
||||
if not _PKG.match(pkg):
|
||||
raise ValueError(f"bad package name {pkg!r}")
|
||||
return root_dir() / pkg
|
||||
|
||||
|
||||
def sidecar_of(archive: Path) -> Path:
|
||||
return archive.with_name(archive.name[: -len(".tar.gz")] + ".json")
|
||||
|
||||
|
||||
def keep_count() -> int:
|
||||
try:
|
||||
n = int(library.setting("saves.keep", KEEP_DEFAULT))
|
||||
except (TypeError, ValueError):
|
||||
n = KEEP_DEFAULT
|
||||
return max(1, n)
|
||||
|
||||
|
||||
def read_manifest(archive: Path) -> dict:
|
||||
"""The manifest inside a backup (reads the whole archive: also checks it's complete). ValueError if it isn't a
|
||||
FramePort save backup."""
|
||||
try:
|
||||
with tarfile.open(archive, "r:gz") as tar:
|
||||
found = None
|
||||
for m in tar:
|
||||
if m.name == MANIFEST and m.isreg():
|
||||
found = json.loads(tar.extractfile(m).read().decode("utf-8"))
|
||||
except (OSError, tarfile.TarError, EOFError, ValueError) as exc:
|
||||
raise ValueError(f"{archive.name} isn't a readable save backup ({exc})") from None
|
||||
if not isinstance(found, dict) or found.get("format") != 1 or not found.get("package"):
|
||||
raise ValueError(f"{archive.name} isn't a FramePort save backup")
|
||||
return found
|
||||
|
||||
|
||||
def _sidecar_data(manifest: dict, archive: Path) -> dict:
|
||||
files = manifest.get("files") or []
|
||||
return {"package": manifest.get("package"), "created": manifest.get("created"),
|
||||
"version": manifest.get("version") or "", "title": manifest.get("title") or "",
|
||||
"files": len(files), "bytes": sum(int(f.get("size") or 0) for f in files),
|
||||
"skipped": [s for s in manifest.get("skipped") or [] if s.get("reason") in ("size", "unreadable")],
|
||||
"archive": archive.name, "agent": manifest.get("agent")}
|
||||
|
||||
|
||||
def _from_sidecar(archive: Path, data: dict) -> Backup:
|
||||
return Backup(package=str(data.get("package") or archive.parent.name), path=archive,
|
||||
created=float(data.get("created") or archive.stat().st_mtime), size=archive.stat().st_size,
|
||||
files=int(data.get("files") or 0), bytes=int(data.get("bytes") or 0),
|
||||
version=str(data.get("version") or ""), title=str(data.get("title") or ""),
|
||||
skipped=len(data.get("skipped") or []))
|
||||
|
||||
|
||||
def list_backups(pkg: str) -> list[Backup]:
|
||||
"""This game's backups on this PC, newest first (a missing/broken sidecar is rebuilt from the archive)."""
|
||||
d = backups_dir(pkg)
|
||||
out = []
|
||||
for archive in sorted(d.glob("*.tar.gz")) if d.is_dir() else []:
|
||||
if not _NAME.match(archive.name):
|
||||
continue
|
||||
try:
|
||||
data = json.loads(sidecar_of(archive).read_text(encoding="utf-8"))
|
||||
except (OSError, ValueError):
|
||||
try:
|
||||
data = _sidecar_data(read_manifest(archive), archive)
|
||||
sidecar_of(archive).write_text(json.dumps(data, indent=1), encoding="utf-8")
|
||||
except (OSError, ValueError):
|
||||
continue
|
||||
try:
|
||||
out.append(_from_sidecar(archive, data))
|
||||
except OSError:
|
||||
continue
|
||||
return sorted(out, key=lambda b: b.created, reverse=True)
|
||||
|
||||
|
||||
def has_backups(pkg: str) -> bool:
|
||||
try:
|
||||
d = backups_dir(pkg)
|
||||
except ValueError:
|
||||
return False
|
||||
return d.is_dir() and any(_NAME.match(p.name) for p in d.glob("*.tar.gz"))
|
||||
|
||||
|
||||
def prune(pkg: str, keep: int | None = None, protect: Path | None = None) -> list[Path]:
|
||||
"""Delete all but the newest `keep` backups of a game (never `protect`). Returns the deleted archives."""
|
||||
keep = keep_count() if keep is None else max(1, keep)
|
||||
gone = []
|
||||
for b in list_backups(pkg)[keep:]:
|
||||
if protect is not None and b.path == protect:
|
||||
continue
|
||||
for p in (b.path, b.sidecar):
|
||||
p.unlink(missing_ok=True)
|
||||
gone.append(b.path)
|
||||
return gone
|
||||
|
||||
|
||||
def delete(backup: Backup) -> None:
|
||||
backup.path.unlink(missing_ok=True)
|
||||
backup.sidecar.unlink(missing_ok=True)
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------------------ the Frame side
|
||||
def _quote(s: str) -> str:
|
||||
return "'" + s.replace("'", "'\"'\"'") + "'"
|
||||
|
||||
|
||||
def _exec(frame, command: str, args: dict):
|
||||
remote = frame.ensure_agent()
|
||||
return frame.client.exec_command(f"python3 {_quote(remote)} {command} {_quote(json.dumps(args))}",
|
||||
timeout=EXEC_TIMEOUT)
|
||||
|
||||
|
||||
def _last_json(text: str) -> dict | None:
|
||||
for line in reversed(text.splitlines()):
|
||||
line = line.strip()
|
||||
if line.startswith("{"):
|
||||
try:
|
||||
return json.loads(line)
|
||||
except ValueError:
|
||||
return None
|
||||
return None
|
||||
|
||||
|
||||
def info(frame, pkg: str) -> dict:
|
||||
"""{files, bytes, skipped, running, version, rollback: {size, time} | None} of the game's saves on the Frame."""
|
||||
return frame.agent("saves_info", package=pkg)
|
||||
|
||||
|
||||
def _new_name(d: Path) -> Path:
|
||||
stamp = time.strftime("%Y%m%d-%H%M%S")
|
||||
path, n = d / f"{stamp}.tar.gz", 1
|
||||
while path.exists() or path.with_name(path.name + ".part").exists():
|
||||
path, n = d / f"{stamp}-{n}.tar.gz", n + 1
|
||||
return path
|
||||
|
||||
|
||||
def backup(frame, pkg: str, reporter: Reporter | None = None, keep: int | None = None) -> Backup:
|
||||
"""Back up the game's saves from the Frame into a new archive on this PC, then keep the newest `keep`."""
|
||||
rep = reporter or Reporter()
|
||||
rep.stage("saves", "Backing up saves")
|
||||
try:
|
||||
expected = int(info(frame, pkg).get("bytes") or 0)
|
||||
except Exception: # noqa: BLE001 - only for the progress bar
|
||||
expected = 0
|
||||
d = backups_dir(pkg)
|
||||
d.mkdir(parents=True, exist_ok=True)
|
||||
dest = _new_name(d)
|
||||
part = dest.with_name(dest.name + ".part")
|
||||
stdin, stdout, stderr = _exec(frame, "_backup_saves", {"package": pkg})
|
||||
received = 0
|
||||
try:
|
||||
stdin.channel.shutdown_write()
|
||||
with open(part, "wb") as f:
|
||||
while True:
|
||||
rep.check_cancel()
|
||||
chunk = stdout.read(CHUNK)
|
||||
if not chunk:
|
||||
break
|
||||
f.write(chunk)
|
||||
received += len(chunk)
|
||||
if expected: # compressed: an estimate, never "done" before the end
|
||||
rep.progress(min(0.95, received / expected), f"{received / 2**20:.1f} MiB")
|
||||
code = stdout.channel.recv_exit_status()
|
||||
reply = _last_json(stderr.read().decode("utf-8", "replace")) or {}
|
||||
if code or not reply.get("ok"):
|
||||
raise SavesError(reply.get("error") or f"the Frame couldn't back up the saves (exit {code})")
|
||||
manifest = read_manifest(part)
|
||||
if manifest.get("package") != pkg:
|
||||
raise SavesError(f"the Frame sent saves of {manifest.get('package')}, not {pkg}")
|
||||
part.replace(dest)
|
||||
except BaseException:
|
||||
try:
|
||||
stdout.channel.close()
|
||||
except Exception: # noqa: BLE001
|
||||
pass
|
||||
part.unlink(missing_ok=True)
|
||||
raise
|
||||
data = _sidecar_data(manifest, dest)
|
||||
sidecar_of(dest).write_text(json.dumps(data, indent=1), encoding="utf-8")
|
||||
result = _from_sidecar(dest, data)
|
||||
prune(pkg, keep, protect=dest)
|
||||
rep.progress(1.0, "")
|
||||
rep.log(f"saved {result.files} file(s), {result.bytes / 2**20:.1f} MiB of saves, to {dest}"
|
||||
+ (f"; {result.skipped} large file(s) left out" if result.skipped else ""))
|
||||
return result
|
||||
|
||||
|
||||
def restore(frame, pkg: str, archive: Path, reporter: Reporter | None = None) -> dict:
|
||||
"""Send a backup to the Frame; its current saves are kept there as a rollback copy (`undo_restore`)."""
|
||||
rep = reporter or Reporter()
|
||||
archive = Path(archive)
|
||||
manifest = read_manifest(archive) # a damaged or foreign file fails here, before the Frame is touched
|
||||
if manifest.get("package") != pkg:
|
||||
raise SavesError(f"this backup is of {manifest.get('package')}, not {pkg}")
|
||||
rep.stage("saves", "Restoring saves")
|
||||
size = archive.stat().st_size
|
||||
stdin, stdout, stderr = _exec(frame, "_restore_saves", {"package": pkg})
|
||||
sent = 0
|
||||
try:
|
||||
with open(archive, "rb") as f:
|
||||
while True:
|
||||
rep.check_cancel()
|
||||
chunk = f.read(CHUNK)
|
||||
if not chunk:
|
||||
break
|
||||
try:
|
||||
stdin.write(chunk)
|
||||
except OSError:
|
||||
break # the Frame stopped reading (refused): its reply says why
|
||||
sent += len(chunk)
|
||||
rep.progress(min(0.95, sent / max(1, size)), f"{sent / 2**20:.1f} MiB")
|
||||
try:
|
||||
stdin.channel.shutdown_write()
|
||||
except OSError:
|
||||
pass
|
||||
except BaseException:
|
||||
try:
|
||||
stdout.channel.close() # a cancelled restore: the agent sees a cut-off archive and changes nothing
|
||||
except Exception: # noqa: BLE001
|
||||
pass
|
||||
raise
|
||||
out = stdout.read().decode("utf-8", "replace")
|
||||
code = stdout.channel.recv_exit_status()
|
||||
reply = _last_json(out) or {}
|
||||
if not reply.get("ok"):
|
||||
err = stderr.read().decode("utf-8", "replace").strip()
|
||||
raise SavesError(reply.get("error") or f"the Frame couldn't restore the saves (exit {code}) {err[-300:]}")
|
||||
rep.progress(1.0, "")
|
||||
return reply["result"]
|
||||
|
||||
|
||||
def undo_restore(frame, pkg: str) -> dict:
|
||||
"""Put back the saves the last restore replaced (the Frame's rollback copy; the replaced ones become the new
|
||||
rollback copy)."""
|
||||
stdin, stdout, stderr = _exec(frame, "_restore_saves", {"package": pkg, "rollback": True})
|
||||
try:
|
||||
stdin.channel.shutdown_write()
|
||||
except OSError:
|
||||
pass
|
||||
reply = _last_json(stdout.read().decode("utf-8", "replace")) or {}
|
||||
stdout.channel.recv_exit_status()
|
||||
if not reply.get("ok"):
|
||||
raise SavesError(reply.get("error") or "the Frame couldn't put the saves back")
|
||||
return reply["result"]
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
],
|
||||
" (connect the Frame first)": "",
|
||||
" (list cut off)": "",
|
||||
" (newest)": "",
|
||||
" (update: {latest})": "",
|
||||
" ({len} can't be installed there)": "",
|
||||
" + Revive": "",
|
||||
@@ -76,6 +77,11 @@
|
||||
"A Meta Quest game. FramePort patches it for the Frame, where it runs in Lepton, Valve's Android container.": "",
|
||||
"A new FramePort version is ready.": "",
|
||||
"A newer tested recipe is available. It wasn't applied because you changed this game's settings.": "",
|
||||
"A newer version is available from an install link: {names}.": [
|
||||
"",
|
||||
""
|
||||
],
|
||||
"A newer version is available from its install link.": "",
|
||||
"a Python package": "",
|
||||
"A recipe is the list of patches and settings FramePort applies to a game. Tested recipes come from a real Frame; the others are suggested. Hover a patch to see why it's there.": "",
|
||||
"A Samsung Gear VR or Oculus Go game (32-bit). The Frame only runs 64-bit code, so FramePort's 32-bit bridge translates it inside the app (experimental). The right controller acts as the Gear VR / Go controller.": "",
|
||||
@@ -101,6 +107,7 @@
|
||||
"Add a tag": "",
|
||||
"Add a Windows program…": "",
|
||||
"Add an APK…": "",
|
||||
"Add folder…": "",
|
||||
"Add from a link…": "",
|
||||
"Add games": "",
|
||||
"Add this tag": "",
|
||||
@@ -148,6 +155,7 @@
|
||||
"Already patched: don't change the game's files": "",
|
||||
"Already patched: install unchanged": "",
|
||||
"Already set up?": "",
|
||||
"Already up to date": "",
|
||||
"Also delete its saves and everything it stored on the Frame (mods, downloaded content)": "",
|
||||
"Also delete this game's files on this PC ({size})": "",
|
||||
"Also in your library: {value} version": "",
|
||||
@@ -155,6 +163,10 @@
|
||||
"Also shows each patch's ID, exactly what it changes and its parameters. Useful when reporting a problem.": "",
|
||||
"An AppImage, folder or .zip/.tar archive with a Linux program, best built for arm64. Builds for x86_64 PCs run too, but slower. The app must bring the libraries SteamOS lacks.": "",
|
||||
"An ordinary Android app or game without VR. It's installed unchanged and runs in Lepton, Valve's Android container.": "",
|
||||
"An update is available for {name}": [
|
||||
"",
|
||||
""
|
||||
],
|
||||
"Analyze": "",
|
||||
"Analyze again": "",
|
||||
"Analyze {title} again": "",
|
||||
@@ -174,7 +186,7 @@
|
||||
"Appearance": "",
|
||||
"AppImage": "",
|
||||
"Apply with Update on Frame.": "",
|
||||
"Apps that suggest controller bindings only for Meta's newer profiles (Touch Plus, Touch Pro), which the Frame's runtime rejects (XR_ERROR_PATH_UNSUPPORTED), get the same bindings as oculus/touch_controller instead (components Touch lacks are dropped). Without it such apps get no controller input.": "",
|
||||
"Apps that suggest controller bindings only for Meta's newer profiles (Touch Plus, Touch Pro), which the Frame's runtime rejects (XR_ERROR_PATH_UNSUPPORTED), get the same bindings as oculus/touch_controller instead (components Touch lacks are dropped), and the runtime's answer for each hand is reported to them as their own profile (Unity's OpenXR input only connects controllers of a profile it knows). Meta's detached-controller paths (XR_META_detached_controllers, which the Frame lacks) are left out of the app's actions and bindings: one such path made Unity attach no controller input at all. Without it such apps get no controller input.": "",
|
||||
"Artwork for {get}": "",
|
||||
"Artwork updated ({src}). The Frame's Steam library still shows the old art.": "",
|
||||
"Artwork updated for {get}": "",
|
||||
@@ -193,7 +205,17 @@
|
||||
"Automatic ({auto:.0%})": "",
|
||||
"Automatic SteamVR performance settings (this PC)": "",
|
||||
"Back to library": "",
|
||||
"Back up all saves": "",
|
||||
"Back up its saves to this PC before deleting them": "",
|
||||
"Back up saves": "",
|
||||
"Back up saves: {title}": "",
|
||||
"Back up the signing keys ({len}) to {shown_dir} first": "",
|
||||
"Backed up the saves of {n} game": [
|
||||
"",
|
||||
""
|
||||
],
|
||||
"Backed up {done} of {total} games' saves; not: {failed}": "",
|
||||
"Backing up {title}": "",
|
||||
"Banner": "",
|
||||
"Battery": "",
|
||||
"Before a swapchain image is handed to the Frame, wait until the game's GPU work on it has finished, for games that hand over images early (an eye flickers or jitters). Costs some frame time. 2 = only after the first 60 s (compare both in one session).": "",
|
||||
@@ -234,15 +256,20 @@
|
||||
"Check for new versions automatically": "",
|
||||
"Check for updates": "",
|
||||
"Check game files": "",
|
||||
"Check games from install links for new versions": "",
|
||||
"Check install links for updates": "",
|
||||
"Check now": "",
|
||||
"Check program": "",
|
||||
"Check that the Frame and this PC are on the same network.": "",
|
||||
"Checking folders…": "",
|
||||
"Checking for updates": "",
|
||||
"Checking the saves on the Frame…": "",
|
||||
"Checking this PC…": "",
|
||||
"Checking tools…": "",
|
||||
"Checking which app opens these links…": "",
|
||||
"checksum checked": "",
|
||||
"Check…": "",
|
||||
"Choose a backup to put back on the Frame. Close the game first.": "",
|
||||
"Choose a file": "",
|
||||
"Choose a folder": "",
|
||||
"Choose a folder with Quest, Android or PC VR games. FramePort finds them and gets them ready.": "",
|
||||
@@ -316,6 +343,9 @@
|
||||
"Copy this theme as a file": "",
|
||||
"Corrects graphics code the Frame's drivers reject (black screen with sound).": "",
|
||||
"Corrects specific shaders that hang the game on the Frame. Comes from a game's recipe.": "",
|
||||
"Cortopia games: don't wait for Meta's org-scoped id": "",
|
||||
"Cortopia Studios' games (e.g. Escaping Wonderland) ask Meta's platform for an org-scoped user id at start when on Wi-Fi, only to use it as their analytics id. OVRPort's platform library doesn't answer that request (\"An unknown error occurred. Request failed.\"), so the game waits forever on its loading screen. Makes the game take its own offline path for that one request (the analytics id stays empty); the licence check and the logged-in user before it are unchanged. Found with Cpp2IL in libil2cpp.so.": "",
|
||||
"Couldn't check the saves on the Frame: {error}": "",
|
||||
"Couldn't check this PC": "",
|
||||
"Couldn't connect: {exc}": "",
|
||||
"Couldn't copy the screenshot: {error}": "",
|
||||
@@ -329,7 +359,9 @@
|
||||
"Couldn't open the game's storage: {exc}": "",
|
||||
"Couldn't read the file list: {exc}": "",
|
||||
"Couldn't read the Frame's folders: {exc}": "",
|
||||
"Couldn't read the install link of {name}": "",
|
||||
"Couldn't read {path}: {exc}": "",
|
||||
"Couldn't read: {names}": "",
|
||||
"Couldn't remove the theme: {error}": "",
|
||||
"Couldn't start the live view: {exc}": "",
|
||||
"Couldn't take a screenshot: {error}": "",
|
||||
@@ -378,7 +410,8 @@
|
||||
"dev build": "",
|
||||
"Dev builds are early, less tested versions and may have bugs. You still get the next release as a normal update (you have {version}).": "",
|
||||
"Developer Mode lets FramePort find and connect to the Frame; the setup turns it on for you. With it on, you can also open Settings → Developer → Pair new host on the Frame and approve FramePort there.": "",
|
||||
"Diagnostics for frame.gl_multiview_fbo: checks for GL errors after every single-view draw of a multiview shader and logs counters every 5 seconds (tag GLMV in launch.log).": "",
|
||||
"Diagnostic for Vulkan games that fail on their first frames with missing Quest foveation images.": "",
|
||||
"Diagnostics for frame.gl_multiview_fbo: checks for GL errors after every single-view draw of a multiview shader and logs counters every 5 seconds (tag GLMV in launch.log). 2 (frameport settings) also checks every draw and logs the draw state, failed texture uploads and shader compiles and, for idTech 4 engines, the game clock.": "",
|
||||
"Diagnostics: removes layer color fades. Some fades no longer show.": "",
|
||||
"Diagnostics: the Vulkan shim (frame.vk_sanitize) adds Khronos' validation layer to the game's instance; its findings go to launch.log. The layer library (libVkLayer_khronos_validation.so) must be in the APK.": "",
|
||||
"Disable application space warp if used": "",
|
||||
@@ -386,7 +419,7 @@
|
||||
"Disable Meta XR Audio telemetry": "",
|
||||
"Disconnect": "",
|
||||
"Dismiss": "",
|
||||
"Display refresh rate for this game (72, 80, 90, 96, 108, 120 or 144; 0 = the game's choice). A video's frame rate that divides the refresh rate plays smoothest (for example 30 fps at 90 Hz, 24 fps at 72 Hz).": "",
|
||||
"Display refresh rate for this game (72, 80, 90, 96, 108, 120 or 144; 0 = the game's choice). Applied through SteamVR before the game starts. A video's frame rate that divides the refresh rate plays smoothest (for example 30 fps at 90 Hz, 24 fps at 72 Hz).": "",
|
||||
"Documents": "",
|
||||
"Don't pause on short interruptions": "",
|
||||
"Done": "",
|
||||
@@ -396,9 +429,11 @@
|
||||
"Download all ({n})…": "",
|
||||
"Download all…": "",
|
||||
"Download and install": "",
|
||||
"Download and update": "",
|
||||
"Download selected…": "",
|
||||
"Download to this PC…": "",
|
||||
"Download to which folder on this PC?": "",
|
||||
"Download update": "",
|
||||
"Download {name}": "",
|
||||
"Download {n} items to this PC…": "",
|
||||
"Download {n} screenshot": [
|
||||
@@ -451,6 +486,7 @@
|
||||
"Every 5 s, logs per located space how far the requested times are from the frame's predicted display time, and the runtime clock's offset from the monotonic clock. No effect on the game.": "",
|
||||
"Every key goes through": "",
|
||||
"Every N seconds, saves the left-eye image the game submits (a quarter of its size) as fb_snap_0-7.ppm in the game's files folder on the Frame. Launch tests run without anyone wearing the headset, so the headset view stays black; this shows what the game itself draws. OpenGL ES games only.": "",
|
||||
"Every Scan a folder… adds its folder here. Rescan folders looks in them for new games, and for games you moved: a game whose files are gone from their old place is pointed at the same copy in its new place. Another version found there is only taken by Scan a folder…; Rescan leaves it for you to choose (Update with a newer version… on the game's page). Removing a folder only stops it being scanned: its games stay in the library.": "",
|
||||
"Every shot you take in the headset": "",
|
||||
"Every uploaded file is present with the right size.": "",
|
||||
"Every {n}": "",
|
||||
@@ -491,6 +527,7 @@
|
||||
"Fix depth flicker (Unreal Vulkan)": "",
|
||||
"Fix freezes when controllers vibrate": "",
|
||||
"Fix hands lagging behind controllers": "",
|
||||
"Fix inside-out mixed reality": "",
|
||||
"Fix launcher icon entry": "",
|
||||
"Fix Lua startup crashes on Frame": "",
|
||||
"Fix minimal Android SDK": "",
|
||||
@@ -515,6 +552,7 @@
|
||||
"For games that judder or shimmer while you hold your head still (for example I Am Cat).": "",
|
||||
"For games that pause or recenter when the headset briefly loses focus.": "",
|
||||
"For games that show the headset's own controllers. Takes effect after a reinstall.": "",
|
||||
"For games that show your room on their objects and darkness where your room should be.": "",
|
||||
"For games where one eye flickers or jitters. Costs some speed.": "",
|
||||
"For games whose fades to black don't show, so you see the level loading (for example Batman: Arkham Shadow).": "",
|
||||
"For games whose hands trail the controllers when you move them (for example BattleSisters).": "",
|
||||
@@ -563,6 +601,7 @@
|
||||
"FramePort changelog": "",
|
||||
"FramePort checks GitHub for a new version every few hours. Update now downloads and checks it, then restarts FramePort; your games and settings stay.": "",
|
||||
"FramePort downloads it and restarts as the new version. Your games and settings stay.": "",
|
||||
"FramePort downloads the new version from the same site and installs it on your Frame. Saves are kept.": "",
|
||||
"FramePort found more than one program in this app. Pick the one that starts it, not a helper like a crash reporter or updater.": "",
|
||||
"FramePort installs games on the Frame over your network": "",
|
||||
"FramePort installs games on the Frame over your network.": "",
|
||||
@@ -615,6 +654,7 @@
|
||||
"Game launch capacity": "",
|
||||
"Game not found": "",
|
||||
"Game page": "",
|
||||
"Game recipes are tested settings shared on GitHub; games that use one get its improvements, then show Update on Frame. Games installed from an install link get a new version when the link's site publishes one: FramePort asks before it downloads anything.": "",
|
||||
"Game recipes are up to date": "",
|
||||
"Game recipes from GitHub: last checked {when}": "",
|
||||
"Game settings": "",
|
||||
@@ -626,6 +666,9 @@
|
||||
"game window opened": "",
|
||||
"Game's choice": "",
|
||||
"Game: the running game's processes plus the busiest others. Steam and SteamVR: Steam, SteamVR and the desktop. All: every program. A lock marks programs that would close Steam or SteamVR.": "",
|
||||
"Games": "",
|
||||
"Games from install links are up to date": "",
|
||||
"Games from install links: last checked {when}": "",
|
||||
"Games see this folder as {value}": "",
|
||||
"Games that ask the headset for its controller models (Meta's runtime controller models, XR_FB_render_model) get the Steam Frame controllers instead of Quest Touch controllers. The models come from the Frame's own SteamVR and are converted on the Frame at install time. Games that ship their own controller meshes aren't affected. Turning it on needs a rebuild (it adds a small library in front of OVRPort's loader).": "",
|
||||
"Games that fade to black by dimming their picture with a layer color scale (XR_KHR_composition_layer_color_scale_bias, for example Batman: Arkham Shadow's loading screens) can show the level loading instead of black on the Frame. FrameBridge then draws the fade itself: a black quad in front of the eyes whose opacity follows the game's dimming. 2 also removes the game's own dimming (if both show, the fade is doubled).": "",
|
||||
@@ -635,9 +678,11 @@
|
||||
"Generate OVRPort config": "",
|
||||
"Generates no-op stubs for ovr_* functions the game imports but OVRPort's platform loader lacks (for example Espire 1/2, Wallace & Gromit, The Climb 2). Symptom: UnsatisfiedLinkError / 'cannot locate symbol ovr_...'. Online/store features stay unavailable.": "",
|
||||
"Get FramePort ready": "",
|
||||
"Gets Cortopia games (for example Escaping Wonderland) past their loading screen.": "",
|
||||
"Getting FramePort ready": "",
|
||||
"GiB": "",
|
||||
"GitHub issue opened": "",
|
||||
"Gives a controller action whose name already exists in its action set a free name (\"turn\" -> \"turn_2\"). The Frame's runtime accepts duplicate names but then can't load the game's input manifest and treats the game as closed: black, then the home environment while the game keeps running with sound (for example Scared By Squares, whose Unreal project has an action and an axis both called Turn; GitHub #323).": "",
|
||||
"Gives older Quest games a newer version of Meta's VR plugin that can be converted.": "",
|
||||
"GL shim (frame.gl_shim): shader inputs declared as integers (int/uint, ivecN/uvecN) whose vertex data the game set up with glVertexAttribPointer (as floats) are set up again with glVertexAttribIPointer before each draw. Qualcomm's Quest driver read the raw integers anyway; the Frame's GL driver converts them to floats, so skinned models using bone indices vanish (for example BlazeRush's car bodies and controllers; Klownicle's guide, GitHub #57). Comes from a game's recipe.": "",
|
||||
"GL shim (frame.gl_shim): vertex shaders whose source contains every '|'-separated text compute in highp: whole-word mediump becomes highp on every line without the words in, out or uniform (the shader's interface keeps its precision). For effects that draw streaks or flashes from mediump rounding on the Frame (for example BlazeRush's particles: in uvec2 inBoneIndices;|uniform InstanceData|void main()). Pair it with a new shader cache name if the game caches compiled programs. Comes from a game's recipe.": "",
|
||||
@@ -651,6 +696,7 @@
|
||||
"GL wrapper: OpenGL ES depth formats (Minecraft)": "",
|
||||
"Go to my library": "",
|
||||
"Godot apps: start without a clipboard service": "",
|
||||
"Google Play services' libraries in games built for Android 12+ only (for example Titan Isles) had their Android 12 checks folded into 'always true' when the game was built; on Lepton's Android 11 they then call an Android 12 method and the game crashes at start (FATAL EXCEPTION: GoogleApiHandler). Those checks answer 'no' again (an in-place edit of classes.dex).": "",
|
||||
"GPU": "",
|
||||
"Graphics": "",
|
||||
"Group": "",
|
||||
@@ -680,6 +726,7 @@
|
||||
"Hide Vulkan foveation": "",
|
||||
"Hides a Quest-only way of saving GPU power that the Frame lacks. Leave it on.": "",
|
||||
"Hides Android's back, home and recents buttons, which cover the app's own buttons.": "",
|
||||
"Hides Quest FB foveation extensions from the game and OVRPort, removes Vulkan foveation image/create chains, and refuses foveation profile updates. Diagnostic for first-frame failures with missing density images (for example Transformers Beyond Reality: Redux). Device verification pending; does not disable Valve foveation.": "",
|
||||
"Hides Quest foveation extensions the Frame runtime lacks.": "",
|
||||
"Hides the Frame's brief focus dips (up to focus_hold_ms) once the game has been focused for a second. On by default: the Frame's wear sensor flickers \"HMD off\" for 0.5-2 s while worn, and many games pause or recenter every time (for example Blade & Sorcery, Lucky's Tale).": "",
|
||||
"Hides XR_FB_space_warp, so the game renders every frame itself instead of half of them plus motion vectors (Application SpaceWarp). For games whose picture flickers or smears on the Frame (for example Unreal Engine 5 games such as Into The Radius 2).": "",
|
||||
@@ -721,6 +768,7 @@
|
||||
"Install from a link": "",
|
||||
"Install it anyway to try other patches.": "",
|
||||
"Install Lepton on the Frame": "",
|
||||
"Install link updates: waiting for your answer": "",
|
||||
"Install link: {host}": "",
|
||||
"Install links": "",
|
||||
"Install missing": "",
|
||||
@@ -785,7 +833,7 @@
|
||||
"Keep the same Meta user between starts": "",
|
||||
"Keep the signing keys: without them, updating a game loses its saves.": "",
|
||||
"Keeps a smoothing setting off that the game turns on itself and that can freeze the Frame.": "",
|
||||
"Keeps every submitted image rect inside its swapchain. Unity can size the eye area a few pixels past the image on some Frames; SteamVR then rejects every frame (xrEndFrame -25, XR_ERROR_SWAPCHAIN_RECT_INVALID) and the game stops drawing (for example PowerWash Simulator stuck at \"Waiting\").": "",
|
||||
"Keeps every submitted image rect inside its swapchain. Unity can size the eye area a few pixels past the image on some Frames; SteamVR then rejects every frame (xrEndFrame -25, XR_ERROR_SWAPCHAIN_RECT_INVALID) and the game stops drawing (for example PowerWash Simulator stuck at \"Waiting\"). An empty rect (0x0, e.g. BattleTalent's first frames, GitHub #293) is rejected the same way and becomes the whole swapchain image.": "",
|
||||
"Keeps games running that use a 360° cube layer the Frame lacks (for example Budget Cuts Ultimate). Leave it on.": "",
|
||||
"Keeps one label so the title is stable.": "",
|
||||
"Keeps one name for the game, so it shows the same everywhere.": "",
|
||||
@@ -795,6 +843,7 @@
|
||||
"Keyboard connected to {label}.": "",
|
||||
"Keyboard disconnected: {error}": "",
|
||||
"KiB": "",
|
||||
"kshoji's USB MIDI driver (Unity MIDI plugins, for example PianoVision) polls Android's USB service for MIDI devices; the Frame's Android has no USB service, so the app crashes a few seconds after start (NullPointerException on MidiDeviceConnectionWatchThread). The poll returns at once instead, so no USB MIDI device is ever found (an in-place edit of classes.dex).": "",
|
||||
"Language": "",
|
||||
"Language packs from the game's files": "",
|
||||
"Large files upload together using OpenSSH when available. Default: 3. Lower this on a busy network.": "",
|
||||
@@ -823,10 +872,13 @@
|
||||
"Lepton's Android has no clipboard service, and SDL's Java code (SDL2 and LÖVE games, for example Dramatic Shape) registers a clipboard listener at start without checking, so the app crashes with a NullPointerException in SDLClipboardHandler. That call is skipped (an in-place edit of classes.dex).": "",
|
||||
"Lepton's Android has no clipboard service, and the Android code of Godot 4.2-4.4 (for example EndoparasiticVR) casts the missing service to a ClipboardManager without checking, so the app crashes at start with a NullPointerException in Godot.<init>. That check is skipped and Godot's clipboard functions do nothing instead (an in-place edit of classes.dex).": "",
|
||||
"Lepton's Android only gets a keyboard, a pointer and touch from the Frame, so a 2D game never sees a controller (the controllers only move the pointer; SDL games show their touch controls). This passes Steam Input's virtual gamepad (\"Microsoft X-Box 360 pad\", made by Steam for the Frame's controllers and paired Bluetooth pads) into this app's container with an Xbox 360 key layout, and tells SDL games to use it (SDL_GAMECONTROLLER_ALLOW_STEAM_VIRTUAL_GAMEPAD). Steam Input must be on for the game's shortcut; the controllers must be on when the game starts (a pad Steam makes later isn't seen until the next start). The APK isn't changed. Off for one start: FRAMEPORT_NO_GAMEPAD=1 in the game's launch options.": "",
|
||||
"Lets apps with a USB MIDI driver start on the Frame (they'd crash looking for USB devices); USB MIDI devices aren't available there.": "",
|
||||
"Lets games built on Meta's oldest VR interface run on the Frame.": "",
|
||||
"Lets games built with Unity's App UI start on the Frame (they'd quit at once on an Android 12 vibrator call).": "",
|
||||
"Lets games made for Oculus PCs run on SteamVR.": "",
|
||||
"Lets games start that would stop at Meta's avatars (for example BlazeRush). No Meta avatars.": "",
|
||||
"Lets games with a verified older Lua engine get past a startup crash on the Frame.": "",
|
||||
"Lets games with Google Play services code start on the Frame (they'd crash at start on an Android 12 call).": "",
|
||||
"Lets games with Vivox voice chat start on the Frame (they'd crash on an Android 12 audio call).": "",
|
||||
"Lets games written for newer OpenXR versions run on the Frame.": "",
|
||||
"Lets Godot games start on the Frame (they'd crash looking for a clipboard).": "",
|
||||
@@ -840,6 +892,7 @@
|
||||
"Lets the game find extra content it keeps next to its data (for example Star Wars Tales' seasons).": "",
|
||||
"Lets the game finish loading when its separate loading splash stalls the render thread.": "",
|
||||
"Lets the game leave its loading screen: it waited for a Quest-only step that never starts on the Frame (for example Vader Immortal).": "",
|
||||
"Lets the game load: it reserves more memory at start than the Frame grants in one piece and crashed before its first frame (for example Transformers Beyond Reality).": "",
|
||||
"Lets the game use language files already in its data instead of waiting for a download that never comes.": "",
|
||||
"Lets the game use your controllers as a gamepad instead of a pointer, for 2D games with touch controls (for example SDL games).": "",
|
||||
"Lets typing reach this app from Steam's on-screen keyboard or your PC's keyboard. VR keeps working.": "",
|
||||
@@ -851,6 +904,7 @@
|
||||
"Lets you type into this app's text fields on the Frame (they'd close at once).": "",
|
||||
"Letters, Enter, Backspace, arrows, Esc and shortcuts reach the headset.": "",
|
||||
"Library": "",
|
||||
"Library folders": "",
|
||||
"Link": "",
|
||||
"Linux": "",
|
||||
"Linux app": "",
|
||||
@@ -873,6 +927,7 @@
|
||||
"Logs details when flat panels stay black. No effect on the game.": "",
|
||||
"Logs details when one eye looks wrong. No effect on the game.": "",
|
||||
"Logs every Meta Platform SDK request the game makes (user, entitlement, cloud saves, ...) and the messages that answer them, and every 10 s the requests that never got an answer (logcat tag fp_ovrtrace, in launch.log). For games that wait forever on a loading screen (for example Vader Immortal after its intro). Changes nothing: every call goes to the real function.": "",
|
||||
"Logs graphics pipelines the Frame's driver refuses. No effect on the game.": "",
|
||||
"Logs how game poses line up with the Frame's clock. No effect on the game.": "",
|
||||
"Logs Vulkan mistakes the game makes. Needs a special test build.": "",
|
||||
"Longer for headsets that briefly think they're off your head.": "",
|
||||
@@ -947,16 +1002,19 @@
|
||||
"Newer APK of {title}": "",
|
||||
"Newer version for {title}": "",
|
||||
"Newer version of {title}": "",
|
||||
"Newer versions are available from their install links.": "",
|
||||
"Next": "",
|
||||
"Nice, it works! FramePort receives install links. (Demo: nothing was installed.)": "",
|
||||
"No": "",
|
||||
"No activity": "",
|
||||
"no answer from the Frame": "",
|
||||
"No backups of {title} on this PC yet. Back up its saves first (game menu → Back up saves).": "",
|
||||
"no checksum": "",
|
||||
"No dev build is published right now": "",
|
||||
"No file at that path": "",
|
||||
"No folder at that path": "",
|
||||
"No folders to rescan yet — add games with Scan a folder…": "",
|
||||
"No folders yet. Add one here, or use Scan a folder… in the Library.": "",
|
||||
"No Frame connected: the game goes to your library now and installs when the Frame connects.": "",
|
||||
"No FramePort game is running. Start one, or switch the filter to see everything.": "",
|
||||
"No Frames found. New Frame? Use Start setup above. Otherwise turn on Developer Mode and keep the Frame on this network.": "",
|
||||
@@ -964,6 +1022,7 @@
|
||||
"No keyboard? Open {page} in Chromium on the Frame, copy the line and paste it into Konsole. This PC shows there as \"{words}\".": "",
|
||||
"No limit": "",
|
||||
"No matching files": "",
|
||||
"No new games in that folder": "",
|
||||
"No new games in {name}": "",
|
||||
"No other Frames remembered yet.": "",
|
||||
"No process matches.": "",
|
||||
@@ -971,6 +1030,7 @@
|
||||
"No release notes.": "",
|
||||
"No screenshots yet": "",
|
||||
"No Unreal crash reporter": "",
|
||||
"No updates": "",
|
||||
"no viewer open": "",
|
||||
"No: a 2D app": "",
|
||||
"None": "",
|
||||
@@ -979,6 +1039,7 @@
|
||||
"Not connected: {error}": "",
|
||||
"Not enough space on the Frame": "",
|
||||
"Not enough space on the Frame ({detail}). Uninstall games you don't play or free up space on the Steam Frame page.": "",
|
||||
"Not found (moved, deleted or on a drive that isn't connected)": "",
|
||||
"Not from a FramePort game": "",
|
||||
"Not installed": "",
|
||||
"Not installed yet (needs Developer Mode)": "",
|
||||
@@ -1021,6 +1082,7 @@
|
||||
"ON AIR": "",
|
||||
"On Frame": "",
|
||||
"On the desktop": "",
|
||||
"On the Frame now: {line}": "",
|
||||
"On the Frame, open Konsole (SteamVR dashboard → Launch a program → Desktop, then app menu → System → Konsole) and run:": "",
|
||||
"On the Frame, open Settings → Developer → Pair new host and approve FramePort there.": "",
|
||||
"On the Frame, open Settings → Developer → Pair new host and approve FramePort.": "",
|
||||
@@ -1039,11 +1101,13 @@
|
||||
"Only internal storage": "",
|
||||
"Open": "",
|
||||
"Open \"Install with FrameDrop\" buttons (framedrop:// links) in FramePort": "",
|
||||
"Open backups folder": "",
|
||||
"Open frameport:// links in FramePort": "",
|
||||
"Open game": "",
|
||||
"Open game page": "",
|
||||
"Open GitHub issue": "",
|
||||
"Open in browser": "",
|
||||
"Open save backups": "",
|
||||
"Open the Monitor": "",
|
||||
"Open {scheme}:// links with FramePort?": "",
|
||||
"Open {title}": "",
|
||||
@@ -1108,6 +1172,8 @@
|
||||
"PC VR ✓": "",
|
||||
"Per-eye diagnostics (log)": "",
|
||||
"Perfect pacing": "",
|
||||
"Photon Voice's microphone plugin (for example Table Troopers) picks the audio device with Android 12 methods (AudioManager communication devices) without checking the Android version; Lepton runs Android 11, so the game crashes with a NoSuchMethodError when voice chat starts. That method returns at once instead (an in-place edit of classes.dex); the microphone keeps Android's default audio route.": "",
|
||||
"Photon Voice: skip Android 12 audio routing": "",
|
||||
"Pick several games and install them in one go. FramePort asks every question first, then works through them in the background.": "",
|
||||
"Pick the field in the headset": "",
|
||||
"Pick the program you'd double-click to play. Oculus builds usually work better than Steam builds.": "",
|
||||
@@ -1123,6 +1189,7 @@
|
||||
"Play on Frame": "",
|
||||
"Play on Frame — put the headset on first.": "",
|
||||
"Play on this PC": "",
|
||||
"Play services: Android 11 version checks": "",
|
||||
"Play your Quest, Android and PC VR games on the Steam Frame. Three steps and you're set.": "",
|
||||
"playing": "",
|
||||
"Playing below, in this window.": "",
|
||||
@@ -1161,6 +1228,7 @@
|
||||
"Put a password, link or note in the box and press Type it.": "",
|
||||
"Put the Frame to sleep": "",
|
||||
"Put the Frame to sleep?": "",
|
||||
"Puts back the saves {title} had before the last restore. The saves it has now become the copy you can undo to.": "",
|
||||
"Puts settings files next to the game on the Frame, for example to turn off an unsupported effect.": "",
|
||||
"Quality": "",
|
||||
"Quest": "",
|
||||
@@ -1212,6 +1280,7 @@
|
||||
"Remembered": "",
|
||||
"Remove": "",
|
||||
"Remove converted copies now": "",
|
||||
"Remove folder": "",
|
||||
"Remove from library…": "",
|
||||
"Remove localized app names": "",
|
||||
"Remove tag": "",
|
||||
@@ -1254,13 +1323,19 @@
|
||||
"Repairs shaders that hang the graphics chip at certain effects, from the game's recipe (for example Vader Immortal's lightspeed jump).": "",
|
||||
"Repeat xrLocateViews queries for the same display time get the first, fully tracked answer again. Games that ask several times per frame got slightly different poses and rendered parts of the frame with different heads: judder (for example I Am Cat; proposed by Klownicle, GitHub #8).": "",
|
||||
"Replace application label and icon": "",
|
||||
"Replace the saves on the Frame?": "",
|
||||
"Replaces libvrapi.so with a VrApi→OpenXR bridge (Android-XR-Bridge/OVRPort fork, GPL-3.0, patched for the Frame: GLES sessions, cylinder→quad layers, sRGB format fallback, 30 s VR-mode deadline, emulated time conversion). Needed when the engine calls VrApi itself instead of through OVRPlugin (for example The Climb 2, Path of the Warrior); OVRPort cannot translate those.": "",
|
||||
"Report a problem": "",
|
||||
"Report a problem · {title}": "",
|
||||
"Report a problem…": "",
|
||||
"Reports Frame controllers as Oculus Touch and hides synthetic hand tracking. Set 0 for games that require hand tracking (for example Silhouette).": "",
|
||||
"Rescan folders": "",
|
||||
"Rescanning {n} folder for new games": [
|
||||
"Rescan folders in the Library looks in these folders for new games and for games that moved there.": "",
|
||||
"Rescan folders won't look in {path} any more. The {n} game from it stays in your library (nothing is deleted).": [
|
||||
"",
|
||||
""
|
||||
],
|
||||
"Rescanning {n} folder for new and moved games": [
|
||||
"",
|
||||
""
|
||||
],
|
||||
@@ -1274,6 +1349,10 @@
|
||||
"Restart the Frame?": "",
|
||||
"Restart the Frame…": "",
|
||||
"Restarting": "",
|
||||
"Restore": "",
|
||||
"Restore saves · {title}": "",
|
||||
"Restore saves: {title}": "",
|
||||
"Restore saves…": "",
|
||||
"Resume": "",
|
||||
"Resuming — copied files are skipped": "",
|
||||
"Retry refused picture formats": "",
|
||||
@@ -1306,6 +1385,7 @@
|
||||
"Runs xrSyncActions one at a time with xrPollEvent and skips it for 250 ms after focus returns. For games that crash in the runtime's input code right after focus comes back (SIGSEGV in vrclient.so UpdateActionStateInternal / xrSyncActions, for example Myst).": "",
|
||||
"Save": "",
|
||||
"Save as known-good recipe": "",
|
||||
"Save backups to keep per game": "",
|
||||
"Save the screenshots to which folder on this PC?": "",
|
||||
"Saved as a known-good recipe": "",
|
||||
"Saved as known-good. Check the GitHub issue that opened and submit it.": "",
|
||||
@@ -1313,6 +1393,7 @@
|
||||
"Saved {name} — drag it into the GitHub issue that opened": "",
|
||||
"Saved. Restart the game to use the new settings.": "",
|
||||
"Saved. They apply when the game is installed.": "",
|
||||
"Saves": "",
|
||||
"Saves a few UI panels before and after FrameBridge turns them upright, for testing without the headset.": "",
|
||||
"saves and settings": "",
|
||||
"Saves the first N UI panels that FrameBridge turns upright (Vulkan games whose panels are stored upside down), before and after the flip, as fb_flip_<n>_raw.ppm / fb_flip_<n>_upright.ppm in the game's files folder on the Frame. Shows what the runtime gets without anyone wearing the headset.": "",
|
||||
@@ -1322,7 +1403,7 @@
|
||||
"Scales every controller vibration the game asks for (0-1): plain vibrations, Meta's amplitude envelopes and PCM buffers. For games whose vibrations feel much stronger than on a Quest.": "",
|
||||
"Scan a folder…": "",
|
||||
"Scan {name}": "",
|
||||
"Scans your game folders again and adds new games. Games already in the library keep their recipe, tags and art.": "",
|
||||
"Scans your game folders again and adds new games. A game you moved into one of them gets its new place; games already in the library keep their name, recipe, tags and art. Settings → Library folders lists the folders.": "",
|
||||
"Screenshot copied. Paste it anywhere.": "",
|
||||
"Screenshot taken": "",
|
||||
"Screenshots": "",
|
||||
@@ -1456,6 +1537,7 @@
|
||||
"Steady controller input after focus": "",
|
||||
"Steam": "",
|
||||
"Steam and SteamVR": "",
|
||||
"Steam doesn't sync Quest games' saves. This copies each installed Quest game's saves to this PC (caches and big downloaded content stay out). Restore one from the game's menu → Restore saves….": "",
|
||||
"Steam for Windows not found": "",
|
||||
"Steam Frame": "",
|
||||
"Steam Frame patches": "",
|
||||
@@ -1472,6 +1554,8 @@
|
||||
"Stereo (3D) 360° layers: 0 = as the game sends them, 2 = flat (the left image to both eyes).": "",
|
||||
"Stop": "",
|
||||
"Stop objects popping in and out": "",
|
||||
"Stop scanning this folder": "",
|
||||
"Stop scanning this folder?": "",
|
||||
"Stop using this key (the file stays)": "",
|
||||
"Stopped: {why}": "",
|
||||
"Stops a black picture in Minecraft launchers (for example QuestCraft).": "",
|
||||
@@ -1483,7 +1567,9 @@
|
||||
"Stops a start-up crash in Stress Level Zero games (for example BONELAB).": "",
|
||||
"Stops bHaptics from asking for a Bluetooth permission the Frame doesn't have (the game would freeze on its loading screen).": "",
|
||||
"Stops Epic Online Services from retrying its login keychain forever (the game would never finish starting).": "",
|
||||
"Stops games from hanging when their eye picture is a little too big (for example PowerWash Simulator). Leave it on.": "",
|
||||
"Stops games from dropping back to the home environment at start because two of their controller actions share a name (for example Scared By Squares). Leave it on.": "",
|
||||
"Stops games from hanging when their eye picture is a little too big or empty (for example PowerWash Simulator). Leave it on.": "",
|
||||
"Stops games with Photon Voice chat from crashing on the Frame when voice chat starts (an Android 12 audio call).": "",
|
||||
"Stops Meta's audio library from reporting to Meta (only matters on PC emulators).": "",
|
||||
"Stops Meta's old VR library from closing the game at start (for example Jurassic World Aftermath).": "",
|
||||
"Stops some Unreal games from closing themselves right after starting.": "",
|
||||
@@ -1527,6 +1613,7 @@
|
||||
"That key can't be used: {error}": "",
|
||||
"That theme file can't be used: {error}": "",
|
||||
"That's me!": "",
|
||||
"The activity of Unity's App UI package (for example PianoVision) gets the vibrator through Android 12's VibratorManager without checking the Android version; on Lepton's Android 11 the game quits at start with a NoClassDefFoundError. The activity then starts without a vibrator and its UI haptic feedback does nothing (an in-place edit of classes.dex).": "",
|
||||
"The APK file is damaged or incomplete. Get the game again and rescan the folder.": "",
|
||||
"The connection to the Frame is busy. Try again in a moment.": "",
|
||||
"The download didn't finish. Check your internet connection.": "",
|
||||
@@ -1562,6 +1649,7 @@
|
||||
"The Frame's Steam library still shows the old artwork.": "",
|
||||
"The Frame's Steam library still shows the old name.": "",
|
||||
"the game failed its checks (see the list above)": "",
|
||||
"The game's current saves on the Frame are replaced. FramePort keeps a copy of them on the Frame, so you can undo the last restore.": "",
|
||||
"The game's files or settings changed. Update applies only what's needed; saves are kept.": "",
|
||||
"The game's {kind} isn't at {path} any more. Add the game again from the folder that has it.": "",
|
||||
"The headset is asleep: put it on, then take the screenshot.": "",
|
||||
@@ -1609,6 +1697,7 @@
|
||||
"This Frame's SSH key changed since FramePort last connected (SteamOS was reset, or another device now has its address). If it's your Frame, choose Trust the new key on the Steam Frame page.": "",
|
||||
"This game can't run on the Steam Frame.": "",
|
||||
"This game is marked \"Can't run\" on the Steam Frame:": "",
|
||||
"This is a Google {platform} VR build. Its VR can't reach the Frame's headset, so it runs as a flat window at best, usually without working controls. An Oculus build of the game (Meta Quest, Oculus Go or Gear VR) works the normal way.": "",
|
||||
"This is a website in an app: it opens in Meta's browser, which the Frame doesn't have. If nothing opens, visit the website in a browser.": "",
|
||||
"This is the example button from frameport.app. Real buttons install real games.": "",
|
||||
"this PC": "",
|
||||
@@ -1640,6 +1729,7 @@
|
||||
"Try this setting": "",
|
||||
"Turn it down if controller vibrations are too strong.": "",
|
||||
"Turn off only for games you play with your hands instead of controllers.": "",
|
||||
"Turn off Quest Vulkan foveation": "",
|
||||
"Turn off space warp": "",
|
||||
"Turn on Developer Mode first": "",
|
||||
"Turn on if your copy is already patched: the APK is installed unchanged. PC VR games are never changed on this PC.": "",
|
||||
@@ -1659,6 +1749,10 @@
|
||||
"Typed it, except characters the Frame's US keyboard layout doesn't have: {chars}": "",
|
||||
"ufw is active. Allow the setup port with: sudo ufw allow {port}/tcp (remove it afterwards with: sudo ufw delete allow {port}/tcp)": "",
|
||||
"unclear": "",
|
||||
"Undo last restore ({when})": "",
|
||||
"Undo restore": "",
|
||||
"Undo restore: {title}": "",
|
||||
"Undo the last restore?": "",
|
||||
"Uninstall": "",
|
||||
"Uninstall FramePort": "",
|
||||
"Uninstall FramePort?": "",
|
||||
@@ -1672,6 +1766,8 @@
|
||||
"Uninstall. ": "",
|
||||
"Uninstalled {title}": "",
|
||||
"Uninstalled {title} and deleted its files on this PC ({size})": "",
|
||||
"Unique controller action names": "",
|
||||
"Unity App UI: no Android 12 vibrator": "",
|
||||
"Unity frame loop: wait for skipped frames": "",
|
||||
"Unity's built-in Oculus frame loop (frame.unity_oculus_check): before each frame wait, wait up to 50 ms for the last waited frame to begin and skip the wait if it doesn't. Fixes a freeze at the first scene switch (for example Sniper Elite VR); in other games it can make loading screens stutter.": "",
|
||||
"Unity's built-in Oculus frame loop (frame.unity_oculus_check): don't pass Unity's physics-step pose update on, so the hands use the frame's display-time poses. Fixes hands trailing the controllers in some games (for example Sniper Elite VR); in others it makes the hands lag (for example BattleSisters).": "",
|
||||
@@ -1692,17 +1788,20 @@
|
||||
"Unreal builds of Meta XR Audio abort ('ClassNotFoundException com.oculus.os.AnalyticsEvent') on non-Quest devices. Patches that one JNI FindClass call so the library continues (for example NOPE Challenge).": "",
|
||||
"Unreal games can check their whole data file (.obb) before starting (bVerifyOBBOnStartUp). On the Frame that check's progress and error screens are invisible (Lepton runs VR games without an Android window), so the game seems to hang on its DownloaderActivity, for example Contractors. This turns the check off in the manifest; Unreal still checks that the OBB is there with the right size, so a missing or wrong-version OBB still stops the game.": "",
|
||||
"Unreal games start CrashReportClient when they crash, which leaves a crash dialog instead of simply closing. This passes -nocrashreports to the game and, on the Frame, renames the game's copy of CrashReportClient.exe so it can't start (your game files on this PC aren't changed).": "",
|
||||
"Unreal reserves its memory ranges on Android with ordinary read/write mappings. Games built with Unreal's Binned3 allocator reserve tens of gigabytes at once while the engine loads (76 GiB in Transformers Beyond Reality); Quest allows that, the Frame's kernel refuses mappings larger than its memory, and the game crashes before its first frame (SIGSEGV at fault addr 0x10 in libUnreal.so, inside System.loadLibrary). This marks those mappings MAP_NORESERVE, as Quest effectively treats them: memory is still only used when the game touches it.": "",
|
||||
"Unreal's Java OBB delivery check can leave a game on an invisible DownloaderActivity screen even with the manifest CRC check off (e.g. Into The Radius). Makes known Unreal delivery predicates return true, including recognized obfuscated versions, bypassing the Java name and size gate. Experimental: the native engine still needs complete, matching, readable OBB data.": "",
|
||||
"Unreal's Oculus module looks up every OVRPlugin function it was built against and starts no VR when one is missing; OVRPort's OpenXR OVRPlugin lacks some old ones (for example ovrp_GetPTWNear, which Unreal 4.25 builds like Star Wars Pinball VR look up). The game then never starts an OpenXR session and crashes a few seconds in. Adds a generated library to libOVRPlugin.so with a stand-in for each missing function that reports failure (ovrpFailure), so Unreal's Oculus support starts. The functions OVRPort has are untouched.": "",
|
||||
"Unreal: bypass the stalled loading splash": "",
|
||||
"Unreal: don't wait for the Quest shader precompile": "",
|
||||
"Unreal: match multiview depth to the eye size": "",
|
||||
"Unreal: Quest controller bindings (RPOC key map)": "",
|
||||
"Unreal: reserve memory like on Quest": "",
|
||||
"Unreal: skip the OBB delivery check": "",
|
||||
"Unreal: stand-ins for OVRPlugin functions OVRPort lacks": "",
|
||||
"Unreal: start without the OBB check": "",
|
||||
"Unreal: thumb follows the capacitive touches": "",
|
||||
"Untested": "",
|
||||
"Update": "",
|
||||
"Update all": "",
|
||||
"Update all ({updates})": "",
|
||||
"Update anyway…": "",
|
||||
@@ -1724,11 +1823,17 @@
|
||||
"Update tools": "",
|
||||
"Update with a newer APK…": "",
|
||||
"Update with a newer version…": "",
|
||||
"Update {name} to {version}?": "",
|
||||
"Update {n} games?": "",
|
||||
"Updated the location of {n} game": [
|
||||
"",
|
||||
""
|
||||
],
|
||||
"Updates": "",
|
||||
"Updates every game marked \"Update ready\", one after another.": "",
|
||||
"Updates the game, frame rate and battery every 5 seconds. Turn off to save the Frame's power.": "",
|
||||
"Updates this source checkout (git pull + uv sync), then restarts FramePort.": "",
|
||||
"Updates, tools, this PC and where FramePort keeps its data": "",
|
||||
"Updates, installing, appearance and where FramePort keeps its data": "",
|
||||
"Updating works in the desktop app": "",
|
||||
"Upload": "",
|
||||
"Upload files…": "",
|
||||
@@ -1743,6 +1848,7 @@
|
||||
"Upside down": "",
|
||||
"Upside down and mirrored": "",
|
||||
"Upside-down panel images (diagnostics)": "",
|
||||
"USB MIDI: don't poll for USB devices": "",
|
||||
"Use controllers": "",
|
||||
"Use FramePort": "",
|
||||
"Use FramePort for these links": "",
|
||||
@@ -1762,6 +1868,8 @@
|
||||
"Vermillion shows a canvas being painted as a separate compositor layer, which the Frame draws in front of everything: the hand and brush disappear over the canvas while they still paint. Rewrites PaintableMesh.HasCompositorLayerAvailable and ShouldUseCompositorOverlay -> false in libil2cpp.so (found with Cpp2IL), so the game uses its own fallback and draws the canvas in the scene. The canvas may look a little less sharp.": "",
|
||||
"Vermillion: paint canvases in the scene": "",
|
||||
"Version": "",
|
||||
"version {version}": "",
|
||||
"Version {version} is available from its install link (you have {current}).": "",
|
||||
"Very high": "",
|
||||
"Vibration strength": "",
|
||||
"Video panels that an Android media player draws into (XR_KHR_android_surface_swapchain, for example I Am Monkey's intro video), which the Frame's runtime refuses, get an Android Surface from FrameBridge: each video frame is copied into an ordinary swapchain the panel shows. Without it these panels are missing and a game waiting for its video stays black. 0 = leave them to the runtime.": "",
|
||||
@@ -1782,8 +1890,10 @@
|
||||
"VrApi → OpenXR bridge": "",
|
||||
"Vulkan error checks (log)": "",
|
||||
"Vulkan format workaround": "",
|
||||
"Vulkan pipeline failures (log)": "",
|
||||
"Vulkan shader dump (diagnostics)": "",
|
||||
"Vulkan shader fixes": "",
|
||||
"Vulkan shim (frame.vk_sanitize): logs every failing graphics/compute pipeline creation with its shader stages (named like the vk_shader_dump files), structure types and any sampler Y'CbCr conversion involved, to find the pipeline behind Unreal's \"Shader compilation failures are Fatal.\" No effect on the game.": "",
|
||||
"Vulkan shim (frame.vk_sanitize): makes two Unreal habits valid Vulkan - depth images get VK_IMAGE_USAGE_TRANSFER_DST_BIT (they are cleared with vkCmdClearDepthStencilImage) and Qualcomm shader-resolve subpasses lose an invalid depth resolve. Found with the validation layer in Into The Radius 2 (flickering models, windows behind models). Also leaves out image barriers without an image and refuses image views without one, which crash the Frame's driver (for example Metro Awakening).": "",
|
||||
"Vulkan shim (frame.vk_sanitize): on gives every occlusion query room for both eyes. In multiview passes the Frame's driver writes a zero result for the second eye into the next query, so engines that count on one slot cull visible objects (models popping in and out, for example Into The Radius 2). 0 = off, 1 = on (2 slots).": "",
|
||||
"Vulkan shim (frame.vk_sanitize): SPIR-V modules matching size + SHA-256 get words inserted at a byte offset, for example stores that initialize locals a shader reads before writing (an undefined loop counter hung the GPU in VR4's campaign). Format: <size>:<sha256>:<byte offset>:<word>,<word>,...; several separated by ';'. Comes from a game's recipe.": "",
|
||||
@@ -1830,6 +1940,7 @@
|
||||
"Windows' firewall blocks the Frame from reaching FramePort. Start the setup again and allow the change when Windows asks.": "",
|
||||
"Windows' firewall blocks the Frame on public networks. Set this network to Private in Windows' network settings.": "",
|
||||
"Windows' firewall for WSL blocks the Frame. Show the setup command again and allow the change when Windows asks.": "",
|
||||
"With emulated passthrough, honours the eye layer's XR_FB_composition_layer_alpha_blend, which the Frame's runtime ignores: Unreal games keep inverted alpha and ask for inverse blending, so the room showed where the game drew and black where it should show the room (for example Star Wars: Beyond Victory). The alpha is inverted in the game's image before it is composited (Vulkan).": "",
|
||||
"Without a Meta account, OVRPort's platform library makes up a new user id at every start (ovr_GetLoggedInUserID). Games that file saves under the user id (for example Walkabout Mini Golf) then start with an empty profile each time and seem to lose all progress. Gives the game a fixed id instead, different for each game and each FramePort user.": "",
|
||||
"Working": "",
|
||||
"Working…": "",
|
||||
@@ -1919,6 +2030,22 @@
|
||||
"",
|
||||
""
|
||||
],
|
||||
"{n} game has another version there (left alone: Update with a newer version… on its page)": [
|
||||
"",
|
||||
""
|
||||
],
|
||||
"{n} game in the library": [
|
||||
"",
|
||||
""
|
||||
],
|
||||
"{n} game is already in the library from another folder": [
|
||||
"",
|
||||
""
|
||||
],
|
||||
"{n} game now uses the other version found there": [
|
||||
"",
|
||||
""
|
||||
],
|
||||
"{n} game ran into a problem": [
|
||||
"",
|
||||
""
|
||||
@@ -1935,6 +2062,10 @@
|
||||
"",
|
||||
""
|
||||
],
|
||||
"{n} large file left out": [
|
||||
"",
|
||||
""
|
||||
],
|
||||
"{n} line": [
|
||||
"",
|
||||
""
|
||||
@@ -1960,14 +2091,24 @@
|
||||
"",
|
||||
""
|
||||
],
|
||||
"{n} update available": [
|
||||
"",
|
||||
""
|
||||
],
|
||||
"{n} update is waiting in the Library": [
|
||||
"",
|
||||
""
|
||||
],
|
||||
"{n} viewer": [
|
||||
"",
|
||||
""
|
||||
],
|
||||
"{old} → {new} · from {host}": "",
|
||||
"{on} on your Frame": "",
|
||||
"{rate}/s": "",
|
||||
"{remaining} more after this": "",
|
||||
"{size:.1f} GiB free": "",
|
||||
"{size} of saves": "",
|
||||
"{title} couldn't be added to the Frame's Steam library: {why}": "",
|
||||
"{title} ended.": "",
|
||||
"{title} failed: {error}": "",
|
||||
@@ -1977,6 +2118,7 @@
|
||||
"{title} joins the Frame's Steam library once the running game closes": "",
|
||||
"{title} joins the Frame's Steam library when you're back in Gaming Mode — start it there": "",
|
||||
"{title} moved to {label}": "",
|
||||
"{title}'s saves on the Frame are replaced by the backup from {when}. The Frame keeps a copy of the saves it has now, so you can undo this.": "",
|
||||
"{title}: analyzed again": "",
|
||||
"{title}: checks failed": "",
|
||||
"{title}: details from {value}": "",
|
||||
@@ -1987,7 +2129,10 @@
|
||||
"{title}: newer version added": "",
|
||||
"{title}: newer version added. Press Update to install it.": "",
|
||||
"{title}: ready": "",
|
||||
"{title}: saves backed up ({line})": "",
|
||||
"{title}: saves from {when} restored ({n} files)": "",
|
||||
"{title}: Steam artwork updated on the Frame": "",
|
||||
"{title}: the saves from before the last restore are back": "",
|
||||
"{title}: {line}": "",
|
||||
"{used} of {total}": "",
|
||||
"{used}/{max} kernel keys used": "",
|
||||
|
||||
@@ -48,6 +48,9 @@ class ApkContext:
|
||||
reporter: Reporter
|
||||
recipe_patches: dict # full selection, for patches that depend on others
|
||||
notes: list[str] = field(default_factory=list)
|
||||
# (name, ok, detail) a patch reports while applying, e.g. a WARN that it found nothing to change: they join the
|
||||
# build's checks (job/CLI output, the build record) like validate()'s
|
||||
checks: list[tuple[str, bool | None, str]] = field(default_factory=list)
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -193,6 +193,9 @@ def convert(ws, prebuilt: Callable[[str], bytes], ovrport: Callable[[str, str],
|
||||
class A32Bridge(Patch):
|
||||
id = "frame.a32_bridge"
|
||||
a32 = True # the bridge itself
|
||||
# the translator ended blocks before its exit-stub table ran out only from this release on (GitHub #342: OpenSSL's
|
||||
# ARMv8 SHA-1 rounds in Pinball FX2 VR killed the game): "Update on Frame" for the game that hit it
|
||||
package_revisions = {"com.zenstudios.PinballFX2VRQuest": 2}
|
||||
title = "32-bit ARM bridge (Gear VR / Go games)"
|
||||
description = (
|
||||
"Runs a 32-bit-only game (armeabi-v7a: Gear VR, Oculus Go and early Quest games) on the Frame, which has no "
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
"""Cortopia Studios' Meta platform start-up waits forever for an org-scoped user id (Escaping Wonderland, GitHub #360).
|
||||
|
||||
Cortopia's games start Meta's platform in `Cortopia.Scripts.Platform.Meta.OculusPlatform.Initialize` (an async
|
||||
method, `<Initialize>d__13.MoveNext`): Core.AsyncInitialize, Entitlements.IsUserEntitledToApplication,
|
||||
Users.GetLoggedInUser, and then, only when `Application.internetReachability` is ReachableViaLocalAreaNetwork,
|
||||
Users.GetOrgScopedID(user id), whose answer only becomes the game's AnalyticsID. OVRPort's platform library has no
|
||||
`ovr_User_GetOrgScopedID` (an export that returns request id 0, runtimes 3.4.3-23204ea and -aa54c3f); Meta's C#
|
||||
wrapper then logs "An unknown error occurred. Request failed." and never calls the callback, so the awaited task never
|
||||
finishes and the game stays on its loading screen with frames still paced.
|
||||
|
||||
The game's own code skips that request when the device isn't on Wi-Fi/LAN (then the analytics id stays empty, as it
|
||||
does for offline players). This patch takes that path always: the `b.ne` after `cmp w0, #2` that follows the call to
|
||||
`get_internetReachability` in that method becomes an unconditional `b`. The licence check and the logged-in user come
|
||||
before it and are untouched. Methods are found with Cpp2IL; the site must match exactly once, with the
|
||||
GetOrgScopedID call inside the skipped part, or nothing is changed."""
|
||||
from __future__ import annotations
|
||||
|
||||
from ..base import ApkContext, Patch, Suggestion, register
|
||||
from .unity_text_input import ALL_TARGETS, METADATA, Il2cppReturnPatch, _executable, can_rewrite_il2cpp
|
||||
|
||||
PLATFORM = "Assembly-CSharp/Cortopia/Scripts/Platform/Meta/OculusPlatform.cs"
|
||||
APPLICATION = "UnityEngine.CoreModule/UnityEngine/Application.cs"
|
||||
USERS = "Oculus.Platform/Oculus/Platform/Users.cs"
|
||||
WANTED = {PLATFORM: ["MoveNext"], APPLICATION: ["get_internetReachability"], USERS: ["GetOrgScopedID"]}
|
||||
for _cls, _names in WANTED.items(): # one Cpp2IL run (and cache entry) serves every IL2CPP patch
|
||||
ALL_TARGETS.setdefault(_cls, [])
|
||||
ALL_TARGETS[_cls] += [n for n in _names if n not in ALL_TARGETS[_cls]]
|
||||
|
||||
CMP_W0_2 = 0x7100081F # cmp w0, #2 (subs wzr, w0, #2): NetworkReachability.ReachableViaLocalAreaNetwork
|
||||
|
||||
|
||||
def _word(data: bytes | bytearray, off: int) -> int:
|
||||
return int.from_bytes(data[off:off + 4], "little")
|
||||
|
||||
|
||||
def _bl_target(word: int, off: int) -> int | None:
|
||||
if word & 0xFC000000 != 0x94000000:
|
||||
return None
|
||||
imm = word & 0x3FFFFFF
|
||||
return off + ((imm - (1 << 26) if imm & (1 << 25) else imm) << 2)
|
||||
|
||||
|
||||
def skip_org_id(lib: bytes, method: tuple[int, int], reachability: int, org_scoped_id: int
|
||||
) -> tuple[bytes | None, list[str]]:
|
||||
"""In the method at (file offset, length): `bl get_internetReachability; cmp w0, #2; b.ne X` -> `b X`, when the
|
||||
skipped code [b.ne + 4, X) calls GetOrgScopedID. Offsets are file offsets (one code segment: bl's relative
|
||||
displacement is the same in the file). Returns (patched library or None, notes); raises when the code differs."""
|
||||
start, length = method
|
||||
if start % 4 or not any(a <= start and start + length <= b for a, b in _executable(lib)):
|
||||
raise RuntimeError(f"OculusPlatform.Initialize: offset {start:#x} isn't code in libil2cpp.so")
|
||||
sites, done = [], []
|
||||
for off in range(start, start + length - 8, 4):
|
||||
if _bl_target(_word(lib, off), off) != reachability or _word(lib, off + 4) != CMP_W0_2:
|
||||
continue
|
||||
br = off + 8
|
||||
w = _word(lib, br)
|
||||
if w & 0xFF00001F == 0x54000001: # b.ne
|
||||
imm = (w >> 5) & 0x7FFFF
|
||||
target = br + ((imm - (1 << 19) if imm & (1 << 18) else imm) << 2)
|
||||
if br < target <= start + length and any(_bl_target(_word(lib, o), o) == org_scoped_id
|
||||
for o in range(br + 4, target, 4)):
|
||||
sites.append((br, target))
|
||||
elif w & 0xFC000000 == 0x14000000: # already an unconditional b
|
||||
done.append(br)
|
||||
if not sites:
|
||||
if done:
|
||||
return None, ["OculusPlatform.Initialize: org-scoped id request already skipped"]
|
||||
raise RuntimeError("OculusPlatform.Initialize: the network check before GetOrgScopedID wasn't found")
|
||||
if len(sites) > 1:
|
||||
raise RuntimeError(f"OculusPlatform.Initialize: {len(sites)} candidate checks; not guessing which one")
|
||||
br, target = sites[0]
|
||||
out = bytearray(lib)
|
||||
out[br:br + 4] = (0x14000000 | (((target - br) >> 2) & 0x3FFFFFF)).to_bytes(4, "little")
|
||||
return bytes(out), [f"OculusPlatform.Initialize: skips Users.GetOrgScopedID (b.ne -> b at {br:#x})"]
|
||||
|
||||
|
||||
class CortopiaOrgId(Patch):
|
||||
id = "frame.cortopia_org_id"
|
||||
title = "Cortopia games: don't wait for Meta's org-scoped id"
|
||||
description = ("Cortopia Studios' games (e.g. Escaping Wonderland) ask Meta's platform for an org-scoped user id "
|
||||
"at start when on Wi-Fi, only to use it as their analytics id. OVRPort's platform library doesn't "
|
||||
"answer that request (\"An unknown error occurred. Request failed.\"), so the game waits forever "
|
||||
"on its loading screen. Makes the game take its own offline path for that one request (the "
|
||||
"analytics id stays empty); the licence check and the logged-in user before it are unchanged. "
|
||||
"Found with Cpp2IL in libil2cpp.so.")
|
||||
order = 49
|
||||
|
||||
def applies(self, a):
|
||||
return (a.engine == "Unity" and "libil2cpp.so" in a.libs and "arm64-v8a" in a.abis
|
||||
and bool((a.extra or {}).get("cortopia_org_id")))
|
||||
|
||||
def detect(self, a):
|
||||
if self.applies(a) and can_rewrite_il2cpp(a):
|
||||
return Suggestion(True, "Cortopia's Meta platform start-up waits for an org-scoped user id that "
|
||||
"OVRPort's platform library never answers (stuck loading screen).")
|
||||
return None
|
||||
|
||||
def apply(self, ctx: ApkContext) -> bool:
|
||||
from ...analysis.il2cpp import find_methods
|
||||
|
||||
ws = ctx.ws
|
||||
lib_name = ws.lib("libil2cpp.so")
|
||||
if ws.abi != "arm64-v8a" or not ws.has(lib_name) or not ws.has(METADATA):
|
||||
return False
|
||||
check = "Cortopia platform start-up"
|
||||
version = (ctx.analysis.extra or {}).get("unity_version") or Il2cppReturnPatch._unity_version(ws)
|
||||
if not version:
|
||||
ctx.reporter.check(check, False, "not fixed: unknown Unity version (rescan the game)")
|
||||
return False
|
||||
lib = ws.read(lib_name)
|
||||
ctx.reporter.log(f"{check}: finding the code (Cpp2IL; the first time can take a minute)")
|
||||
try:
|
||||
found = find_methods(lib, ws.read(METADATA), version, ALL_TARGETS)
|
||||
method = found.get(PLATFORM, {}).get("MoveNext")
|
||||
reach = found.get(APPLICATION, {}).get("get_internetReachability")
|
||||
org = found.get(USERS, {}).get("GetOrgScopedID")
|
||||
if not (method and reach and org):
|
||||
ctx.notes.append(f"{check}: code not found in this game")
|
||||
return False
|
||||
patched, notes = skip_org_id(lib, method, reach[0], org[0])
|
||||
except Exception as exc: # noqa: BLE001 - optional fix: the game still builds, unchanged
|
||||
ctx.reporter.check(check, False, f"not fixed: {exc}")
|
||||
return False
|
||||
ctx.notes.extend(notes)
|
||||
if patched is not None:
|
||||
ws.put(lib_name, patched)
|
||||
return patched is not None
|
||||
|
||||
|
||||
register(CortopiaOrgId)
|
||||
@@ -0,0 +1,79 @@
|
||||
"""Google Play services' client libraries ask com.google.android.gms.common.util.PlatformVersion before using newer
|
||||
Android APIs. In an app built for Android 12+ only (Quest builds declare minSdkVersion 32), the R8 shrinker folds
|
||||
PlatformVersion.isAtLeastS()/isAtLeastSv2() into `return true`. OVRPort lowers the minimum so the app installs on
|
||||
Lepton's Android 11, but the folded checks stay true: play-services-basement then calls
|
||||
StrictMode.VmPolicy.Builder.permitUnsafeIntentLaunch() (Android 12) when it binds to Play services and the app dies
|
||||
on its GoogleApiHandler thread with NoSuchMethodError (Titan Isles, GitHub #310), whether or not Play services are
|
||||
there. The checks for Android versions newer than 11 that were folded to a constant `true` return false again (same
|
||||
size, in place; see vivox_audio_route); Play services then take their Android 11 path (and, as there are no Play
|
||||
services in Lepton, report them missing the normal way). Only constant bodies change: a real SDK_INT check stays."""
|
||||
from __future__ import annotations
|
||||
|
||||
import struct
|
||||
|
||||
from ...apk.dex import Dex
|
||||
from ..base import ApkContext, Patch, Suggestion, register
|
||||
|
||||
PLATFORM_VERSION = "Lcom/google/android/gms/common/util/PlatformVersion;"
|
||||
# the checks for Android versions above Lepton's Android 11 (API 30)
|
||||
NEWER = ("isAtLeastS", "isAtLeastSv2", "isAtLeastT", "isAtLeastU", "isAtLeastV", "isAtLeastB", "isAtLeastBaklava")
|
||||
TRUE_BODY = [0x1012, 0x000F] # const/4 v0, #1 ; return v0
|
||||
|
||||
|
||||
def folded_checks(dex: Dex) -> list[tuple[str, int]]:
|
||||
"""(name, code offset) of PlatformVersion's checks for Android 12+ that R8 folded to `return true`."""
|
||||
out = []
|
||||
for idx, code in dex.class_methods(PLATFORM_VERSION):
|
||||
name = dex.method(idx)[1]
|
||||
if name not in NEWER or dex.return_type(idx) != "Z":
|
||||
continue
|
||||
n = struct.unpack_from("<I", dex.data, code + 12)[0]
|
||||
if n == 2 and list(struct.unpack_from("<2H", dex.data, code + 16)) == TRUE_BODY:
|
||||
out.append((name, code))
|
||||
return out
|
||||
|
||||
|
||||
def has_folded_checks(dexes: list[bytes]) -> bool:
|
||||
return any(PLATFORM_VERSION.encode() in d and b"isAtLeastS" in d and folded_checks(Dex(d)) for d in dexes)
|
||||
|
||||
|
||||
def patch_dex(dex: Dex) -> list[str]:
|
||||
"""PlatformVersion checks that now return false; [] if nothing applies."""
|
||||
return [name for name, code in folded_checks(dex) if dex.return_early(code, "Z")]
|
||||
|
||||
|
||||
class GmsPlatformVersion(Patch):
|
||||
id = "frame.gms_platform_version"
|
||||
title = "Play services: Android 11 version checks"
|
||||
description = ("Google Play services' libraries in games built for Android 12+ only (for example Titan Isles) "
|
||||
"had their Android 12 checks folded into 'always true' when the game was built; on Lepton's "
|
||||
"Android 11 they then call an Android 12 method and the game crashes at start (FATAL EXCEPTION: "
|
||||
"GoogleApiHandler). Those checks answer 'no' again (an in-place edit of classes.dex).")
|
||||
order = 44
|
||||
needs_vr = False
|
||||
|
||||
def applies(self, a):
|
||||
return bool((a.extra or {}).get("gms_folded_sdk_checks"))
|
||||
|
||||
def detect(self, a):
|
||||
if self.applies(a):
|
||||
return Suggestion(True, "Google Play services' Android 12 checks were built in as 'always true'; on "
|
||||
"Lepton (Android 11) the game would crash at start.")
|
||||
return None
|
||||
|
||||
def apply(self, ctx: ApkContext) -> bool:
|
||||
changed = False
|
||||
for name in sorted(n for n in ctx.ws.names() if n.startswith("classes") and n.endswith(".dex")):
|
||||
data = ctx.ws.read(name)
|
||||
if PLATFORM_VERSION.encode() not in data:
|
||||
continue
|
||||
dex = Dex(data)
|
||||
done = patch_dex(dex)
|
||||
if done:
|
||||
ctx.ws.put(name, dex.finish())
|
||||
ctx.notes.append(f"{name}: PlatformVersion.{', '.join(done)} return false")
|
||||
changed = True
|
||||
return changed
|
||||
|
||||
|
||||
register(GmsPlatformVersion)
|
||||
@@ -38,7 +38,7 @@ def _words(data: bytes | bytearray, off: int, n: int) -> list[int]:
|
||||
def _function_offset(data: bytes, size: int) -> int | None:
|
||||
"""File offset of FUNC in the loader (None: not an ELF, no such export, or shorter than `size` bytes)."""
|
||||
try:
|
||||
dynsym = elf._elf(data).get_section_by_name(".dynsym")
|
||||
dynsym = elf.dynsym_section(elf._elf(data))
|
||||
except Exception: # noqa: BLE001
|
||||
return None
|
||||
found = dynsym.get_symbol_by_name(FUNC) if dynsym is not None else None
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
"""Photon Voice (Exit Games' Unity voice chat, e.g. Table Troopers, GitHub #362/#325) crashes in Lepton when voice
|
||||
chat starts: its Java microphone plugin (com.exitgames.photon.audioinaec.AudioInAEC) picks the audio route in
|
||||
updateAudioDevice with Android 12 AudioManager methods (getAvailableCommunicationDevices, setCommunicationDevice)
|
||||
and has no Android version check left (it logs "Start: SDK >= 31, using BroadcastReceiver" on every Android), so on
|
||||
Lepton's Android 11 the microphone thread dies with java.lang.NoSuchMethodError and takes the app with it. The
|
||||
AudioInAEC methods that call them (updateAudioDevice: void) return at once instead, the same in-place classes.dex edit
|
||||
as frame.vivox_audio_route. The microphone thread then goes on as on Android 12 (communication mode, echo canceller /
|
||||
gain control / noise suppressor, AudioRecord) on Android's default route; only the device pick is skipped."""
|
||||
from __future__ import annotations
|
||||
|
||||
from ..base import ApkContext, Patch, Suggestion, register
|
||||
from .vivox_audio_route import patch_class, patch_dexes
|
||||
|
||||
AUDIO_IN = "Lcom/exitgames/photon/audioinaec/AudioInAEC;"
|
||||
|
||||
|
||||
def patch_dex(dex) -> list[str]:
|
||||
"""Methods of Photon Voice's AudioInAEC that now return at once; [] if nothing applies."""
|
||||
return patch_class(dex, AUDIO_IN)
|
||||
|
||||
|
||||
class PhotonVoiceAudioRoute(Patch):
|
||||
id = "frame.photon_voice_audio_route"
|
||||
title = "Photon Voice: skip Android 12 audio routing"
|
||||
description = ("Photon Voice's microphone plugin (for example Table Troopers) picks the audio device with "
|
||||
"Android 12 methods (AudioManager communication devices) without checking the Android version; "
|
||||
"Lepton runs Android 11, so the game crashes with a NoSuchMethodError when voice chat starts. "
|
||||
"That method returns at once instead (an in-place edit of classes.dex); the microphone keeps "
|
||||
"Android's default audio route.")
|
||||
order = 44
|
||||
needs_vr = False
|
||||
|
||||
def applies(self, a):
|
||||
return bool((a.extra or {}).get("photon_voice_api31"))
|
||||
|
||||
def detect(self, a):
|
||||
if self.applies(a):
|
||||
return Suggestion(True, "Photon Voice calls Android 12 audio methods, which Lepton (Android 11) lacks, "
|
||||
"and crashes when voice chat starts.")
|
||||
return None
|
||||
|
||||
def apply(self, ctx: ApkContext) -> bool:
|
||||
return patch_dexes(ctx, AUDIO_IN, "Photon Voice AudioInAEC")
|
||||
|
||||
|
||||
register(PhotonVoiceAudioRoute)
|
||||
@@ -51,7 +51,7 @@ def _x0_address(data: bytes, segs, at: int, back: int = 8) -> int | None:
|
||||
|
||||
|
||||
def _function(data: bytes, name: str) -> tuple[int, int] | None:
|
||||
sec = elf._elf(data).get_section_by_name(".dynsym")
|
||||
sec = elf.dynsym_section(elf._elf(data))
|
||||
for sym in (sec.get_symbol_by_name(name) or []) if sec else []:
|
||||
if sym["st_value"] and sym["st_size"]:
|
||||
return sym["st_value"], sym["st_size"]
|
||||
|
||||
@@ -15,7 +15,7 @@ VIDEO_LIBS = ("libavcodec", "libffmpeg", "libvlc", "libmpv", "libijkffmpeg")
|
||||
def raise_swapchain_limit(data: bytes) -> tuple[bytes | None, int]:
|
||||
"""Rewrite the `cmp wN, #4096` size guards at the start of OVRPort's swapchain entry points."""
|
||||
try:
|
||||
dynsym = elf._elf(data).get_section_by_name(".dynsym")
|
||||
dynsym = elf.dynsym_section(elf._elf(data))
|
||||
except Exception: # noqa: BLE001
|
||||
return None, 0
|
||||
if dynsym is None:
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
"""Unity's App UI package (com.unity.dt.app-ui) ships its own activity (com.unity3d.player.appui.AppUIGameActivity,
|
||||
e.g. PianoVision, GitHub #297) whose onCreate gets the vibrator through Android 12's VibratorManager
|
||||
(getSystemService("vibrator_manager") → check-cast VibratorManager → getDefaultVibrator) without checking the Android
|
||||
version. Lepton runs Android 11: the class doesn't exist, onCreate throws NoClassDefFoundError and the app quits before
|
||||
Unity starts. That sequence becomes "no vibrator" (its registers are set to null, the field store stays, the rest of
|
||||
onCreate runs), and the activity's methods that use the vibrator (App UI's haptic feedback for its UI controls) return
|
||||
at once. In-place classes.dex edit (see vivox_audio_route); nothing else changes. The Frame's Android has no vibrator
|
||||
to drive anyway: controller haptics go through OpenXR, not through this."""
|
||||
from __future__ import annotations
|
||||
|
||||
import struct
|
||||
|
||||
from ...apk.dex import Dex
|
||||
from ..base import ApkContext, Patch, Suggestion, register
|
||||
|
||||
PACKAGE = "Lcom/unity3d/player/appui/"
|
||||
VIBRATOR_MANAGER = "Landroid/os/VibratorManager;"
|
||||
VIBRATOR = "Landroid/os/Vibrator;"
|
||||
SERVICE = "vibrator_manager"
|
||||
CONST_STRING, CONST16, INVOKE_VIRTUAL, MOVE_RESULT_OBJECT, CHECK_CAST, IGET_OBJECT = 0x1A, 0x13, 0x6E, 0x0C, 0x1F, 0x54
|
||||
|
||||
|
||||
def _no_vibrator_manager(dex: Dex, code_off: int) -> bool:
|
||||
"""Rewrite one `getSystemService("vibrator_manager") … getDefaultVibrator()` sequence in this code item: the
|
||||
registers it leaves set (the string, the manager, the vibrator) become null and the rest of the span nops."""
|
||||
insns = list(dex._insns(code_off))
|
||||
for k, (pos, u) in enumerate(insns):
|
||||
if u[0] & 0xFF != CONST_STRING or dex.string(u[1]) != SERVICE or k + 5 >= len(insns):
|
||||
continue
|
||||
seq = insns[k:k + 6]
|
||||
ops = [x[1][0] & 0xFF for x in seq]
|
||||
if ops != [CONST_STRING, INVOKE_VIRTUAL, MOVE_RESULT_OBJECT, CHECK_CAST, INVOKE_VIRTUAL, MOVE_RESULT_OBJECT]:
|
||||
continue
|
||||
if (dex.method(seq[1][1][1])[1] != "getSystemService" or dex.type_name(seq[3][1][1]) != VIBRATOR_MANAGER
|
||||
or dex.method(seq[4][1][1]) != (VIBRATOR_MANAGER, "getDefaultVibrator")):
|
||||
continue
|
||||
regs = []
|
||||
for unit in (seq[0][1][0], seq[2][1][0], seq[5][1][0]): # vAA of const-string / both move-results
|
||||
if unit >> 8 not in regs:
|
||||
regs.append(unit >> 8)
|
||||
end = seq[5][0] + len(seq[5][1])
|
||||
new = [w for r in regs for w in (CONST16 | r << 8, 0)]
|
||||
new += [0] * (end - pos - len(new))
|
||||
struct.pack_into(f"<{len(new)}H", dex.data, code_off + 16 + 2 * pos, *new)
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def _reads_vibrator(dex: Dex, code_off: int) -> bool:
|
||||
return any(u[0] & 0xFF == IGET_OBJECT and dex.field(u[1])[1] == VIBRATOR for _pos, u in dex._insns(code_off))
|
||||
|
||||
|
||||
def patch_dex(dex: Dex) -> list[str]:
|
||||
"""What changed in App UI's activities ("<Class>.onCreate", "<Class>.Vibrate", …); [] if nothing applies."""
|
||||
done = []
|
||||
for cls in dex.class_names():
|
||||
if not cls.startswith(PACKAGE):
|
||||
continue
|
||||
short = cls[len(PACKAGE):-1]
|
||||
methods = dex.class_methods(cls)
|
||||
fixed = [dex.method(idx)[1] for idx, code in methods if _no_vibrator_manager(dex, code)]
|
||||
if not fixed:
|
||||
continue
|
||||
done += [f"{short}.{m}" for m in fixed]
|
||||
for idx, code in methods:
|
||||
if dex.return_type(idx) == "V" and _reads_vibrator(dex, code) and dex.return_early(code, "V"):
|
||||
done.append(f"{short}.{dex.method(idx)[1]}")
|
||||
return done
|
||||
|
||||
|
||||
class UnityAppUiVibrator(Patch):
|
||||
id = "frame.unity_appui_vibrator"
|
||||
title = "Unity App UI: no Android 12 vibrator"
|
||||
description = ("The activity of Unity's App UI package (for example PianoVision) gets the vibrator through "
|
||||
"Android 12's VibratorManager without checking the Android version; on Lepton's Android 11 the "
|
||||
"game quits at start with a NoClassDefFoundError. The activity then starts without a vibrator "
|
||||
"and its UI haptic feedback does nothing (an in-place edit of classes.dex).")
|
||||
order = 44
|
||||
needs_vr = False
|
||||
|
||||
def applies(self, a):
|
||||
return bool((a.extra or {}).get("unity_appui_vibrator"))
|
||||
|
||||
def detect(self, a):
|
||||
if self.applies(a):
|
||||
return Suggestion(True, "Unity App UI's activity uses Android 12's VibratorManager at start, which "
|
||||
"Lepton (Android 11) lacks: the game would quit at once.")
|
||||
return None
|
||||
|
||||
def apply(self, ctx: ApkContext) -> bool:
|
||||
changed = False
|
||||
for name in sorted(n for n in ctx.ws.names() if n.startswith("classes") and n.endswith(".dex")):
|
||||
data = ctx.ws.read(name)
|
||||
if PACKAGE.encode() not in data or VIBRATOR_MANAGER.encode() not in data:
|
||||
continue
|
||||
dex = Dex(data)
|
||||
done = patch_dex(dex)
|
||||
if done:
|
||||
ctx.ws.put(name, dex.finish())
|
||||
ctx.notes.append(f"{name}: Unity App UI without VibratorManager ({', '.join(done)})")
|
||||
changed = True
|
||||
return changed
|
||||
|
||||
|
||||
register(UnityAppUiVibrator)
|
||||
@@ -150,14 +150,27 @@ class Il2cppReturnPatch(Patch):
|
||||
again, more = patch_field_loads(patched or lib, method, offset[0], value, name)
|
||||
patched, notes = again or patched, notes + more
|
||||
except Exception as exc: # noqa: BLE001 - optional fix: the game still builds, unchanged
|
||||
ctx.reporter.check(self.check_name, False, f"not fixed: {exc}")
|
||||
return False
|
||||
ctx.notes.extend(notes or [f"{self.check_name}: code not found in this game"])
|
||||
# e.g. "Cpp2IL couldn't read this game's code: System.IndexOutOfRangeException: … (exit code 134)"
|
||||
return self._not_applied(ctx, f"{exc}; built without this fix")
|
||||
if not notes: # turned on, but none of its methods is in this game: say so instead of a silent no-op
|
||||
wanted = dict.fromkeys(f"{c.rsplit('/', 1)[-1][:-3]}.{m}"
|
||||
for c, ms in {**self.targets, **self.field_loads}.items() for m in ms)
|
||||
return self._not_applied(ctx, f"code not found in this game (Cpp2IL found none of {', '.join(wanted)}); "
|
||||
"built without this fix")
|
||||
ctx.notes.extend(notes)
|
||||
if patched is not None:
|
||||
ws.put(lib_name, patched)
|
||||
return patched is not None
|
||||
|
||||
|
||||
def _not_applied(self, ctx: ApkContext, why: str) -> bool:
|
||||
"""A WARN build check (the build still succeeds) naming the patch, and the same line in the log."""
|
||||
detail = f"not applied ({self.id}): {why}"
|
||||
ctx.reporter.log(f"{self.check_name}: {detail}")
|
||||
ctx.checks.append((self.check_name, None, detail))
|
||||
return False
|
||||
|
||||
|
||||
class UnityTextInput(Il2cppReturnPatch):
|
||||
id = "frame.unity_text_input"
|
||||
title = "Make Unity text fields work"
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
"""Unreal's Android memory reservations without commit-charge accounting (GitHub #349, Transformers Beyond Reality).
|
||||
|
||||
Unreal reserves virtual memory on Android with `mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
|
||||
0)` (FPlatformVirtualMemoryBlock::AllocateVirtual: Android has no separate commit step). Games built with
|
||||
FMallocBinned3 reserve the whole allocator range up front while libUnreal.so loads, 76 GiB in Transformers Beyond
|
||||
Reality. Quest's kernel lets that through; the Frame runs with the kernel's heuristic overcommit (mode 0), which
|
||||
refuses any single writable private mapping larger than RAM + swap (16 + 8 GiB), so the reservation fails, Unreal's
|
||||
out-of-memory handler runs before its log exists and dereferences a null pointer (SIGSEGV, fault addr 0x10, from a
|
||||
static constructor inside System.loadLibrary). Adding MAP_NORESERVE to those mmap calls gives them the Quest
|
||||
behaviour: pages are still only backed when touched, the mapping just isn't charged up front.
|
||||
|
||||
Each site is `mov w3, #0x22` (MAP_PRIVATE|MAP_ANONYMOUS) a few instructions before a `bl` to mmap's PLT stub, with
|
||||
`mov x0, xzr` and `mov w2, #3` in the same window; the one instruction becomes `mov w3, #0x4022`. Nothing else changes
|
||||
and nothing moves; only arm64 engine libraries."""
|
||||
from __future__ import annotations
|
||||
|
||||
import io
|
||||
import struct
|
||||
|
||||
from ...analysis import elf
|
||||
from ..base import ApkContext, Patch, Suggestion, register
|
||||
|
||||
ENGINE_LIBS = ("libUE4.so", "libUnreal.so")
|
||||
MOV_W3_FLAGS = 0x52800443 # mov w3, #0x22 MAP_PRIVATE|MAP_ANONYMOUS
|
||||
MOV_W3_NORESERVE = 0x52880443 # mov w3, #0x4022 MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE
|
||||
MOV_W2_RW = 0x52800062 # mov w2, #3 PROT_READ|PROT_WRITE
|
||||
MOV_X0_NULL = 0xAA1F03E0 # mov x0, xzr
|
||||
WINDOW_BEFORE, WINDOW_AFTER = 8, 9
|
||||
|
||||
|
||||
def _mmap_slots(data: bytes) -> set[int]:
|
||||
"""GOT slots of mmap/mmap64 (R_AARCH64_JUMP_SLOT relocations)."""
|
||||
from elftools.elf.elffile import ELFFile
|
||||
from elftools.elf.relocation import RelocationSection
|
||||
|
||||
e = ELFFile(io.BytesIO(data))
|
||||
dynsym = elf.dynsym_section(e)
|
||||
if dynsym is None:
|
||||
return set()
|
||||
slots = set()
|
||||
for sec in e.iter_sections():
|
||||
if not isinstance(sec, RelocationSection) or sec["sh_type"] != "SHT_RELA":
|
||||
continue
|
||||
for r in sec.iter_relocations():
|
||||
sym = r["r_info_sym"]
|
||||
if sym and dynsym.get_symbol(sym).name in ("mmap", "mmap64"):
|
||||
slots.add(r["r_offset"])
|
||||
return slots
|
||||
|
||||
|
||||
def _plt_slot(data: bytes, segs, va: int) -> int | None:
|
||||
"""The GOT slot a PLT stub at `va` jumps through: adrp x16, page; ldr x17, [x16, #off]."""
|
||||
off = elf.vaddr_to_offset(segs, va)
|
||||
if off is None or off + 8 > len(data):
|
||||
return None
|
||||
adrp, ldr = struct.unpack_from("<II", data, off)
|
||||
if adrp & 0x9F00001F != 0x90000010 or ldr & 0xFFC003FF != 0xF9400211:
|
||||
return None
|
||||
imm = ((adrp >> 29) & 3) | ((adrp >> 5) & 0x7FFFF) << 2
|
||||
if imm & 1 << 20:
|
||||
imm -= 1 << 21
|
||||
return (va & ~0xFFF) + (imm << 12) + ((ldr >> 10) & 0xFFF) * 8
|
||||
|
||||
|
||||
def mmap_sites(data: bytes) -> tuple[list[int], list[int]]:
|
||||
"""File offsets of the flag instructions of anonymous read/write mmap calls: (still MAP_PRIVATE|MAP_ANONYMOUS,
|
||||
already MAP_NORESERVE)."""
|
||||
if not elf.is_elf(data) or not elf.is_64bit(data) or data[5] != 1:
|
||||
return [], []
|
||||
slots = _mmap_slots(data)
|
||||
if not slots:
|
||||
return [], []
|
||||
segs = elf.load_segments(data)
|
||||
stubs: dict[int, bool] = {}
|
||||
todo, done = [], []
|
||||
for word, out in ((MOV_W3_FLAGS, todo), (MOV_W3_NORESERVE, done)):
|
||||
needle = struct.pack("<I", word)
|
||||
at = data.find(needle)
|
||||
while at >= 0:
|
||||
va = next((at - o + v for v, o, s in segs if o <= at < o + s), None) if at % 4 == 0 else None
|
||||
if va is not None:
|
||||
for k in range(1, WINDOW_AFTER + 1):
|
||||
if at + 4 * k + 4 > len(data):
|
||||
break
|
||||
w = struct.unpack_from("<I", data, at + 4 * k)[0]
|
||||
if w >> 26 != 0b100101: # bl
|
||||
continue
|
||||
imm = w & 0x3FFFFFF
|
||||
target = va + 4 * k + ((imm - (1 << 26)) if imm & 1 << 25 else imm) * 4
|
||||
if target not in stubs:
|
||||
stubs[target] = _plt_slot(data, segs, target) in slots
|
||||
if stubs[target]:
|
||||
window = {struct.unpack_from("<I", data, at + 4 * j)[0]
|
||||
for j in range(-WINDOW_BEFORE, k) if at + 4 * j >= 0}
|
||||
if MOV_W2_RW in window and MOV_X0_NULL in window:
|
||||
out.append(at)
|
||||
break
|
||||
at = data.find(needle, at + 1)
|
||||
return todo, done
|
||||
|
||||
|
||||
def patch_lib(data: bytes) -> tuple[bytes, int]:
|
||||
todo, _done = mmap_sites(data)
|
||||
if not todo:
|
||||
return data, 0
|
||||
buf = bytearray(data)
|
||||
for at in todo:
|
||||
struct.pack_into("<I", buf, at, MOV_W3_NORESERVE)
|
||||
return bytes(buf), len(todo)
|
||||
|
||||
|
||||
class UnrealNoReserve(Patch):
|
||||
id = "frame.unreal_noreserve"
|
||||
title = "Unreal: reserve memory like on Quest"
|
||||
description = ("Unreal reserves its memory ranges on Android with ordinary read/write mappings. Games built with "
|
||||
"Unreal's Binned3 allocator reserve tens of gigabytes at once while the engine loads (76 GiB in "
|
||||
"Transformers Beyond Reality); Quest allows that, the Frame's kernel refuses mappings larger "
|
||||
"than its memory, and the game crashes before its first frame (SIGSEGV at fault addr 0x10 in "
|
||||
"libUnreal.so, inside System.loadLibrary). This marks those mappings MAP_NORESERVE, as Quest "
|
||||
"effectively treats them: memory is still only used when the game touches it.")
|
||||
order = 49
|
||||
needs_vr = False
|
||||
|
||||
def applies(self, a):
|
||||
return a.engine == "Unreal" and "arm64-v8a" in a.abis
|
||||
|
||||
def detect(self, a):
|
||||
if self.applies(a) and (a.extra or {}).get("unreal_binned3"):
|
||||
return Suggestion(True, "Unreal's Binned3 allocator reserves more memory at start than the Frame's "
|
||||
"kernel allows in one piece; without this the game crashes while it loads.")
|
||||
return None
|
||||
|
||||
def apply(self, ctx: ApkContext) -> bool:
|
||||
ws = ctx.ws
|
||||
if ws.abi != "arm64-v8a":
|
||||
return False
|
||||
lib = next((n for n in ENGINE_LIBS if ws.has(ws.lib(n))), None)
|
||||
if not lib:
|
||||
return False
|
||||
data, count = patch_lib(ws.read_lib(lib))
|
||||
if not count:
|
||||
if not mmap_sites(data)[1]:
|
||||
ctx.notes.append(f"{self.id}: no anonymous read/write mmap calls found in {lib}, left unchanged")
|
||||
return False
|
||||
ws.put(ws.lib(lib), data)
|
||||
ctx.notes.append(f"{count} mmap call(s) in {lib} reserve with MAP_NORESERVE")
|
||||
return True
|
||||
|
||||
def validate(self, ctx: ApkContext):
|
||||
ws = ctx.ws
|
||||
lib = next((n for n in ENGINE_LIBS if ws.has(ws.lib(n))), None)
|
||||
if not lib or ws.abi != "arm64-v8a":
|
||||
return []
|
||||
todo, done = mmap_sites(ws.read_lib(lib))
|
||||
return [("Unreal memory reservations use MAP_NORESERVE", bool(done) and not todo,
|
||||
f"{len(done)} rewritten, {len(todo)} left")]
|
||||
|
||||
|
||||
register(UnrealNoReserve)
|
||||
@@ -0,0 +1,58 @@
|
||||
"""kshoji's USB MIDI driver for Android (jp.kshoji.driver.midi, used by Unity MIDI plugins, e.g. PianoVision for USB
|
||||
pianos, GitHub #297) polls Android's UsbManager for connected MIDI devices on its own thread. Lepton's Android has no
|
||||
USB service (getSystemService("usb") is null), so the first poll throws a NullPointerException on
|
||||
MidiDeviceConnectionWatchThread and the app dies a few seconds after start. The poll
|
||||
(MidiDeviceConnectionWatchThread.checkConnectedDevices) returns at once instead: the watcher then never sees a USB
|
||||
device, which on the Frame it couldn't reach anyway (in-place classes.dex edit, see vivox_audio_route)."""
|
||||
from __future__ import annotations
|
||||
|
||||
from ...apk.dex import Dex
|
||||
from ..base import ApkContext, Patch, Suggestion, register
|
||||
|
||||
WATCH_THREAD = "Ljp/kshoji/driver/midi/device/MidiDeviceConnectionWatcher$MidiDeviceConnectionWatchThread;"
|
||||
METHOD = "checkConnectedDevices"
|
||||
|
||||
|
||||
def patch_dex(dex: Dex) -> list[str]:
|
||||
"""Methods of the watcher thread that now return at once; [] if nothing applies."""
|
||||
done = []
|
||||
for idx, code in dex.class_methods(WATCH_THREAD):
|
||||
if dex.method(idx)[1] == METHOD and dex.return_type(idx) == "V" and dex.return_early(code, "V"):
|
||||
done.append(METHOD)
|
||||
return done
|
||||
|
||||
|
||||
class UsbMidiWatcher(Patch):
|
||||
id = "frame.usb_midi_watcher"
|
||||
title = "USB MIDI: don't poll for USB devices"
|
||||
description = ("kshoji's USB MIDI driver (Unity MIDI plugins, for example PianoVision) polls Android's USB "
|
||||
"service for MIDI devices; the Frame's Android has no USB service, so the app crashes a few "
|
||||
"seconds after start (NullPointerException on MidiDeviceConnectionWatchThread). The poll returns "
|
||||
"at once instead, so no USB MIDI device is ever found (an in-place edit of classes.dex).")
|
||||
order = 44
|
||||
needs_vr = False
|
||||
|
||||
def applies(self, a):
|
||||
return bool((a.extra or {}).get("usb_midi_watcher"))
|
||||
|
||||
def detect(self, a):
|
||||
if self.applies(a):
|
||||
return Suggestion(True, "kshoji's USB MIDI driver polls Android's USB service, which the Frame's "
|
||||
"Android lacks: the app would crash a few seconds after start.")
|
||||
return None
|
||||
|
||||
def apply(self, ctx: ApkContext) -> bool:
|
||||
changed = False
|
||||
for name in sorted(n for n in ctx.ws.names() if n.startswith("classes") and n.endswith(".dex")):
|
||||
data = ctx.ws.read(name)
|
||||
if WATCH_THREAD.encode() not in data:
|
||||
continue
|
||||
dex = Dex(data)
|
||||
if patch_dex(dex):
|
||||
ctx.ws.put(name, dex.finish())
|
||||
ctx.notes.append(f"{name}: USB MIDI watcher's {METHOD} returns at once")
|
||||
changed = True
|
||||
return changed
|
||||
|
||||
|
||||
register(UsbMidiWatcher)
|
||||
@@ -18,13 +18,14 @@ API31 = ("getAvailableCommunicationDevices", "setCommunicationDevice", "clearCom
|
||||
"removeOnCommunicationDeviceChangedListener")
|
||||
|
||||
|
||||
def patch_dex(dex: Dex) -> list[str]:
|
||||
"""Methods of Vivox's AudioChangeListener that now return at once; [] if nothing applies."""
|
||||
def patch_class(dex: Dex, cls: str) -> list[str]:
|
||||
"""Methods of class `cls` that call one of the Android 12 communication-device methods and now return at once;
|
||||
[] if nothing applies. Shared with frame.photon_voice_audio_route."""
|
||||
targets = {i for name in API31 for i in dex.method_index(AUDIO_MANAGER, name)}
|
||||
if not targets:
|
||||
return []
|
||||
done = []
|
||||
for idx, code in dex.class_methods(LISTENER):
|
||||
for idx, code in dex.class_methods(cls):
|
||||
if not dex.invoked(code) & targets:
|
||||
continue
|
||||
if dex.return_early(code, dex.return_type(idx)):
|
||||
@@ -32,6 +33,27 @@ def patch_dex(dex: Dex) -> list[str]:
|
||||
return done
|
||||
|
||||
|
||||
def patch_dexes(ctx: ApkContext, cls: str, label: str) -> bool:
|
||||
"""patch_class on every classes*.dex that defines `cls`; notes what changed."""
|
||||
changed = False
|
||||
for name in sorted(n for n in ctx.ws.names() if n.startswith("classes") and n.endswith(".dex")):
|
||||
data = ctx.ws.read(name)
|
||||
if cls.encode() not in data:
|
||||
continue
|
||||
dex = Dex(data)
|
||||
done = patch_class(dex, cls)
|
||||
if done:
|
||||
ctx.ws.put(name, dex.finish())
|
||||
ctx.notes.append(f"{name}: {label} returns at once in {', '.join(sorted(done))}")
|
||||
changed = True
|
||||
return changed
|
||||
|
||||
|
||||
def patch_dex(dex: Dex) -> list[str]:
|
||||
"""Methods of Vivox's AudioChangeListener that now return at once; [] if nothing applies."""
|
||||
return patch_class(dex, LISTENER)
|
||||
|
||||
|
||||
class VivoxAudioRoute(Patch):
|
||||
id = "frame.vivox_audio_route"
|
||||
title = "Vivox voice chat: skip Android 12 audio routing"
|
||||
@@ -52,18 +74,7 @@ class VivoxAudioRoute(Patch):
|
||||
return None
|
||||
|
||||
def apply(self, ctx: ApkContext) -> bool:
|
||||
changed = False
|
||||
for name in sorted(n for n in ctx.ws.names() if n.startswith("classes") and n.endswith(".dex")):
|
||||
data = ctx.ws.read(name)
|
||||
if LISTENER.encode() not in data:
|
||||
continue
|
||||
dex = Dex(data)
|
||||
done = patch_dex(dex)
|
||||
if done:
|
||||
ctx.ws.put(name, dex.finish())
|
||||
ctx.notes.append(f"{name}: Vivox AudioChangeListener returns at once in {', '.join(sorted(done))}")
|
||||
changed = True
|
||||
return changed
|
||||
return patch_dexes(ctx, LISTENER, "Vivox AudioChangeListener")
|
||||
|
||||
|
||||
register(VivoxAudioRoute)
|
||||
@@ -38,6 +38,11 @@ SETTINGS = [
|
||||
"scale_bias, for example Batman: Arkham Shadow's loading screens) can show the level loading instead of black on "
|
||||
"the Frame. FrameBridge then draws the fade itself: a black quad in front of the eyes whose opacity follows the "
|
||||
"game's dimming. 2 also removes the game's own dimming (if both show, the fade is doubled)."),
|
||||
("hide_fb_foveation", "int", 0, "Turn off Quest Vulkan foveation",
|
||||
"Hides Quest FB foveation extensions from the game and OVRPort, removes Vulkan foveation image/create chains, "
|
||||
"and refuses foveation profile updates. Diagnostic for first-frame failures with missing density images "
|
||||
"(for example Transformers Beyond Reality: Redux). Device verification pending; "
|
||||
"does not disable Valve foveation."),
|
||||
("hide_space_warp", "int", 0, "Turn off space warp",
|
||||
"Hides XR_FB_space_warp, so the game renders every frame itself instead of half of them plus motion vectors "
|
||||
"(Application SpaceWarp). For games whose picture flickers or smears on the Frame (for example Unreal Engine 5 "
|
||||
@@ -59,6 +64,11 @@ SETTINGS = [
|
||||
"Drop layers whose swapchain failed or whose extension isn't enabled."),
|
||||
("passthrough_emul", "int", 1, "Emulate passthrough",
|
||||
"XR_FB_passthrough via ALPHA_BLEND (Frame grayscale cameras)."),
|
||||
("alpha_blend_emul", "int", 1, "Emulate layer alpha blending",
|
||||
"With emulated passthrough, honours the eye layer's XR_FB_composition_layer_alpha_blend, which the Frame's "
|
||||
"runtime ignores: Unreal games keep inverted alpha and ask for inverse blending, so the room showed where the "
|
||||
"game drew and black where it should show the room (for example Star Wars: Beyond Victory). The alpha is "
|
||||
"inverted in the game's image before it is composited (Vulkan)."),
|
||||
("flip_emul", "int", 1, "Emulate flipped quads",
|
||||
"Blit quads flagged XrCompositionLayerImageLayoutFB VERTICAL_FLIP upside down (Vulkan). Fixes UI panels and "
|
||||
"text that show upside down (for example Assassin's Creed Nexus)."),
|
||||
@@ -106,7 +116,10 @@ SETTINGS = [
|
||||
("profile_remap", "int", 1, "Newer Touch profiles as Touch",
|
||||
"Apps that suggest controller bindings only for Meta's newer profiles (Touch Plus, Touch Pro), which the Frame's "
|
||||
"runtime rejects (XR_ERROR_PATH_UNSUPPORTED), get the same bindings as oculus/touch_controller instead "
|
||||
"(components Touch lacks are dropped). Without it such apps get no controller input."),
|
||||
"(components Touch lacks are dropped), and the runtime's answer for each hand is reported to them as their own "
|
||||
"profile (Unity's OpenXR input only connects controllers of a profile it knows). Meta's detached-controller paths "
|
||||
"(XR_META_detached_controllers, which the Frame lacks) are left out of the app's actions and bindings: one such "
|
||||
"path made Unity attach no controller input at all. Without it such apps get no controller input."),
|
||||
("haptic_scale", "float", 1.0, "Vibration strength",
|
||||
"Scales every controller vibration the game asks for (0-1): plain vibrations, Meta's amplitude envelopes and "
|
||||
"PCM buffers. For games whose vibrations feel much stronger than on a Quest."),
|
||||
@@ -116,7 +129,8 @@ SETTINGS = [
|
||||
("aim_forward", "float", 0.0, "Pointer origin forward (m)",
|
||||
"Moves where the pointing ray starts forward (+) or back (−)."),
|
||||
("refresh_rate", "float", 0.0, "Refresh rate (Hz)",
|
||||
"Display refresh rate for this game (72, 80, 90, 96, 108, 120 or 144; 0 = the game's choice). A video's frame "
|
||||
"Display refresh rate for this game (72, 80, 90, 96, 108, 120 or 144; 0 = the game's choice). Applied through "
|
||||
"SteamVR before the game starts. A video's frame "
|
||||
"rate that divides the refresh rate plays smoothest (for example 30 fps at 90 Hz, 24 fps at 72 Hz)."),
|
||||
("layer_debug", "int", 0, "Extra diagnostics (log)",
|
||||
"Logs details for debugging: composition layers and swapchains, focus changes, play-space creation, pointer vs "
|
||||
@@ -173,7 +187,13 @@ SETTINGS = [
|
||||
("rect_clamp", "int", 1, "Clamp image rects",
|
||||
"Keeps every submitted image rect inside its swapchain. Unity can size the eye area a few pixels past the image "
|
||||
"on some Frames; SteamVR then rejects every frame (xrEndFrame -25, XR_ERROR_SWAPCHAIN_RECT_INVALID) and the game "
|
||||
"stops drawing (for example PowerWash Simulator stuck at \"Waiting\")."),
|
||||
"stops drawing (for example PowerWash Simulator stuck at \"Waiting\"). An empty rect (0x0, e.g. BattleTalent's "
|
||||
"first frames, GitHub #293) is rejected the same way and becomes the whole swapchain image."),
|
||||
("action_dedup", "int", 1, "Unique controller action names",
|
||||
"Gives a controller action whose name already exists in its action set a free name (\"turn\" -> \"turn_2\"). "
|
||||
"The Frame's runtime accepts duplicate names but then can't load the game's input manifest and treats the game "
|
||||
"as closed: black, then the home environment while the game keeps running with sound (for example Scared By "
|
||||
"Squares, whose Unreal project has an action and an axis both called Turn; GitHub #323)."),
|
||||
("swap_eyes", "int", 0, "Swap eyes", "Swap left/right views (diagnostic)."),
|
||||
("strip_depth", "int", 0, "Strip depth layers", "Remove XR_KHR_composition_layer_depth chains (diagnostic)."),
|
||||
("mutable_fix", "int", 0, "Mutable swapchain fix", "Experimental Vulkan mutable-format workaround."),
|
||||
@@ -210,12 +230,18 @@ SETTINGS = [
|
||||
"subpasses lose an invalid depth resolve. Found with the validation layer in Into The Radius 2 (flickering "
|
||||
"models, windows behind models). Also leaves out image barriers without an image and refuses image views without "
|
||||
"one, which crash the Frame's driver (for example Metro Awakening)."),
|
||||
("vk_pipeline_log", "int", 0, "Vulkan shim: pipeline log (diagnostics)",
|
||||
"Vulkan shim (frame.vk_sanitize): logs every failing graphics/compute pipeline creation with its shader stages "
|
||||
"(named like the vk_shader_dump files), structure types and any sampler Y'CbCr conversion involved, to find the "
|
||||
"pipeline behind Unreal's \"Shader compilation failures are Fatal.\" No effect on the game."),
|
||||
("vk_validation", "int", 0, "Vulkan shim: validation layer",
|
||||
"Diagnostics: the Vulkan shim (frame.vk_sanitize) adds Khronos' validation layer to the game's instance; its "
|
||||
"findings go to launch.log. The layer library (libVkLayer_khronos_validation.so) must be in the APK."),
|
||||
("gl_mv_debug", "int", 0, "Multiview interposer: diagnostics",
|
||||
"Diagnostics for frame.gl_multiview_fbo: checks for GL errors after every single-view draw of a multiview "
|
||||
"shader and logs counters every 5 seconds (tag GLMV in launch.log)."),
|
||||
"shader and logs counters every 5 seconds (tag GLMV in launch.log). 2 (frameport settings) also checks every "
|
||||
"draw and logs the draw state, failed texture uploads and shader compiles and, for idTech 4 engines, the game "
|
||||
"clock."),
|
||||
("gl_hide_msrtt", "int", 1, "GL shim: hide multisampled render-to-texture",
|
||||
"GL shim only: hide GL_EXT_multisampled_render_to_texture(2) (Zink crashes rendering Unity's runtime MSAA eye "
|
||||
"buffer through it, for example The Room VR)."),
|
||||
@@ -341,6 +367,10 @@ UI: dict[str, dict] = {
|
||||
"passthrough_emul": dict(group="room", level="common", label="See your room",
|
||||
help="Shows the Frame's cameras where the game expects passthrough.",
|
||||
control=("switch",)),
|
||||
"alpha_blend_emul": dict(group="room", level="advanced", label="Fix inside-out mixed reality",
|
||||
depends="passthrough_emul",
|
||||
help="For games that show your room on their objects and darkness where your room "
|
||||
"should be.", control=("switch",)),
|
||||
"scene_emul": dict(group="room", level="common", label="Pretend room layout",
|
||||
help="Mixed-reality games that build their level from your room get a simple room with walls.",
|
||||
control=("switch",)),
|
||||
@@ -373,6 +403,9 @@ UI: dict[str, dict] = {
|
||||
"foveation_fix": dict(group="troubleshooting", level="advanced", label="Hide Quest foveation",
|
||||
help="Hides a Quest-only way of saving GPU power that the Frame lacks. Leave it on.",
|
||||
control=("switch",)),
|
||||
"hide_fb_foveation": dict(group="troubleshooting", level="advanced", label="Turn off Quest Vulkan foveation",
|
||||
help="Diagnostic for Vulkan games that fail on their first frames with missing Quest foveation images.",
|
||||
control=("switch",)),
|
||||
"hide_space_warp": dict(group="troubleshooting", level="advanced", label="Turn off space warp",
|
||||
help="For games whose picture flickers or smears (for example Into The Radius 2).",
|
||||
control=("switch",)),
|
||||
@@ -390,11 +423,17 @@ UI: dict[str, dict] = {
|
||||
help="Older way to turn upside-down panels; prefer Fix upside-down menus.", control=("switch",)),
|
||||
"swap_eyes": dict(group="troubleshooting", level="advanced", label="Swap eyes",
|
||||
help="Shows each eye's picture to the other eye. For testing.", control=("switch",)),
|
||||
"vk_pipeline_log": dict(group="troubleshooting", level="advanced", label="Vulkan pipeline failures (log)",
|
||||
help="Logs graphics pipelines the Frame's driver refuses. No effect on the game.", control=("switch",)),
|
||||
"vk_validation": dict(group="troubleshooting", level="advanced", label="Vulkan error checks (log)",
|
||||
help="Logs Vulkan mistakes the game makes. Needs a special test build.", control=("switch",)),
|
||||
"rect_clamp": dict(group="troubleshooting", level="advanced", label="Keep pictures in bounds",
|
||||
help="Stops games from hanging when their eye picture is a little too big (for example "
|
||||
help="Stops games from hanging when their eye picture is a little too big or empty (for example "
|
||||
"PowerWash Simulator). Leave it on.", control=("switch",)),
|
||||
"action_dedup": dict(group="troubleshooting", level="advanced", label="Unique controller action names",
|
||||
help="Stops games from dropping back to the home environment at start because two of their "
|
||||
"controller actions share a name (for example Scared By Squares). Leave it on.",
|
||||
control=("switch",)),
|
||||
"gl_hide_msrtt": dict(group="troubleshooting", level="advanced", label="Hide fast anti-aliasing (OpenGL ES)",
|
||||
help="For Unity games that crash when they turn on anti-aliasing (for example The Room "
|
||||
"VR).", control=("switch",)),
|
||||
@@ -449,7 +488,7 @@ UI: dict[str, dict] = {
|
||||
# settings that need the xrshim (frame/adapter.py: OVRPlugin's own arm64 OpenXR lookups routed to the adapter), so
|
||||
# they don't work for 32-bit games on the bridge. surface_native: Batman's native video renderer hooks Vulkan
|
||||
# functions OVRPort's dispatcher doesn't know
|
||||
XRSHIM_SETTINGS = ("controller_models", "haptic_fix", "surface_native")
|
||||
XRSHIM_SETTINGS = ("hide_fb_foveation", "controller_models", "haptic_fix", "surface_native")
|
||||
|
||||
|
||||
class AdapterSetting(Patch):
|
||||
@@ -531,6 +570,9 @@ class AdapterSetting(Patch):
|
||||
"scene_depth": lambda a: ap.uses_scene(a) or a.extra.get("mr_only"),
|
||||
"passthrough_emul": lambda a: (a.extra.get("mr_only")
|
||||
or "com.oculus.feature.PASSTHROUGH" in (a.extra.get("features") or {})),
|
||||
"alpha_blend_emul": lambda a: (a.extra.get("mr_only")
|
||||
or "com.oculus.feature.PASSTHROUGH" in (a.extra.get("features") or {})),
|
||||
"hide_fb_foveation": ap.is_vulkan,
|
||||
"flip_emul": ap.is_vulkan,
|
||||
"flip_quads": ap.is_vulkan,
|
||||
"mutable_fix": ap.is_vulkan,
|
||||
@@ -546,6 +588,7 @@ class AdapterSetting(Patch):
|
||||
"vk_hide_fdm": lambda a: a.engine == "Unreal", # Unreal's Vulkan isn't always detected (Metro Awakening)
|
||||
"vk_query_slots": lambda a: a.engine == "Unreal" and ap.is_vulkan(a),
|
||||
"vk_validation": lambda a: a.engine == "Unreal",
|
||||
"vk_pipeline_log": lambda a: a.engine in ("Unreal", "Other") and "arm64-v8a" in a.abis,
|
||||
# wherever the Vulkan shim can be (vk_sanitize); Unreal's Vulkan builds are rarely detected as such
|
||||
"vk_shader_dump": lambda a: a.engine in ("Unreal", "Other") and "arm64-v8a" in a.abis,
|
||||
"zink_shader_fix": ap.is_gles,
|
||||
@@ -582,6 +625,9 @@ def adapter_settings(recipe_patches: dict) -> dict:
|
||||
out[key] = value
|
||||
if (recipe_patches.get("device.foveation") or {}).get("mode") in ("tracked", "fixed"):
|
||||
out["foveation_fix"] = 1 # shared injection must not compete with the game's native foveation
|
||||
# ...and must render into ordinary images: Valve's FDM leaves a SUBSAMPLED swapchain image's coarse areas
|
||||
# unscaled, which the compositor shows as garbage around the sharp area (GitHub #303, Medieval Dynasty)
|
||||
out["foveation_storage_fix"] = 1
|
||||
return out
|
||||
|
||||
|
||||
|
||||
@@ -76,6 +76,12 @@ SUMMARIES = {
|
||||
"with the content check off. Experimental; the game still needs its data.",
|
||||
"frame.unreal_skip_obb_check": "Starts Unreal games without re-checking their data file (they'd seem to hang "
|
||||
"on an invisible check screen).",
|
||||
"frame.gms_platform_version": "Lets games with Google Play services code start on the Frame (they'd crash at "
|
||||
"start on an Android 12 call).",
|
||||
"frame.usb_midi_watcher": "Lets apps with a USB MIDI driver start on the Frame (they'd crash looking for USB "
|
||||
"devices); USB MIDI devices aren't available there.",
|
||||
"frame.unity_appui_vibrator": "Lets games built with Unity's App UI start on the Frame (they'd quit at once on an "
|
||||
"Android 12 vibrator call).",
|
||||
"frame.bhaptics_permission": "Stops bHaptics from asking for a Bluetooth permission the Frame doesn't have (the "
|
||||
"game would freeze on its loading screen).",
|
||||
"frame.eos_keychain_loop":"Stops Epic Online Services from retrying its login keychain forever (the game "
|
||||
@@ -84,6 +90,8 @@ SUMMARIES = {
|
||||
"(they'd abort with \"cannot create thread specific key\"), for example Wander.",
|
||||
"frame.vivox_audio_route": "Lets games with Vivox voice chat start on the Frame (they'd crash on an Android 12 "
|
||||
"audio call).",
|
||||
"frame.photon_voice_audio_route": "Stops games with Photon Voice chat from crashing on the Frame when voice chat "
|
||||
"starts (an Android 12 audio call).",
|
||||
"frame.unity_oculus_check": "Lets older Unity games start VR without Meta's system apps (they'd stay on a 2D "
|
||||
"screen).",
|
||||
"frame.unity_multipass": "Draws each eye separately. Try it when one eye shows a gray or broken picture.",
|
||||
@@ -99,6 +107,7 @@ SUMMARIES = {
|
||||
"seasons).",
|
||||
"frame.ovr_microphone": "Stops a crash a few seconds after the logo in games with voice chat.",
|
||||
"frame.ovr_stable_user": "Keeps your progress in games that file their saves under your Meta user.",
|
||||
"frame.cortopia_org_id": "Gets Cortopia games (for example Escaping Wonderland) past their loading screen.",
|
||||
"frame.luajit_pointers": "Lets games with a verified older Lua engine get past a startup crash on the Frame.",
|
||||
"frame.avatar_stub": "Lets games start that would stop at Meta's avatars (for example BlazeRush). No Meta "
|
||||
"avatars.",
|
||||
@@ -118,6 +127,8 @@ SUMMARIES = {
|
||||
"empty Gear VR controls on the Frame, for example Vader Immortal).",
|
||||
"frame.unreal_splash_bypass": "Lets the game finish loading when its separate loading splash stalls the "
|
||||
"render thread.",
|
||||
"frame.unreal_noreserve": "Lets the game load: it reserves more memory at start than the Frame grants in one "
|
||||
"piece and crashed before its first frame (for example Transformers Beyond Reality).",
|
||||
"frame.unreal_multiview_depth": "Shows the full environment when its upper part is clipped but menu panels "
|
||||
"look correct.",
|
||||
"frame.unreal_thumb_touch": "Makes the hands' thumbs follow what your thumb touches (they always pointed up: the "
|
||||
|
||||
+266
-20
@@ -28,15 +28,115 @@ from .sources import quest_dump, rift_dump
|
||||
from .targets.base import PC_LABEL, Target
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class ScanReport:
|
||||
"""What a scan did with games already in the library that it found at another place (GitHub discussion #351).
|
||||
Each item: {"package", "title", "path": the copy found, "old": where the library had it}.
|
||||
moved: the library's copy is gone and the found one is the same build: the entry now points at it (title, tags,
|
||||
art, recipe, builds and installs stay). updated: the library's copy is gone and the found one is another version:
|
||||
taken like "Update with a newer APK…" (only by Scan a folder…, which the user pointed at that folder).
|
||||
other_version: the same on Rescan folders: left alone, the user decides. other_copy: the library's copy is still
|
||||
there: it stays."""
|
||||
moved: list[dict] = dataclasses.field(default_factory=list)
|
||||
updated: list[dict] = dataclasses.field(default_factory=list)
|
||||
other_version: list[dict] = dataclasses.field(default_factory=list)
|
||||
other_copy: list[dict] = dataclasses.field(default_factory=list)
|
||||
|
||||
def handled(self) -> set[str]:
|
||||
return {i["package"] for i in self.moved + self.updated + self.other_version + self.other_copy}
|
||||
|
||||
def note(self, kind: str, entry: dict, path, reporter: Reporter | None = None) -> None:
|
||||
item = {"package": entry["package"], "title": entry.get("title") or entry["package"], "path": str(path),
|
||||
"old": entry.get("apk") or entry.get("game_dir")}
|
||||
getattr(self, kind).append(item)
|
||||
if reporter:
|
||||
reporter.log({
|
||||
"moved": "{title}: moved, now uses {path}",
|
||||
"updated": "{title}: another version found at {path}; the library now uses it (title, tags, art and "
|
||||
"your own recipe stay)",
|
||||
"other_version": "{title}: another version found at {path}; left alone (to switch to it: \"Update "
|
||||
"with a newer APK…\" or \"…version…\" on the game's page, or Scan a folder… on "
|
||||
"that folder)",
|
||||
"other_copy": "{title}: another copy at {path} is left out (the library keeps {old})",
|
||||
}[kind].format(**item))
|
||||
|
||||
|
||||
def _same_path(a, b) -> bool:
|
||||
try:
|
||||
return Path(a).resolve() == Path(b).resolve()
|
||||
except OSError:
|
||||
return str(a) == str(b)
|
||||
|
||||
|
||||
def source_present(entry: dict) -> bool:
|
||||
"""The game's own files are where the library says (Quest/Android: APK + data; PC VR: the game folder)."""
|
||||
try:
|
||||
if is_rift(entry) or is_linux(entry):
|
||||
return bool(entry.get("game_dir")) and Path(entry["game_dir"]).is_dir()
|
||||
check_source(entry)
|
||||
return True
|
||||
except Exception: # noqa: BLE001 - missing, or on a drive that isn't connected
|
||||
return False
|
||||
|
||||
|
||||
def _missing_note(entry: dict, reporter: Reporter | None) -> None:
|
||||
if reporter:
|
||||
reporter.log(f"{entry.get('title') or entry['package']}: its files aren't at "
|
||||
f"{entry.get('apk') or entry.get('game_dir')} any more (moved, deleted, or on a drive that "
|
||||
"isn't connected)")
|
||||
|
||||
|
||||
def same_quest_build(entry: dict, apk: Path) -> bool:
|
||||
"""The APK is the build the library entry was made from: the same SHA-256 (recorded when it was added), else the
|
||||
same versionName."""
|
||||
if entry.get("source_sha256"):
|
||||
try:
|
||||
return builder.sha256(Path(apk)) == entry["source_sha256"]
|
||||
except OSError:
|
||||
return False
|
||||
ver = (entry.get("analysis") or {}).get("version")
|
||||
return bool(ver) and quest_dump.version_name(Path(apk)) == ver
|
||||
|
||||
|
||||
def relink_quest(package: str, src: SourceGame) -> dict | None:
|
||||
"""Point a Quest/Android entry at the same build in another place: only where its files are changes."""
|
||||
from .core.models import data_manifest
|
||||
|
||||
manifest = data_manifest(src.data_dir, src.data_files)
|
||||
fields = dict(name=src.name, apk=str(src.apk), data_dir=str(src.data_dir) if src.data_dir else None,
|
||||
data_files=src.data_files, data_bytes=sum(manifest.values()), data_manifest=manifest,
|
||||
origin=str(src.origin) if src.origin else None)
|
||||
return library.update_game(package, lambda g: g.update(fields))
|
||||
|
||||
|
||||
def _known_quest(src: SourceGame, old: dict, reporter: Reporter | None, allow_update: bool,
|
||||
report: ScanReport) -> None:
|
||||
"""A Quest/Android game of the library found at another place than the library's copy (see ScanReport)."""
|
||||
if source_present(old):
|
||||
report.note("other_copy", old, src.apk, reporter)
|
||||
return
|
||||
_missing_note(old, reporter)
|
||||
if same_quest_build(old, src.apk):
|
||||
relink_quest(old["package"], src)
|
||||
report.note("moved", old, src.apk, reporter)
|
||||
elif allow_update:
|
||||
replace_apk(old["package"], src.apk, reporter, found=src)
|
||||
report.note("updated", old, src.apk, reporter)
|
||||
else:
|
||||
report.note("other_version", old, src.apk, reporter)
|
||||
|
||||
|
||||
def add_path(path: Path, reporter: Reporter | None = None, on_added=None, force_rift: bool = False,
|
||||
art: bool = False, only_new: bool = False) -> list[dict]:
|
||||
art: bool = False, only_new: bool = False, report: ScanReport | None = None) -> list[dict]:
|
||||
"""Scan a file/folder (recursively), analyze every game found (Quest APKs and Rift game folders) and store it with
|
||||
a suggested recipe. on_added(entry) is called as each game lands in the library (the GUI streams cards in).
|
||||
force_rift: `path` is one Rift game folder (added even if no VR runtime is detected). art: fetch artwork too.
|
||||
only_new: skip Quest APKs already in the library (a rescan for games added since; Rift folders already skip
|
||||
unchanged games)."""
|
||||
unchanged games). A game of the library found at another place (moved, a second copy, another version) is put in
|
||||
`report` (ScanReport), not in the returned list."""
|
||||
path = Path(path)
|
||||
added = []
|
||||
report = report if report is not None else ScanReport()
|
||||
known_apks = {str(Path(g["apk"]).resolve()) for g in library.games() if g.get("apk")} if only_new else set()
|
||||
# entries made from AXRB's PC-patched copies (no OBBs; older FramePort scanned them) get the original download
|
||||
known_packages = {g["package"] for g in library.games()
|
||||
@@ -45,6 +145,8 @@ def add_path(path: Path, reporter: Reporter | None = None, on_added=None, force_
|
||||
def done(entry):
|
||||
if only_new and entry["package"] in known_packages: # already in the library (e.g. an unchanged Rift folder)
|
||||
return
|
||||
if entry["package"] in report.handled(): # moved, another copy or version: reported, not "added"
|
||||
return
|
||||
added.append(entry)
|
||||
if on_added:
|
||||
on_added(entry)
|
||||
@@ -54,12 +156,21 @@ def add_path(path: Path, reporter: Reporter | None = None, on_added=None, force_
|
||||
reporter.check_cancel()
|
||||
if only_new and str(Path(src.apk).resolve()) in known_apks:
|
||||
continue
|
||||
if only_new: # another copy of a game already in the library (e.g. a patched build): leave it alone
|
||||
try:
|
||||
pkg = quest_dump._package_of(src.apk)
|
||||
except Exception: # noqa: BLE001
|
||||
pkg = None
|
||||
old = library.game(pkg) if pkg else None
|
||||
if old and old.get("apk") and not is_rift(old) and not is_linux(old) \
|
||||
and not _same_path(old["apk"], src.apk) and not quest_dump._axrb_patched(Path(old["apk"])):
|
||||
try:
|
||||
if quest_dump._package_of(src.apk) in known_packages:
|
||||
continue
|
||||
except Exception: # noqa: BLE001
|
||||
pass
|
||||
_known_quest(src, old, reporter, not only_new, report)
|
||||
except Exception as exc: # noqa: BLE001 - keep scanning
|
||||
if reporter:
|
||||
reporter.log(f"skipped {src.apk.name}: {exc}")
|
||||
continue
|
||||
if only_new and pkg in known_packages: # (e.g. an entry without an APK)
|
||||
continue
|
||||
try:
|
||||
entry = add_game(src, reporter)
|
||||
if art:
|
||||
@@ -87,7 +198,8 @@ def add_path(path: Path, reporter: Reporter | None = None, on_added=None, force_
|
||||
reporter.check_cancel()
|
||||
reporter.progress(i / max(len(folders), 1), f"{i + 1} / {len(folders)} · {folder.name}")
|
||||
try:
|
||||
entry = add_rift_game(folder, reporter, tree=trees.get(folder), force=force_rift, art=art)
|
||||
entry = add_rift_game(folder, reporter, tree=trees.get(folder), force=force_rift, art=art,
|
||||
report=report, allow_update=not only_new)
|
||||
if entry and art and not entry.get("details"):
|
||||
fetch_details(entry["package"], reporter)
|
||||
entry = library.game(entry["package"])
|
||||
@@ -96,6 +208,8 @@ def add_path(path: Path, reporter: Reporter | None = None, on_added=None, force_
|
||||
except Exception as exc:
|
||||
if reporter:
|
||||
reporter.log(f"skipped {folder.name}: {exc}")
|
||||
if reporter and report.moved:
|
||||
reporter.log(f"Updated the location of {len(report.moved)} game(s)")
|
||||
return added
|
||||
|
||||
|
||||
@@ -136,12 +250,70 @@ def _existing_rift(folder: Path) -> dict | None:
|
||||
return None
|
||||
|
||||
|
||||
def _rift_program(entry: dict) -> tuple[str, int] | None:
|
||||
"""(program path in the game folder, its size) from a PC VR entry's fingerprint."""
|
||||
fp = (((entry.get("analysis") or {}).get("extra") or {}).get("fingerprint")) or ""
|
||||
parts = fp.rsplit(":", 3)
|
||||
if len(parts) == 4 and parts[0] and parts[1].isdigit():
|
||||
return parts[0], int(parts[1])
|
||||
return None
|
||||
|
||||
|
||||
def _file_size(path: Path) -> int | None:
|
||||
try:
|
||||
return path.stat().st_size if path.is_file() else None
|
||||
except OSError:
|
||||
return None
|
||||
|
||||
|
||||
def _same_rift_build(entry: dict, folder: Path) -> bool:
|
||||
"""The folder holds the build the entry was made from: its program at the same place with the same size."""
|
||||
prog = _rift_program(entry)
|
||||
if prog:
|
||||
return _file_size(folder / prog[0]) == prog[1]
|
||||
return bool(entry.get("exe")) and _file_size(folder / entry["exe"]) is not None
|
||||
|
||||
|
||||
def _moved_rift(folder: Path, tree) -> dict | None:
|
||||
"""The library's PC VR entry this folder is another copy of (it was found elsewhere before): the same game id,
|
||||
else an entry whose folder is gone and whose program (path and size) is in this folder."""
|
||||
from .analysis import rift
|
||||
|
||||
rifts = [g for g in library.games() if g.get("kind") == "rift" and g.get("game_dir")
|
||||
and not _same_path(g["game_dir"], folder)]
|
||||
same = library.game(rift.game_id(folder, getattr(tree, "manifest", None)))
|
||||
if same is not None and any(g["package"] == same["package"] for g in rifts):
|
||||
return same
|
||||
gone = [g for g in rifts if (p := _rift_program(g)) and _file_size(folder / p[0]) == p[1]
|
||||
and not source_present(g)]
|
||||
return gone[0] if len(gone) == 1 else None
|
||||
|
||||
|
||||
def _relink_rift(entry: dict, folder: Path) -> dict | None:
|
||||
"""Point a PC VR entry at the same build in another folder: only where its files are changes."""
|
||||
from .analysis import rift
|
||||
|
||||
new_fp = rift.fingerprint(folder, entry.get("exe") or "")
|
||||
|
||||
def change(g: dict) -> None:
|
||||
g.update(game_dir=str(folder), origin=str(folder.parent), name=folder.name)
|
||||
extra = (g.get("analysis") or {}).setdefault("extra", {}) if isinstance(g.get("analysis"), dict) else {}
|
||||
extra["folder"] = str(folder)
|
||||
old_fp = extra.get("fingerprint") or ""
|
||||
# (copies may get a new date; a fingerprint of an older analysis stays so the next scan analyzes it again)
|
||||
if new_fp and old_fp.rsplit(":", 1)[-1] == new_fp.rsplit(":", 1)[-1]:
|
||||
extra["fingerprint"] = new_fp
|
||||
return library.update_game(entry["package"], change)
|
||||
|
||||
|
||||
def add_rift_game(folder: Path, reporter: Reporter | None = None, tree=None, exe: str | None = None,
|
||||
force: bool = False, art: bool = False, replace: dict | None = None) -> dict | None:
|
||||
force: bool = False, art: bool = False, replace: dict | None = None,
|
||||
report: ScanReport | None = None, allow_update: bool = True) -> dict | None:
|
||||
"""Analyze one Rift game folder and store it. Unchanged folders (same program, size, date) are not analyzed again;
|
||||
the user's exe choice, recipe and tags survive rescans. Returns None for folders without a VR runtime (unless
|
||||
force). replace: the library entry this folder is a newer version of (replace_rift_game): it keeps its package and
|
||||
name."""
|
||||
name. A game of the library whose folder moved here gets this folder (report: ScanReport; allow_update: another
|
||||
version of it may replace it, see ScanReport)."""
|
||||
from .analysis import rift
|
||||
from .recommend import catalog
|
||||
|
||||
@@ -152,6 +324,27 @@ def add_rift_game(folder: Path, reporter: Reporter | None = None, tree=None, exe
|
||||
reporter.log(f"skipped {folder.name}: an older version of a game that was updated from another folder")
|
||||
return None
|
||||
old = replace or _existing_rift(folder)
|
||||
if old is None and exe is None: # (set_exe passes the entry's own folder)
|
||||
tree = tree or rift.walk(folder)
|
||||
other = _moved_rift(folder, tree)
|
||||
if other is not None:
|
||||
report = report if report is not None else ScanReport()
|
||||
if source_present(other):
|
||||
report.note("other_copy", other, folder, reporter)
|
||||
return None
|
||||
_missing_note(other, reporter)
|
||||
if not _same_rift_build(other, folder):
|
||||
if not allow_update:
|
||||
report.note("other_version", other, folder, reporter)
|
||||
return None
|
||||
replace_rift_game(other["package"], folder, reporter)
|
||||
report.note("updated", other, folder, reporter)
|
||||
return library.game(other["package"])
|
||||
_relink_rift(other, folder)
|
||||
report.note("moved", other, folder, reporter)
|
||||
if art and not _has_art(other["package"]):
|
||||
_rift_art(library.game(other["package"]), reporter)
|
||||
return library.game(other["package"])
|
||||
old_extra = ((old or {}).get("analysis") or {}).get("extra") or {}
|
||||
forced = exe is not None or replace is not None # set_exe / a newer version: always analyze
|
||||
if replace is None:
|
||||
@@ -536,8 +729,11 @@ def add_from_link(manifest, path: Path, reporter: Reporter | None = None, icon:
|
||||
else:
|
||||
raise ValueError(f"FramePort can't install {path.name}")
|
||||
pkg = entry["package"]
|
||||
fields = {"link": {"source": manifest.source, "name": manifest.name, "time": time.time()}}
|
||||
if not manifest.direct: # a manifest (not a bare file link) names it
|
||||
fields = {"link": {"source": manifest.source, "name": manifest.name, "time": time.time(),
|
||||
"version": manifest.version, "direct": manifest.direct}}
|
||||
old_link = entry.get("link") or {}
|
||||
renamed = entry.get("title_locked") and old_link.get("name") and entry.get("title") != old_link.get("name")
|
||||
if not manifest.direct and not renamed: # a manifest (not a bare file link) names it, unless the user renamed it
|
||||
fields.update(title=manifest.name, title_locked=True)
|
||||
if not entry.get("title_locked"): # what Rename… → reset brings back
|
||||
fields["auto_title"] = entry.get("title") or pkg
|
||||
@@ -547,6 +743,8 @@ def add_from_link(manifest, path: Path, reporter: Reporter | None = None, icon:
|
||||
details.update(description=manifest.description, sources=[*(details.get("sources") or []), "link"])
|
||||
fields["details"] = details
|
||||
library.upsert_game(pkg, **fields)
|
||||
with library.edit() as data: # this download is the version the manifest offered
|
||||
data["games"].get(pkg, {}).pop("link_update", None)
|
||||
if icon:
|
||||
from .artwork import fetch, sources
|
||||
|
||||
@@ -559,6 +757,44 @@ def add_from_link(manifest, path: Path, reporter: Reporter | None = None, icon:
|
||||
return library.game(pkg)
|
||||
|
||||
|
||||
LINK_CHECK_HOURS = 6
|
||||
|
||||
|
||||
def check_link_updates(force: bool = False, reporter: Reporter | None = None) -> list[str]:
|
||||
"""Fetch the manifest of every game installed from an install link whose manifest named a version again, and mark
|
||||
the ones with a newer version (`link_update` = {"version", "checked"}; cleared when the manifest no longer offers
|
||||
one). Runs at most every LINK_CHECK_HOURS unless `force`; off with setting `links.check_updates`. Returns the
|
||||
packages that have an update now. A manifest that can't be fetched leaves the game as it was."""
|
||||
from . import deeplink
|
||||
|
||||
if not force and (not library.setting("links.check_updates", True)
|
||||
or time.time() - float(library.setting("links.last_update_check", 0) or 0)
|
||||
< LINK_CHECK_HOURS * 3600):
|
||||
return [g["package"] for g in library.games() if g.get("link_update")]
|
||||
library.set_setting("links.last_update_check", time.time())
|
||||
found = {}
|
||||
for g in library.games():
|
||||
link = g.get("link")
|
||||
if not deeplink.can_check_updates(link):
|
||||
continue
|
||||
try:
|
||||
m = deeplink.check_update(link)
|
||||
except Exception as exc: # noqa: BLE001 - offline, moved manifest…: try again next time
|
||||
if reporter:
|
||||
reporter.log(f"{g['package']}: update check failed: {exc}")
|
||||
continue
|
||||
found[g["package"]] = {"version": m.version, "checked": time.time()} if m else None
|
||||
with library.edit() as data:
|
||||
for pkg, offer in found.items():
|
||||
if pkg not in data["games"]:
|
||||
continue
|
||||
if offer:
|
||||
data["games"][pkg]["link_update"] = offer
|
||||
else:
|
||||
data["games"][pkg].pop("link_update", None)
|
||||
return [g["package"] for g in library.games() if g.get("link_update")]
|
||||
|
||||
|
||||
def is_overlay_app(entry: dict) -> bool:
|
||||
"""A SteamVR overlay app (fpsVR & co.): installed for SteamVR to draw over games; no launch test."""
|
||||
if is_linux(entry):
|
||||
@@ -638,13 +874,16 @@ def add_game(src: SourceGame, reporter: Reporter | None = None) -> dict:
|
||||
old = library.game(a.package) or {}
|
||||
# a name the user chose (Rename…, an install link) stays when the game is scanned again
|
||||
names = {"auto_title": recipe.title or a.label} if old.get("title_locked") else {"title": recipe.title or a.label}
|
||||
# a recipe the user edited stays when the game is scanned again (only the suggestion is refreshed, like Analyze
|
||||
# again); a derived one follows the new analysis
|
||||
own = {} if (old.get("recipe") or {}).get("source") == "user" else \
|
||||
{"recipe": library.recipe_to_dict(recipe), "status": recipe.status}
|
||||
return library.upsert_game(
|
||||
a.package, **names, name=src.name, apk=str(src.apk),
|
||||
data_dir=str(src.data_dir) if src.data_dir else None, data_files=src.data_files,
|
||||
data_bytes=sum(manifest.values()), data_manifest=manifest, source_sha256=builder.sha256(src.apk),
|
||||
origin=str(src.origin),
|
||||
analysis=a.to_dict(), recipe=library.recipe_to_dict(recipe), suggested=library.recipe_to_dict(recipe),
|
||||
status=recipe.status,
|
||||
analysis=a.to_dict(), suggested=library.recipe_to_dict(recipe), **own,
|
||||
)
|
||||
|
||||
|
||||
@@ -661,16 +900,17 @@ class WrongPackage(ValueError):
|
||||
"""The picked APK is another app than the game it should update."""
|
||||
|
||||
|
||||
def replace_apk(package: str, apk: Path, reporter: Reporter | None = None) -> dict:
|
||||
def replace_apk(package: str, apk: Path, reporter: Reporter | None = None, found: SourceGame | None = None) -> dict:
|
||||
"""A newer APK for a Quest/Android game already in the library (GitHub #161): the entry points at it from now on.
|
||||
Its title, art, tags and the user's own recipe stay (a suggested recipe follows the new analysis, like Analyze
|
||||
again). The game data stays where it was unless the new APK's folder brings its own. Returns {"entry", "older":
|
||||
the new versionCode is lower than the old one's, "old_version", "new_version"}."""
|
||||
again). The game data stays where it was unless the new APK's folder brings its own. found: the game as a scan
|
||||
found it (its data folder). Returns {"entry", "older": the new versionCode is lower than the old one's,
|
||||
"old_version", "new_version"}."""
|
||||
entry = library.game(package)
|
||||
if entry is None or is_rift(entry) or is_linux(entry):
|
||||
raise ValueError("only Quest/Android games can get a newer APK")
|
||||
apk = Path(apk)
|
||||
src = quest_dump.from_path(apk)
|
||||
src = found or quest_dump.from_path(apk)
|
||||
new_pkg, new_vc = quest_dump._apk_ids(apk)
|
||||
if src is None or new_pkg is None:
|
||||
raise ValueError(f"{apk.name} isn't a readable APK")
|
||||
@@ -685,8 +925,14 @@ def replace_apk(package: str, apk: Path, reporter: Reporter | None = None) -> di
|
||||
a = analyze(apk, data_bytes=src.data_bytes())
|
||||
a.extra["lang_packs"] = langpacks.find_tags(_data_folder(src))
|
||||
a.extra["asset_files"] = langpacks.find_content_files(_data_folder(src))
|
||||
library.upsert_game(package, apk=str(apk), data_dir=str(src.data_dir) if src.data_dir else None,
|
||||
data_files=src.data_files, data_bytes=src.data_bytes())
|
||||
fields = dict(apk=str(apk), data_dir=str(src.data_dir) if src.data_dir else None, data_files=src.data_files,
|
||||
data_bytes=src.data_bytes(), source_sha256=builder.sha256(apk))
|
||||
if found is not None: # found by a scan: where it was found
|
||||
from .core.models import data_manifest
|
||||
|
||||
fields.update(name=src.name, origin=str(src.origin) if src.origin else entry.get("origin"),
|
||||
data_manifest=data_manifest(src.data_dir, src.data_files))
|
||||
library.upsert_game(package, **fields)
|
||||
stored = _store_analysis(package, a)
|
||||
return {"entry": stored, "older": bool(old_vc and new_vc and new_vc < old_vc), "old_version": old_vc,
|
||||
"new_version": new_vc}
|
||||
|
||||
@@ -246,10 +246,23 @@ def web_wrapper_note(analysis: Analysis) -> str | None:
|
||||
f"Meta's browser, which the Frame doesn't have. If nothing opens, {where}.")
|
||||
|
||||
|
||||
def google_vr_note(analysis: Analysis) -> str | None:
|
||||
"""A Google Daydream / Cardboard build (analysis.detect.google_vr) that isn't also a Meta build: its VR can't
|
||||
reach the Frame's headset (GitHub #335)."""
|
||||
kind = (analysis.extra or {}).get("google_vr")
|
||||
if not kind or analysis.vr_kind == "quest": # a build with Oculus support too goes the normal way
|
||||
return None
|
||||
name = "Google Daydream" if kind == "daydream" else "Google Cardboard"
|
||||
return (f"This is a {name} VR build (Google VR SDK). Its VR can't reach the Steam Frame's headset: Daydream "
|
||||
"needs Google's VR services and Cardboard draws for a phone in a viewer, and FramePort has no "
|
||||
"translation for either, so it runs as a flat window at best, usually without working controls. An "
|
||||
"Oculus build of the same game (Meta Quest, Oculus Go or Gear VR) goes through FramePort's normal path.")
|
||||
|
||||
|
||||
def blocker_notes(analysis: Analysis) -> list[str]:
|
||||
"""Warnings read from the APK's manifest that it may not run on the Frame (whatever the recipe says). Only
|
||||
warnings: the manifest alone never marks a game unsupported (owner's rule); a launch test's triage decides."""
|
||||
return [n for n in (android_version_note(analysis), web_wrapper_note(analysis)) if n]
|
||||
return [n for n in (android_version_note(analysis), web_wrapper_note(analysis), google_vr_note(analysis)) if n]
|
||||
|
||||
|
||||
def _static_blockers(analysis: Analysis, recipe: Recipe) -> None:
|
||||
@@ -274,7 +287,8 @@ def _non_quest(analysis: Analysis, recipe: Recipe) -> None:
|
||||
recipe.reasons = {pid: v for pid, v in recipe.reasons.items() if pid in recipe.patches}
|
||||
recipe.alt_patches = []
|
||||
recipe.as_is = not any(base.get(pid).stage == "apk" for pid in recipe.patches) # the APK stays unchanged
|
||||
recipe.notes = _add(recipe.notes, "Android app without VR: installed without FramePort's VR translation.")
|
||||
if not (analysis.extra or {}).get("google_vr"): # a Google VR build says so in its own note (blocker_notes)
|
||||
recipe.notes = _add(recipe.notes, "Android app without VR: installed without FramePort's VR translation.")
|
||||
elif kind in ("pico_sdk", "wave"):
|
||||
recipe.status = "unsupported"
|
||||
recipe.notes = _add(recipe.notes, f"Uses {'Pico' if kind == 'pico_sdk' else 'HTC Vive Wave'}'s own VR SDK "
|
||||
|
||||
@@ -45,6 +45,16 @@ def _apk_ids(apk: Path) -> tuple[str | None, int | None]:
|
||||
return a.package, vc
|
||||
|
||||
|
||||
def version_name(apk: Path) -> str | None:
|
||||
"""The APK's versionName (None if it can't be read)."""
|
||||
try:
|
||||
from pyaxmlparser import APK
|
||||
|
||||
return APK(str(apk)).version_name or None
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
|
||||
def _package_of(apk: Path) -> str | None:
|
||||
return _apk_ids(apk)[0]
|
||||
|
||||
|
||||
+106
-26
@@ -96,6 +96,24 @@ def reduce_motion_setting() -> bool:
|
||||
return bool(library.setting(REDUCE_MOTION, False))
|
||||
|
||||
|
||||
def scan_report_lines(report: pipeline.ScanReport) -> list[str]:
|
||||
"""A scan's summary of games already in the library that it found elsewhere (pipeline.ScanReport)."""
|
||||
out = []
|
||||
if report.moved:
|
||||
out.append(tr_n("Updated the location of {n} game", "Updated the location of {n} games", len(report.moved)))
|
||||
if report.updated:
|
||||
out.append(tr_n("{n} game now uses the other version found there",
|
||||
"{n} games now use the other versions found there", len(report.updated)))
|
||||
if report.other_version:
|
||||
out.append(tr_n("{n} game has another version there (left alone: Update with a newer version… on its page)",
|
||||
"{n} games have another version there (left alone: Update with a newer version… on their "
|
||||
"pages)", len(report.other_version)))
|
||||
if report.other_copy:
|
||||
out.append(tr_n("{n} game is already in the library from another folder",
|
||||
"{n} games are already in the library from other folders", len(report.other_copy)))
|
||||
return out
|
||||
|
||||
|
||||
SIDEBAR_WIDTH = 236 # logical px before the UI scale (content_insets)
|
||||
|
||||
|
||||
@@ -190,6 +208,7 @@ class FramePortApp:
|
||||
self.updater.start()
|
||||
self.announcer.start()
|
||||
self.run_bg(self._refresh_catalog) # confirmed game configs from GitHub main (no release needed)
|
||||
self.run_bg(self._check_link_updates) # newer versions of games installed from install links
|
||||
_link_state["owner"] = self
|
||||
if _link_state["thread"] is None:
|
||||
import atexit
|
||||
@@ -1168,13 +1187,17 @@ class FramePortApp:
|
||||
"uninstall_frame": lambda e: self.uninstall(pkg, "frame"),
|
||||
"uninstall_pc": lambda e: self.uninstall(pkg, "pc"),
|
||||
"remove": lambda e: self.remove_from_library(pkg),
|
||||
"backup_saves": lambda e: self.backup_saves(pkg),
|
||||
"restore_saves": lambda e: self.restore_saves(pkg),
|
||||
"saves_folder": lambda e: self.open_saves_folder(pkg),
|
||||
}
|
||||
enabled = (lambda opts: [(label, icon, handler) for label, icon, handler, disabled, _ in opts
|
||||
if handler and not disabled])
|
||||
busy = bool(job)
|
||||
on_frame = connected and C.install_state(g, self.frame_info) in ("installed", "outdated")
|
||||
st = MenuState(
|
||||
quick=quick, connected=connected, job=busy,
|
||||
on_frame=connected and C.install_state(g, self.frame_info) in ("installed", "outdated"),
|
||||
quick=quick, connected=connected, job=busy, on_frame=on_frame,
|
||||
saves=on_frame and not rift and not linux,
|
||||
on_pc=rift and pkg in self.pc_installs(),
|
||||
plays=[] if busy or not quick else enabled(self.play_options(g)),
|
||||
installs=[] if busy or not quick else enabled(self.install_options(g)),
|
||||
@@ -1765,6 +1788,30 @@ class FramePortApp:
|
||||
return tr("{title}: Steam artwork updated on the Frame").format(title=self._title(pkg))
|
||||
return self.submit(tr("Update Steam art: {title}").format(title=self._title(pkg)), run, pkg, "art")
|
||||
|
||||
# Save backups (discussion #352): views/saves_dialog.py, install/saves.py
|
||||
def backup_saves(self, pkg: str) -> Job:
|
||||
from .views import saves_dialog
|
||||
|
||||
return saves_dialog.backup_saves(self, pkg)
|
||||
|
||||
def restore_saves(self, pkg: str) -> None:
|
||||
from .views import saves_dialog
|
||||
|
||||
saves_dialog.restore_dialog(self, pkg)
|
||||
|
||||
def open_saves_folder(self, pkg: str) -> None:
|
||||
from .views import saves_dialog
|
||||
|
||||
saves_dialog.open_folder(pkg)
|
||||
|
||||
def backup_all_saves(self) -> Job | None:
|
||||
"""Frame page: one job backing up every installed Quest game's saves."""
|
||||
from .views import saves_dialog
|
||||
|
||||
pkgs = [d.get("package") for d in (self.frame_info or {}).get("installed", [])
|
||||
if d.get("package") and d.get("kind") not in ("pcvr", "linux") and not d.get("overlay")]
|
||||
return saves_dialog.backup_all(self, pkgs)
|
||||
|
||||
def move_game(self, pkg: str) -> None:
|
||||
"""Move to…: pick another drive of the Frame (microSD card, internal storage) for an installed game; the copy
|
||||
runs as a Frame job (GitHub #90)."""
|
||||
@@ -1842,13 +1889,28 @@ class FramePortApp:
|
||||
"The game folder stays.").format(title=title)
|
||||
|
||||
delete_local, extra = self._delete_local_option(pkg)
|
||||
delete_data = None
|
||||
delete_data = backup_first = None
|
||||
if to == "frame": # GitHub #130: what the game stored (saves, mods, downloads) used to survive every uninstall
|
||||
delete_data, row = C.checkbox(tr("Also delete its saves and everything it stored on the Frame (mods, "
|
||||
"downloaded content)"), value=False, active_color=T.ERROR)
|
||||
extra = row if extra is None else ft.Column([row, extra], spacing=T.px(8), tight=True)
|
||||
rows = [row]
|
||||
if (library.game(pkg) or {}).get("kind") not in ("rift", "linux"): # discussion #352
|
||||
backup_first, backup_row = C.checkbox(tr("Back up its saves to this PC before deleting them"),
|
||||
value=True, active_color=T.ACCENT, disabled=True)
|
||||
|
||||
def follow(e):
|
||||
backup_first.disabled = not delete_data.value
|
||||
C.update(backup_first)
|
||||
delete_data.on_change = follow
|
||||
rows.append(ft.Container(backup_row, padding=ft.Padding(T.S5, 0, 0, 0)))
|
||||
rows += [extra] if extra is not None else []
|
||||
extra = ft.Column(rows, spacing=T.px(8), tight=True) if len(rows) > 1 else row
|
||||
|
||||
def run(job: Job):
|
||||
if delete_data and delete_data.value and backup_first and backup_first.value:
|
||||
from ..install import saves
|
||||
|
||||
saves.backup(self._target_for(to).frame, pkg, job.reporter) # fails = nothing deleted
|
||||
self._target_for(to).uninstall(pkg, keep_data=not (delete_data and delete_data.value))
|
||||
self._pc_cache = None
|
||||
if delete_local and delete_local.value:
|
||||
@@ -2235,36 +2297,29 @@ class FramePortApp:
|
||||
return self.submit(tr("Add {name}").format(name=name), run, None, "task")
|
||||
|
||||
def scan_roots(self) -> list[str]:
|
||||
"""Folders to rescan: the ones scanned before (remembered from now on), else the folders the library's games
|
||||
came from (one level up from each game folder)."""
|
||||
roots = [r for r in library.setting("scan.roots", []) if Path(r).exists()]
|
||||
if not roots:
|
||||
found = set()
|
||||
for g in library.load().get("games", {}).values():
|
||||
if g.get("kind") == "linux": # added one by one (its origin may be e.g. Downloads)
|
||||
continue
|
||||
origin = g.get("origin") or (str(Path(g["apk"]).parent) if g.get("apk") else None)
|
||||
if origin and Path(origin).parent.exists():
|
||||
found.add(str(Path(origin).parent))
|
||||
roots = sorted(found)
|
||||
# a folder inside another one is scanned with it (scanning it again would only repeat work)
|
||||
return [r for r in roots if not any(o != r and Path(r).is_relative_to(o) for o in roots)]
|
||||
"""Folders "Rescan folders" scans (core/folders.py; Settings → Library folders lists and edits them)."""
|
||||
from ..core import folders
|
||||
|
||||
return folders.rescan_roots()
|
||||
|
||||
def rescan(self, e=None) -> None:
|
||||
"""Scan the library's folders again for games added since (unchanged games aren't analyzed again)."""
|
||||
"""Scan the library's folders again for games added since (unchanged games aren't analyzed again) and for games
|
||||
whose files moved there (their entries are pointed at the new place)."""
|
||||
roots = self.scan_roots()
|
||||
if not roots:
|
||||
self.toast(tr("No folders to rescan yet — add games with Scan a folder…"))
|
||||
return
|
||||
for r in roots:
|
||||
self.scan(r, only_new=True)
|
||||
self.toast(tr_n("Rescanning {n} folder for new games", "Rescanning {n} folders for new games", len(roots)))
|
||||
self.toast(tr_n("Rescanning {n} folder for new and moved games",
|
||||
"Rescanning {n} folders for new and moved games", len(roots)))
|
||||
|
||||
def scan(self, path: str, single: bool = False, only_new: bool = False) -> Job:
|
||||
last = {"t": 0.0}
|
||||
if not single: # remembered for "Rescan folders"
|
||||
roots = [r for r in library.setting("scan.roots", []) if r != str(path)]
|
||||
library.set_setting("scan.roots", roots + [str(path)])
|
||||
if not single and Path(path).is_dir(): # remembered for "Rescan folders" (Settings → Library folders)
|
||||
from ..core import folders
|
||||
|
||||
folders.remember(path)
|
||||
|
||||
def added_one(entry: dict):
|
||||
from ..artwork import thumbs
|
||||
@@ -2282,17 +2337,23 @@ class FramePortApp:
|
||||
def run(job: Job):
|
||||
rep = job.reporter
|
||||
rep.stage(tr("Looking for games"))
|
||||
report = pipeline.ScanReport()
|
||||
added = pipeline.add_path(Path(path), rep, on_added=added_one, force_rift=single, art=True,
|
||||
only_new=only_new)
|
||||
only_new=only_new, report=report)
|
||||
if self.route[0] == "welcome" and added:
|
||||
library.set_setting("ui.welcome_done", True)
|
||||
self.route = ("library",)
|
||||
n = len(added)
|
||||
if report.handled():
|
||||
self.refresh_view() # moved games: their pages show the new place
|
||||
if only_new:
|
||||
return tr_n("{n} new game in {name}", "{n} new games in {name}", n,
|
||||
text = tr_n("{n} new game in {name}", "{n} new games in {name}", n,
|
||||
name=Path(path).name) if added else \
|
||||
tr("No new games in {name}").format(name=Path(path).name)
|
||||
return tr_n("Added {n} game", "Added {n} games", n) if added else tr("No games found in that folder")
|
||||
else:
|
||||
text = tr_n("Added {n} game", "Added {n} games", n) if added else \
|
||||
(tr("No new games in that folder") if report.handled() else tr("No games found in that folder"))
|
||||
return " · ".join([text] + scan_report_lines(report))
|
||||
return self.submit(tr("Scan {name}").format(name=Path(path).name), run, None, "scan")
|
||||
|
||||
# ------------------------------------------------------------------ executable choice / artwork
|
||||
@@ -2326,6 +2387,25 @@ class FramePortApp:
|
||||
self.toast(tr("Game recipes are up to date"))
|
||||
return n
|
||||
|
||||
def _check_link_updates(self, force: bool = False) -> list[str]:
|
||||
"""Games installed from an install link whose manifest names a newer version now (pipeline.
|
||||
check_link_updates; at most every 6 h): the Library bar and the game page offer the update."""
|
||||
before = {g["package"] for g in library.games() if g.get("link_update")}
|
||||
found = pipeline.check_link_updates(force=force)
|
||||
new = [p for p in found if p not in before]
|
||||
if set(found) != before:
|
||||
self.refresh_view()
|
||||
if new:
|
||||
self.toast(tr_n("An update is available for {name}", "Updates are available for {n} games",
|
||||
len(new), name=self._title(new[0])))
|
||||
elif force: # Settings → Check now
|
||||
self.toast(tr("Games from install links are up to date") if not found else
|
||||
tr_n("{n} update is waiting in the Library", "{n} updates are waiting in the Library",
|
||||
len(found)))
|
||||
if force and self.route[0] == "settings":
|
||||
self.render() # the "last checked" line
|
||||
return found
|
||||
|
||||
def frame_power(self, action: str, force: bool = False) -> None:
|
||||
"""Sleep / restart / shut down the Frame (agent `power`, run a few seconds later so the answer arrives)."""
|
||||
heading = {"sleep": tr("Put the Frame to sleep?"), "restart": tr("Restart the Frame?"),
|
||||
|
||||
@@ -70,6 +70,9 @@ HELP: dict[str, str] = _Translated({
|
||||
"last_session": "After you play a game on the Frame, FramePort reads that session's log: crashes, frame rate and "
|
||||
"moments the game lost focus. Game settings apply at the next start; other patches reinstall the "
|
||||
"game. Your saves stay.",
|
||||
"game_updates": "Game recipes are tested settings shared on GitHub; games that use one get its improvements, "
|
||||
"then show Update on Frame. Games installed from an install link get a new version when the "
|
||||
"link's site publishes one: FramePort asks before it downloads anything.",
|
||||
"install_links": "Some websites have \"Install with FramePort\" buttons (frameport.app links). FramePort opens "
|
||||
"these links, shows what they offer and installs it when you agree. On macOS, use Add games → "
|
||||
"Add from a link… instead.",
|
||||
@@ -111,8 +114,14 @@ HELP: dict[str, str] = _Translated({
|
||||
"app_updates": "FramePort checks GitHub for a new version every few hours. Update now downloads and checks it, "
|
||||
"then restarts FramePort; your games and settings stay.",
|
||||
"update_all": "Updates every game marked \"Update ready\", one after another.",
|
||||
"rescan": "Scans your game folders again and adds new games. Games already in the library keep their recipe, "
|
||||
"tags and art.",
|
||||
"rescan": "Scans your game folders again and adds new games. A game you moved into one of them gets its new "
|
||||
"place; games already in the library keep their name, recipe, tags and art. Settings → Library "
|
||||
"folders lists the folders.",
|
||||
"library_folders": "Every Scan a folder… adds its folder here. Rescan folders looks in them for new games, and "
|
||||
"for games you moved: a game whose files are gone from their old place is pointed at the same "
|
||||
"copy in its new place. Another version found there is only taken by Scan a folder…; Rescan "
|
||||
"leaves it for you to choose (Update with a newer version… on the game's page). Removing a "
|
||||
"folder only stops it being scanned: its games stay in the library.",
|
||||
"files": "Upload, download, rename and delete files on the Frame. Videos, Downloads and Documents are shared by "
|
||||
"every Quest game; each game also has its own storage.",
|
||||
"live_view": "Shows the headset's view with sound, whatever is running. It plays here where possible, else in "
|
||||
@@ -120,6 +129,8 @@ HELP: dict[str, str] = _Translated({
|
||||
"type_on_frame": "This PC's keyboard types on the Frame while this tab is open. In the headset, select a text "
|
||||
"field, then type here.",
|
||||
"free_space": "Deletes copies kept from earlier installs and unfinished uploads. Games and saves stay.",
|
||||
"save_backups": "Steam doesn't sync Quest games' saves. This copies each installed Quest game's saves to this PC "
|
||||
"(caches and big downloaded content stay out). Restore one from the game's menu → Restore saves….",
|
||||
"install_drive": "Where new games go on the Frame, such as a microSD card. Installed games stay put; right-click → "
|
||||
"Move to… moves one. Cards formatted as FAT, exFAT or NTFS can't hold games.",
|
||||
"move_game": "Copies the game and its saves to the other drive, checks the copy, then removes the old one. The "
|
||||
|
||||
@@ -36,6 +36,7 @@ class MenuState:
|
||||
movable: bool = False # the Frame knows which drive it's on (agent v63+, microSD): Move to…
|
||||
android: bool = False # a Quest/Android game (not PC VR, not a Linux app): it can get a newer APK
|
||||
new_version: bool = False # a Linux app or PC VR game: it can get a newer version (file or folder)
|
||||
saves: bool = False # a Quest/Android game installed on the connected Frame: back up / restore saves
|
||||
|
||||
|
||||
def menu_sections(g: dict, st: MenuState, act: Callable[[str], Callable]) -> list:
|
||||
@@ -62,6 +63,13 @@ def menu_sections(g: dict, st: MenuState, act: Callable[[str], Callable]) -> lis
|
||||
# the new build only; the Frame's game data stays (e.g. changed OBBs a normal update would replace)
|
||||
top.append((tr("Update app only…"), ft.Icons.SYSTEM_UPDATE_ALT_ROUNDED, act("update_app")))
|
||||
|
||||
saves: list = [] # GitHub discussion #352: Steam doesn't sync Quest games' saves
|
||||
if st.saves and not job:
|
||||
saves += [(tr("Back up saves"), ft.Icons.BACKUP_ROUNDED, act("backup_saves")),
|
||||
(tr("Restore saves…"), ft.Icons.RESTORE_ROUNDED, act("restore_saves"))]
|
||||
if st.android:
|
||||
saves.append((tr("Open backups folder"), ft.Icons.FOLDER_OPEN_ROUNDED, act("saves_folder")))
|
||||
|
||||
artwork = [(tr("Rename…"), ft.Icons.DRIVE_FILE_RENAME_OUTLINE_OUTLINED, act("rename")),
|
||||
(tr("Find artwork…"), ft.Icons.IMAGE_SEARCH_ROUNDED, act("find_art")),
|
||||
(tr("Use your own artwork…"), ft.Icons.UPLOAD_FILE_OUTLINED, act("custom_art"))]
|
||||
@@ -87,7 +95,8 @@ def menu_sections(g: dict, st: MenuState, act: Callable[[str], Callable]) -> lis
|
||||
danger = [(tr("Remove from library…"), ft.Icons.REMOVE_CIRCLE_OUTLINE_ROUNDED, act("remove"))]
|
||||
|
||||
out: list = list(top)
|
||||
for head, items in ((tr("Name and artwork"), artwork), (tr("Recipe"), recipe), (tr("Troubleshoot"), trouble)):
|
||||
for head, items in ((tr("Saves"), saves), (tr("Name and artwork"), artwork), (tr("Recipe"), recipe),
|
||||
(tr("Troubleshoot"), trouble)):
|
||||
if items:
|
||||
out += [None, Header(head), *items]
|
||||
return out + [None, *danger]
|
||||
|
||||
@@ -192,11 +192,13 @@ class FrameView:
|
||||
padding=T.S5)
|
||||
send = C.ghost(tr("Files"), ft.Icons.FOLDER_OPEN_ROUNDED, lambda e: self.app.go("files"),
|
||||
tooltip=C.tip(HELP["files"]))
|
||||
quest = any(d.get("kind") not in ("pcvr", "linux") and not d.get("overlay") for d in items)
|
||||
backup = [C.ghost(tr("Back up all saves"), ft.Icons.BACKUP_ROUNDED, lambda e: self.app.backup_all_saves(),
|
||||
tooltip=C.tip(HELP["save_backups"]))] if quest else []
|
||||
free = C.ghost(tr("Free up space…"), ft.Icons.CLEANING_SERVICES_OUTLINED, lambda e: self.app.cleanup_frame(),
|
||||
tooltip=C.tip(HELP["free_space"]))
|
||||
return C.section(tr("Installed games ({len})").format(len=len(items)), body,
|
||||
action=ft.Row([send, C.ghost(tr("Free up space…"), ft.Icons.CLEANING_SERVICES_OUTLINED,
|
||||
lambda e: self.app.cleanup_frame(),
|
||||
tooltip=C.tip(HELP["free_space"]))], spacing=T.S2, tight=True)
|
||||
if items else send)
|
||||
action=ft.Row([send, *backup, free], spacing=T.S2, tight=True) if items else send)
|
||||
|
||||
def _fill_installed(self, items: list[dict], col: ft.Column) -> None:
|
||||
def settings_slot() -> ft.Control:
|
||||
|
||||
@@ -382,6 +382,14 @@ class GameView:
|
||||
"settings."), T.TEXT, expand=True),
|
||||
C.secondary(tr("Use the new recipe"), ft.Icons.AUTO_FIX_HIGH_ROUNDED, take_update)],
|
||||
vertical_alignment=ft.CrossAxisAlignment.CENTER), "info", ft.Icons.NEW_RELEASES_OUTLINED))
|
||||
from .link_dialog import link_update_text, update_from_link
|
||||
|
||||
link_update = link_update_text(g)
|
||||
if link_update:
|
||||
out.append(C.callout(ft.Row([
|
||||
C.body(link_update, T.TEXT, expand=True),
|
||||
C.secondary(tr("Download update"), ft.Icons.SYSTEM_UPDATE_ROUNDED,
|
||||
lambda e: update_from_link(self.app, [pkg]))]), "info", ft.Icons.SYSTEM_UPDATE_ROUNDED))
|
||||
if g.get("steam_name_stale") and installed:
|
||||
out.append(C.callout(ft.Row([
|
||||
C.body(tr("The Frame's Steam library still shows the old name."), T.TEXT, expand=True),
|
||||
@@ -412,8 +420,17 @@ class GameView:
|
||||
"have. If nothing opens, visit the website in a browser."), T.TEXT)]
|
||||
+ ([C.meta(web["url"], T.TEXT_2, selectable=True)] if web.get("url") else []), spacing=T.px(4)),
|
||||
"warn", ft.Icons.LANGUAGE_ROUNDED))
|
||||
# a Google Daydream / Cardboard build (no Oculus support in it): its VR has no way to the headset (#335)
|
||||
gvr = (extra.get("google_vr") if not self.rift and not self.linux and extra.get("vr_kind") != "quest"
|
||||
else "")
|
||||
if gvr:
|
||||
out.append(C.callout(tr("This is a Google {platform} VR build. Its VR can't reach the Frame's headset, so "
|
||||
"it runs as a flat window at best, usually without working controls. An Oculus "
|
||||
"build of the game (Meta Quest, Oculus Go or Gear VR) works the normal way.")
|
||||
.format(platform="Daydream" if gvr == "daydream" else "Cardboard"),
|
||||
"warn", ft.Icons.VIEW_IN_AR_ROUNDED))
|
||||
static = " ".join(engine.blocker_notes(library.analysis_from_dict(g["analysis"]))) \
|
||||
if (too_new or web) else ""
|
||||
if (too_new or web or gvr) else ""
|
||||
if static and recipe.notes.strip() == static:
|
||||
pass # the recipe's note says the same (shown above)
|
||||
elif recipe.status == "unsupported":
|
||||
|
||||
@@ -282,6 +282,7 @@ class LibraryView:
|
||||
self.select_mode = False
|
||||
self.sel_bar = ft.Container(visible=False)
|
||||
self.resume_bar = ft.Container(visible=False)
|
||||
self.link_bar = ft.Container(visible=False) # games from install links with a newer version
|
||||
self.update_bar = ft.Container(visible=False) # "FramePort x.y is available" (ui/updater.py)
|
||||
self.games: list[dict] = []
|
||||
self.tw: set[str] = set()
|
||||
@@ -355,7 +356,8 @@ class LibraryView:
|
||||
alignment=ft.MainAxisAlignment.END,
|
||||
vertical_alignment=ft.CrossAxisAlignment.CENTER), expand=3)],
|
||||
vertical_alignment=ft.CrossAxisAlignment.CENTER, spacing=T.S3),
|
||||
self.update_bar, self.resume_bar, self.hint, self.filters, self._drop_area(self.body), self.sel_bar,
|
||||
self.update_bar, self.resume_bar, self.link_bar, self.hint, self.filters, self._drop_area(self.body),
|
||||
self.sel_bar,
|
||||
], expand=True, spacing=T.S4)
|
||||
# skeleton cards until the first batch arrives
|
||||
n = min(len(library.games()), 15)
|
||||
@@ -382,6 +384,7 @@ class LibraryView:
|
||||
self._update_hint()
|
||||
self.update_resume_bar()
|
||||
self.update_update_bar()
|
||||
self.update_link_bar()
|
||||
self._update_sel_bar()
|
||||
return self.root
|
||||
|
||||
@@ -401,6 +404,7 @@ class LibraryView:
|
||||
self._update_header(games, pc)
|
||||
self.update_update_bar()
|
||||
self.update_resume_bar() # also after Dismiss / Resume and when installs finish or fail
|
||||
self.update_link_bar()
|
||||
if not games:
|
||||
self.body.content = C.empty_state(
|
||||
ft.Icons.LIBRARY_ADD_OUTLINED, tr("Add your games"),
|
||||
@@ -518,6 +522,24 @@ class LibraryView:
|
||||
self.update_bar.content = bar
|
||||
C.update(self.update_bar)
|
||||
|
||||
def update_link_bar(self) -> None:
|
||||
"""Games installed from an install link whose manifest now names a newer version (pipeline.
|
||||
check_link_updates): update them from here."""
|
||||
from .link_dialog import update_from_link
|
||||
|
||||
app = self.app
|
||||
pkgs = [g["package"] for g in library.games() if g.get("link_update")]
|
||||
self.link_bar.visible = bool(pkgs)
|
||||
if pkgs:
|
||||
names = ", ".join(app._title(p) for p in pkgs[:3]) + ("…" if len(pkgs) > 3 else "")
|
||||
self.link_bar.content = C.callout(ft.Row([
|
||||
C.body(tr_n("A newer version is available from an install link: {names}.",
|
||||
"Newer versions are available from install links: {names}.",
|
||||
len(pkgs), names=names), T.TEXT, expand=True),
|
||||
C.primary(tr("Update"), ft.Icons.SYSTEM_UPDATE_ROUNDED, lambda e: update_from_link(app, pkgs)),
|
||||
], spacing=T.S3), "info", ft.Icons.SYSTEM_UPDATE_ROUNDED)
|
||||
C.update(self.link_bar)
|
||||
|
||||
def update_resume_bar(self) -> None:
|
||||
"""Installs that didn't finish (cancelled, failed, or the app closed): resume them from here."""
|
||||
app = self.app
|
||||
|
||||
@@ -128,7 +128,7 @@ def _confirm(app: FramePortApp, m: deeplink.Manifest, sizes: dict, pasted: bool,
|
||||
extra=ft.Column([*rows, *notes], spacing=T.S2, tight=True))
|
||||
|
||||
|
||||
def download_and_install(app: FramePortApp, m: deeplink.Manifest, icon=None) -> Job:
|
||||
def download_and_install(app: FramePortApp, m: deeplink.Manifest, icon=None, open_page: bool = True) -> Job:
|
||||
def run(job: Job):
|
||||
rep = job.reporter
|
||||
path = deeplink.download(m, rep)
|
||||
@@ -142,12 +142,80 @@ def download_and_install(app: FramePortApp, m: deeplink.Manifest, icon=None) ->
|
||||
except Exception: # noqa: BLE001 - artwork is optional
|
||||
pass
|
||||
library.set_setting("ui.welcome_done", True)
|
||||
app.open_game(pkg)
|
||||
if open_page:
|
||||
app.open_game(pkg)
|
||||
app.page.run_thread(lambda: app.install(pkg, "frame")) # asks the usual install questions, then queues it
|
||||
return tr("Downloaded {name}").format(name=g.get("title") or m.name)
|
||||
return app.submit(tr("Download {name}").format(name=m.name), run, None, "task")
|
||||
|
||||
|
||||
def update_from_link(app: FramePortApp, pkgs: list[str]) -> None:
|
||||
"""Game page / Library bar: games installed from an install link whose manifest offers a newer version (pipeline.
|
||||
check_link_updates). Fetches each manifest again in a job, asks once, then downloads and installs every update
|
||||
like a first install (download_and_install)."""
|
||||
def run(job: Job):
|
||||
job.reporter.stage(tr("Reading the install link"))
|
||||
offers, failed = [], []
|
||||
for pkg in pkgs:
|
||||
link = (library.game(pkg) or {}).get("link")
|
||||
if not deeplink.can_check_updates(link):
|
||||
continue
|
||||
try:
|
||||
m = deeplink.check_update(link)
|
||||
except Exception as exc: # noqa: BLE001 - one manifest that can't be read doesn't stop the others
|
||||
failed.append(pkg)
|
||||
job.reporter.log(f"{pkg}: {exc}")
|
||||
continue
|
||||
if m:
|
||||
offers.append((pkg, link.get("version") or "", m, deeplink.fetch_icon(m)))
|
||||
else: # the offer was withdrawn meanwhile
|
||||
with library.edit() as data:
|
||||
data["games"].get(pkg, {}).pop("link_update", None)
|
||||
app.page.run_thread(lambda: _confirm_updates(app, offers, failed))
|
||||
return tr("Install link updates: waiting for your answer") if offers else tr("No updates")
|
||||
app.submit(tr("Check install links for updates"), run, pkgs[0] if len(pkgs) == 1 else None, "task")
|
||||
|
||||
|
||||
def _confirm_updates(app: FramePortApp, offers: list, failed: list[str]) -> None:
|
||||
if not offers:
|
||||
app.refresh_view()
|
||||
if failed:
|
||||
app.toast(tr("Couldn't read the install link of {name}").format(name=app._title(failed[0])), error=True)
|
||||
else:
|
||||
app.toast(tr("Already up to date"))
|
||||
return
|
||||
rows = [ft.Column([
|
||||
C.body(app._title(pkg), T.TEXT, weight=ft.FontWeight.W_500, max_lines=1, overflow=ft.TextOverflow.ELLIPSIS),
|
||||
C.meta(tr("{old} → {new} · from {host}").format(old=old or "?", new=m.version, host=m.host or _host(m.source))),
|
||||
], spacing=T.px(2), tight=True) for pkg, old, m, _icon in offers]
|
||||
notes = [C.callout(tr("FramePort downloads the new version from the same site and installs it on your Frame. "
|
||||
"Saves are kept."), "info")]
|
||||
if failed:
|
||||
notes.append(C.meta(tr("Couldn't read: {names}").format(names=", ".join(app._title(p) for p in failed))))
|
||||
if len(offers) == 1:
|
||||
pkg, _old, m, _icon = offers[0]
|
||||
heading = tr("Update {name} to {version}?").format(name=app._title(pkg), version=m.version)
|
||||
text = tr("A newer version is available from its install link.")
|
||||
else:
|
||||
heading = tr("Update {n} games?").format(n=len(offers))
|
||||
text = tr("Newer versions are available from their install links.")
|
||||
|
||||
def go():
|
||||
for _pkg, _old, m, icon in offers:
|
||||
download_and_install(app, m, icon, open_page=len(offers) == 1)
|
||||
C.confirm(app.page, heading, text, tr("Download and update"), go,
|
||||
extra=ft.Column([*rows, *notes], spacing=T.S2, tight=True))
|
||||
|
||||
|
||||
def link_update_text(g: dict) -> str | None:
|
||||
"""The game page's line for a newer version from the game's install link (None: no update known)."""
|
||||
offer, link = g.get("link_update"), g.get("link") or {}
|
||||
if not offer:
|
||||
return None
|
||||
return tr("Version {version} is available from its install link (you have {current}).").format(
|
||||
version=offer.get("version"), current=link.get("version") or "?")
|
||||
|
||||
|
||||
DEMO_COVER = "demo-cool-game" # ui/icons/demo-cool-game.svg (also the site's site/public/demo/cool-game.svg)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
"""Save backups of Quest games (GitHub discussion #352): "Back up saves" (a job), "Restore saves…" (pick a backup,
|
||||
confirm; the Frame keeps the replaced saves for one undo), "Open backups folder", and "Back up all saves" on the Frame
|
||||
page. The work itself is install/saves.py (shared with the CLI)."""
|
||||
from __future__ import annotations
|
||||
|
||||
import time
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import flet as ft
|
||||
|
||||
from ...errors import explain
|
||||
from ...i18n import fmt_size, tr, tr_n
|
||||
from ...install import saves
|
||||
from .. import components as C
|
||||
from .. import theme as T
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..app import FramePortApp
|
||||
from ..jobs import Job
|
||||
|
||||
|
||||
def _frame(app: FramePortApp):
|
||||
return app._target_for("frame").frame
|
||||
|
||||
|
||||
def when(t: float) -> str:
|
||||
return time.strftime("%Y-%m-%d %H:%M", time.localtime(t))
|
||||
|
||||
|
||||
def backup_line(b: saves.Backup) -> str:
|
||||
""""12 files · 3.4 MB of saves · version 1.2" (+ large files left out)."""
|
||||
parts = [tr_n("{n} file", "{n} files", b.files), tr("{size} of saves").format(size=fmt_size(b.bytes))]
|
||||
if b.version:
|
||||
parts.append(tr("version {version}").format(version=b.version))
|
||||
if b.skipped:
|
||||
parts.append(tr_n("{n} large file left out", "{n} large files left out", b.skipped))
|
||||
return " · ".join(parts)
|
||||
|
||||
|
||||
def backup_saves(app: FramePortApp, pkg: str) -> Job:
|
||||
"""Back up the game's saves from the Frame to this PC (a job)."""
|
||||
title = app._title(pkg)
|
||||
|
||||
def run(job: Job):
|
||||
b = saves.backup(_frame(app), pkg, job.reporter)
|
||||
return tr("{title}: saves backed up ({line})").format(title=title, line=backup_line(b))
|
||||
return app.submit(tr("Back up saves: {title}").format(title=title), run, pkg, "tool-frame")
|
||||
|
||||
|
||||
def backup_all(app: FramePortApp, packages: list[str]) -> Job | None:
|
||||
"""One job backing up every installed Quest game's saves (a game that runs or fails is reported, the rest go
|
||||
on)."""
|
||||
if not packages:
|
||||
return None
|
||||
|
||||
def run(job: Job):
|
||||
done, failed = 0, []
|
||||
for i, pkg in enumerate(packages):
|
||||
job.reporter.check_cancel()
|
||||
job.reporter.log(tr("Backing up {title}").format(title=app._title(pkg)))
|
||||
try:
|
||||
saves.backup(_frame(app), pkg, job.reporter)
|
||||
done += 1
|
||||
except saves.SavesError as exc:
|
||||
failed.append(f"{app._title(pkg)}: {explain(exc)}")
|
||||
job.reporter.log(failed[-1])
|
||||
job.reporter.progress((i + 1) / len(packages))
|
||||
if failed:
|
||||
return tr("Backed up {done} of {total} games' saves; not: {failed}").format(
|
||||
done=done, total=len(packages), failed="; ".join(failed[:3]) + (" …" if len(failed) > 3 else ""))
|
||||
return tr_n("Backed up the saves of {n} game", "Backed up the saves of {n} games", done)
|
||||
return app.submit(tr("Back up all saves"), run, None, "tool-frame")
|
||||
|
||||
|
||||
def open_folder(pkg: str) -> None:
|
||||
from ...core import winhost
|
||||
|
||||
d = saves.backups_dir(pkg)
|
||||
d.mkdir(parents=True, exist_ok=True)
|
||||
winhost.open_folder(d)
|
||||
|
||||
|
||||
def restore_dialog(app: FramePortApp, pkg: str) -> None:
|
||||
"""Pick one of the game's backups and restore it on the Frame (after a confirmation); undo the last restore."""
|
||||
title = app._title(pkg)
|
||||
found = saves.list_backups(pkg)
|
||||
by_path = {str(b.path): b for b in found}
|
||||
group = ft.RadioGroup(value=str(found[0].path) if found else None, content=ft.Column([
|
||||
ft.Row([ft.Radio(value=str(b.path), active_color=T.ACCENT),
|
||||
ft.Column([C.body(when(b.created) + (tr(" (newest)") if i == 0 else ""), T.TEXT),
|
||||
C.meta(backup_line(b))], spacing=T.px(2), expand=True)],
|
||||
spacing=T.S2)
|
||||
for i, b in enumerate(found)], spacing=T.S2, scroll=ft.ScrollMode.AUTO, height=min(T.px(300),
|
||||
T.px(52) * len(found))))
|
||||
undo_row = ft.Row([C.meta(tr("Checking the saves on the Frame…"))], spacing=T.S2,
|
||||
vertical_alignment=ft.CrossAxisAlignment.CENTER)
|
||||
|
||||
def restore(e):
|
||||
b = by_path.get(group.value or "")
|
||||
if not b:
|
||||
return
|
||||
|
||||
def go():
|
||||
app.page.pop_dialog()
|
||||
|
||||
def run(job: Job):
|
||||
r = saves.restore(_frame(app), pkg, b.path, job.reporter)
|
||||
return tr("{title}: saves from {when} restored ({n} files)").format(
|
||||
title=title, when=when(b.created), n=r.get("restored", 0))
|
||||
app.submit(tr("Restore saves: {title}").format(title=title), run, pkg, "tool-frame")
|
||||
C.confirm(app.page, tr("Replace the saves on the Frame?"),
|
||||
tr("{title}'s saves on the Frame are replaced by the backup from {when}. The Frame keeps a copy of "
|
||||
"the saves it has now, so you can undo this.").format(title=title, when=when(b.created)),
|
||||
tr("Restore"), go, danger=True)
|
||||
|
||||
def undo(e):
|
||||
def go():
|
||||
app.page.pop_dialog()
|
||||
|
||||
def run(job: Job):
|
||||
saves.undo_restore(_frame(app), pkg)
|
||||
return tr("{title}: the saves from before the last restore are back").format(title=title)
|
||||
app.submit(tr("Undo restore: {title}").format(title=title), run, pkg, "tool-frame")
|
||||
C.confirm(app.page, tr("Undo the last restore?"),
|
||||
tr("Puts back the saves {title} had before the last restore. The saves it has now become the copy "
|
||||
"you can undo to.").format(title=title), tr("Undo restore"), go, danger=True)
|
||||
|
||||
def fill():
|
||||
try:
|
||||
info = saves.info(_frame(app), pkg)
|
||||
except Exception as exc: # noqa: BLE001
|
||||
undo_row.controls = [C.meta(tr("Couldn't check the saves on the Frame: {error}").format(
|
||||
error=explain(exc)))]
|
||||
C.update(undo_row)
|
||||
return
|
||||
now = tr("On the Frame now: {line}").format(line=" · ".join(
|
||||
[tr_n("{n} file", "{n} files", int(info.get("files") or 0)),
|
||||
tr("{size} of saves").format(size=fmt_size(int(info.get("bytes") or 0)))]))
|
||||
rows: list[ft.Control] = [ft.Container(C.meta(now), expand=True)]
|
||||
rb = info.get("rollback")
|
||||
if rb:
|
||||
rows.append(C.ghost(tr("Undo last restore ({when})").format(when=when(rb.get("time") or 0)),
|
||||
ft.Icons.UNDO_ROUNDED, on_click=undo))
|
||||
undo_row.controls = rows
|
||||
C.update(undo_row)
|
||||
|
||||
restore_btn = C.primary(tr("Restore"), ft.Icons.RESTORE_ROUNDED, on_click=restore, disabled=not found)
|
||||
if found:
|
||||
listing: ft.Control = group
|
||||
else:
|
||||
listing = C.callout(tr("No backups of {title} on this PC yet. Back up its saves first (game menu → Back up "
|
||||
"saves).").format(title=title))
|
||||
content = ft.Column([
|
||||
C.body(tr("Choose a backup to put back on the Frame. Close the game first."), T.TEXT_2),
|
||||
listing,
|
||||
C.callout(tr("The game's current saves on the Frame are replaced. FramePort keeps a copy of them on the Frame, "
|
||||
"so you can undo the last restore."), "warn"),
|
||||
undo_row,
|
||||
], spacing=T.S3, tight=True)
|
||||
app.page.show_dialog(C.dialog(
|
||||
tr("Restore saves · {title}").format(title=title), content, size="m",
|
||||
actions=[C.ghost(tr("Open backups folder"), ft.Icons.FOLDER_OPEN_ROUNDED, on_click=lambda e: open_folder(pkg)),
|
||||
C.ghost(tr("Cancel"), on_click=lambda e: app.page.pop_dialog()), restore_btn]))
|
||||
app.run_bg(fill)
|
||||
@@ -21,14 +21,17 @@ if TYPE_CHECKING:
|
||||
TOOL_TITLES = {"java": tr("Java runtime"), "overport": "OVRPort", "apksigner": "apksigner", "revive": tr("Revive")}
|
||||
TOOL_WHY = {"java": tr("Runs OVRPort and apksigner"), "overport": tr("Converts Quest games to OpenXR"),
|
||||
"apksigner": tr("Signs rebuilt games"), "revive": tr("Runs Oculus PC games on SteamVR")}
|
||||
# the page's sections in order (the index on the left lists them): Appearance near the top (it's the most used),
|
||||
# "Uninstall FramePort" last
|
||||
SECTIONS = ("appearance", "updates", "links", "installing", "tools", "pc", "data", "feedback", "about", "remove")
|
||||
# the page's sections in order (the index on the left lists them): what most users need first (updates of the app and
|
||||
# their games, installing, where games come from, looks), then what only some need (link handlers, tools FramePort
|
||||
# manages itself, PC VR on this PC), "Uninstall FramePort" last
|
||||
SECTIONS = ("updates", "installing", "folders", "appearance", "data", "feedback", "links", "tools", "pc", "about",
|
||||
"remove")
|
||||
|
||||
|
||||
def section_titles() -> dict[str, str]:
|
||||
"""Index labels of SECTIONS (the sections' own headings may be longer)."""
|
||||
return {"appearance": tr("Appearance"), "updates": tr("Updates"), "links": tr("Install links"),
|
||||
"folders": tr("Library folders"),
|
||||
"installing": tr("Installing"), "tools": tr("Tools"), "pc": tr("This PC"), "data": tr("Data"),
|
||||
"feedback": tr("Problems and feedback"), "about": tr("About"), "remove": tr("Uninstall FramePort")}
|
||||
|
||||
@@ -127,14 +130,100 @@ class SettingsView:
|
||||
parallel = C.dropdown(label=tr("Parallel uploads"), value=str(upload_threads()), width=T.px(240),
|
||||
options=[ft.DropdownOption(str(n), str(n)) for n in range(1, 9)],
|
||||
on_select=threads_changed)
|
||||
return ft.Column([launch, keep, video, parallel,
|
||||
return ft.Column([launch, parallel,
|
||||
C.meta(tr("Large files upload together using OpenSSH when available. "
|
||||
"Default: 3. Lower this on a busy network.")),
|
||||
video, keep,
|
||||
C.ghost(tr("Remove converted copies now"), ft.Icons.CLEANING_SERVICES_OUTLINED, clean,
|
||||
tooltip=tr("Your own game files aren't touched.")),
|
||||
ft.Container(height=T.S2), self.ssh_keys()],
|
||||
spacing=T.S2, horizontal_alignment=ft.CrossAxisAlignment.START)
|
||||
|
||||
def library_folders(self) -> ft.Control:
|
||||
"""Settings → Library folders: the folders "Rescan folders" scans (core/folders.py, GitHub discussion #351).
|
||||
Status (is it there, how many games come from it) is read off the UI thread."""
|
||||
from ...core import folders
|
||||
|
||||
app = self.app
|
||||
rows = ft.Column(spacing=T.S2)
|
||||
|
||||
def row(st: folders.FolderStatus) -> ft.Control:
|
||||
games = tr_n("{n} game in the library", "{n} games in the library", st.games)
|
||||
if st.exists:
|
||||
icon, color, state = ft.Icons.FOLDER_OUTLINED, T.TEXT_2, games
|
||||
else:
|
||||
icon, color = ft.Icons.FOLDER_OFF_OUTLINED, T.WARN
|
||||
state = tr("Not found (moved, deleted or on a drive that isn't connected)") + " · " + games
|
||||
return ft.Row([
|
||||
C.as_icon(icon, T.px(18), color),
|
||||
ft.Column([C.body(Path(st.path).name or st.path, T.TEXT, max_lines=1,
|
||||
overflow=ft.TextOverflow.ELLIPSIS),
|
||||
C.meta(st.path, max_lines=2, overflow=ft.TextOverflow.ELLIPSIS, tooltip=st.path),
|
||||
C.meta(state, T.WARN if not st.exists else None)],
|
||||
spacing=0, expand=True),
|
||||
C.icon_btn(ft.Icons.DELETE_OUTLINE_ROUNDED, tr("Stop scanning this folder"),
|
||||
on_click=lambda e, s=st: remove(s)),
|
||||
], spacing=T.S2, vertical_alignment=ft.CrossAxisAlignment.CENTER)
|
||||
|
||||
def fill(): # (run_bg: a folder on a sleeping network drive can take a while to answer)
|
||||
items = folders.status()
|
||||
rows.controls = [row(s) for s in items] or \
|
||||
[C.meta(tr("No folders yet. Add one here, or use Scan a folder… in the Library."))]
|
||||
C.update(rows)
|
||||
|
||||
def remove(st: folders.FolderStatus):
|
||||
def ok():
|
||||
folders.remove(st.path)
|
||||
app.run_bg(fill)
|
||||
C.confirm(app.page, tr("Stop scanning this folder?"),
|
||||
tr_n("Rescan folders won't look in {path} any more. The {n} game from it stays in your library "
|
||||
"(nothing is deleted).",
|
||||
"Rescan folders won't look in {path} any more. The {n} games from it stay in your library "
|
||||
"(nothing is deleted).", st.games, path=st.path),
|
||||
tr("Remove folder"), ok)
|
||||
|
||||
async def add(e):
|
||||
path = await C.pick_dir(app.page, dialog_title=tr("Folder with games (APKs or PC VR games)"))
|
||||
if not path:
|
||||
return
|
||||
try:
|
||||
folders.add(path)
|
||||
except ValueError as exc:
|
||||
app.toast(str(exc), error=True)
|
||||
return
|
||||
app.run_bg(fill)
|
||||
app.scan(path, only_new=True) # its games (new ones, and ones that moved there) come in now
|
||||
|
||||
rows.controls = [C.meta(tr("Checking folders…"))]
|
||||
app.run_bg(fill)
|
||||
return ft.Column([
|
||||
C.meta(tr("Rescan folders in the Library looks in these folders for new games and for games that "
|
||||
"moved there.")),
|
||||
rows,
|
||||
ft.Row([C.secondary(tr("Add folder…"), ft.Icons.CREATE_NEW_FOLDER_OUTLINED, add),
|
||||
C.ghost(tr("Rescan folders"), ft.Icons.REFRESH_ROUNDED, app.rescan)],
|
||||
spacing=T.S2, run_spacing=T.S2, wrap=True),
|
||||
], spacing=T.S3, horizontal_alignment=ft.CrossAxisAlignment.START)
|
||||
|
||||
def save_backups(self) -> ft.Control:
|
||||
"""Settings → Data: how many save backups to keep per game (install/saves.py, setting saves.keep)."""
|
||||
from ...core import library, winhost
|
||||
from ...install import saves
|
||||
|
||||
def changed(e):
|
||||
library.set_setting("saves.keep", int(e.control.value))
|
||||
|
||||
def open_root(e):
|
||||
saves.root_dir().mkdir(parents=True, exist_ok=True)
|
||||
winhost.open_folder(saves.root_dir())
|
||||
keep = C.dropdown(label=tr("Save backups to keep per game"), value=str(saves.keep_count()), width=T.px(260),
|
||||
options=[ft.DropdownOption(str(n), str(n))
|
||||
for n in sorted({*saves.KEEP_CHOICES, saves.keep_count()})],
|
||||
on_select=changed)
|
||||
return ft.Row([keep, C.help_icon("save_backups"),
|
||||
C.ghost(tr("Open save backups"), ft.Icons.FOLDER_OPEN_ROUNDED, open_root)],
|
||||
spacing=T.S2, wrap=True, vertical_alignment=ft.CrossAxisAlignment.CENTER)
|
||||
|
||||
def ssh_keys(self) -> ft.Control:
|
||||
"""Settings → Installing: private key files FramePort logs in with besides its own (frame.connection
|
||||
EXTRA_KEYS_SETTING; the Frame connection and OpenSSH uploads both use them, GitHub #242)."""
|
||||
@@ -211,14 +300,20 @@ class SettingsView:
|
||||
C.secondary(tr("Check for updates"), ft.Icons.REFRESH_ROUNDED, lambda e: app.updater.check_now())],
|
||||
vertical_alignment=ft.CrossAxisAlignment.CENTER),
|
||||
status,
|
||||
ft.Row([C.meta(tr("What changed in this version and the ones before it."), expand=True),
|
||||
C.ghost(tr("What's new…"), ft.Icons.NEW_RELEASES_OUTLINED, lambda e: app.updater.show_history())],
|
||||
vertical_alignment=ft.CrossAxisAlignment.CENTER),
|
||||
C.switch(tr("Check for new versions automatically"), value=bool(library.setting("update.auto_check", True)),
|
||||
on_change=auto_check),
|
||||
C.switch(tr("Install updates automatically when FramePort starts"),
|
||||
value=bool(library.setting("update.auto_install", False)),
|
||||
on_change=auto_install),
|
||||
ft.Row([C.meta(tr("What changed in this version and the ones before it."), expand=True),
|
||||
C.ghost(tr("What's new…"), ft.Icons.NEW_RELEASES_OUTLINED, lambda e: app.updater.show_history())],
|
||||
vertical_alignment=ft.CrossAxisAlignment.CENTER),
|
||||
ft.Divider(height=1, color=T.BORDER),
|
||||
ft.Row([C.body(tr("Games"), T.TEXT, weight=ft.FontWeight.W_500), C.help_icon("game_updates")],
|
||||
spacing=T.px(4), vertical_alignment=ft.CrossAxisAlignment.CENTER),
|
||||
self.catalog_updates(),
|
||||
self.link_updates(),
|
||||
ft.Divider(height=1, color=T.BORDER),
|
||||
ft.Row([C.meta(tr("Asked to test something? Dev builds come before the next release."), expand=True),
|
||||
C.ghost(tr("Install the latest dev build…"), G.TEST,
|
||||
lambda e: app.updater.install_dev())],
|
||||
@@ -251,6 +346,32 @@ class SettingsView:
|
||||
on_change=toggle),
|
||||
], spacing=T.S2)
|
||||
|
||||
def link_updates(self) -> ft.Control:
|
||||
"""Settings → Updates → Games: newer versions of games installed from install links whose manifest names a
|
||||
version (pipeline.check_link_updates; setting links.check_updates)."""
|
||||
import time
|
||||
|
||||
from ...core import library
|
||||
|
||||
app = self.app
|
||||
last = library.setting("links.last_update_check")
|
||||
when = time.strftime("%Y-%m-%d %H:%M", time.localtime(last)) if last else tr("never")
|
||||
n = sum(1 for g in library.games() if g.get("link_update"))
|
||||
line = tr("Games from install links: last checked {when}").format(when=when)
|
||||
if n:
|
||||
line += " · " + tr_n("{n} update available", "{n} updates available", n)
|
||||
|
||||
def toggle(e):
|
||||
library.set_setting("links.check_updates", bool(e.control.value))
|
||||
return ft.Column([
|
||||
ft.Row([C.meta(line, expand=True),
|
||||
C.ghost(tr("Check now"), ft.Icons.SYNC_ROUNDED,
|
||||
lambda e: app.run_bg(lambda: app._check_link_updates(force=True)))],
|
||||
vertical_alignment=ft.CrossAxisAlignment.CENTER),
|
||||
C.switch(tr("Check games from install links for new versions"),
|
||||
value=bool(library.setting("links.check_updates", True)), on_change=toggle),
|
||||
], spacing=T.S2)
|
||||
|
||||
def links_card(self) -> ft.Control:
|
||||
"""Settings → Install links: one switch per scheme — framedrop:// ("Install with FrameDrop" buttons on web
|
||||
pages) and frameport:// (FramePort's own links) open FramePort (urlhandler)."""
|
||||
@@ -426,7 +547,7 @@ class SettingsView:
|
||||
value=self.app.reduce_motion, on_change=lambda e: self.app.set_reduce_motion(e.control.value))
|
||||
controls = [self.theme_picker(), ft.Container(height=T.S2), dd, note, ft.Container(height=T.S2), live_card,
|
||||
live_note, motion]
|
||||
languages = i18n.available()
|
||||
languages = i18n.available() # first: whoever needs it needs it before anything else
|
||||
if len(languages) > 1: # only once a translation exists
|
||||
def language_changed(e):
|
||||
library.set_setting("ui.language", e.control.value)
|
||||
@@ -434,7 +555,7 @@ class SettingsView:
|
||||
lang = C.dropdown(label=tr("Language"), value=i18n.language(), width=T.px(260), on_select=language_changed,
|
||||
options=[ft.dropdown.Option(code, i18n.language_name(code)) for code in languages])
|
||||
lang_note = C.meta(tr("Changes apply the next time FramePort starts."))
|
||||
controls += [lang, lang_note]
|
||||
controls = [lang, lang_note, ft.Container(height=T.S2), *controls]
|
||||
return ft.Column(controls, spacing=T.S2)
|
||||
|
||||
def agent_text(self) -> str:
|
||||
@@ -496,6 +617,8 @@ class SettingsView:
|
||||
"appearance": C.section(tr("Appearance"), C.card(self.appearance(), padding=T.S4), help="ui_scale"),
|
||||
"updates": C.section(tr("Updates"), C.card(self.updates_card(), padding=T.S4), help="app_updates"),
|
||||
"links": C.section(tr("Install links"), C.card(self.links_card(), padding=T.S4), help="install_links"),
|
||||
"folders": C.section(tr("Library folders"), C.card(self.library_folders(), padding=T.S4),
|
||||
help="library_folders"),
|
||||
"installing": C.section(tr("Installing"), C.card(self.installing(), padding=T.S4), help="launch_test"),
|
||||
"tools": C.section(tr("Tools"), C.card(self.tools, padding=ft.Padding(T.S4, T.S2, T.S4, T.S2)),
|
||||
subtitle=tr("FramePort keeps its own copies; nothing is installed system-wide"),
|
||||
@@ -511,7 +634,7 @@ class SettingsView:
|
||||
lambda e: app.copy(data))]), "data_folder"),
|
||||
C.kv(tr("Catalog"), tr("{len} tested recipes (built in, online and yours)")
|
||||
.format(len=len(catalog.load())), "catalog"),
|
||||
self.catalog_updates(),
|
||||
self.save_backups(),
|
||||
], spacing=T.S2))),
|
||||
# text above, buttons below (side by side, the buttons squeezed the text in a narrow window)
|
||||
"feedback": C.section(tr("Problems and feedback"), C.card(ft.Column([
|
||||
@@ -542,7 +665,7 @@ class SettingsView:
|
||||
+ [ft.Container(height=T.px(240))],
|
||||
spacing=T.S5, scroll=ft.ScrollMode.AUTO, expand=True)
|
||||
return ft.Column([
|
||||
app.top_bar(tr("Settings"), tr("Updates, tools, this PC and where FramePort keeps its data")),
|
||||
app.top_bar(tr("Settings"), tr("Updates, installing, appearance and where FramePort keeps its data")),
|
||||
ft.Row([self.index_column(), self.page_col], expand=True, spacing=0,
|
||||
vertical_alignment=ft.CrossAxisAlignment.START),
|
||||
], spacing=T.S5, expand=True)
|
||||
@@ -3,6 +3,7 @@ from __future__ import annotations
|
||||
|
||||
import re
|
||||
from dataclasses import dataclass, field
|
||||
from datetime import date
|
||||
|
||||
import yaml
|
||||
|
||||
@@ -209,8 +210,17 @@ def _forgive_headless_end(res: TriageResult, lines: list[str], markers: list[dic
|
||||
|
||||
|
||||
def _secs(line: str) -> float | None:
|
||||
"""A logcat line's time in seconds, its date included (as a day of a leap year): logcat replays old kernel
|
||||
lines dated days before the game's (BattleTalent, GitHub #293), so the time of day alone can't order them."""
|
||||
m = LOGCAT_TIME.match(line)
|
||||
return int(m[1]) * 3600 + int(m[2]) * 60 + int(m[3]) + int(m[4]) / 1000 if m else None
|
||||
if not m:
|
||||
return None
|
||||
month, day = int(m[1]), int(m[2])
|
||||
try:
|
||||
ordinal = date(2000, month, day).timetuple().tm_yday
|
||||
except ValueError:
|
||||
return None
|
||||
return (ordinal * 24 + int(m[3])) * 3600 + int(m[4]) * 60 + int(m[5]) + int(m[6]) / 1000
|
||||
|
||||
|
||||
MISSING_OBB = ("The game keeps its content in a data file (.obb) and none was installed: FramePort found no .obb "
|
||||
@@ -229,22 +239,23 @@ def add_missing_obb(res: TriageResult) -> TriageResult:
|
||||
return res
|
||||
|
||||
|
||||
LOGCAT_TIME = re.compile(r"^\d\d-\d\d (\d\d):(\d\d):(\d\d)\.(\d{3})")
|
||||
LOGCAT_TIME = re.compile(r"^(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)\.(\d{3})")
|
||||
|
||||
|
||||
_YEAR = 366 * 86400
|
||||
_HALF_YEAR = _YEAR / 2
|
||||
|
||||
|
||||
def frames_stopped(lines: list[str], gap: float = 20.0) -> float | None:
|
||||
"""Seconds since the last pacing summary (or initial projection submission if none), when over `gap`.
|
||||
Twenty seconds allows several of FrameBridge's 5 s pacing windows before suspecting a stalled frame loop."""
|
||||
def secs(line):
|
||||
m = LOGCAT_TIME.match(line)
|
||||
return int(m[1]) * 3600 + int(m[2]) * 60 + int(m[3]) + int(m[4]) / 1000 if m else None
|
||||
last_projection = last_pacing = last = None
|
||||
for ln in lines: # logcat lines aren't strictly in time order: the latest time counts, not the last line
|
||||
t = secs(ln)
|
||||
t = _secs(ln)
|
||||
if t is None:
|
||||
continue
|
||||
if last is not None and t < last - 43200: # past midnight
|
||||
t += 86400
|
||||
if last is not None and t < last - _HALF_YEAR: # past New Year (12-31 -> 01-01)
|
||||
t += _YEAR
|
||||
last = t if last is None else max(last, t)
|
||||
if re.search(r"FrameBridge\s*: pacing:", ln):
|
||||
last_pacing = t if last_pacing is None else max(last_pacing, t)
|
||||
|
||||
Loaded 100 of 135 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user