Subway Surfers
Subway Surfers is a mobile game developed by Kiloo. All the save files consist of the JSON format right after the header, protected by a SHA-1 hash.
Header
'Length' determines the number of bytes are after the header. The value is little-endian.
Name | Data Type | Position | Length |
---|---|---|---|
Magic | Integer | 0 | 0x4 |
Hash | SHA-1 | 0x4 | 0x14 |
Length | Integer | 0x18 | 0x4 |
Hash
The hash is generated from the data starting at the end of the header all the way to the end of the file, and a key. The key is different depending on the type of file it is. When creating a new hash, place the key before the data.
Top Run:
{ 0x47, 0x68, 0x67, 0x74, 0x72, 0x52, 0x46, 0x52, 0x66, 0x50, 0x4C, 0x4A, 0x68, 0x46, 0x44, 0x73, 0x57, 0x65, 0x23, 0x64, 0x45, 0x64, 0x72, 0x74, 0x35, 0x72, 0x66, 0x67, 0x35, 0x36 }Online Settings:
{ 0x70, 0x64, 0x76, 0x73, 0x68, 0x62, 0x68, 0x6B, 0x6E, 0x64, 0x66, 0x39, 0x32, 0x6B, 0x31, 0x39, 0x7A, 0x76, 0x62, 0x63, 0x6B, 0x61, 0x77, 0x64, 0x39, 0x32, 0x66, 0x6A, 0x6B }Player Info:
{ 0x77, 0x65, 0x31, 0x32, 0x72, 0x74, 0x79, 0x75, 0x69, 0x6B, 0x6C, 0x68, 0x67, 0x66, 0x64, 0x6A, 0x65, 0x72, 0x4B, 0x4A, 0x47, 0x48, 0x66, 0x76, 0x67, 0x68, 0x79, 0x75, 0x68, 0x6E, 0x6A, 0x69, 0x6F, 0x6B, 0x4C, 0x4A, 0x48, 0x6C, 0x31, 0x34, 0x35, 0x72, 0x74, 0x79, 0x66, 0x67, 0x68, 0x6A, 0x76, 0x62, 0x6E }JSON
After the header, the rest of the file is under the JSON format for data.
Name | Data Type | Position | Length |
---|---|---|---|
Length Of Name | Byte | 0 | 0x1 |
Name | String | 0x1 | ∞ |
Length Of Value | Byte | … | 0x1 |
Value | String | … | ∞ |