Hedera_Helix Posted May 6, 2016 Share Posted May 6, 2016 Hello fellow Project Pokémoners, I've come here in the hopes of finding help on fixing my AS save. In short I've found myself in a situation where my e-shop AS save is "corrupted" after a system transfer from a stock O3DS to a stock N3DS. Here's the breakdown of what happened: I managed to hardbrick a 32 GB SD micro card in the transfer process (formatting the SD went wrong), so I had to make due with the 4 GB SD micro instead. Hence, I couldn't transfer all of the titles to the N3DS at once. However, as a noob I figured I could just re-download the titles that I wanted later on (once I could tell what was actually on my SD). And then I made a big mistake-I redownloaded Alpha Sapphire from the E-Shop to the N3DSXL. Yeah, I know. Fail. So, my AS save is now "corrupt" because its secure value doesn't match up to the N3DS's secure value. And now I'm here because I'm a bit lost as to how I can fix my save, I think I get the gist of it, but I have some blanks to fill in. To fix this I need to update the old savefile's secure value to match that of my N3DSXL, and to do that I need to have a way to decrypt my savefiles. Which means installing homebrew and then using either svdt/savedatafiler/suloku's anti-savegame patcher/manual Hex editing? In terms of Homebrew options here's what I have: My O3DSXL that I transferred from (source). No homebrew installed. Ver. 10.7.0-32E My N3DSXL that I transferred to (target). Again no homebrew. Also Ver 10.7.0-32E The SD card from the O3DSXL with everything intact (including the old (encrypted) AS save). So, I should be able to run OOTHax (via Powersaves+OOT retail cart) and then install a9lh. But being the noob that I am, I'm a bit confused about some things (and thus I have some dumb questions): Do I need to homebrew both of my consoles? If so, in what order? (E.g. do I start with getting the secure value off the O3DS or the N3DS?) Since it's the same NNID on both consoles, does that mean that only one console can be homebrewed at a time? Once homebrewed, can a console be restored to stock and still use the fixed save? Many thanks in advance. Link to comment Share on other sites More sharing options...
Kaphotics Posted May 6, 2016 Share Posted May 6, 2016 You can't copy paste save files between consoles without decrypting first. If you can export it with jksm, savedatafiler, or save_manager, then you'll be able to recover it, else nope. Can't decrypt another 3ds's files on another console. Link to comment Share on other sites More sharing options...
Hedera_Helix Posted May 7, 2016 Author Share Posted May 7, 2016 You can't copy paste save files between consoles without decrypting first.If you can export it with jksm, savedatafiler, or save_manager, then you'll be able to recover it, else nope. Can't decrypt another 3ds's files on another console. Because the secure value is kept on the console itself? Hmm...since I don't have any homebrew running atm (but I should be able to install it) does that mean it's impossible? As in, if I were to install Homebrew now (thus gaining access to decrypting) on the O3DS, I wouldn't be able to decrypt the save anyway? Or, does that mean that in order to decrypt the save I have to first system transfer back to the O3DS (so the save is on the matching console)? Then install homebrew (thus gaining access to decrypting the savefile) on that console? Sorry if it's a really dumb question, just making sure I get the hang of things. Link to comment Share on other sites More sharing options...
Guest Posted May 7, 2016 Share Posted May 7, 2016 The secure value is on the save file, and on the savegame FS. Every time you save in a game that uses secure values, it updates the one on the save file and the one on the savegame FS to the same one. If you try to restore an older save file, the secure values won't match up, and it won't work. However, with homebrew, you can remove the secure value from your (decrypted) save file, and the 3DS will accept it without complaining. But the save file you have is encrypted for your O3DS. You can't delete the secure value without the save file being decrypted, and you can't do that unless you are on the specific 3DS that created that save file. You have done a system transfer off from your O3DS to your N3DS. For all intents and purposes, your O3DS is now seen as a different 3DS. I -think- your N3DS is now theoretically the one to be able to decrypt your save file, since you've done a system transfer from the O3DS that created the save file to that N3DS. But because you re-downloaded AS off the eShop instead of transferring it during system transfer, the secure value for AS on your N3DS's savegame FS doesn't match up with the one in your save file anymore, so you can't use it. There might still be hope, but you need to have homebrew access. Your only hope is to get Cubic Ninja, or Ocarina of Time if you have a R4i Save Dongle or Powersaves (or if you know someone else with homebrewed 3DS that can inject the exploit save file in your game.) Then you may be able to place your old save file in the correct folder in your microSD card, and then start up svdt via homebrew. Your 3DS -should- be able to decrypt the save file and extract the decrypted raw "main" file, which you can inject back in. No matter what, DO NOT do a system format on your N3DS. If you do, you would permanently lose the ability to decrypt that save file anymore. You can't system transfer from N3DS to O3DS, so don't bother with that. It wouldn't help anyway, because you would still have the same issue with secure value. You say that you would be able to use oot3dhax via Powersaves. This has the Powersaves oot3dhax save files for 10.7. There will be two different folders for two different cardids. Take "N3DS_E_24576_9221.bin" from both of those folders, in the EUR folder, and try both of them. Then you would want svdt (here). I assume you already know where to put your save file on your microSD, so put it there, and then start up homebrew launcher through oot3dhax once you have it working. Then run svdt and hope and pray that your N3DS can decrypt the save file (which I believe it should, thanks to the system transfer. But I may still be wrong.) Only the game itself cares about the secure value, so even if it doesn't match, you should still be able to see the "main" file over on the left of the screen. If you do, you've succeeded. Copy the "main" file to your microSD card for safekeeping, then copy it back over to your game. Make sure you told svdt to overwrite secure value (it asks when it starts up.) Good luck. If it doesn't work, then it is safe to assume that your save file is lost forever. Link to comment Share on other sites More sharing options...
Hedera_Helix Posted May 8, 2016 Author Share Posted May 8, 2016 Thanks for the detailed response! So in theory, since the system transfer was successful that might mean I can decrypt-since the decryption key could be on the N3DS now. That seems to corroborate with what I read on the thread for Suloku's tool on GBAtemp: https://gbatemp.net/threads/antisavegame-restore-secure-value-updater-ps-acnl-prw-ssb-xy-oras.396644/page-5#post-6162100 I actually misread that postchain initially, so I was under the impression that only the savefile's original system would able to decrypt, hence the dumb question earlier. After re-reading the linked post and yours, I realize that should only be true should the system transfer fails for some reason. Since mine didn't, that's at least one spark of hope for fixing the save. It's settled then, when postal services delivers my Powersaves I know what I'm going to do. Big thanks for the help so far. I'll update on how it goes once I've had a chance to try homebrew out. Link to comment Share on other sites More sharing options...
Guest Posted May 9, 2016 Share Posted May 9, 2016 Yeah, just make sure you don't run the game after you put the save file back in the right folder. Just go straight to the Homebrew Launcher and run svdt on AS. I can't guarantee anything since I've never had to test this, but in theory, it -should- work. If it doesn't, well... I hope you didn't buy a powersaves just for that. I thought you were saying you already had one. At least Powersaves is an alright thing to own for other things. Definitely worth having it for oot3dhax anyway. Even if you couldn't get your save file sorted out, at least you'd have homebrew access. Link to comment Share on other sites More sharing options...
Hedera_Helix Posted May 17, 2016 Author Share Posted May 17, 2016 I did get Powersaves for both fixing this and Homebrew access, always handy in case anything else ever goes wrong I figured, and as it turns out... It was the right thing to do because it worked! I had to use a somewhat different method to fix my save than you suggested, as svdt alone didn't work (dunno why-but having automatic secure value rewriting enabled didn't do the trick), but disabling svdt's automatic secure value rewriting when decrypting the save and then using suloku's tool did! In case anyone else finds themselves in the same spot, here's what I did: Load into Homebrew Launcher (svdt installed) via entrypoint. (OOTHax in my case) Go to svdt and select the AS title. When asked if I "wanted to enable automatic secure value rewriting on restore?" Pressed "B" to disable it. Moved the main save to my PC. Started up AS and initialized the save data, started a new file, saved. Went back to svdt and once again, with anti secure value rewriter disabled, I exported my "new" save. Used Suloku's tool to update the secure value. Injected it back. And...Profit! To make sure what I did would work and for curiosity's sake, I compared the old file and the updated one in HxD, and voilà! There it was, address 0x75E00 properly updated. Thanks to the help and the tools (thanks Suloku!), I saved the majority of my Living Dex progress, my breeder Ditto, and my complete Vivillon collection! :kikkoman: Again, big thanks for the help! Link to comment Share on other sites More sharing options...
Guest Posted May 17, 2016 Share Posted May 17, 2016 The reason why secure value wasn't being overwritten properly is because you need to save at least once in-game after having installed the game, otherwise the secure value is set to 00 00 00 00 00 00 00 00. When you save once in-game, that secure value properly gets created, and then svdt's anti-anti savegame restore for overwriting the secure value works as intended. Link to comment Share on other sites More sharing options...
suloku Posted May 18, 2016 Share Posted May 18, 2016 The reason why secure value wasn't being overwritten properly is because you need to save at least once in-game after having installed the game, otherwise the secure value is set to 00 00 00 00 00 00 00 00.When you save once in-game, that secure value properly gets created, and then svdt's anti-anti savegame restore for overwriting the secure value works as intended. Not really true: svdt gets current secure value by reading the one from the current savegame in the 3ds. It is now possible to delete secure value from userland, but most people have cfw and use jk savemanager now and I haven't had time to update svdt so it erases secure value upon restore. Link to comment Share on other sites More sharing options...
Guest Posted May 18, 2016 Share Posted May 18, 2016 Wait, it reads secure value from the savegame FS or from the save data (main)? Because I wanted to restore my AC:NL save file that I had backed up, after having re-installed the game, and svdt said that secure value was set to 00 00 00 00 00 00 00 00. Then when I restored the save file, it kept giving me the "this isn't the latest save data" etc. etc., until I actually started a new save and got up to the point where I could save, and then the secure value got set to something, and restoring my old save file worked. So how does it work exactly, then? Link to comment Share on other sites More sharing options...
suloku Posted May 18, 2016 Share Posted May 18, 2016 Svdt reads the secure value from the save in the save filesystem, so it relies in the save being valid (aka having a valid secure value). As I said, this could be updated, but meladroit isn't actively developing and I haven't had time to add secure value clearing to svdt. Also, jk savemanager is (for the majority of users) better if you have cfw (easier to use). Link to comment Share on other sites More sharing options...
Guest Posted May 18, 2016 Share Posted May 18, 2016 That's pretty much what I said, no? Because you haven't saved yet, the secure value in the savegame fs is invalid (has never been set), so it doesn't work until you saved at least once in-game. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now