fix(ea): bind activation licences to the CPUID of the game's own bitness

The machine hash of activation versions 2 and 3 includes CPUID leaf 1 ECX,
and FEX reports AVX to 64-bit (ARM64EC) processes but not to 32-bit (WOW64)
ones. The hardware probe only ran a 32-bit CPUID program, so 64-bit games
rejected their licence and looped through ActivationUI. The probe now runs
CPUID in both bitnesses, the game gets the values its exe sees, and the
cache is retaken when the Proton or FEX build changes.
This commit is contained in:
The412Banner committed 2026-11-22 14:39:35 +00:00
1 parent 1f70d43fe2
commit 2702ba2db8
3 files changed
+234 -37

No files matched your search

+4 -3
View File
@@ -12,7 +12,7 @@ EA games install, update and start without the EA app. The research behind it is
| Queries | `app/src/main/resources/ea/graphql/*.gql` | EA's own query texts, byte for byte. The gateway matches persisted queries by SHA-256, so these files must not be reformatted (`-text` in `.gitattributes`). |
| Downloads | Rust `src/ea/` in `libdroiddeckstores.so`, `EaInstaller.kt` | A build is one ZIP on EA's CDN. The engine reads its central directory with ranged reads, keeps files whose size and CRC match, and streams every other entry through inflate into place. `.droiddeck-ea-files` records what it placed, so a resume or update does not re-hash those files; files a new build drops are removed. |
| Updates | `EaUpdates` in `EaBackend.kt` | The game page compares the installed version with the offer's live `gameVersion` (every 30 minutes at most). Update runs the same install, which only fetches changed files. |
| Launch, guest | `droiddeck-store-launch` (`prepare_ea`) | Creates the prefix, reads the machine as Wine reports it (`wmic`, `vol`, `hostname`; cached in `pfx/.droiddeck-ea-hw.json`), writes EA app presence keys and the game's `Install Dir` keys in both registry views, runs the build's Touchup once per installed build, then asks the app for the session and writes any licence files. |
| Launch, guest | `droiddeck-store-launch` (`prepare_ea`) | Creates the prefix, reads the machine as Wine reports it (`wmic`, `vol`, `hostname`, CPUID from a 32-bit and a 64-bit probe; cached in `pfx/.droiddeck-ea-hw.json` until the Proton version or its FEX libraries change), writes EA app presence keys and the game's `Install Dir` keys in both registry views, runs the build's Touchup once per installed build, then asks the app for the session and writes any licence files. |
| Launch, app | `EaLaunch.kt`, `EaOoa.kt`, `EaLsx.kt` | Answers `ea-prepare`: starts the LSX endpoint on `127.0.0.1:3216`, mints the short-lived opaque token, writes `.droiddeck-ea-env` (read once and deleted by the launcher `.bat`), and for games with a `Core` folder requests an online-activation licence for the machine hash. |
| LSX | `EaLsx.kt` | The local endpoint EA's SDK talks to instead of the EA app: challenge, AES session key, config, profile, settings, game info, auth codes for the game's own client ids, licences with Denuvo tokens, entitlements. Friends, presence and the overlay answer empty. |
@@ -20,8 +20,9 @@ EA games install, update and start without the EA app. The research behind it is
The licence names a hash of the machine the game's activation layer computes itself. The hash
version follows the activation library's product version (`Core/activation.dll` or `awc.dll`):
5.x → 4, 4.7.6+ → 3, 4.7.x → 2, 4.x → 1. Versions 2 and 3 also need CPUID leaf 1 ECX, which Wine's
WMI does not expose, so those use `00000000` unless the probe learns it.
5.x → 4, 4.7.6+ → 3, 4.7.x → 2, 4.x → 1. Versions 2 and 3 also hash CPUID leaf 1 ECX, which FEX
reports differently to 32-bit (WOW64) and 64-bit (ARM64EC) processes when their AVX support differs,
so the game is sent the CPUID its own exe's bitness sees.
## Not done yet