fix(xbox): hand Xodus a launch folder the Linux guest can see (#2751)

* fix(xbox): log and show why an Xbox launch could not be prepared

* fix(xbox): hand Xodus a launch folder the Linux guest can see

---------

Co-authored-by: Zeratullo <8460122+Zeratullo@users.noreply.github.com>
This commit is contained in:
ZeratulloandZeratullo authored and GitHub committed 2026-11-18 00:23:00 -05:00
1 parent c8b291b9db
commit c7cd2b55af
4 files changed
+19 -3

No files matched your search

@@ -58,7 +58,11 @@ object StoreLaunchRequests {
}
"xbox-renew" -> JSONObject().put("ok", com.droiddeck.launcher.stores.xbox.XboxRuntime.renew(app, request.optString("id"), request.optString("lease")))
"xbox-prepare" -> runCatching { com.droiddeck.launcher.stores.xbox.XboxRuntime.prepare(app, request.getString("id")) }
.getOrElse { JSONObject().put("ok", false).put("reason", "Xbox account service is unavailable. Sign in again and retry.") }
.getOrElse {
StoresState.logLine("Xbox: launch prepare failed (${it.javaClass.simpleName}: ${it.message})")
val reason = (it as? IllegalStateException)?.message ?: "Xbox account service is unavailable. Sign in again and retry."
JSONObject().put("ok", false).put("reason", reason)
}
"ea-prepare" -> runCatching { lastLaunched = Store.EA to request.optString("id"); com.droiddeck.launcher.stores.ea.EaLaunch.prepare(app, request) }
.getOrElse { JSONObject().put("ok", false).put("reason", "error-" + it.javaClass.simpleName) }
"ea-exited" -> {
@@ -18,7 +18,8 @@ internal class XboxLaunchViews {
parent.listFiles()?.filter { it.name.startsWith("launch-") }?.forEach(::remove)
recovered.add(parent.path)
}
return Files.createTempDirectory(parent.toPath(), "launch-").toFile()
// The guest binds the files directory by the path Android reports, not its canonical one.
return File(files, "xbox-runtime/views/" + Files.createTempDirectory(parent.toPath(), "launch-").fileName)
}
companion object {