> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Game Saves tools

> Inspect XBOX Game Saves traffic with Fiddler and use the xbstorage and gamesaveutil command-line tools to export and import local save data.

This article describes using Fiddler for inspecting network traffic, the essential tools and techniques for debugging, and manipulating Game Saves.

## Inspecting Game Saves network traffic

Use Fiddler to inspect and debug network traffic coming to and from your title. For information about Fiddler setup, see the following articles:

* [Fiddler on XBOX devkits](/build/console-features/networking/tools/fiddler-setup-networking)
* [Fiddler on Windows PC](/build/console-features/networking/tools/fiddler-pc)

Fiddler confirms whether the title acquires or releases the title lock, which determines when data syncs to and from the cloud.

Here’s the `PUT` request when a title successfully obtains a lock.

```
PUT /connectedstorage/users/xuid(<XUID>)/scids/<TITLE SCID>/lock HTTP/1.1  
```

Here’s the request when a title releases a lock.

```
DELETE /connectedstorage/users/xuid(<XUID>)/scids/<TITLE SCID>/lock HTTP/1.1
```

The title acquires and releases the lock at different points, depending on the Game Saves API in use.

| Game Saves API | Lock acquisition                                                                                                                                                                                               | Lock release                                                                                                                                         | Notes                                                                                                                                                                                                                                                                           |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| XGameSaveFiles | [XGameSaveFilesGetFolderWithUiAsync](/reference/system/xgamesavefiles/functions/xgamesavefilesgetfolderwithuiasync)                                                                                            | Automatically releases the lock when the device finishes uploading pending changes. This process takes about 15 to 30 seconds after the title exits. | Reacquire the lock when the title resumes by calling [XGameSaveFilesGetFolderWithUiAsync](/reference/system/xgamesavefiles/functions/xgamesavefilesgetfolderwithuiasync). The folder path from the API call stays the same across sessions. The lock might no longer be active. |
| XGameSave      | [XGameSaveInitializeProvider](/reference/system/xgamesave/functions/xgamesaveinitializeprovider) or [XGameSaveInitializeProviderAsync](/reference/system/xgamesave/functions/xgamesaveinitializeproviderasync) | [XGameSaveCloseProvider](/reference/system/xgamesave/functions/xgamesavecloseprovider)                                                               | The title calls [XGameSaveCloseProvider](/reference/system/xgamesave/functions/xgamesavecloseprovider) to release the provider’s resources. Not calling it causes a memory leak.                                                                                                |

For more information about the sync process, see [Understanding the Game Saves sync flow](/build/core-features/common/game-save/game-saves-syncing)

## Manipulating Game Saves

Two tools are available for directly interacting with Game Saves.

* `xbstorage`: Used for local Game Saves on console. For more information, see [Manage Game Saves data on console (xbstorage.exe)](/tools/tools-console/commandlinetools/xbstorage).
* `xgamesaveutil`:  Used for local Game Saves on PC.  For more information, see [Manage Game Saves data on PC (xgamesaveutil.exe)](/tools/tools-pc/commandlinetools/gr-xgamesaveutil).

These tools enable you to import and export individual user or machine-provider storage spaces through .xml files.
For a list of all tool operations, see the respective tool's article.

<Info>The import and export behavior differs between console and PC. See the details below and the respective tool pages for more information.</Info>

### Console (xbstorage)

On console, `xbstorage` operates through the console's Game Saves service. When the tool performs an operation, the system behaves as if the title performs the operation directly.

* **Importing** data causes the console to sync with the cloud first (acquiring a lock and downloading any remote changes), write the imported data locally, and then begin uploading the imported data to the cloud. The upload completes in the background before the lock is released.
* **Exporting** data causes the console to sync with the cloud first, then copy the local data to the output file.

### PC (xgamesaveutil)

On PC, `xgamesaveutil` writes data directly to local disk without going through the Game Saves service.

* **Importing** data writes the containers and blobs to the local disk. The tool doesn't sync with the cloud before or after the import, and it doesn't trigger an upload to the cloud. The imported data is uploaded to the cloud the next time the title launches and acquires the Game Saves provider.
* **Exporting** data reads containers directly from local disk. It doesn't sync with the cloud before reading.

If the device running one of these tools can’t acquire a lock or detects a conflict between the cloud and local containers, the system treats the situation as if the user isn't going to resolve the conflict. In this state, the device keeps one version of the container. The device behaves as if it's offline until the next time the title is launched.

## Reference API documentation

* [XGameSave (API contents)](/reference/system/xgamesave/xgamesave_members)
  * Functions
    * [XGameSaveInitializeProvider](/reference/system/xgamesave/functions/xgamesaveinitializeprovider)
    * [XGameSaveInitializeProviderAsync](/reference/system/xgamesave/functions/xgamesaveinitializeproviderasync)
    * [XGameSaveCloseProvider](/reference/system/xgamesave/functions/xgamesavecloseprovider)
* [XGameSaveFiles (API contents)](/reference/system/xgamesavefiles/xgamesavefiles_members)
  * Functions
    * [XGameSaveFilesGetFolderWithUiAsync](/reference/system/xgamesavefiles/functions/xgamesavefilesgetfolderwithuiasync)

## See also

[Game Saves TOC](/build/core-features/common/game-save/game-saves-toc)


## Related topics

- [Game Saves overview](/build/core-features/common/game-save/game-saves-overview.md)
- [Game save](/build/core-features/common/game-save/index.md)
- [Game Saves (contents)](/build/core-features/common/game-save/game-saves-toc.md)
- [XGameSaveFiles](/reference/system/xgamesavefiles/xgamesavefiles_members.md)
- [Game Saves system dialogs](/build/core-features/common/game-save/game-saves-dialogues.md)
