mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 20:36:04 +00:00
Logs: one folder per session, a device report, and credentials scrubbed
A session used to leave a loose session-<stamp>.log in Download/SteamDeck and a compositor log in a different folder entirely, with Steam's own logs copied beside the first one only if the session exited cleanly - which the sessions worth reading never do. Reports arrived needing three questions answered before anything could be read: what device, which drivers, which settings. Now each session claims Download/SteamDeck/session-<stamp>/ and everything lands in it: device.txt, session.log, wayland.log, steam.log plus steam/ in Steam mode, desktop.log in desktop mode. The folder is claimed by whoever starts first, since the activity starts the compositor before the service starts the session, and the compositor is told where to write through its environment - it opens that file once, so the service also copies it in at teardown, which covers the second and later sessions of one process. device.txt is written before the session starts, so a session that dies in its first second still says what it ran on: model, SoC, Android, kernel, cores and ceilings, RAM, the GPU as KGSL names it, the panel, the driver each half of the session chose, the runtime version, every switch in effect, and whether Android is set to kill the session's child processes. Nothing identifying is collected - no serial, no device or advertising id, no account name, no network names - and Steam's logs are scrubbed line by line on the way in, with Bannerlator's patterns: session tokens (including the bare numeric "Using JWT" form), machine-auth GUIDs, WebAPI keys, Guard codes, emails, and SteamIDs masked to their last four digits so lines still correlate. loginusers.vdf, config.vdf and the ssfn files are never copied. Also from Max: a switch to run proot without its seccomp acceleration (PROOT_NO_SECCOMP=1), for kernels that handle that filter badly - ENOSYS from calls that plainly exist is the signature, which is what the Fold's storm looks like; and the phantom-process warning above, which is his "your OS killed it".
This commit is contained in:
1 parent
13c512de0b
commit
aa047ce942
13 files changed
+516
-15
No files matched your search
@@ -85,6 +85,8 @@ class MainActivity : ComponentActivity() {
|
||||
private var tuSysmem by mutableStateOf(false)
|
||||
private var zinkLazy by mutableStateOf(false)
|
||||
private var noXalia by mutableStateOf(false)
|
||||
private var prootNoSeccomp by mutableStateOf(false)
|
||||
private var phantomWarning by mutableStateOf<String?>(null)
|
||||
private var directAudio by mutableStateOf(false)
|
||||
private var mic by mutableStateOf(false)
|
||||
private var linuxRows by mutableStateOf<List<DriverRow>>(emptyList())
|
||||
@@ -176,10 +178,12 @@ class MainActivity : ComponentActivity() {
|
||||
cores = CpuCores.all.map { c -> CoreRow(c, "cpu$c" + (CpuCores.maxGhz(c)?.let { String.format(java.util.Locale.US, " · %.1f GHz", it) } ?: "")) },
|
||||
clientOverride = clientOverride, clientCores = clientCores, gameCores = gameCores,
|
||||
tuSysmem = tuSysmem, zinkLazy = zinkLazy, noXalia = noXalia,
|
||||
prootNoSeccomp = prootNoSeccomp, phantomWarning = phantomWarning,
|
||||
onClientOverride = { on -> SessionPrefs.setClientCpusOverride(this, on); clientOverride = on },
|
||||
onTuSysmem = { on -> SessionPrefs.setTuSysmem(this, on); tuSysmem = on },
|
||||
onZinkLazy = { on -> SessionPrefs.setZinkLazy(this, on); zinkLazy = on },
|
||||
onNoXalia = { on -> SessionPrefs.setNoXalia(this, on); noXalia = on },
|
||||
onProotNoSeccomp = { on -> SessionPrefs.setProotNoSeccomp(this, on); prootNoSeccomp = on },
|
||||
onClientCore = { core, on ->
|
||||
clientCores = if (on) clientCores + core else clientCores - core
|
||||
SessionPrefs.setClientCpus(this, CpuCores.format(clientCores))
|
||||
@@ -330,6 +334,18 @@ class MainActivity : ComponentActivity() {
|
||||
tuSysmem = SessionPrefs.tuSysmem(this)
|
||||
zinkLazy = SessionPrefs.zinkLazy(this)
|
||||
noXalia = SessionPrefs.noXalia(this)
|
||||
prootNoSeccomp = SessionPrefs.prootNoSeccomp(this)
|
||||
// Android 12 kills the children an app forks itself once there are more than a handful.
|
||||
// A session is nothing but those, so where this is on the OS ends the session and no log
|
||||
// of ours says why. We cannot change a secure setting from here - only say so.
|
||||
phantomWarning = runCatching {
|
||||
android.provider.Settings.Global.getString(contentResolver, "settings_enable_monitor_phantom_procs")
|
||||
}.getOrNull().let { v ->
|
||||
when (v?.lowercase()) {
|
||||
"false", "0" -> null
|
||||
else -> "Android 12 and later kill the extra processes an app starts for itself once there are more than a few, and a session is made of dozens: proot, gamescope, the client and its helpers, Wine. Where that is left on, the client dies with nothing in its log, because nothing in the session did it. Some phones have a \"restrict child processes\" switch in Developer options — turn it off. Otherwise, over adb:\n\n adb shell settings put global settings_enable_monitor_phantom_procs false\n\nThis phone " + (if (v == null) "has not been set either way, so the ROM's default applies." else "currently reports it as on.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun refreshProtons() {
|
||||
|
||||
Reference in new issue
Block a user