Repository navigation
[Kernel/XAM/VFS] Support offline Xbox Live sign-in for DLCs and fix save renames and per-title cache: (#132, #125) - #137
Conversation
…es, and pending thread I/O (#125) - Hash xe::string_key_insensitive case-insensitively so ContentManager::open_packages_ finds and closes packages regardless of root name case (ports Xenia Edge 1551bc340) + validate root names in XamContentCreateEx/XamContentSetThumbnail (ports 93a6be623). - Resolve VFS entry renames across symbolic links, multi-component mount paths (e.g. \Device\Content\N), DOS device prefixes, and root_dir_handle instead of stripping a single path component (ports 39aea998f and 3de73d379). - Overwrite existing HostPathEntry files in place and truncate on final handle close instead of deleting/recreating over open handles (ports 494e2ef67). - Query real host filesystem capacity and free space in HostPathDevice (ports f17accd63). - Drain pending async file I/O before XThread::Exit tears down thread state and keep status_block untouched until completion (ports 896b71158 and f2da83314). - Track allocated kernel object bodies in ObjectTable so ObDereferenceObject resolves non-dispatcher objects such as XAM enumerators cleanly (ports 6f52b23ba and 207a01cf5). - Add native host unit test string_key_test in tools/test-native-logic.sh.
…nd partition formats (#125) - Mount \CACHE per title under storage_root/cache/<title_id> during CompleteLaunch and link \Device\cache0 and \Device\cache1 to \CACHE instead of pre-registering a shared cache: symlink only when mount_cache=true (ports Xenia Edge 7f1689639). - Redirect ObCreateSymbolicLink targets \Device\Harddisk0\Cache0 and Cache1 to \Device\cache0 and cache1, and implement IoDismountVolume and IoDismountVolumeByFileHandle so utility drive unmounts/remounts keep cache: intact (ports 7f1689639 and 4fcace370). - Persist Partition0 cache ownership table (0x800..0xC00) and formatted FATX ('XTAF') cluster sizes in storage_root/cache/Headers/<title_id>.header via NullDevice/NullEntry/NullFile, emptying \CACHE when a title formats a cache partition (ports c628a23df, 4fcace370, and WriteAllBytes from 873672df5). - Add native host test vfs_save_cache_test in tools/test-native-logic.sh covering Mass Effect .tmp save renames across symlinks and multi-component mount paths, in-place overwrites, host disk space reporting, cache: remounts, and Partition0/FATX formatting.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5b880d24d5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| status_block->status = X_STATUS_PENDING; | ||
| status_block->information = 0; | ||
| } | ||
| // The status block is left alone until the request completes. |
There was a problem hiding this comment.
Set queued I/O status blocks to pending
For requests that SubmitRequest queues, such as asynchronous reads and writes, this leaves the caller’s I/O status block untouched until the worker completes. A caller polling a reused status block can see stale success and byte-count values and consume incomplete data while the request is still pending. Set the status to X_STATUS_PENDING and information to zero before posting the request, as the previous implementation did.
Useful? React with 👍 / 👎.
O que muda e por quê
Este PR corrige bloqueio de DLCs por status de perfil offline da Xbox Live (
#132), falhas de gravação/carregamento de saves e montagem de partição de cache (cache:) em Mass Effect (2007) (#125), e registra o diagnóstico técnico completo de#120e#96com base nos logs e no histórico do Xenia Edge.1. Fight Night Champion (
45410915) — DLCs presas mesmo comlicense_mask = -1(Closes #132)license_mask = -1), títulos da EA como Fight Night Champion consultamXamUserGetSigninState,XamUserGetSigninInfo,UserProfile::GetUserFlags()eXamUserCheckPrivilege(0xD1..0xFF), exigindo que o perfil local reporte estadoeXUserSigninState_SignedInToLive(2), flagX_USER_INFO_FLAG_LIVE_ENABLED, XUID online (0x0009...) e privilégios Live concedidos para liberar lutadores/modos de DLC. RetornarSignedInToLiveglobalmente para todos os jogos causaria regressão em títulos que tentam iniciar handshake real de rede na Xbox Live sem backend online.3b2173427,48b318a2a,85b839af6) emxam.h,user_profile.h,profile_manager.{h,cc}exam_user.cc, isolando a lógica pura emuser_signin_util.h.live_signinna categoria[Profiles](falsepor padrão), sem nunca gravar ou alterar o arquivoAccountem disco e preservando o XUID offline (0xE030...) usado nas pastas de save, enquanto deriva deterministicamente um XUID online (0x0009...) apenas nas consultas XAM online.live_signin = trueexclusivamente para Fight Night Champion (0x45410915) em commit isolado emgame_quirks.cc.2. Mass Effect (
4D5307E8) — falha ao salvar/carregar e arquivos.tmpórfãos (Closes #125)xe::string_key_insensitive::hash()sensível a caixa (1551bc340):operator==ignorava caixa, mashash()usavautf8::hash_fnv1a, fazendoContentManager::open_packages_cair em buckets distintos ao abrir"save"e fechar/consultar"SAVE", deixando pacotes (GamerProfile/ saves) presos montados..tmp(Save_player_*_00.tmp) falhando em mounts multi-componente eroot_dir_handle(39aea998f,3de73d379):Entry::Renameremovia apenas 1 componente do caminho (path_parts.erase(begin())), quebrando renames resolvidos para\Device\Content\N\...comX_STATUS_OBJECT_PATH_NOT_FOUNDe ignorandoroot_dir_handleemNtSetInformationFile(XFileRenameInformation).HostPathEntrye espaço livre fixo (494e2ef67,f17accd63):kOverwrite/kOverwriteIfdeletava e recriava o arquivo por baixo de handles abertos; agora trunca/sobrescreve in-place (HostPathEntry::Overwrite()) eHostPathDeviceconsulta capacidade/espaço livre reais do host.XThreade referência de objetos XAM (896b71158,f2da83314,6f52b23ba,207a01cf5,93a6be623):XThread::Exitagora drena requisições assíncronas antes de destruir a thread,SubmitRequestpreservastatus_blockaté a conclusão, eObjectTable::LookupAllocatedBodypermite queObDereferenceObjectresolva objetos kernel não-dispatcher (como enumeradores de conteúdo).cache:ausente por padrão (mount_cache = false) e quebrada em remount/formatação (7f1689639,c628a23df,4fcace370,873672df5):CompleteLaunchpassa a montar\CACHEpor título (storage_root/cache/<title_id>) com links\Device\cache0e\Device\cache1sempre disponíveis paraXMountUtilityDrive(mantendomount_cachecompatível com o schema do app paracache0:/cache1:), redirecionando\Device\Harddisk0\Cache0/Cache1emObCreateSymbolicLink, implementandoIoDismountVolume/IoDismountVolumeByFileHandlee persistindo a tabelaPartition0(0x800..0xC00) + cluster size'XTAF'emcache/Headers/<title_id>.headercom limpeza automática (EmptyTitleCache()) ao formatar.3. Triagem técnica documentada (
#120e#96)#120(Call of Duty 4: Modern Warfare415607E6—"Out of memory"após"The Coup"):xe.loganexado (session_20261107-150649.zip) comprova que não há falta de RAM do Android nem falha de heap do Xenia (zero erros emMmAllocatePhysicalMemoryExouNtAllocateVirtualMemory). O primeiro boot roda 20.407 frames normalmente (F.N.G.->Crew Expendable->The Coup); no frame20407, o jogo chamaXamLoaderLaunchTitle("default.xex")->RelaunchTitle(Setup status=00000000), e 22 frames após o relaunch (f:0020429) a thread principal01000028disparalongjmpem0x82167828(Com_Error(ERR_DROP, "Out of memory")interno da engine IW3).RelaunchTitleafetavam diretamente esse fluxo: o cache compartilhado sem isolamento/formatação por título (corrigido neste PR) e a não-limpeza delaunch_dataapósXamLoaderGetLaunchData(portado do Edge684293925no PR#134). Como não temos mídia de CoD4 para reteste em dispositivo aqui,#120permanece aberta aguardando confirmação em gameplay após ambos os PRs.#96(WWE 2K14545408B2— crash em0x82C79568):v0.2.0 (80237530)semxe.loganexado (solicitado em 27/out sem resposta) e sem commit específico para545408B2no Xenia Edge. Semxe.lognão é possível isolar se o fault em0x82C79568vinha de export kernel, VFS ou JIT/GPU; permanece aguardando log atualizado.Como foi testado
XENDROID_NDK=... bash tools/test-native-logic.sh: 18/18 binários nativos aprovados, incluindo 3 novos testes de host C++:xam_live_signin_test: valida estado offline padrão (SignedInLocally, privilégios Live negados) vslive_signin=trueou conta Live (SignedInToLive,X_USER_INFO_FLAG_LIVE_ENABLED, XUID0x0009...determinístico sem alterar XUID offline, privilégios Live concedidos).string_key_test: valida hash e lookup/erase case-insensitive emunordered_mapparastring_key_insensitive("save"vs"SAVE") preservando sensibilidade a caixa emstring_key.vfs_save_cache_test: reproduz e valida renames de.tmpde saves do Mass Effect via nome simples, symlinksave:\e caminho multi-componente\Device\Content\1\..., sobrescrita in-place com truncamento no fechamento, reporte de espaço livre real do disco, persistência da tabelaPartition0e formatação'XTAF'limpando\CACHE+ remount decache:.aarch64-linux-android29-clang++ -fsyntax-only(viacompile_commands.jsondo build Release NDK29, emHEADe isoladamente em cada um dos 4 commits): 0 erros em todas as 22 unidades de tradução C++ de produção alteradas.:app:assembleRelease -PxendroidReleaseIdSuffix=.fork.ui -PxendroidReleaseDebuggable(NDK 29arm64-v8a+ ThinLTOlibe.so):BUILD SUCCESSFUL.python3 tools/check-jni.py: consistente.Unlocks DLCs that require an Xbox Live-enabled profile in Fight Night Champion and fixes save/load and cache drive failures in games like Mass Effect.
cache:partitions work out of the box.🛠️ Fixed
live_signin, enabled automatically for Fight Night Champion45410915) so profile-gated DLCs unlock even when offline (Fight Night Champion (45410915) DLCs stay locked with license_mask = -1 (needs Xbox Live online profile status) #132)..tmprenames across symbolic links and\Device\Contentmounts, in-place file overwrites, pending async file I/O on thread exit, and per-titlecache:utility drive mounting/formatting for Mass Effect (4D5307E8) ([Bug] Mass Effect (2007) fails to save and load games on XenDroid+ #125).Desbloqueia DLCs que exigem perfil com status Xbox Live em Fight Night Champion e corrige falhas ao salvar/carregar jogos e montar a partição
cache:em títulos como Mass Effect..tmpcorretamente e a partiçãocache:por jogo funciona automaticamente.🛠️ Corrigido
live_signin, ativado automaticamente para Fight Night Champion45410915) para liberar DLCs vinculadas ao status online do perfil (Fight Night Champion (45410915) DLCs stay locked with license_mask = -1 (needs Xbox Live online profile status) #132)..tmpno VFS via symlinks e\Device\Content, sobrescrita de arquivos in-place, drenagem de I/O assíncrono ao encerrar threads e montagem/formatação da partiçãocache:por jogo para Mass Effect (4D5307E8) ([Bug] Mass Effect (2007) fails to save and load games on XenDroid+ #125).