## Summary Follow-up to #1412, focused on repeat work observed in completed CI logs. - Give APK compilation and Android tests the same build-label and API-key inputs. Previously `generateReleaseBuildConfig` changed between invocations and caused Kotlin/Java recompilation before tests. - Continue executing the Android test suite on every CI run: disable reuse of the test task's results in CI while retaining compilation caching. Keep the existing heap and process isolation settings. - Cache the four remote checksum-pinned model/AAR downloads used by add-on packs. Hash-check every cache hit, atomically replace corrupt entries only after a verified download, and verify the destination bytes. Packs are still regenerated from current prepared components and their checksums remain part of the APK. - Bound download time and retry connection resets as well as HTTP errors; keep checksum mismatches fatal. - Include the pack recipes in runtime source freshness checks. - Restrict PR report updates to the workflow bot's own marker comment, addressing the minor extraction review finding from #1412. ## Evidence and validation The previous successful run explicitly recorded changed `BuildConfig.java` as the reason for repeated Kotlin/Java compilation between assembly and tests. The final #1412 normal run spent 38 seconds building/downloading packs, 5m59s building the APK, and 3m03s in the Android test step. A forced run also hit a connection reset while fetching pack inputs and passed on retry. Focused tests cover cold/warm input reuse, corrupt-cache repair, changed-pin invalidation, rejected download bytes, actual local HTTP connection failure/retry, identical build metadata and bot-only comment selection. Actionlint passed. The clean Linux full suite passed 1,149 tests (18 skipped) before the final Gradle test-execution policy block. Host, APK/ABI and Android checks are green on the final head, including the ordinary PR run against the updated main branch and both controlled branch attempts below. Validation will compare cold and warm runs on the same commit, confirm cache-hit hash verification, confirm app compilation remains up-to-date in the test invocation, and confirm the Android suite actually executes on both runs. Source-tree, preload, APK/ABI, all-test, signing and publishing gates remain. Existing Gradle, CMake and Cargo caching remains. Native compilation was tens of seconds in the inspected baseline; no speculative native cache changes or unmeasured speed claim are included. Android test execution itself was about 2m30s; this PR removes avoidable setup/recompilation rather than weakening coverage or changing concurrency. ## Follow-up correction The first CI run failed two artwork-key tests that assumed the compiled-in API key was empty. Keeping build inputs consistent exposed that assumption. Tests now check the configured build key and its trimmed fallback after clearing a user key; existing pure-function empty-key and precedence coverage remains. No key values are included in assertion messages. The failed run confirmed BuildConfig generation and Kotlin/Java compilation were UP-TO-DATE in the test invocation; subsequent full runs passed. The merged #1412 main run40007656633 passed signing, pack publishing, preview announcement and catalog updates. ## Gradle cache audit fixes Completed-run logs showed setup-gradle was read-only on PRs. Same-repository PRs and branch runs can now persist their own cache entries; fork PRs remain read-only. GitHub cache ref isolation is retained. See [Gradle cache guidance](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md) and [GitHub cache scopes](https://docs.github.com/en/actions/reference/workflows-and-actions/dependency-caching). PR caches consume additional shared quota; no claim of reuse between different PR refs is made. COMMIT_TIME now comes from SOURCE_COMMIT, matching the provenance field and avoiding timestamp changes from temporary PR merge commits. The source tree and pack validation remain unchanged. This enables a meaningful same-commit warm check. Per-commit generated Java metadata may still cause cross-commit recompilation; moving metadata into packaged data is a separate candidate, not part of this patch. Head9835c4e3passed full CI and the same-commit warm rerun below. ## Confirmed final results Both controlled runs use exactly9835c4e3e1and workflow_dispatch, avoiding PR merge-tree changes between attempts. | Measurement | First attempt | Warm attempt | Reduction | | --- | ---: | ---: | ---: | | Request to required gate green | 13m09s | 7m11s | 5m58s (45%) | | Gradle APK build step | 6m11s | 2m08s | 4m03s (66%) | | Android test step | 2m57s | 2m08s | 49s | | Add-on pack build step | 40s | 31s | 9s | [First attempt](https://github.com/Droid-Deck/DroidDeck/actions/runs/40015059221/attempts/1) and [warm attempt](https://github.com/Droid-Deck/DroidDeck/actions/runs/40015059221/attempts/2) both passed. Initial queue delay was 3 seconds in each. This is one observed pair, not a guaranteed latency or isolated attribution of every timing difference to cache changes. The first attempt already had some dependency/build cache reuse. Warm logs confirm the exact head's Gradle-home cache restored; release Kotlin and Java compilation were FROM-CACHE during assembly, then UP-TO-DATE during tests. Assembly reported 22 tasks FROM-CACHE. The Android test executor actually ran; test results were neither cached nor skipped. All four remote pack input hits were hash-verified; packs were regenerated. Runtime inputs and APK native exports/dependencies verified. The ordinary [PR workflow](https://github.com/Droid-Deck/DroidDeck/actions/runs/40013127993/attempts/2) also passed against the updated main merge tree. A fresh Gradle daemon and "no cached configuration" remain expected on a new runner: configuration/task-graph persistence is distinct from build-output caching and currently has no configured encryption key. The measured Kotlin/Java FROM-CACHE results demonstrate output reuse despite that message. This proves same-commit warm reuse. New pushes can still invalidate compilation through changed source, toolchain, generated provenance or pack metadata, and cache eviction/ref scope can cause misses. Cross-commit compilation reuse is not established by this pair. Branch validation intentionally skips main-only publishing; merged #1412's main run40007656633 separately passed signing and publication. The user authorized merging after the final cache-recovery correction passed. ## Final cache-recovery correction Commitc95e1147addresses the remaining minor review finding: after a download passes its SHA check, an unexpected directory at the exact hash-named cache entry is removed before the verified file is promoted. Invalid downloads leave that directory untouched. A regression test covers failed verification, successful repair and subsequent warm reuse. All five focused download tests passed in a clean Linux export. All final-head PR checks passed in [run40018498031](https://github.com/Droid-Deck/DroidDeck/actions/runs/40018498031): host suite ran 1,164 tests (49 platform skips), APK build and native validation passed, Android tests executed successfully, and the source/build validation status is green. Benchmark results above remain measurements of9835c4e3.
DroidDeck brings the SteamOS experience to Android: Valve's Steam client in Big Picture on your Adreno handheld, with Windows games through Valve's ARM64 Proton.
Note: DroidDeck does not have a stand-alone website. Do not click on any download links from websites claiming to be the DroidDeck team.
Requirements and install
Use Android 9 or newer on a supported Adreno device (730 or newer, or 8xx). Adreno 6xx is experimental: DirectX 11 uses DXVK 2 and may run, and DirectX 12 games can still crash. Mali, Xclipse, PowerVR, and Adreno 710 are unsupported. No root is required. Allow about 3 GB for the runtime and 1.1 GB more for the desktop and emulators. Install the APK from Releases, install the Linux runtime, then press Play and sign in. Steam downloads on first launch. Install Desktop & apps to use the desktop and emulators. The Store installs Linux apps and games from Flathub (ARM64 builds) with Flatpak; with additional options to install Appimages and set up scripts. Stores (Setup › Stores › "Show Stores in the rail") signs in to GOG, Epic Games and Amazon Games and downloads games into the Games storage. Epic keeps its direct API install path. Opening Epic Stores prepares Epic’s official Linux launcher preview. When installed, Epic games launched from DroidDeck use that client, and games installed in the client are imported into DroidDeck’s library and shortcuts. The x86-64 client runs through FEX on ARM and DroidDeck retains its Proton hooks; this preview and ARM setup are outside Epic’s listed Linux support. The cog on a store’s chip row sets its opening tab and download speed tier.
On Android 14 and newer, before Steam launches, you must turn on Disable child process restrictions in Developer options. If this option is not available in developer settings (Android 12 and 13 devices), first launch of Steam will present a "Fix it for me" button, which will help automate the setup process.
Smart glasses
Use Setup → Smart glasses for app-wide virtual-screen settings across DroidDeck menus, launchers, desktop sessions, and games. Supported VITURE, RayNeo, XREAL, and Rokid connections provide 3DoF; Luma Ultra adds optional experimental 6DoF and stereo-assisted hand/Joy-Con tracking. Model support and SDK requirements differ: see the smart-glasses support matrix for supported devices, controls, setup, and limitations.
Community
Join the DroidDeck Discord for help, Preview builds, and device reports. Bug reports go in its #bug-reports forum; attach the zip from Share logs (Setup, or the session drawer) so the logs come with it.
Build
Run tools/build_local.sh with Docker, Java 17, the Android SDK/NDK, Rust through rustup, GitHub CLI, Python 3, and zstd installed. It prepares the same native libraries, pinned components and audio sinks as CI, then checks the APK's assets, JNI exports and dependencies. The APK is at app/build/outputs/apk/release/app-release.apk. Set DROIDDECK_PA13_SOURCE_DIR to an existing PulseAudio 13.0 source directory to skip downloading it. Set DROIDDECK_SIGNING_ENV to a signing environment file to install over a release build; relative keystore paths resolve beside that file. To install on an attached device, run tools/deploy_local.sh.
After preparation, ordinary ./gradlew :app:assembleRelease builds can reuse the verified inputs. If native sources, component pins or staged files change, packaging stops with instructions to rerun the helper. Generated audio stays under app/build/; the tracked base bundle is never modified. ./gradlew -PskipRust=true :app:testDebugUnitTest needs no native preparation. For an APK without store engines, use DROIDDECK_SKIP_RUST=1 tools/build_local.sh; it omits cached engine libraries too.
For the prepared Windows checkout, run ./tools/run_windows.ps1 (optionally with -Serial <adb-serial>), or select DroidDeck XR in Android Studio and run the app module on the connected phone. Machine-specific options live in the ignored local.properties: droiddeck.python selects a Python executable, droiddeck.skipRust=true omits the optional store download engines, and droiddeck.debugApplicationIdSuffix=.xr installs DroidDeck XR Dev alongside the signed release. The development app has its own runtime and Steam login. The local Java selection is in .gradle/config.properties.
python tools/prepare_windows_runtime.py restores this checkout's audited runtime inputs from the pinned CI APK, three locally rebuilt preload libraries, and the checksum-pinned Gamescope archive in build/windows-setup/. Start Docker Desktop's Linux engine first: preparation now rebuilds DroidDeck's ARM64 VR driver and Vulkan layer from current source and runs their native regression tests. The compiler image is built automatically on first use. Vulkan headers come from the NDK beside --llvm-strip, or from an explicit --vk-include <NDK-sysroot-include> directory.
To reuse that build, pass --rebuilt-vr build/windows-setup/vr. Preparation verifies its vr-build.json against the current Git revision, source files, Vulkan headers, output checksums, and ARM64 architecture; missing or stale builds fail instead of falling back to the donor's VR libraries. The script checks the actual donor CI merge tree, still rejects unrelated unaudited runtime changes, and records component provenance in app/build/windows-runtime-provenance.json. Preserve these ignored preparation files when rebuilding locally; clean removes the prepared assets and their verification manifest.
Run the helper and preload regression suite with bash tools/test_local.sh. On macOS it runs in Linux through Docker, matching the helpers' runtime and CI instead of compiling Linux preloads against macOS headers.
Limits
Compatibility and performance vary by device; hardware validation is limited. Desktop compositing uses software rendering. Firefox sandboxing is reduced under proot. Logs are kept app-private (files/logs/, the last 30 sessions); Share logs packs the newest session, with the stores and tool logs, into one scrubbed zip.
Credits and licence
GPL-3.0. Runtime, shim, input, and controller work build on WinNative and Bannerlator (maxjivi05). Epic Games and GOG support build on Phobos’s adaptation of Legendary and gogdl, respectively. The registry entries a GOG game's install script (goggame-<id>.script) sets are read the way Heroic Games Launcher's GOG setup (GPL-3.0) reads them. LSFG frame generation is from the work of Camille LaVey and the Eden emulator project, following lsfg-vk, ported to WinNative and DroidDeck by @maxjivi05; it needs your own copy of Lossless Scaling and ships none of its shaders. x86 AppImages, and any whose own runtime cannot unpack them, are unpacked with uruntime by VHSgunzo (MIT), shipped unmodified with its licence, which also starts the arm64 emulator AppImages whose own runtime cannot run its extractor on Android. The Steam client's audio goes through @The412Banner's DirectAudio PulseAudio sink (LGPL-2.1-or-later), built from tools/directaudio/sink with its request size kept to its ring so clients are not asked to queue 100 ms ahead. mmap ring-buffer controller input was developed by ribbit384 (WinNative #345). Why the x86-64 Steam client refused the arm64 client's sign-in was checked by reading Steam's saved token with the ConnectCache format from deadlock-api-ingest. x86 programs that link OpenSSL 3 under FEX use the copy in the Steam Linux Runtime 4.0 platform. Hooks written with WriteProcessMemory into code FEX has translated go through /proc/<pid>/mem again when the kernel refuses process_vm_writev, as Wine's server/ptrace.c wrote them before Wine 11. x86 Linux games under FEX get the same /etc/asound.conf that pressure-vessel writes into the Steam Linux Runtime, so ALSA plays through PulseAudio. Games render with Mesa Turnip's own per-render-pass choice between tile memory and system memory, while the Steam client keeps TU_DEBUG=sysmem; FEX's code disk cache was checked in its source and is already on through Proton. The proot fast path picks the guest name of a host file bound under several names in the order PRoot's path/binding.c (GPL-2.0-or-later) sorts its bindings, so links and /proc/self/fd read back as they do through proot. The session's PipeWire (MIT) opens its sockets with the per-socket access settings documented in its module-access.c, and WirePlumber (MIT) keeps those clients at full permissions through its access.rules. Wine write watches use the userfaultfd support in Proton's dlls/ntdll/unix/virtual.c (LGPL-2.1-or-later): libblsession gives it the arm64 syscall number and answers its PAGEMAP_SCAN from /proc/self/pagemap where Android refuses the ioctl. Wine on arm64 sets a thread's full context by raising SIGUSR2 from syscall_dispatcher_return_slowpath in Wine's dlls/ntdll/unix/signal_arm64.c (LGPL-2.1-or-later); libblsession runs that handler in place on a frame laid out as the Linux kernel's arch/arm64/kernel/signal.c builds it and returns through rt_sigreturn, so proot does not stop the thread for it. Wine's process list reads each process's memory counters from /proc/<pid>/status in fill_vm_counters (Wine dlls/ntdll/unix/process.c, LGPL-2.1-or-later), so libblsession gives those reads the kernel's file instead of a copy with TracerPid cleared. droiddeck-ntsync is checked against the object, wait and error semantics documented for the Linux ntsync driver in Documentation/userspace-api/ntsync.rst (GPL-2.0). See LICENSE. Steam and Proton belong to Valve Corporation; this project is not affiliated with Valve.
XR glasses support builds on WinNative's VITURE glasses work. VITURE protocol details were checked against XRLinuxDriver by @wheaney, including the VITURE protocol header it ships, ar-drivers-rs by @badicsalex and the go-macos/iokit VITURE package; the optional VITURE SDK belongs to VITURE and is not included. RayNeo support adapts @informalTechCode's RayNeo-Air-Series-3DoF-Scaffold (Apache-2.0) and references @verncat's RayNeo-Air-3S-Pro-OpenVR (MIT) and Monado (BSL-1.0); see docs/third-party/rayneo. XREAL 1S support references XRLinuxDriver and xrealOneDeviceKit by @wheaney, xreal_one_driver by @rohitsangwan01 (MIT) and xr-tools by @0xcaff. Rokid support follows the Rokid protocol notes in ar-drivers-rs and @badicsalex's Void Computing write-ups, and Monado's Rokid driver. The REDMAGIC glasses-display findings draw on @mekhontsev's MagicDesk investigation and @Coding-BR's decompiled Nubia kernel. VITURE, RayNeo, XREAL, Rokid and REDMAGIC are trademarks of their owners; this project is not affiliated with them.
Joy-Con VR controllers port the arm model of Google's Google VR SDK for Unity (Apache-2.0), adapt the hand skeleton of Valve's OpenVR handskeletonsimulation sample (BSD-3-Clause), which follows Moshi Turner's hand simulation in Monado, and use the Index controller offsets from Monado's vive_poses.c (BSL-1.0). Joy-Con behaviour was researched in Linux's hid-nintendo driver by Daniel J. Ogorchock, @dekuNukem's Nintendo_Switch_Reverse_Engineering, SDL and the Android Open Source Project, and checked against ALVR, OpenComposite, PSMoveSteamVRBridge, @F8LEFT's JoyConVr, @krnelpan1c's Daydream-Controller-SteamVR, @yoyobuae's joyconvr, Moonlight and Dolphin; see docs/third-party/joycon. Nintendo Switch and Joy-Con are trademarks of Nintendo; this project is not affiliated with Nintendo.
Camera hand tracking runs Google's MediaPipe Tasks Vision library with its Pose Landmarker (Lite) model, BlazePose GHUM 3D, and its Hand Landmarker model (all Apache-2.0), on frames from AndroidX CameraX (Apache-2.0); MediaPipe's usage reports are switched off. The design was checked against @F8LEFT's JoyConVr camera app (MIT), and the short Joy-Con movements follow the accelerometer mode of the Google VR SDK for Unity's arm model, Eric Foxlin's zero-velocity updates and Frosio, Pedersini and Borghese's accelerometer autocalibration, and the camera and Joy-Con are joined by a Kalman filter (R. E. Kalman, 1960). Bare camera hands take their gestures after ALVR's hand_gestures.rs (MIT) and Meta Quest's menu pinch, with distances checked on photos from the HaGRID gesture set (CC BY-SA 4.0, not included), fit the palm with Horn's quaternion method (1987) and smooth it with the 1€ filter (Casiez, Roussel and Vogel, 2012); the white glove model follows Valve's OpenVR render model reference and Index controller poses, is meshed with surface nets (Gibson, 1998; Mikola Lysenko) and blends and shades it with Inigo Quilez's smooth minimum and distance-field ambient occlusion, porting his polygon distance (MIT); see docs/third-party/handtracking.
The Store installs and runs apps with Flatpak (LGPL-2.1). Its sandbox goes through DroidDeck's own bubblewrap shim, which follows how Flatpak hands bwrap its environment. Chromium and Electron apps from Flathub start their browser processes through zypak by @refi64 (BSD-3-Clause); its source was read to see that it always spawns them through Flatpak's spawn portal, which is why DroidDeck starts them directly without Chromium's sandbox instead.
