Skip to content

About

Decode and encode GameSir Connect controller-profile share codes (GAMESIR:...) - AES-256-CBC + gzip. Back up, inspect, edit, share.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

gamesir-connect-codec

Decode & encode GameSir Connect controller-profile share codes — the GAMESIR:… strings the app puts on your clipboard when you export a profile.

Turn this:

GAMESIR:ydTB0FPOmgsgM8zU7dw7m5gq6YGJOIhjHySYuruai+T6xx…

…into readable JSON you can back up, inspect, diff, edit, and re-share — and turn edited JSON back into a valid code you can import.

Not affiliated with or endorsed by GameSir. This is an interoperability / backup tool for your own controller profiles. It touches controller configuration only — button maps, dead zones, stick curves, triggers. No firmware, no games, nothing else. The format may change in future app versions.

Why

  • Back up your profiles as plain text in git instead of trusting one app install.
  • Diff two profiles to see exactly what changed.
  • Edit settings the UI makes fiddly, then re-import.
  • Build tooling — profile generators, cross-platform configurators, shareable presets.

Install

pip install -r requirements.txt   # just: cryptography

Usage

CLI

# decode a code to JSON (arg, file, or stdin)
python gamesir_codec.py decode "GAMESIR:ydTB0F…"
python gamesir_codec.py decode -i code.txt -o profile.json
pbpaste | python gamesir_codec.py decode          # macOS; use clip/xclip elsewhere

# encode JSON back into a code
python gamesir_codec.py encode profile.json
python gamesir_codec.py encode profile.json -o code.txt

# strip fields GameSir's importer rejects (e.g. G7 Pro FL2/FR2 paddles) so the
# code actually imports; removed fields are printed so you can re-add them in-app
python gamesir_codec.py encode profile.json --importable

As a library

from gamesir_codec import decode, encode

packet = decode("GAMESIR:ydTB0F…")
print(packet["productType"], packet["diff"]["Sticks"]["Left"]["deadzone"])

packet["diff"]["Sticks"]["Left"]["deadzone"]["beginDeadzone"] = 30
code = encode(packet)        # paste this back into GameSir Connect → Import

What you get

The decoded packet:

{
  "v": 1,
  "appVer": "1.11.3",
  "productType": "G7ProCE",
  "ts": 1700000000000,
  "diff": { "...only the settings you changed from default..." }
}

diff is a sparse overlay on the controller's default profile, so a code only carries what you actually customized. See examples/ for a sample.

Supported controllers

The password and format are hardcoded app-wide, so this works for any controller GameSir Connect supports. The productType field is only a compatibility gate on import (you can't import a G7 profile onto a different pad), not a different key.

Empirically tested on the GameSir G7 Pro (G7ProCE). Reports of other models working (or not) are welcome — open an issue with the productType.

How it works

GAMESIR: + base64( AES-256-CBC( base64( gzip( JSON ) ) ) )

Key and IV come from OpenSSL's EVP_BytesToKey(MD5, password, no salt), which is what Node's legacy crypto.createCipher('aes-256-cbc', password) uses under the hood. Full write-up in FORMAT.md.

Known limitations

GameSir Connect's importer rejects share codes that contain fields outside its base profile template — including codes the app itself exported. On the G7 Pro the upper paddles (FL2/FR2) trigger this, so a straight re-import fails with "invalid profile contents." Use encode --importable to strip those fields (it prints what it removed so you can re-add them in‑app). Full write‑up, root cause, and an app‑only repro: KNOWN_ISSUES.md.

License

MIT.

About

Decode and encode GameSir Connect controller-profile share codes (GAMESIR:...) - AES-256-CBC + gzip. Back up, inspect, edit, share.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages