Commit Graph
2046 Commits
Author SHA1 Message Date
Kurt Himebauch fe6f8638c6 Lay wide session drawer pages out in two columns (#3694)
Keep drawer content composed when changing width, and keep component notes within their groups so columns stay balanced.
2026-12-04 12:15:50 -05:00
Kurt Himebauch 26b11c6838 Keep the session drawer open while the agent's file picker is up (#3696)
Preserve the Agent page and its result handler while the system picker covers the session, including on a docked second screen.
2026-12-04 11:00:09 -05:00
Kurt Himebauch a9f2017aa3 Draw the outline of enabled secondary buttons under the agent's latest reply (#3697)
* Draw the outline of enabled secondary buttons under the agent's latest reply

* Count only the index fetch's own connections in DesktopLanguageIndexSourceTest
2026-12-04 10:25:37 -05:00
Kurt Himebauch bc8a970520 Stop re-arming frame generation after repeated GPU loss (#3659)
Disable frame generation after repeated startup device losses, while preserving recovery for engines that had been working. Keep the current ZeroFG-compatible submission path.
2026-12-04 09:41:39 -05:00
Kurt Himebauch 1d1c29517a Revert "Feat:Add Snapdragon X Elite and Adreno X1 GPU detection" (#3695)
Revert "Feat:Add Snapdragon X Elite and Adreno X1 GPU detection (#3671)"

This reverts commit be98982cfc.
2026-12-04 09:30:22 -05:00
LunaDL be98982cfc Feat:Add Snapdragon X Elite and Adreno X1 GPU detection (#3671)
* feat(gpu): add Snapdragon X and Adreno X1 detection

* fix: resolve Snapdragon X PR conflicts and review findings

* fix: resolve Snapdragon X PR conflicts and review findings

* fix: resolve Snapdragon X PR conflicts and review findings

* fix: resolve Snapdragon X PR conflicts and review findings

* fix: resolve Snapdragon X PR conflicts and review findings

* fix: resolve Snapdragon X PR conflicts and review findings

* test: preserve current SoC mappings and cover QTI X1 fallback

* test: preserve current SoC mappings and cover QTI X1 fallback

* test: preserve current SoC mappings and cover QTI X1 fallback

* fix: keep session TU_DEBUG policy authoritative

* test: preserve explicit TU_DEBUG environment overrides

* chore: remove unused GPU detection import

* test: verify TU_DEBUG defaults stay session-owned

* chore: restart PR CI

* fix: remove duplicate game environment resolver

* fix: preserve session TU_DEBUG defaults for Flatpak and Snap

* fix: only export explicit game TU_DEBUG overrides

* test: correct SoC platform fallback assertions

* test: cover inherited session TU_DEBUG defaults

* test: remove redundant GameEnvironment comment

* fix: preserve Venus game sysmem setting

* test: cover persisted Venus sysmem setting
2026-12-04 09:29:44 -05:00
Kurt Himebauch ed763ecb9b Let the session drawer expand to the screen's left edge (#3691)
Keep the resize grip usable at full width and reserve its touch area from Android Back gestures.
2026-12-04 09:22:27 -05:00
Kurt Himebauch c514c59018 Settings search: open the result's row, scroll to it and flash it (#3657)
* Settings search: open the result's row, scroll to it and flash it

* Opt in to the foundation API the search target uses
2026-12-04 08:56:05 -05:00
Kurt Himebauch b6efc4d44a Updates: Lab builds under the installed build, two panes in landscape (#3667)
* feat(updates): Lab builds under the installed build, two panes in landscape

Lab builds sit under the installed build instead of below the test list,
with kept builds folded behind a toggle while one runs. In landscape the
page splits into two panes that scroll on their own: the installed build,
checks, Lab builds and tester options on the left, the channel picker and
its status on the right. The selected test build expands in place with its
status, notes and install button.

* fix(updates): stack the fallback status above the test list
2026-12-04 08:55:44 -05:00
Kurt Himebauch b61f766b66 fix(session): sleep freezes the programs that run in worker processes (#3665)
With the native session, gamescope, Xwayland, wineserver and the game each run
in a worker process of their own: none descends from the session root, so the
freeze on sleep left them running. On wake the resume still added the frozen
time to the guest clock shift, and every one of them saw its monotonic clock
jump back by the length of the sleep. Unreal games abort on that:
KINGDOM HEARTS III failed with "Detected negative delta time" (DeltaTime
-10.05 s after a 13 s sleep).

The freeze now treats the session's worker programs as helper roots, as the
teardown already does.
2026-12-04 08:54:51 -05:00
Kurt Himebauch 01c8991049 Fix initial controller focus in the frame generation picker (#3689)
Keep engine choices in the session drawer focus tree so the selected engine receives focus on open and the Engine control regains focus on close.
2026-12-04 07:43:45 -05:00
Kurt Himebauch bf8faf06e1 Make frame generation and game zoom controller-friendly (#3669)
Add the session engine picker and the stepped Game zoom slider. Keep Frame Generation in its own tab and use the standard controller focus ring on its buttons.
2026-12-04 07:20:03 -05:00
LunaDL a6ffbe7d81 Add ZeroFG and optional ZeroPacer (#3552)
Add ZeroFG as a frame generation engine with its opt-in pacer. Keep frame generation in the dedicated session tab and keep manual DLL import removed.
2026-12-03 22:29:39 -05:00
Kurt Himebauch 34b78e2e42 Agent chat: open pictures full screen (#3668)
feat(agent): open chat pictures full screen

Tapping a picture in the agent chat, or an attached image, opens it over
the whole window. Pinch or double-tap zooms and dragging pans; a tap, a
swipe down, Back or B, or the close button closes it. It is a popup so it
also works in the pet's chat, which lives in an overlay window.
2026-12-03 22:27:31 -05:00
Kurt Himebauch bd016858c7 fix(agent): keys reach the pet's editor after its chat closes and opens again (#3666)
The pet's chat panel absorbed taps with a clickable disabled while the
chat was closed. A disabled clickable drops its focus node, so closing the
chat removed a node above the still-focused editor and reopening put back a
new, unfocused one in its place. Compose then found no focus target for key
events: backspace and other key presses were dropped, and with the pet's
view focused, DroidDeck crashed with "Event can't be processed because we
do not have an active focus target".
2026-12-03 21:49:50 -05:00
Kurt Himebauch f761e5f1db Change Steam picture position live from the session menu (#3661)
Use independent portrait and landscape alignment, with Top and 1280×800 as the default in Steam portrait. Keep explicit resolutions and existing controls modes.
2026-12-03 21:13:55 -05:00
Kurt Himebauch ebb3bb6373 Default to visible sticks and add live on-screen controls opacity (#3662)
Keep existing settings and touch targets unchanged. Let users dim the touch controls from 100 to 10 percent.
2026-12-03 20:52:28 -05:00
Kurt Himebauch 2aad4fbb1b Keep oversized floating HUD panels from clipping (#3663)
Fit the entire floating panel to its viewport without changing saved HUD scale.
2026-12-03 20:52:15 -05:00
Kurt Himebauch b81d7d796f Default the DroidDeck HUD to FPS and 1% low (#3660)
Keep 0.1% and 0.01% lows opt-in without changing saved choices.
2026-12-03 20:51:53 -05:00
Kurt Himebauch 54e1dcb5a4 Trim own file page cache during sessions under memory pressure (#3439) 2026-12-03 20:38:11 -05:00
The412Banner 10d3b801fa Run original Xbox games from the Xbox store (#3638)
Original Xbox games sold for PC through the Xbox store (Xbox360BackwardCompatibil.* packages: Fuzion Frenzy, BLiNX, Conker, Crimson Skies, Grabbed by the Ghoulies, Morrowind, Red Faction II, ...) now start and play on DroidDeck-Bionic.

- droiddeck-xbox: keep the GameInput redistributable, remove its service class; run install actions with FEX's safe settings; find MicrosoftGame.config in any case and skip one that does not parse.
- droiddeck-game-env: fix rule for these games turns on the emulator fixes in the Wine, FEX and VKD3D-Proton builds made for them.
- Components: each installed game gets the Xbox FEX, VKD3D-Proton and DXVK builds, never over a player's choice (also not one made during the download).
- Xbox store: these games show the size of their console package.
- DroidDeck-Bionic launch.sh keeps the Wine and VKD3D-Proton switches; bionic pack uses the v18 layer with the fixes (released as DroidDeck-Bionic 14.1 r104).
- Xbox backend: purchases that name a legacy marketplace offer reach the library.
2026-12-04 07:57:43 +08:00
Kurt Himebauch 00b354a40a Fix portrait game tabs and compact Library and Store filters (#3658)
Keep About, Launch, and Install in the game detail strip. Use dropdowns for top-level sources in portrait and narrow panes. Default Library title and size overlays to off without overriding saved choices.
2026-12-03 18:38:15 -05:00
Kurt Himebauch 5a18f69c7e Controls below the game: drop the second-screen bar, Steam and Quick Access under the pad (#3653)
* Controls below the game: drop the second-screen bar, Steam and Quick Access under the pad

* Test the keys under the unfolded pad instead of the removed bar

* Keep a touch drawer button below the game
2026-12-03 16:54:04 -05:00
Kurt Himebauch 68af03ac74 Negotiate verified producer fences for Steam game frames (#3651)
Use the verified Gamescope component and preserve the safe copy fallback. Direct game frames remains experimental and off by default.
2026-12-03 16:29:52 -05:00
MaxsTechReview d8bb4a8751 fix(ea): signing out forgets the EA web session so another account can sign in (#3652)
EA keeps its sign-in session in cookies scoped under the sign-in paths
(/connect on accounts.ea.com, /p on signin.ea.com). Sign-out and the
fresh sign-in only listed and expired cookies at /, so the old session
survived and EA signed the previous account straight back in.

Cookie expiry now also covers every path prefix of each sign-in URL, and
the EA sign-in URLs name those paths.

Closes #2457
2026-12-03 16:26:00 -05:00
Kurt Himebauch 312069603a Put the VR session page in More by default (#3655) 2026-12-03 15:54:27 -05:00
Kurt Himebauch 3988f52480 feat(updates): lead with the installed build, one-row channel picker, clearer offer; agent images in chat (#3643) 2026-12-03 15:53:59 -05:00
Kurt Himebauch 59eaa0eb06 fix(agent): after agent setup, Gradle and git work on the device (#3642) 2026-12-03 15:53:28 -05:00
Kurt Himebauch 811e285834 Remove manual Lossless Scaling DLL import (#3654)
Remove the picker and import paths. Ignore manually imported caches; keep LSFG from Steam installations.
2026-12-03 15:45:14 -05:00
Kurt Himebauch f75cb387eb Render the Steam home tab at 60 FPS (#3647)
Raise the shared Steam home idle animation cadence from 30 to 60 FPS without changing mixed-refresh displays or in-game frame limits.
2026-12-03 14:21:26 -05:00
Kurt Himebauch 18d735b4c4 feat(ui): tabs that do not fit a narrow page open as a dropdown (#3640)
* feat(ui): tabs that do not fit a narrow page open as a dropdown

In portrait or on a narrow page, a row of section pills that would scroll
sideways becomes one chip naming the shown section, which opens the list of
sections, as the second screen's picker does. Covers the sheets' pills
(Steam, desktop, glasses, Settings and the others on SheetChips), TabStrip,
the game page's tabs and the Stores chips.

* fix(stores): the compact store picker takes controller focus, survives a hidden store and keeps the signed-out status

* fix(ui): picking the shown tab from the tab menu still activates it
2026-12-03 13:49:09 -05:00
Kurt Himebauch 7138f95c90 fix(onboarding): no wireless-debugging step on first run when the session runs outside the child-process count (#3639)
Before the runtime is installed, the rootfs has no native hook yet, so the
child-process check assumed the next session would be counted and showed
"Finish setup" for wireless debugging. The session stages the hook from the
APK before it starts, so predict the next session from the setting and the
rootfs loader instead; a runtime still to be installed will have one.
2026-12-03 12:45:41 -05:00
Kurt Himebauch 8b3cc7eb15 Wire XR keyboard text into the session input queue (#3631)
Initialize KeyboardHost with the updated key and text callbacks. Keep XR physical-key routing and use the regular ordered compositor queue for text.
2026-12-03 09:54:26 -05:00
Kurt Himebauch f9eeef44ed Keep the last frame visible on manual pause (#3626)
Use the effective zero-copy profile to capture and restore presentation across manual pause and resume, without overriding a disabled preference.
2026-12-03 07:39:12 -05:00
danyi eeb10e02fd Restore Chinese input for Android and Steam keyboards (#1529)
Commit Android IME text through the focused renderer and submit only after delivery is confirmed. Restore Steam pinyin on Ubuntu rc7 and allow older runtimes to start normally without IBus.
2026-12-03 07:36:55 -05:00
FryMcNugget 673675b45e feat(quest): DroidDeck's menu, agent pet and keyboards float in the immersive SteamVR view (#3596) 2026-12-03 07:28:05 -05:00
Tushar Gandhe 153c873898 fix(ui): LB, RB, LT and RT close the keyboard and menus of the page they leave (#3619) 2026-12-03 07:26:39 -05:00
MicroCool cec2e4ed70 Retry rate-limited Robolectric downloads with a Maven Central mirror (#3620) 2026-12-03 07:26:11 -05:00
FryMcNugget 8cf1e60cc2 fix(runtime): thermal zone binds no longer leak into the stand-in for PCI devices (#3595) 2026-12-02 22:22:52 -05:00
LunaDL e3faee459f Fix frame generation controls in Library and Steam settings (#3597)
Restore the frame generation controls and make the Steam menu focus its first enabled option for controller and keyboard navigation.
2026-12-02 20:54:39 -05:00
Kurt Himebauch 4ab9635ceb fix(desktop): run Plasma, its helpers and the apps it opens outside Android's child-process count (#3599) 2026-12-02 18:45:22 -05:00
Kurt Himebauch 34fff40b56 ci: run Kotlin unit tests separately from APK builds (#3566)
Run Kotlin tests beside APK compilation while keeping merge and release checks intact. Pin the APK and test workflows to the same pull request base, retry Robolectric rate limits on both Maven Central hosts, and verify source parity when main advances.
2026-12-02 16:47:42 -05:00
Maksynum 5d05c36033 fix(audio): fall back to standard AAudio and bound startup restarts (#3514)
Fall back to standard audio mode after low-latency failures and cap consecutive startup restarts. On the Pocket Fit Elite, the exact locally signed PR build accepted playback in both DirectAudio modes. The Samsung-specific failure did not reproduce on that device.
2026-12-02 16:34:46 -05:00
JRAlmonte 1a7a116939 feat(ui): add frosted launcher wallpaper and cards (#3559)
Add opt-in frosted wallpaper and cards with separate transparency settings. Keep dialogs solid and fall back to the standard palette when blur or readable contrast is unavailable.
2026-12-02 15:48:36 -05:00
Hay Li bi c7cd7c18e6 fix(ea): the game's own Origin session gets the profile and GetSettings (#3578)
EA games open two LSX sessions: the activation layer's, which holds the launch,
and the game SDK's, which claims the same game but is never trusted. GetProfile
then sent it an empty UserId/PersonaId, which the SDK parses as integers, and
Lost in Random quit on the FormatException. Sessions that claimed the prepared
game now get the profile ids (tokens, codes, licences and entitlements stay with
the trusted session), and GetSettings is answered with the SDK's
GetSettingsResponse instead of ErrorSuccess.
2026-12-02 14:47:36 -05:00
LunaDL e04e38b44c Feat:Add a setting to hide the Smart Glasses shortcut (#3564)
* Add persistent Smart Glasses shortcut preference

* Add Smart Glasses shortcut visibility setting

* Respect Smart Glasses shortcut visibility preference

* Add Smart Glasses shortcut setting strings

* Observe shortcut preference in Smart Glasses settings

* Test Smart Glasses shortcut visibility preference

* Keep shortcut toggle in session settings only

* Expose shortcut preference in global Smart Glasses setup

* Label Smart Glasses shortcut setting

* Verify shortcut setting is available without connected glasses

* Mark new Smart Glasses shortcut labels as English-only

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Add Smart Glasses shortcut translations

* Keep Smart Glasses shortcut labels translatable
2026-12-02 14:44:24 -05:00
LunaDL 90c7dece92 feat(ui): Add dedicated Frame Generation tab and better engine selection ( left side menu ) (#3549)
* feat(ui): add dedicated frame generation drawer tab

* fix(ui): keep frame limit label in display settings

* fix(ui): focus display controls on a stable setting

* feat(ui): simplify frame generation engine and multiplier selection

* chore(ui): clean up frame generation selector imports

* fix(ui): restore controller support in frame generation menu

* refactor(ui): keep frame generation controls always visible

* refactor(ui): show frame generation controls inline

* chore(ui): remove obsolete frame generation focus import

* fix(ui): register frame generation engine focus

* fix(ui): remove obsolete frame generation menu host

* fix(ui): update frame generation menu call sites

* fix(ui): stack frame generation controls and restore focus

* fix(ui): gate legacy frame generation card menu

* fix(ui): gate legacy frame generation sheet menu

* Fix FrameGenMenu call signature

* Show frame generation controls only when opened

* ci: trigger checks

* feat(ui): add always-visible frame generation off option

* feat(ui): keep frame generation controls visible

* feat(ui): add custom frame generation vector icon

* feat(ui): use custom icon for frame generation tab

* fix(ui): restore adaptive LSFG target picker

* fix(ui): remove excess top spacing in frame generation menu

* Fix FrameGenMenu disabled-state handling

* Format FrameGenMenu multiplier row

* Add tighter Frame Generation control spacing

* Tighten Frame Generation drawer spacing

* Replace Frame Generation icon with new vector

* Keep legacy Frame Generation buttons available

* Use legacy Frame Generation buttons outside drawer

* chore: trigger CI
2026-12-02 14:32:24 -05:00
5cd6fe8864 feat(session): run the session outside Android's child-process count (#3338)
* docs: research Android's child-process limit without developer options

* docs: confirm the child-process gaps on the Thor

* feat(session): start long-lived daemons in uncounted worker processes

* feat(nativeguest): hand long-lived programs to uncounted worker processes

* test(session): run the session bus block with dd_spawn

* test(nativeguest): cover the exec handoff's wait and kill

* feat(session): run the session root, its jobs and the gamescope chain outside the child-process count

* feat(setup): the child-process limit no longer blocks Steam while the session runs in workers

* feat(audio): run PulseAudio outside the child-process count

* feat(nativeguest): hand off posix_spawn children and keep handed-off daemons alive

* fix(nativeguest): let Steam end a handed-off game and keep process-group signals

* perf(session): exec a worker as soon as its reply is in and keep two bound ahead; fix review findings

* fix(nativeguest): address review findings in handoff waits, signals and spawn errors

* fix(session): commit each worker launch explicitly and keep workers with the session that asked

* fix(session): let a worker wait for its launch commit on the main thread

* fix(session): confirm handoffs, honour wait selectors and stop spawns at teardown

* fix(session): one owner per handoff exit, worker launch answers and spawn edge cases

* fix(session): send a working directory outside the program's root by its real path

* fix(session): recheck a taken exit's child and commit a launch only on a whole go line

* fix(session): three-step launch, tagged exit reports and lock-free popen and system children

* test(native): popen test shell is static, as the other hook fixtures

* test(native): run the popen test program with a clean environment

* test(native): skip the popen test where a spawn child cannot exec aarch64

* fix(session): confirm the hook before the worker runs, prefer a late report and free a reused pid

* fix(session): tell a reused pid's old entry by start time, not the reaped flag

* fix(session): silent failed launches, bounded spawn requests and held check-gone writes

* test(native): check the unlisted child's status only where a child can exec aarch64

* fix(session): every exit-only waitid goes through the handoff wait

* fix(handoff): exact waitid events, safe exit timer, bounded request receipt

* feat(handoff): hand off shell children near Android's process limit

* fix(agent): tag handed-off game windows outside the reaper

* fix(handoff): a handed-off program's getppid() is its forking process

* fix(handoff): exact waitid selection, kept Steam and pipe readers, held reports

* fix(handoff): getppid() gives init for an exited or replaced parent

* fix(handoff): keep __WALL waitid calls on the handoff path

* test(handoff): require a zombie parent in the unreaped-parent case

* fix(handoff): honor __WNOTHREAD and check every argument for Steam

* fix(handoff): stop waiting on a held entry once its parent has exited

* fix(handoff): __WNOTHREAD on waits for a pid, flags on every shim reap

* fix(handoff): keep the forking thread of each child in the parent

* fix(handoff): a wait that finds no child rechecks live handoffs

* fix(handoff): keep a child's forking thread until its end is taken

* fix(handoff): the thread selector applies to claims in progress too

* fix(handoff): controlling-terminal check via /dev/tty, owned records only

* fix(handoff): a child whose forking thread ended is any thread's

* fix(handoff): a parent /proc cannot read is checked with kill(), then given up

* fix(handoff): one-word fork records, changed only by compare-and-swap

* fix(handoff): watch the forking parent through a pidfd opened at start

* fix(handoff): fork records by pid, a gone thread's children go to the main one

* fix(handoff): keep the parent pidfd through dup2 and check it before use

* fix(handoff): no handoff without fork records, unknown thread state keeps the owner

* fix(handoff): undo a pidfd move when dup fails, recheck it after the poll

* fix(handoff): fresh fork records in a forked child, heir is the first live thread

* fix(handoff): one lock over a pidfd move, its dup and the undo

* fix(handoff): liveness check under the pidfd lock, forget only a reaped pid's record

* fix(handoff): lock only dups onto the pidfd, with signals blocked

* fix(handoff): fork record generations, no pidfd restore after a failed move

* fix(handoff): every dup in a pidfd process locks, fork prep blocks signals

* test(semaphores): tell a child hung in qemu-user from a guest deadlock

* fix(handoff): fork records matched by the child's start time, never removed

* test(semaphores): count only reaped children, only futex waits as emulator stalls

* fix(handoff): a known-start bit in fork records

* fix(handoff): dup bookkeeping before the pidfd lock, newer fork records kept

* fix(handoff): a fork record stays only for the pid's current process

* fix(handoff): keep a pending child's fork record when an older fork records late

* fix(handoff): an unknown-start fork record never replaces a pending one

* fix(handoff): self-recorded forks, ELF and wait option checks, both nofile limits

* test(handoff): find the module in the namespace run under discover too

* fix(handoff): a spare parent pidfd made at start, so a dup2 onto it makes no fd

* test(handoff): require ENOEXEC for an ELF stub; skip the namespace run without binfmt

* fix(hook): change the kept fd list under a sequence lock; readers take a copy

* fix(handoff): one report per handed-off child; stops keep a claim; nested waits keep their selector

* fix(hook): a table made at runtime outlives closes begun before it; unknown-start fork records kept

* fix(handoff): waits look before they reap, so a handed-off fork's child is never reported

* fix(hook): settle waits out earlier epochs; unknown-start fork records kept for any handoff under way

* fix(handoff): generation-checked reap marks, stops taken as stops, close counts reset in a fork

* fix(handoff): one given-up table at most, whole stop codes and rusage, WNOWAIT exits rechecked

* fix(handoff): requests name their session; stops of handed-off programs reported; cancellable look

* fix(handoff): table setup not cancellable; test spawner never runs what it cannot end

* fix(handoff): job-control jobs stay counted; unnamed requests refused; cancel-safe setup

* docs(phantom): job-control jobs stay counted; listed programs report no stops

* fix(handoff): a listed program a shell runs as a job-control job stays counted

* refactor(hook): kept descriptors in their own part, a handoff matched by another program

The descriptors close(), close_range() and closefrom() leave open move from
privileged.c to hook/kept.c (unchanged), so the bionic runtime's exec shim can
build the handoff with them. ddh_try_as() matches DD_HANDOFF against one
program and sends another: the bionic shim sends "/system/bin/linker64 PROGRAM
ARGS" and lists it by PROGRAM. ddh_try() is ddh_try_as() with both the same.

* feat(bionic): hand the bionic runtime's Wine programs to the app's workers

The glibc session's hook never sees DroidDeck-Bionic's processes (Wine on
Android's libc), so a bionic game's Wine programs all stayed counted under the
worker running the tool's launch.sh. The handoff is now built into the
runtime's exec shim (tools/bionic-runtime/handoff.c, part of libexecshim.so):

- hook/handoff.c and hook/kept.c with what the native hook's other parts do
  around them: fork(), close(), close_range(), dup2(), dup3(), and exit() for
  the on_exit() bionic lacks
- bionic's execv(), execvp(), execl*() reach the execve system call inside
  libc, past execshim's execve(); Wine starts its preloader with execv(), so
  the shim defines them on top of its execve()
- a linker64 start is listed by its program
- the app starts a handed-off program from the glibc root's bash, which cannot
  load the runtime's LD_PRELOAD/LD_LIBRARY_PATH: they go as arguments of
  /system/bin/env, which puts them back for the program
- launch.sh keeps DD_SPAWN, DD_SPAWN_SESSION, DD_HANDOFF*, DDH_* and
  DDNATV_ROOT, and its /proc/N/environ reads no longer print "Permission
  denied" for idle workers (2>/dev/null before the redirect)

Pocket FIT, DroidDeck-Bionic 14.1-r67 with this shim and launcher, handoff on:
counted during Brawlhalla 25 -> 17, DiRT Showdown 24-27 -> 16, whole run
28 -> 19-20; with Android's limit on no DroidDeck process and no other app's
process was killed (before: Discord, BatteryLog helpers); DiRT 75 fps either
way. docs/phantom-processes.md: "The bionic runtime".

* fix(bionic): hand off only starts that would succeed here; bionic's execvp fallbacks

Review follow-ups on the bionic runtime's handoff (tools/bionic-runtime/handoff.c):

- A start is handed to a worker only when it would get past execve() in this process: the file is a
  regular executable outside the app's data (Android refuses execve() there), and for a linker64 start
  the program it loads is a readable regular file. A start that failed in the worker failed where the
  caller could not see it, so Wine never tried its next candidate. The hook's own check looked at
  /system/bin/env, not the program.
- A start whose argv[0] is not its file stays here: env starts FILE with FILE as argv[0]. linker64 and
  interpreter starts are unaffected (their argv[0] is the file). An empty argv stays here too.
- Nothing is built for the handoff without DD_SPAWN and DD_HANDOFF.
- execvp()/execvpe()/execlp() follow bionic's: an unset PATH is libc's default, an empty PATH or entry
  is the current directory, and a file the kernel cannot start (ENOEXEC) runs under /system/bin/sh.
- close_range() refuses first > last and unknown flags before it splits the range or unshares the table.
- The debug line reads the table's owner only once the table is seen published.

* fix(bionic): hand off app-data starts only where SELinux lets them run; bare names stay here

Follow-up to 7d95564f7 (review, and a Pocket FIT test of its pack):

- 7d95564f7 kept every start of a file in the app's data here. Wine's preloader is one (a static ELF,
  so execshim.c cannot make it a linker64 start), and where SELinux is permissive, as on AYANEO's
  firmware, it runs: Wine then never reached its loader, and its programs ran here, counted again
  (Pocket FIT: Brawlhalla 26-28 counted vs 16-17 before). Where SELinux enforces, Android refuses the
  exec, here and in a worker alike, and Wine falls back to its loader, which goes as a linker64 start.
  Such a start is now handed off when /sys/fs/selinux/enforce reads 0, and stays here otherwise
  (also when the setting cannot be read).
- The program a start would run is checked with the hook's own ddh_startable() (an ELF the kernel
  loads with its interpreter there, or a script with its interpreter): for a linker64 start, the
  program it loads.
- A file name without '/' stays here: env would look it up in PATH, the exec here in the caller's
  working directory.
- execvpe() skips a PATH entry whose candidate exceeds PATH_MAX (ENAMETOOLONG) instead of copying
  it onto the stack.

* fix(handoff): spawn blocks signals and cancellation across the fork; root flag stored under the stop lock

* fix(handoff): a thread that unshares its fd table keeps its own copy of the kept fds

* fix(handoff): register the kept list's fork handlers before a split takes its lock

* test(handoff): cover WNOHANG with a held forked child, early reaps, blocked waitid and pidfd parents; keep the counted-process exception in translations

* test(handoff): exited-entry precondition, atomic checkpoints, a pidfd-only zombie check; validate the shim hold fd

* test(handoff): WNOHANG with two handed-off children and for a group; a program's exit while its entry is held

* test(handoff): a held exit with no free fd, with and without the parent's pidfd

* test(handoff): held-exit tests require the program's own exit status

* test(handoff): time held exits from the run, and only once the program is at its exit

* perf(handoff): keep the asker's priority, quick tools local, workers bound ahead of a game (#3582)

Three fixes that bring handoff-on speed to within 1-2 % of handoff off
(AIO D3D11 same session: 3196 -> 3520 fps, 1 % low 444 -> 637) with the
same counted processes (benchmark mean 18.5, peak 23):

- A handed-off program keeps its asker's priority. Workers are bound
  from the top app with BIND_IMPORTANT, so Android boosts their main
  thread to THREAD_PRIORITY_TOP_APP_BOOST (-10); the program the worker
  execs inherited it. The asker's nice value is sent with the request and
  set before execve, and a watcher resets it if Android boosts it again.
- Quick script tools (awk, sed, grep, cat, ...) stay where they are when
  the count is near the limit. Sent to a worker, the forked child waits
  (counted) while a worker starts; run locally it is counted for a few ms.
- Workers are bound ahead when a Steam game is queued (16 for 20 s), so
  Wine's services do not wait on zygote forks at game start.

---------

Co-authored-by: The412Banner <the412banner@users.noreply.github.com>
Co-authored-by: The412Banner <205237651+The412Banner@users.noreply.github.com>
2026-12-02 14:02:55 -05:00
Kurt Himebauch 186bae8f3e feat(native): run the desktop, its apps and shells as an ordinary user instead of fake root (#3587)
* feat(native): run the desktop, its apps and shells as an ordinary user instead of fake root

* fix(native): a script's interpreter takes DDNATV_BECOME, so sudo runs scripts as root

* fix(desktop): keep the Plasma start line the pipewire tests slice the script at
2026-12-02 13:50:06 -05:00
Kurt Himebauch 3bb22dc92b fix(native): terminals use the ioctls Android allows on an app's pseudo-terminal (#3585)
* fix(native): terminals use the ioctls Android allows on an app's pseudo-terminal

* fix(native): leave a terminal request alone when its register is read before the high half
2026-12-02 13:47:59 -05:00