Functions for signing/verifying original Xbox LIVE account data. Also a tool to read/write accounts from/to files, FATX backup images, or FATX formatted devices. Reversed from XOnline and kernel API's
Leaving this here as a reminder to myself. Docs, tool, and pseudo code in repo need fixing up.
Documentation
Cluster size (FATX header struct): Comment states this is hard-coded, this is partially incorrect. There is a function that that bitpacks a cluster size in sectors for partitions (16K, 32K, 64K, etc.), hard-coded is technically true for FATX16 partitions (memcards)
Number of active FAT's (FATX header struct): Incorrectly labeled. Rename to RootDirectoryClusterStartIndex (cluster index pointing to the first directory block)
XBL accounts are not stored in the FATX header on hard drives as stated, this needs to be corrected and state where they are actually stored (sectors 12-19 inclusive). This is still true for memcards (FATX16)
Reserved (Xbox LIVE account struct): This needs to be relabeled as XUID Flags. Comment is still true for memcards but not hard drives, hard drives will not fail verification when XUID Flags are set in the account data stored on the hard drive (memcards will)
Research needed into the different XUID Flags
Tool
Only sectors 0-1 are being checked for FATX magic value, this will not work for hard drives. Must check for magic in the start sector of stock partitions (need to take the LBA48 custom partition table into account as well - for proper partition offsets (all 3 versions))
Signing for hard drives: Seed data will only generate a valid signing key for memcards, need to research which seed data is used for generating the signing key for hard drives (code is okay but the seeding data is wrong for hard drives and will only work for memcards)
Need to add an option for a user to add their XboxHDKey when signing account data for a hard drive else the signing key and signature will be incorrect
Look into another way of enumerating devices so Linux/Mac users can open/save to devices (WMI is not ideal even for Windows)
I can make an xbox live account just fine with the tool. I can save it to my official 8MB Memory Card. I can then load PSO, select the account and log into play. Now if I use the tool and open the device to edit the live account and set a passcode then save it back to the memory card. Then I load PSO and try to log in. It says the passcode is invalid. If I reopen the live account in the tool, the passcode is still what I set it to. If I remove the passcode and save it back to the memory card. I can then log into PSO just fine. I even tried to format the memory card and make a new live account with a passcode. It still fails. Am I doing something wrong or this a problem with the tool? Thanks!