Skip to content

Add support for loading snapshots and update IGamesCallbacks and IGam… - #3795

Open
NepMods wants to merge 1 commit into
microg:masterfrom
NepMods:fixes/google-play-games-login
Open

Add support for loading snapshots and update IGamesCallbacks and IGam…#3795
NepMods wants to merge 1 commit into
microg:masterfrom
NepMods:fixes/google-play-games-login

Conversation

@NepMods

@NepMods NepMods commented Sep 10, 2026

Copy link
Copy Markdown

Games: Fix snapshot transaction codes so game data (cloud saves) works

Evidence

Transaction codes were extracted from the real Play Games SDK AAR
(com.google.android.gms:play-services-games) via the AIDL Stub onTransact
switch and the client callback implementations, and cross-checked against two SDK
revisions:

Callback / method microG (before) Real SDK
onSnapshotsLoaded(DataHolder) — (missing) 12001
onResolveSnapshotHead(DataHolder, Contents) 12003 12004
commitSnapshotResult(DataHolder) 12004 12005
getSelectSnapshotIntent(...) 12000 12001
loadSnapshots(...) 12001 12002
commitSnapshot(...) 12006 12007
discardAndCloseSnapshot(Contents) 12018 12019
resolveSnapshotHead(...) 15000 15001

The callback mapping is confirmed by the client implementations, e.g.
zzbi.zzt(DataHolder) (12001) builds AnnotatedData<SnapshotMetadataBuffer>,
zzbv.zzs(DataHolder, Contents) (12004) handles snapshot open, and
zzag.zzp(DataHolder) (12005) builds a SnapshotMetadata commit result.

Changes

  • play-services-games/.../IGamesCallbacks.aidl
    • Add onSnapshotsLoaded(in DataHolder data) = 12001.
    • Correct onResolveSnapshotHead12004 and commitSnapshotResult12005.
  • play-services-games/.../IGamesService.aidl
    • Correct the snapshot service codes listed above.
  • play-services-core/.../games/GamesService.kt
    • Implement loadSnapshots(): request the games_lite + Drive appfolder token,
      fetch snapshots via SnapshotsDataClient.loadSnapshotData(), build a
      DataHolder over the player/game/snapshot columns, and deliver it via
      onSnapshotsLoaded (failure returns a non-OK status holder).
    • Populate the snapshot metadata row in resolveSnapshotHead()'s DataHolder
      (id, unique name, title/description, timestamp, duration, progress, device,
      cover image) instead of returning only the player row.
    • discardAndCloseSnapshot() now closes the Contents file descriptor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant