I spend a lot of time tinkering with my Switch, possibly more than I play games with it. As such I was tinkering with undervolting to see how different settings interacted and managed to get into a bootloop crash naming program id 1f. Because I could boot OFW and other emunands I knew the AMS setup and sd card were fine which lead to a problem in the emummc. I had a backup but it was from a clean install and i wasn't looking forward to re-installing ~1tb of applications. To that end I made a fresh backup in the broken state and gave the backup, keys, and crash logs to Claude code telling it what happened and what I suspected. It dove in, analyzed the logs and confirmed my suspicion of system save corruption. It then went to work building a python script to decrypt the backup extract the saves and start validating them. Ultimately it found corruption in save 40 (The list of installed software) and determined that the corruption was only a single block in the free space of the file. With that it rebuilt the file, I replaced it using NxNandManager and viola, back to a functioning console.
I then asked if it could build something that was more generic that others could use to check and potentially repair save corruption. The results are attached. A python script that can analyze and try to repair corrupt saves. In my case the bad blocks were not corrupting any of the real data so repairing it was trivial. If there as corruption in the data things would have gotten more difficult. The tool attempts to handle all the cases but as I don't make a habit of corrupting data I can't test all possible parts. Feel free to use this at your own risk but don't blame me if it doesn't work.
I then asked if it could build something that was more generic that others could use to check and potentially repair save corruption. The results are attached. A python script that can analyze and try to repair corrupt saves. In my case the bad blocks were not corrupting any of the real data so repairing it was trivial. If there as corruption in the data things would have gotten more difficult. The tool attempts to handle all the cases but as I don't make a habit of corrupting data I can't test all possible parts. Feel free to use this at your own risk but don't blame me if it doesn't work.






