Files
DroidDeck/tools/nativeguest/hook
The412BannerandKurt Himebauch 1772291da7 fix(native): programs started through the rootfs loader show their own command line (#3055)
* fix(native): programs started through the rootfs loader show their own command line

Without proot every dynamic guest program runs as "ld.so --preload <hook>
--library-path <dirs> --argv0 <name> <program> <args>", and the kernel's
/proc/<pid>/cmdline kept all of it. Launchers and the session match programs
by their command line, and Wine only moves its Windows command line over its
loader's name when its arguments follow each other, so the Battle.net launcher
never saw Battle.net.exe, gave up after five minutes and ended the session
with the game still running.

The hook now moves the program's own arguments to the front of that area at
start, as an exec of the program would have laid them out.

* fix(native): programs the app starts natively keep their path for /proc/<pid>/exe

* fix(native): the rewritten command line keeps AT_EXECFN naming the program

---------

Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
2026-11-24 17:48:17 -05:00
..
2026-11-11 09:13:17 -05:00