XGameSave data on your PC. Don’t use it while the title is running. Doing so can put the title’s Game Saves in an indeterminate state.
This tool requires the title package to be installed on your PC. This requirement differs from console, where deploying through Visual Studio is sufficient for xbstorage to interact with the title’s Game Saves. You can generate PC packages with makepkg and install them with wdapp install.
If you need to manage
XGameSave data on the console, you must use the Manage XGameSave storage on console (xbstorage.exe).xgamesaveutil reset
xgamesaveutil reset is called, existing saves from the cloud are synced down to the device.
There are two ways to specify the location of the data to delete:
- If the /context parameter is used, and the filename specified by <infile> has a ContextDescription section that is correctly populated, then that file will be used to specify the target PFN and SCID.
- The PFN and SCID can be partially or fully specified through command-line parameters, which take precedence over the respective elements of the specified PFN and SCID from the input file.
Examples
xgamesaveutil import
XGameSave data to:
- If the /context parameter is used, and the filename specified by <filename> has a ContextDescription section that is correctly populated, then that file will be used to specify the target PFN and SCID.
- The PFN and SCID can be partially or fully specified via command-line parameters, which take precedence over the respective elements of the specified PFN and SCID from the input file.
Examples
On PC, this tool writes imported data directly to local storage. It does not sync with the cloud before or after the import, and it does not automatically upload the imported data to the cloud. The data is uploaded the next time the title launches and acquires the Game Saves provider (for example, by calling XGameSaveInitializeProvider).This differs from the console tool (
xbstorage), which syncs with the cloud before importing and uploads the data immediately after.XGameSave storage space in an indeterminate state.
If /replace isn’t specified, the containers that are specified in the input file are erased before the blobs that are specified
in the input file are written. Containers in the XGameSave storage space that aren’t specified in the input file won’t be touched.
xgamesaveutil export
XGameSave storage space to the file specified by outfile. The XML file contains the exported data. For an example, see xgamesaveutil generate. For details about the XML format, see Import and export file format.
There are two ways to specify where to export the XGameSave data from:
- If the /context parameter is used, and the filename specified by <infile> has a ContextDescription section that is correctly populated, then that file will be used to specify the target PFN and SCID.
- The PFN and SCID can be partially or fully specified through command-line parameters, which take precedence over the respective elements of the specified PFN and SCID from the input file.
Examples
On PC, this tool reads data directly from local storage. It does not sync with the cloud before exporting. The exported data reflects whatever is currently on disk, which may not include the latest cloud data.
XGameSave storage space in an indeterminate state.
xgamesaveutil delete
XGameSave storage space.
To do this correctly, you must:
- Ensure the title isn’t running
- Run
xgamesaveutil deleteto delete local data immediately. - Launch the title and acquire the Game Saves provider. This allows
xgamesaveutilto automatically delete the cloud data.
XGameSave data from:
- If the /context parameter is used, and the filename specified by <infile> has a ContextDescription section that is correctly populated, then that file will be used to specify the target PFN and SCID.
- The PFN and SCID can be partially or fully specified through command-line parameters, which take precedence over the respective elements of the specified PFN and SCID from the input file.
Examples
XGameSave storage space, the system attempts to synchronize with the cloud by using the same
logic that runs when the storage space is acquired by a running app.
If an app with the same primary SCID is running, this operation could cause a race condition and put the contents of the
XGameSave storage space in an indeterminate state.
xgamesaveutil generate
Examples
XGameSave storage space, change the Account node in the XML file to something like the following example.
Import and export file format
The XML file that’s used with the import, export, and generate commands has the format that’s shown in the following example.XGameSave storage space for a user, you can use
<Account msa="user@example.com"/> instead of <Account machine="true"/>. Otherwise, the context can be specified
on the command line for import.
Blobs and containers should have the corresponding names given to them by the game or app for which the file is
being generated.
The contents of each blob should be a string wrapped in a CDATA tag, which is generated by calling
CryptBinaryToStringW with the flag CRYPT_STRING_BASE64, providing the data for that blob as a raw-byte
array. Conversely, blob data can be converted back by calling CryptStringToBinary to provide the formerly
encrypted string. For an example of using these two functions, see
CryptBinaryToString returns invalid bytes.
