RELEASE hacPack - Build and Repack NCAs and NSPs

Discussion in 'Switch - Emulation, Homebrew & Software Projects' started by The-4n, Oct 2, 2018.

  1. The-4n
    OP

    The-4n GBAtemp Regular

    Member
    8
    Aug 3, 2018
    United States
    hacPack is a tool for make/build and repacking ncas and nsps

    with hacPack, you can mod your game and repack them into nsp, make custom ncas and nsps, remove and add contents to ncas and etc...
    there's also a gui interface for hacPack to make it easy to use for everyone, but cli is version is recommended

    Current version: v1.36-r2

    https://github.com/The-4n/hacPack/
    https://github.com/The-4n/hacPack/releases

    Changelog:
     
    Last edited by The-4n, Jan 19, 2019
  2. pietempgba
    This message by pietempgba has been removed from public view by porkiewpyne, Oct 2, 2018, Reason: Useless post is useless.
    Oct 2, 2018
  3. Dennieh

    Dennieh Member

    Newcomer
    2
    Aug 4, 2018
    Germany
    A forest in Bavaria
    first of all: thank you!
    isnt really a problem but is there an specific reason why it doesnt just use the prod.keys in the .switch folder like hactool?
     
  4. The-4n
    OP

    The-4n GBAtemp Regular

    Member
    8
    Aug 3, 2018
    United States
    they get outdated by every major new firmware update and cause some problems
    i prefer to remind ppl they need keys for my programs so they always care that their keys are updated
     
    Last edited by The-4n, Oct 2, 2018
  5. Dennieh

    Dennieh Member

    Newcomer
    2
    Aug 4, 2018
    Germany
    A forest in Bavaria
    ah ok
    well i updated my keys and was a bit suprised when it said it didnt found them. but thats an neat idea
     
  6. DarkUnixOs

    DarkUnixOs Member

    Newcomer
    2
    Aug 12, 2018
    Puerto Rico
    Great great job ben looking for this release thanx again!
     
    The-4n likes this.
  7. The-4n
    OP

    The-4n GBAtemp Regular

    Member
    8
    Aug 3, 2018
    United States
    hippy dave and 8BitWonder like this.
  8. duckbill007

    duckbill007 Advanced Member

    Newcomer
    4
    May 5, 2011
    Russia
    Can you provide examples of CLI options to:
    1) Unpack retail NSP file to it's contents
    2) Pack it back to nsp after changing resources
    ?
     
  9. The-4n
    OP

    The-4n GBAtemp Regular

    Member
    8
    Aug 3, 2018
    United States
    you can unpack your nsps with hactool
    hacPack is just for repacking them

    here are the examples of packing ncas/nsps with hacPack:
    https://github.com/The-4n/hacPack/tree/master/docs

    there's also a GUI version which runs cli command in background

    overall, even making ncas with sdk is not an easy job
     
    chrisfand and duckbill007 like this.
  10. duckbill007

    duckbill007 Advanced Member

    Newcomer
    4
    May 5, 2011
    Russia
    I see. Thank you.
     
  11. vebririon

    vebririon Advanced Member

    Newcomer
    1
    Mar 8, 2016
    France
    thanks for utility, sadly, i tried it, and i cant install the custom nsp file, (result : 0x00320002)

    i have modified the romfs content by changing some file by some other for the game named "the binding of isaac", those files are universal for PC/PS4/vita etc etc, some other mod already works perfectly, but this one replacing the original image on an in game item by a modified image on an in game item + description make me fail hard for weeks now :'(
     
  12. The-4n
    OP

    The-4n GBAtemp Regular

    Member
    8
    Aug 3, 2018
    United States
    did you uninstall the game before re-installing it?
    and also did you remake meta nca?
     
  13. vebririon

    vebririon Advanced Member

    Newcomer
    1
    Mar 8, 2016
    France
    yes, game is already uninstalled before trying to install the new created one.

    The 4 nca files are extracted from the .xci game (3 old, 1 new created and replaced by yours, btw should i rename it to the last .nca name ? "c097bf8c8be17b765c012021ba33a789.nca" is the new created nca with modified files, size 583 413 ko | "fd85349fd867558b0bca88fdddca4a73.nca" is the old file, size 581 905 ko)

    also, should i rebuild the game from the xci file or from the nsp encrypted one ? does it change anything ?
     
  14. The-4n
    OP

    The-4n GBAtemp Regular

    Member
    8
    Aug 3, 2018
    United States
    use 4nxci to convert xci to nsp
    extract the nsp (don't use 4nxci extracted files)
    extract remake your program nca
    delete your meta nca (.cnmt.nca) and remake your meta nca
    pack them into nsp

    also tell me the result
     
  15. vebririon

    vebririon Advanced Member

    Newcomer
    1
    Mar 8, 2016
    France
    trying right now, thanks a lot for helping !
     
  16. vebririon

    vebririon Advanced Member

    Newcomer
    1
    Mar 8, 2016
    France
    i'm stuck here :

    i got my extracted NSP here :

    [​IMG]

    +

    [​IMG]
    (files are already replaced on the romfs folder)

    keyset field on hacpack GUI is the keys.txt i've build from my own switch right ? (i prefer to be sure)

    i have to delete both cnmt.nca + cnmt.xml ?

    also, i dont know how to remake new files :/

    [​IMG]

    new modified nca created, do i have to rename it to the previous original nca name ?


    " a65e6e2c3ff8fb76cc36b86e0d2b4981.nca to => 94d0d724f51748ae664977ca174118ca.nca "

    edit :

    i can see the "meta NCA part on hacPack GUI, but i dont know wich file i should use for every categories:/

    [​IMG]
     
    Last edited by vebririon, Oct 4, 2018
  17. The-4n
    OP

    The-4n GBAtemp Regular

    Member
    8
    Aug 3, 2018
    United States
    well delete .cnmt.xml, .cnmt.nca and your program nca
    make program nca (btw, logo is program nca section2 and you can extract it with --section2dir= in hacotol) there's no need to rename it
    after that, go to meta nca tab, chooe your program nca and control nca, also choose the nca type with manual content type as legal information, it'll make new .cnmt
    after that put your program and meta ncas in the same directory of other ncas and go to make nsp tab and make nsp
     
  18. vebririon

    vebririon Advanced Member

    Newcomer
    1
    Mar 8, 2016
    France
    that's the problem i think, i dont know how to fill the program NCA/control NCA/legal information NCA/offline manual NCA/ data NCA field :'(

    program NCA is the fresh created NCA ?

    but what is the control NCA one ?

    also, i tried to use hactool.exe, but it crash everytime i start it, i might be too stupid -.-
     
    Last edited by vebririon, Oct 4, 2018
  19. The-4n
    OP

    The-4n GBAtemp Regular

    Member
    8
    Aug 3, 2018
    United States
    how did you extract exefs and romfs?
     
  20. vebririon

    vebririon Advanced Member

    Newcomer
    1
    Mar 8, 2016
    France
    i used NCA-NSP-XCI_TO_LayeredFS.bat :

    choice 2 then 1 then drag and drop my nsp file created with 4nxci

    [​IMG]

    wich gave me

    [​IMG]

    then used again NCA-NSP-XCI_TO_LayeredFS.bat, choice 1 then 1 then drag and drop the biggest nca file extracted above
     
  21. The-4n
    OP

    The-4n GBAtemp Regular

    Member
    8
    Aug 3, 2018
    United States
    your program nca is the one you created in nca section
    your control nca is the one with 296k size, your legal information nca is the one with 134k size
    idk if the tool you are using works fine or not but make sure to make your hactool working, it's a great app for this purpose
     
Loading...