Manually updating romfs.bin for backups

Discussion in 'Switch - Backup Loaders & Modchips' started by GOTBLZ, Jul 2, 2018.

  1. GOTBLZ
    OP

    GOTBLZ Member

    Newcomer
    1
    Jul 2, 2018
    Australia
    Hey guys,

    I just worked out how to apply update nca files to original cartridge ncas. I'll use Kirby Star Allies as an example.

    I used XCI-Explorer to pull the largest .nca out of the games .xci file (which I named kirbystock.nca), and then had the update .nca (which was named kirbyupdate.nca) file too and used hactool to dump Section1 from them both, which gave me a romfs.bin with a file size of >3GB.

    So with hactool, your command would be something like

    hactool.exe -k keys.dat --titlekey=3676***8E3725A*****837AC6F1***303 --basenca="kirbystock.nca" --section1="atmosphere\titles\01007E3006DDA000\romfs.bin" --exefsdir="atmosphere\titles\01007E3006DDA000\exefs" "kirbyupdate.nca"

    I blanked out some of the update's title key, as i'm not sure if it's allowed to be posted here, but you can find it on Google i'm sure, or at least the way to find it yourself. So titlekey=(the title key that's used for the update.nca), you'll be then left with a folder ready to copy straight to your Switch, of course if your swapping it over another title, you need to edit the main.npdm to change the title ID.
     
  2. Type_O_Dev

    Type_O_Dev GBAtemp Fan

    Member
    5
    Dec 12, 2017
    United States
    will this work with DLC?
     
  3. Wiiunator

    Wiiunator GBAtemp Regular

    Member
    3
    Nov 13, 2015
    Australia
    be interested to see if we can somehow rebuild these files back into XCI in order to load them with SX OS. There are some research made in that regard in the HACBuild thread
     
  4. Type_O_Dev

    Type_O_Dev GBAtemp Fan

    Member
    5
    Dec 12, 2017
    United States
    what thread?
     
  5. huma_dawii

    huma_dawii GBAtemp Addict

    Member
    7
    Apr 3, 2014
    United States
    Planet Earth
    OMG! So, it does work! Now, how did you get the key for the update? can i get a key, how does this works.
     
  6. Wiiunator

    Wiiunator GBAtemp Regular

    Member
    3
    Nov 13, 2015
    Australia
    Last edited by Wiiunator, Jul 2, 2018
  7. Zumoly

    Zumoly GBATemp Analyst

    Member
    4
    Apr 27, 2018
    Mali
    Yorosso
    Is the romfs.bin a folder now containing the update too or is it still a single file?
     
  8. GOTBLZ
    OP

    GOTBLZ Member

    Newcomer
    1
    Jul 2, 2018
    Australia
    No, romfs.bin is still a file, for some reason hactool is able to join the two .ncas into one romfs.bin. Which is funny, cause I couldn't dump anything but the exefs files from the update .nca, it'd ignore any attempt to extract a romfs.bin from it, so I attempted extracting just sector1 as thats the romfs.bin anyway, and it extracted them both merged into one single file, which loads up perfectly, my main screen on Kirby says 2.0.0, and then I get the message to say about the new characters in the update.

    The titlekey is linked to the update itself, its a damn pain to extract, but I bet if you Google something like ( kirby star allies "titlekey" ) no doubt someone has leaked it somewhere in the internet...

    *Oh, and I don't see why this wouldn't work with DLC i'd image you could get it into a nca format pretty easily, and from there, you just need to follow those steps and I reckon it'd work*
     
    Last edited by GOTBLZ, Jul 2, 2018
    Assasin1990 and Zumoly like this.
  9. huma_dawii

    huma_dawii GBAtemp Addict

    Member
    7
    Apr 3, 2014
    United States
    Planet Earth

    Everything cool and nice but this is what I get when I try that.


    D:\Desktop\SWITCH\hactool>hactool.exe -k keys.dat --titlekey=7FD54*****4038AC2B39****B887E4 --basenca="stock.nca" --section1="atmosphere\titles\01007AD00013E000\romfs.bin" --exefsdir="atmosphere\titles\01007AD00013E000\exefs" "update.nca"
    Invalid NCA header! Are keys correct?
    Done!
     
  10. Type_O_Dev

    Type_O_Dev GBAtemp Fan

    Member
    5
    Dec 12, 2017
    United States
    the problem i had was spaces in source folder names , remove them to run properly
     
  11. huma_dawii

    huma_dawii GBAtemp Addict

    Member
    7
    Apr 3, 2014
    United States
    Planet Earth
    You see any space in my folder names?

    do I need the "" quotes?
     
    Last edited by huma_dawii, Jul 2, 2018
  12. Type_O_Dev

    Type_O_Dev GBAtemp Fan

    Member
    5
    Dec 12, 2017
    United States
    where the files are located not the command your typing

    c:\switch stuff\xenoblade chronicles.xci
    renamed
    c:\switchstuff\xeno.xci
     
    Last edited by Type_O_Dev, Jul 2, 2018
  13. huma_dawii

    huma_dawii GBAtemp Addict

    Member
    7
    Apr 3, 2014
    United States
    Planet Earth
    Mine is
    D:\Desktop\SWITCH\hactool



    Note that it says Invalid NCA headers and I have no idea what that means.
     
  14. Type_O_Dev

    Type_O_Dev GBAtemp Fan

    Member
    5
    Dec 12, 2017
    United States
    Ya I just reread you post, my fault I had the same error and I did two things I added new keys.txt and the above
     
  15. Zumoly

    Zumoly GBATemp Analyst

    Member
    4
    Apr 27, 2018
    Mali
    Yorosso
    Good! I'm now going to experiment with it.
     
  16. GOTBLZ
    OP

    GOTBLZ Member

    Newcomer
    1
    Jul 2, 2018
    Australia

    What update are you trying to use?

    You don't have to remove spaces if you have any, just be sure to put a " after the = and " at the end of that variable, so ex, --basenca="kirby's stock file.nca"
     
    Last edited by GOTBLZ, Jul 2, 2018
  17. huma_dawii

    huma_dawii GBAtemp Addict

    Member
    7
    Apr 3, 2014
    United States
    Planet Earth
    Its Super Bomberman R, update from my SD CARD (OFW)
     
  18. arapozo

    arapozo GBAtemp Regular

    Member
    3
    May 19, 2008
    Is this for updating the games offline?
     
  19. GOTBLZ
    OP

    GOTBLZ Member

    Newcomer
    1
    Jul 2, 2018
    Australia
    I think you've got the right key, but maybe because its hex it might need to be backwards, i'll pm you what I get, and you can see if it works
     
  20. huma_dawii

    huma_dawii GBAtemp Addict

    Member
    7
    Apr 3, 2014
    United States
    Planet Earth
    Thank you.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice