Commit Graph
9 Commits
Author SHA1 Message Date
The412Banner 9f5c35f088 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.
2026-12-01 08:24:24 -05:00
The412Banner 7d95564f7b 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.
2026-12-01 07:53:20 -05:00
The412Banner 897e108d8a Merge main into research/phantom-process-limit
Brings the PR up to main fcd197934 (124 commits), without conflicts: the bionic
runtime pack now builds against the 11-14.1 layer (build.sh LAYER_URL v18) and
launch.sh carries main's changes since (WINE_NEW_NDIS, steam_pid) with the
handoff's.
2026-11-30 18:26:39 -05:00
The412Banner 2b9ebd8aee 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".
2026-11-30 17:28:29 -05:00
measlesbagel b09e2f9ba7 fix(bionic): pack GStreamer's debug plugin, so game videos play (#3294)
winegstreamer puts a capssetter, from the debug plugin, at the front of
every video stream's conversion chain. Wine creates it by name at run
time, so check-needed.py, which follows linked libraries, could not
catch the missing plugin, and those videos played nothing on Bionic.
2026-11-28 18:07:50 -05:00
The412Banner 1a22d2a1be feat(bionic): build DroidDeck-Bionic on the DroidDeck-Proton 11-14.1 Wine layer (#3389)
The tool still packed the 12.8 layer (v16-unwind). The v18 layer is the build
of DroidDeck-Proton 11-14.1 Bannerlator ships: Valve Wine a47c73f52fd7, the
GE-Proton11-14 picks, and the ARM64EC code-map and unwind fixes 12.8 carried.
Same layout as 12.8 (three more files), so only the pin changes. Tools are
named DroidDeck-Bionic-14.1-rN; the app's version compare offers 14.1 over 12.8.
2026-11-28 18:01:15 -05:00
xlulx ecaec5da01 fix(bionic): run games from a DroidDeck-Proton prefix that start through a launcher (#3336)
* fix(bionic): run games from a DroidDeck-Proton prefix that start through a launcher

Europa Universalis IV, moved from DroidDeck-Proton to DroidDeck-Bionic, never got past its launcher:

- The network adapter list (GetAdaptersAddresses) never answered with the layer's default if_nameindex code, so the
  Paradox Launcher waited forever. launch.sh sets WINE_NEW_NDIS=1 (the layer's getifaddrs code); a game's
  environment can still set 0.
- The game reported "Steam not detected": the prefix still named Proton's steam.exe (PID 0x20) as Steam's running
  client, and here that PID is the program Steam started, which quits after starting the game. launch.sh writes
  the PID this tool's own prefixes carry (0xfffe) before Wine starts.
- Its Workshop mod was missing: DroidDeck-Proton's s: drive names the guest path of the Steam library, which this
  Wine cannot follow. proton gives the prefix's guest drive links their Android paths for the launch; a session's
  start gives them their guest paths back.

* fix(bionic): give each launch its own temporary file for the registry and drive rewrites
2026-11-28 17:40:46 -05:00
xlulx 2dc74f7574 fix(bionic): DroidDeck's DirectAudio settings, the microphone among them, reach Bionic Wine's audio driver (#3277) 2026-11-27 08:27:32 -05:00
The412Banner 9e6f81540f feat(bionic): DroidDeck-Bionic compatibility tool (Wine on Android's libc, no proot) (#3037)
DroidDeck-Bionic: a Steam compatibility tool that runs the game itself on Android's libc (bionic) instead of glibc inside proot. Steam, the stores and the session stay on DroidDeck's Linux side; only the game process leaves proot.

- Listed in the Proton list only when Run without proot is on, in its own row. Its builds are pre-releases on Droid-Deck/DroidDeck-Proton (DroidDeck-Bionic-12.8-rNN, runtime built by .github/workflows/build-bionic-runtime.yml from tools/bionic-runtime); the app installs and updates them like the other extra tools and never makes one the default unless the user picks it.
- With proot on, a launch sent to a bionic tool goes to the newest DroidDeck-Proton (picks stay as set).
- ProtonExtras / ProtonMenu / ExperimentalProtons / droiddeck-proton-extra: bionic pre-releases checked and listed only without proot; updates carry the default and per-game picks over; deleting a tool never follows links out of it. ProtonDefault: picks left on an older bionic build move to the installed one.
- Components: FEX builds for bionic (bionic-stable on DroidDeck-Components); each tool is offered only the FEX builds that fit it.
- Session logs: the bionic game log and its graphics logs are part of Share logs.

Synced with main twice before the merge (latest sync fbed69ce on main 67b82ad9; Build APK and validation green); a local trial merge on main 3e1fc3e6 had no conflicts and the game-environment, Proton-extra and store-launch tests pass.
2026-11-24 23:39:23 +00:00