1. masagrator

    OP masagrator The developper
    Member

    Joined:
    Oct 14, 2018
    Messages:
    3,139
    Country:
    Poland
    I made this tutorial with my own *.cmd file. Tools for easy unpacking files are hard to find and didn't work for me.
    Tool doesn't support putting titlekey manually and never will.

    My pack is good for 5 situations:
    - Unpack only base game from *.NSP file
    - Unpack *.NSP base game patched with *.NSP update
    - Unpack only base game from *.XCI file
    - Unpack *.XCI base game patched with *.NSP update
    - Unpack *.XCI base game patched with *.NCA update that was already inside *.XCI

    What you need is the newest as possible "keys.txt" which can be found in Google or derived from your own Switch with Lockpick tool
    https://gbatemp.net/threads/lockpick-switch-key-derivation-homebrew.525575/
    https://gbatemp.net/threads/switch-7-0-key-derivation-lockpick_rcm-payload.532916/
    As sharing keys is illegal, it cannot be uploaded to my package.

    Unpackv2.zip unlike Unpack.zip can find correct files in NSP to unpack automatically. It will crash if one NSP contains more than one game possible to launch from Home Menu.
    Additionally contains countermeasures in case when there will be different quantity than 1 *.tik file (Execution aborted) or 1 *.xml file (goes to manually drop NCA file).

    Download "Unpack.zip" or "Unpackv2.zip" from attachments and unpack it.
    Put "keys.txt" in the same folder as "Unpack.cmd".
    If your keys file is named "keys.ini" or "prod.keys", you need to rename it to "keys.txt".

    Tested on Windows 10.
    For best results move your game files to unpack folder.

    • For Unpack.zip
      1. Drop your game with *.NSP extension to "Unpack.cmd".
      Wait until window will be refreshed.
      In Unpack folder there is now "ExtractedNSP" folder with unpacked temporary files.

      2. If you don't have update, press ENTER without writing or dropping anything and go to point 3.

      2.1. Drop update file with *.NSP extension to command line.
      Press ENTER.
      Wait until window will be refreshed.
      In Unpack folder there is now "ExtractedNSPatch" folder with unpacked temporary files.

      2.2 Drop correct NCA file (probably the biggest one) from "ExtractedNSPatch" folder to command line.
      Press ENTER.

      3. Drop correct NCA file (probably the biggest one) from "ExtractedNSP" folder to command line.
      Press ENTER.

      4. Now wait until is finished. It will show you where tool unpacked game files.
      If you want to delete temporary files, press two times ENTER when asked. Otherwise close window.
    • For Unpack.zip
      1. Drop your game with *.XCI extension to "Unpack.cmd".
      Wait until window will be refreshed.
      In Unpack folder there is now "ExtractedXCI" folder with unpacked temporary files.

      2. If you have patch with *.NSP extension, go to 2.1.1. if it's with *.NCA extension (Custom XCIs) inside ExtractedXCI, go to point 2.2.1.
      If you don't have patch, press ENTER without writing or dropping anything and go to point 3.

      2.1.1 Drop update file with *.NSP extension to command line. Press ENTER.
      Wait until window will be refreshed.
      In Unpack folder there is now "ExtractedNSPatch" folder with unpacked temporary files.

      2.1.2 Drop correct NCA file (probably the biggest one) from "ExtractedNSPatch" folder to command line.
      Press ENTER. Go to point 3.

      2.2.1 Write "1" and press ENTER.
      Drop correct NCA file (probably the second biggest file) from "ExtractedXCI" folder to command line.
      Press ENTER.

      3. Drop correct NCA file (probably the biggest one) from "ExtractedXCI" folder to command line.
      Press ENTER.

      4. Now wait until is finished. It will show you where tool unpacked game files.
      If you want to delete temporary files, press two times ENTER when asked. Otherwise close window.
    • For Unpackv2.zip
      1. Drop your game with *.NSP extension to "Unpack.cmd".
      Wait until window will be refreshed.

      2. If you don't have update, press ENTER without writing or dropping anything and go to point 3.

      2.1. Drop update file with *.NSP extension to command line.
      Press ENTER.

      3. Now wait until is finished. It will show you where tool unpacked game files.
      If you want to delete temporary files, press two times ENTER when asked. Otherwise close window.
    • For Unpackv2.zip
      1. Drop your game with *.XCI extension to "Unpack.cmd".
      Wait until window will be refreshed.
      In Unpack folder there is now "ExtractedXCI" folder with unpacked temporary files.

      2. If you have patch with *.NSP extension, go to 2.1.1. if it's with *.NCA extension (Custom XCIs) inside ExtractedXCI, go to point 2.2.1.
      If you don't have patch, press ENTER without writing or dropping anything and go to point 3.

      2.1.1 Drop update file with *.NSP extension to command line. Press ENTER.
      Wait until window will be refreshed.
      Go to point 3.

      2.2.1 Write "1" and press ENTER.
      Drop correct NCA file (probably the second biggest file) from "ExtractedXCI" folder to command line.
      Press ENTER.

      3. Drop correct NCA file (probably the biggest one) from "ExtractedXCI" folder to command line.
      Press ENTER.

      4. Now wait until is finished. It will show you where tool unpacked game files.
      If you want to delete temporary files, press two times ENTER when asked. Otherwise close window.
    • Thanks to:
      @SciresM for hactool
      https://github.com/SciresM/hactool
      @Ericjwg for tf.exe
      https://gbatemp.net/threads/extract...tool-for-layeredfs.511156/page-3#post-8157621
      Aacini for findrepl
      https://www.dostips.com/forum/viewtopic.php?t=4697


    Changelog:
    Code:
    #01.04: Pushed another version of Unpackv2 resolving conflicts with findrepl and XCI NCA Patch.
    #08.04: Next Unpackv2 with fixed crashing when NSP doesn't contain XML
    #10.04: Updated echos about different quantity of XML file
    #11.04: Fixed unpacking XCA without patch in Unpackv2
    #05.07: updated hactool to latest build
     

    Attached Files:

    Last edited by masagrator, Jul 5, 2019
  2. Ericjwg

    Ericjwg GBAtemp Psycho!
    Member

    Joined:
    Jul 2, 2015
    Messages:
    3,711
    Country:
    Canada
    cool, cool
     
  3. masagrator

    OP masagrator The developper
    Member

    Joined:
    Oct 14, 2018
    Messages:
    3,139
    Country:
    Poland
    Unpackv2.zip added with automatically choosing NCA file from extracted NSP based on XML file.

     
    Last edited by masagrator, Mar 30, 2019
    MYFW likes this.
  4. babyjoe00069
    This message by babyjoe00069 has been removed from public view by linuxares, Apr 24, 2019, Reason: dont post keys.
    Apr 24, 2019 Show
  5. masagrator

    OP masagrator The developper
    Member

    Joined:
    Oct 14, 2018
    Messages:
    3,139
    Country:
    Poland
    You're probably using modified nsp or you've two games unpacked to the same folder. I'm not supporting first one. Second: delete ExtractNSP before using this tool.
    This tool is only for using not modified NSP/XCI or modified XCI.

    And delete log as it contains licensed keys and sharing them is banned on gbatemp.

    Edit: it looks like post above has been deleted. :P

    I need to check newest hactool as it should resolve issues with 8.0.0 NSPs.
     
    Last edited by masagrator, Apr 24, 2019
  6. babyjoe00069

    babyjoe00069 Member
    Newcomer

    Joined:
    Apr 3, 2009
    Messages:
    47
    Country:
    United States
    Oh shoot was there keys in that msg I posted? I didnt know what is a key then, that was the error I didnt know lol

    — Posts automatically merged - Please don't double post! —

    It was just Dragonball Fighterz I tried to extract that game and got that msg?
     
  7. Manurocker95

    Manurocker95 Game Developer & Pokémon Master
    Member

    Joined:
    May 29, 2016
    Messages:
    1,422
    Country:
    Spain
    I'm trying to extract Yoshi's Crafted World and the nca extracts fine but then I'm getting an error with the keys and they are the ones I use to convert from XCI to NSP so they should be fine :/

    They are from 8.0.1. Does anyone know how to fix it?
     
  8. linuxares

    linuxares I'm not a generous god!
    Moderator

    Joined:
    Aug 5, 2007
    Messages:
    7,821
    Country:
    Sweden
    Dump your keys with Lockpick_RCM and try again?
     
  9. Manurocker95

    Manurocker95 Game Developer & Pokémon Master
    Member

    Joined:
    May 29, 2016
    Messages:
    1,422
    Country:
    Spain
    My keys are fine as I use them for NSP conversion. I doubt dumping them again would work :/

    Edit: Nope, I dumped them again and they are not working. Same issue. They work for XCI > NSP
     
    Last edited by Manurocker95, Apr 29, 2019
  10. Burorī

    Burorī GBAtemp Regular
    Member

    Joined:
    Mar 23, 2018
    Messages:
    213
    Country:
    Belgium
    Everytime I try I get this:

    *Redacted*
     
    Last edited by Foxi4, May 30, 2019 - Reason: Removed copyrighted material
  11. masagrator

    OP masagrator The developper
    Member

    Joined:
    Oct 14, 2018
    Messages:
    3,139
    Country:
    Poland
    This is normal.
    And you should delete log as sharing keys is banned here.

    And if it's not working - it's because hactool has some issues with files made by newest SDKs. I will probably update tutorial to include Squirrel.
     
    Last edited by masagrator, May 29, 2019
  12. Burorī

    Burorī GBAtemp Regular
    Member

    Joined:
    Mar 23, 2018
    Messages:
    213
    Country:
    Belgium
    Squirrel?
     
  13. JarlRobot

    JarlRobot Member
    Newcomer

    Joined:
    Jul 1, 2019
    Messages:
    14
    Country:
    United States
    Nice work, this works perfectly. Are you willing to add the extraction of the logo path as well?
     
  14. masagrator

    OP masagrator The developper
    Member

    Joined:
    Oct 14, 2018
    Messages:
    3,139
    Country:
    Poland
    No, I made this tutorial for game modding.
    And I've updated packages with newest hactool build. Latest one didn't work with newest NSPs and XCIs.
     
    Last edited by masagrator, Jul 5, 2019
  15. JarlRobot

    JarlRobot Member
    Newcomer

    Joined:
    Jul 1, 2019
    Messages:
    14
    Country:
    United States
    Thank you! I'm using this to mod Skyrim, lol.
     
  16. Enderfacio

    Enderfacio Newbie
    Newcomer

    Joined:
    Sep 18, 2019
    Messages:
    6
    Country:
    Argentina
    Hi, I'm having troubles trying to get the SZS files from a NCA. I can´t get the keys from the game I downloaded in XCI because my Switch is not a model compatible with CFW. Is it realy necessary to get keys to be able to generate the SZS files?
     
  17. masagrator

    OP masagrator The developper
    Member

    Joined:
    Oct 14, 2018
    Messages:
    3,139
    Country:
    Poland
    Those keys need to be derived from Switch itself, not game. And yes - they are necessary
     
  18. Enderfacio

    Enderfacio Newbie
    Newcomer

    Joined:
    Sep 18, 2019
    Messages:
    6
    Country:
    Argentina
    Well then I´m on a dead end... because CWF don't work with my Switch.
    If I ask someone here to get those SZS for me, could that happen or is it to much for asking?
     
  19. gamesquest1

    gamesquest1 Nabnut
    Moderator

    Joined:
    Sep 23, 2013
    Messages:
    15,058
    no you cannot ask for people to share copywritten files on gbatemp, I'm sure the keys you need exist somewhere on the internet, but gbatemp is not the place to be asking for any sort of decryption keys or for copies of files

    good luck on your hunt though
     
  20. Enderfacio

    Enderfacio Newbie
    Newcomer

    Joined:
    Sep 18, 2019
    Messages:
    6
    Country:
    Argentina
    Ok Sorry for asking. Thank you for your help
     
    gamesquest1 likes this.
  21. Kaezzine

    Kaezzine Advanced Member
    Newcomer

    Joined:
    Oct 31, 2019
    Messages:
    70
    Country:
    Germany
    I get tf has stopped working every single time.
    keys.txt are mine. Tried with internet keys, same error.
    Deleted the Extracted NSP folder inbetween trials, same thing !
    Extracted NSP folder has all the NCAs even the bigger one but the cmd crash right after NCA extraction to Extracted NSP folder with "tf has stopped working".
    My NSP file is just a base game (Saints Row The Third) not modified. I was just aiming to take a look at the files and see what mods can be applied.

    So what's this error about ? (I used both Unpack v1 and v2, same deal)
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - extract, files,