ROM Hack Question How to properly replace & resign edited save data to NAND

kimbra

Well-Known Member
OP
Newcomer
Joined
Jun 6, 2019
Messages
49
Trophies
0
Age
29
Location
United States
XP
1,204
Country
United States
Hello! I think I've made a lot of progress figuring out how to extract game save data from a NAND and inject it back to play on an OFW Switch, but I'm running into a hiccup. If anyone has any insight or can tell me exactly what I'm doing wrong, it would be wonderfully appreciated! :lol:

Here's my exact process step by step:
  1. Use Lockpick payload to create prod.keys on microSD
  2. Use Hekate payload to create boot & NAND backup on microSD
  3. Insert microSD to PC and use HacDiskMount and corresponding appropriate keys to mount and explore the NAND User partition
  4. Copy the game save I want to edit from the save folder within the NAND User partition
  5. Place the save data file and prod.keys in my hactoolnet folder and create both a "sav" and "out" folder as well, then copy the save data file into the "sav" folder too
  6. Create extract.bat in the hactoolnet folder:
    Code:
    hactoolnet.exe -k prod.keys
    hactoolnet.exe -t save "sav/0000000000000019" --outdir "out/0000000000000019"
  7. Run extract.bat and find the workable save data in the out/0000000000000019 folder (file is ffx_002)
  8. Edit the save data (in this case FF10) with a save editor and save the changes to my hactoolnet folder
  9. I now have the edited ffx_002 file, the original 0000000000000019 save data file from the NAND User partition, and an inject.bat in the hactoolnet folder as well:
    Code:
    hactoolnet.exe -k prod.keys
    hactoolnet.exe -t save 0000000000000019 --replacefile /ffx_002 ffx_002
  10. Running inject.bat replaces (and supposedly resigns) my edited ffx_002 save file within the original 0000000000000019 save data taken from the NAND User partition as both are in my hactoolnet folder
  11. Copy the resulting edited 0000000000000019 save data file and, with HacDiskMount still running, explore to the NAND User partition save folder, and paste to replace the 0000000000000019 save data file with the edited one
  12. Unmount the NAND User partition, remove the microSD card from PC, and restore the boots and resulting altered NAND to the OFW Switch using the Hekate payload again
  13. Once completed, take out microSD and reboot Switch to run normally, attempt to play FF10 cart, loading ensues shortly followed by a black screen popup informing the save data has been corrupted with an offer to send a report to Nintendo (I just shut down the console and successfully restore the original boots and NAND at this point to fix)
So I believe I've done everything I need to in order to run edited saves on my OFW Switch, but I'm clearly missing something as it appears the edited save data isn't replacing & resigning correctly. As I said, I would be super appreciative of any insight or solutions anyone can offer. Thanks!

EDIT: Here is a list of resources I've been consulting throughout my trials:
 
Last edited by kimbra,
  • Like
Reactions: YueYongMeng

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,276
Trophies
3
XP
12,041
Country
Poland
Easier wouldn't be:
1. Make nand backup
2. Use Checkpoint to load save
3. Make another nand backup
4. Copy folder with save from second backup to first backup
5. Write to nand first backup
?
Because I assume you want to avoid making crash reports on ofw.
 
Last edited by masagrator,

kimbra

Well-Known Member
OP
Newcomer
Joined
Jun 6, 2019
Messages
49
Trophies
0
Age
29
Location
United States
XP
1,204
Country
United States
Easier wouldn't be:
1. Make nand backup
2. Use Checkpoint to load save
3. Make another nand backup
4. Copy folder with save from second backup to first backup
5. Write to nand first backup
?
Because I assume you want to avoid making crash reports on ofw.
Interesting. What precautions would I take while running CFW for Checkpoint? I’d ultimately like to have no CFW run on my clean Switch whatsoever, but this appears to be a very difficult option. I feel like it’s possible to do from reading through this thread though: https://github.com/Thealexbarney/LibHac/issues/19
 

bootmonster

Well-Known Member
Member
Joined
Oct 26, 2002
Messages
477
Trophies
2
XP
1,756
Country
United States
Hello! I think I've made a lot of progress figuring out how to extract game save data from a NAND and inject it back to play on an OFW Switch, but I'm running into a hiccup. If anyone has any insight or can tell me exactly what I'm doing wrong, it would be wonderfully appreciated! :lol:

Here's my exact process step by step:
  1. Use Lockpick payload to create prod.keys on microSD
  2. Use Hekate payload to create boot & NAND backup on microSD
  3. Insert microSD to PC and use HacDiskMount and corresponding appropriate keys to mount and explore the NAND User partition
  4. Copy the game save I want to edit from the save folder within the NAND User partition
  5. Place the save data file and prod.keys in my hactoolnet folder and create both a "sav" and "out" folder as well, then copy the save data file into the "sav" folder too
  6. Create extract.bat in the hactoolnet folder:
    Code:
    hactoolnet.exe -k prod.keys
    hactoolnet.exe -t save "sav/0000000000000019" --outdir "out/0000000000000019"
  7. Run extract.bat and find the workable save data in the out/0000000000000019 folder (file is ffx_002)
  8. Edit the save data (in this case FF10) with a save editor and save the changes to my hactoolnet folder
  9. I now have the edited ffx_002 file, the original 0000000000000019 save data file from the NAND User partition, and an inject.bat in the hactoolnet folder as well:
    Code:
    hactoolnet.exe -k prod.keys
    hactoolnet.exe -t save 0000000000000019 --replacefile /ffx_002 ffx_002
  10. Running inject.bat replaces (and supposedly resigns) my edited ffx_002 save file within the original 0000000000000019 save data taken from the NAND User partition as both are in my hactoolnet folder
  11. Copy the resulting edited 0000000000000019 save data file and, with HacDiskMount still running, explore to the NAND User partition save folder, and paste to replace the 0000000000000019 save data file with the edited one
  12. Unmount the NAND User partition, remove the microSD card from PC, and restore the boots and resulting altered NAND to the OFW Switch using the Hekate payload again
  13. Once completed, take out microSD and reboot Switch to run normally, attempt to play FF10 cart, loading ensues shortly followed by a black screen popup informing the save data has been corrupted with an offer to send a report to Nintendo (I just shut down the console and successfully restore the original boots and NAND at this point to fix)
So I believe I've done everything I need to in order to run edited saves on my OFW Switch, but I'm clearly missing something as it appears the edited save data isn't replacing & resigning correctly. As I said, I would be super appreciative of any insight or solutions anyone can offer. Thanks!

EDIT: Here is a list of resources I've been consulting throughout my trials:

The thing you are doing wrong here is splitting the -k prod.keys on a separate line. You are essentially running the program twice the way you are doing it so how would it know what keys to apply when injecting the save?

Combine that into one line and your should be good.
 
  • Like
Reactions: kimbra

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Well start walking towards them +1