RELEASE [OFFICIAL] 4NXCI - A tool for converting XCI to NSP

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

  1. The-4n
    OP

    The-4n GBAtemp Regular

    Member
    7
    Aug 3, 2018
    United States
    4NXCI is a tool for converting XCI(NX Card Image) files to NSP
    4NXCI is based on hactool by SciresM

    Usage:
    You should load your keyset file with -k or --keyset option followed by a path to it or place your keyset file with "keys.dat" filename in the same folder as 4NXCI
    Created NSP files are located in the same folder as 4NXCI with 'titleid.nsp' filename
    4NXCI creates "4nxci_extracted_xci" folder as a temp folder, you can remove it after the conversion is done

    Code:
    *nix: ./4nxci [options...] <path_to_file.xci>
    Windows: .\4nxci.exe [options...] <path_to_file.xci>
     
    Options:
    -k, --keyset             Set keyset filepath, default filepath is .\keys.dat
    -h, --help               Display usage
    --tempdir                Set temporary directory path
    --outdir                 Set output directory path
    --dummytik               Skip creating and packing dummy tik and cert into nsps
    
    Current version: v2.10

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

    Change log:
     
    Last edited by The-4n, Dec 2, 2018
  2. The-4n
    OP

    The-4n GBAtemp Regular

    Member
    7
    Aug 3, 2018
    United States
    new build is out, v0.9-beta.1
    4NXCI is now in beta stage

    Added support for all xcis, now you can convert almost every xci to nsp with 4nxci
    Added dynamic nsp creation based on metadata
    Fixed a bug which cause program crash and bad nsps due to program nca hash miscalculation
    Improved stability

    https://github.com/The-4n/4NXCI/releases/tag/v0.9-beta.1

    don't forget to post your feedbacks
     
    Last edited by The-4n, Aug 18, 2018
  3. Dean_

    Dean_ GBAtemp Advanced Fan

    Member
    4
    Sep 11, 2014
    Thank you for the update. It's getting closer to perfection :)
     
  4. TR_mahmutpek

    TR_mahmutpek medic

    Member
    5
    Jul 28, 2015
    Turkey
    *TX liked that.
     
  5. peteruk

    peteruk GBAtemp Addict

    Member
    12
    Jun 26, 2015
    thanks for the cool update, still a problem converting Sonic
     
    kop365, Citrus-Hombre and Alex-Kidd like this.
  6. AlternativeZero

    AlternativeZero GBAtemp Regular

    Member
    4
    Apr 7, 2017
    I'm getting unknown meta type with Sonic Mania Plus and Choukaiten Sushi Striker: The Way of Sushido, just reporting, thanks for the tools.
     
  7. The-4n
    OP

    The-4n GBAtemp Regular

    Member
    7
    Aug 3, 2018
    United States
    give me the full name of xci please
    and 4nxci log if you can
     
  8. XaneTenshi

    XaneTenshi GBAtemp Fan

    Member
    4
    Nov 24, 2013
    Denmark
    Not sure what kind of feedback you are looking for, but I just used the newest beta version of 4NXCI to convert a .xci file of Monopoly Switch to NSP and install it with Tinfoil. Works fine for now:)
     
    The-4n likes this.
  9. The-4n
    OP

    The-4n GBAtemp Regular

    Member
    7
    Aug 3, 2018
    United States
    both working and non-working ones
     
  10. Omno

    Omno Advanced Member

    Newcomer
    3
    Mar 2, 2016
    Sonic worked fine for me. I like how you made each section of the game its own nsp. Very clever
     
  11. Dean_

    Dean_ GBAtemp Advanced Fan

    Member
    4
    Sep 11, 2014
    I have no issue converting sonic mania plus (Sonic_Mania_Plus_NSW-LiGHTFORCE)

    Code:
    Saving Secure Partition...
    Saving 789c76ada44493dab9680bb12e6028dc.nca to 4nxci_extracted_xci\789c76ada44493dab9680bb12e6028dc.nca
    Saving 2f3cdf0292951f34b12ae17c8398bb24.nca to 4nxci_extracted_xci\2f3cdf0292951f34b12ae17c8398bb24.nca
    Saving 53ec2194e8ca0d050dbdb5d1ed7f8821.nca to 4nxci_extracted_xci\53ec2194e8ca0d050dbdb5d1ed7f8821.nca
    Saving 25d5974fa3fc08089d5f9c95da5388eb.nca to 4nxci_extracted_xci\25d5974fa3fc08089d5f9c95da5388eb.nca
    Saving 7a65b434cfd792048e8edd9d1421eb21.cnmt.nca to 4nxci_extracted_xci\7a65b434cfd792048e8edd9d1421eb21.cnmt.nca
    Saving 1175e068bb8b1ae8fba5885516c9a133.nca to 4nxci_extracted_xci\1175e068bb8b1ae8fba5885516c9a133.nca
    Saving 8fe5da282fd2d25c993633cf18b8ad4d.cnmt.nca to 4nxci_extracted_xci\8fe5da282fd2d25c993633cf18b8ad4d.cnmt.nca
    Saving e20678a0c8f171cdb2244ed88be48637.nca to 4nxci_extracted_xci\e20678a0c8f171cdb2244ed88be48637.nca
    Saving 9723e1d3322b71984a468b7c75edfcd3.nca to 4nxci_extracted_xci\9723e1d3322b71984a468b7c75edfcd3.nca
    Saving 2d43196a416fb9e0866dbf4e3ea8e0be.nca to 4nxci_extracted_xci\2d43196a416fb9e0866dbf4e3ea8e0be.nca
    Saving 693dc0c76c121c7be3687d6921809540.nca to 4nxci_extracted_xci\693dc0c76c121c7be3687d6921809540.nca
    Saving 37b8eefd54f161cf5146caa1a07bd50c.cnmt.nca to 4nxci_extracted_xci\37b8eefd54f161cf5146caa1a07bd50c.cnmt.nca
    Saving 01009aa000faa8000000000000000004.tik to 4nxci_extracted_xci\01009aa000faa8000000000000000004.tik
    Saving 01009aa000faa8000000000000000004.cert to 4nxci_extracted_xci\01009aa000faa8000000000000000004.cert
    
    ===> Processing Application Metadata:
    Patching 4nxci_extracted_xci\789c76ada44493dab9680bb12e6028dc.nca
    Patching 4nxci_extracted_xci\2f3cdf0292951f34b12ae17c8398bb24.nca
    Patching 4nxci_extracted_xci\53ec2194e8ca0d050dbdb5d1ed7f8821.nca
    Patching 4nxci_extracted_xci\25d5974fa3fc08089d5f9c95da5388eb.nca
    Patching 4nxci_extracted_xci\7a65b434cfd792048e8edd9d1421eb21.cnmt.nca
    
    Creating xml metadata 4nxci_extracted_xci\7a65b434cfd792048e8edd9d1421eb21.cnmt.xml
    Creating dummy tik 4nxci_extracted_xci\01009aa000faa0000000000000000004.tik
    Creating dummy cert 4nxci_extracted_xci\01009aa000faa0000000000000000004.cert
    
    Creating nsp 01009aa000faa000.nsp
    Packing 4nxci_extracted_xci\01009aa000faa0000000000000000004.tik into 01009aa000faa000.nsp
    Packing 4nxci_extracted_xci\01009aa000faa0000000000000000004.cert into 01009aa000faa000.nsp
    Packing 4nxci_extracted_xci\7a65b434cfd792048e8edd9d1421eb21.cnmt.xml into 01009aa000faa000.nsp
    Packing 4nxci_extracted_xci\789c76ada44493dab9680bb12e6028dc.nca into 01009aa000faa000.nsp
    Packing 4nxci_extracted_xci\2f3cdf0292951f34b12ae17c8398bb24.nca into 01009aa000faa000.nsp
    Packing 4nxci_extracted_xci\53ec2194e8ca0d050dbdb5d1ed7f8821.nca into 01009aa000faa000.nsp
    Packing 4nxci_extracted_xci\25d5974fa3fc08089d5f9c95da5388eb.nca into 01009aa000faa000.nsp
    Packing 4nxci_extracted_xci\7a65b434cfd792048e8edd9d1421eb21.cnmt.nca into 01009aa000faa000.nsp
    
    ===> Processing Patch Metadata:
    Processing 4nxci_extracted_xci\e20678a0c8f171cdb2244ed88be48637.nca
    Processing 4nxci_extracted_xci\9723e1d3322b71984a468b7c75edfcd3.nca
    Processing 4nxci_extracted_xci\2d43196a416fb9e0866dbf4e3ea8e0be.nca
    Processing 4nxci_extracted_xci\693dc0c76c121c7be3687d6921809540.nca
    Processing 4nxci_extracted_xci\37b8eefd54f161cf5146caa1a07bd50c.cnmt.nca
    
    Creating xml metadata 4nxci_extracted_xci\37b8eefd54f161cf5146caa1a07bd50c.cnmt.xml
    Creating dummy tik 4nxci_extracted_xci\01009aa000faa8000000000000000003.tik
    Creating dummy cert 4nxci_extracted_xci\01009aa000faa8000000000000000003.cert
    
    Creating nsp 01009aa000faa800.nsp
    Packing 4nxci_extracted_xci\01009aa000faa8000000000000000003.tik into 01009aa000faa800.nsp
    Packing 4nxci_extracted_xci\01009aa000faa8000000000000000003.cert into 01009aa000faa800.nsp
    Packing 4nxci_extracted_xci\37b8eefd54f161cf5146caa1a07bd50c.cnmt.xml into 01009aa000faa800.nsp
    Packing 4nxci_extracted_xci\e20678a0c8f171cdb2244ed88be48637.nca into 01009aa000faa800.nsp
    Packing 4nxci_extracted_xci\9723e1d3322b71984a468b7c75edfcd3.nca into 01009aa000faa800.nsp
    Packing 4nxci_extracted_xci\2d43196a416fb9e0866dbf4e3ea8e0be.nca into 01009aa000faa800.nsp
    Packing 4nxci_extracted_xci\693dc0c76c121c7be3687d6921809540.nca into 01009aa000faa800.nsp
    Packing 4nxci_extracted_xci\37b8eefd54f161cf5146caa1a07bd50c.cnmt.nca into 01009aa000faa800.nsp
    
    ===> Processing AddOn Metadata:
    Patching 4nxci_extracted_xci\1175e068bb8b1ae8fba5885516c9a133.nca
    Patching 4nxci_extracted_xci\8fe5da282fd2d25c993633cf18b8ad4d.cnmt.nca
    
    Creating xml metadata 4nxci_extracted_xci\8fe5da282fd2d25c993633cf18b8ad4d.cnmt.xml
    Creating dummy tik 4nxci_extracted_xci\01009aa000fab0010000000000000004.tik
    Creating dummy cert 4nxci_extracted_xci\01009aa000fab0010000000000000004.cert
    
    Creating nsp 01009aa000fab001.nsp
    Packing 4nxci_extracted_xci\01009aa000fab0010000000000000004.tik into 01009aa000fab001.nsp
    Packing 4nxci_extracted_xci\01009aa000fab0010000000000000004.cert into 01009aa000fab001.nsp
    Packing 4nxci_extracted_xci\8fe5da282fd2d25c993633cf18b8ad4d.cnmt.xml into 01009aa000fab001.nsp
    Packing 4nxci_extracted_xci\1175e068bb8b1ae8fba5885516c9a133.nca into 01009aa000fab001.nsp
    Packing 4nxci_extracted_xci\8fe5da282fd2d25c993633cf18b8ad4d.cnmt.nca into 01009aa000fab001.nsp
    
    
    Summary:
    Game NSP: 01009aa000faa000.nsp
    Update NSP: 01009aa000faa800.nsp
    DLC NSP: 01009aa000fab001.nsp
    
    Done!
     
    snoofly, The-4n and peteruk like this.
  12. XaneTenshi

    XaneTenshi GBAtemp Fan

    Member
    4
    Nov 24, 2013
    Denmark
    How'd you get a copy of the CMD log? I would have liked to check the actual progress of my conversions aswell, but CMD just shut down before I could see anything. My game looks like it's working fine, but something like this would really help put my mind at ease
     
  13. Dean_

    Dean_ GBAtemp Advanced Fan

    Member
    4
    Sep 11, 2014
    Open up cmd and run command like this:
    C:/>4nxci.exe "[to be converted].xci"

    And "Choukaiten Sushi Striker: The Way of Sushido (Choukaiten_Sushi_Striker_The_Way_of_Sushido_JPN_NSW-HR) is converted nicely as well.
    Code:
    Saving Secure Partition...
    Saving 321cc2c0c53a61793bb5c3ee08c3c46c.nca to 4nxci_extracted_xci\321cc2c0c53a61793bb5c3ee08c3c46c.nca
    Saving a2bd29d6b1d72a17d658e14d9797ff78.nca to 4nxci_extracted_xci\a2bd29d6b1d72a17d658e14d9797ff78.nca
    Saving 6dd715c2ca1454d2e3bd36d803a364e6.nca to 4nxci_extracted_xci\6dd715c2ca1454d2e3bd36d803a364e6.nca
    Saving 03f91e112e6f3d6a26ece3f2ab229896.cnmt.nca to 4nxci_extracted_xci\03f91e112e6f3d6a26ece3f2ab229896.cnmt.nca
    
    ===> Processing Application Metadata:
    Patching 4nxci_extracted_xci\321cc2c0c53a61793bb5c3ee08c3c46c.nca
    Patching 4nxci_extracted_xci\a2bd29d6b1d72a17d658e14d9797ff78.nca
    Patching 4nxci_extracted_xci\6dd715c2ca1454d2e3bd36d803a364e6.nca
    Patching 4nxci_extracted_xci\03f91e112e6f3d6a26ece3f2ab229896.cnmt.nca
    
    Creating xml metadata 4nxci_extracted_xci\03f91e112e6f3d6a26ece3f2ab229896.cnmt.xml
    Creating dummy tik 4nxci_extracted_xci\0100a6200851e0000000000000000003.tik
    Creating dummy cert 4nxci_extracted_xci\0100a6200851e0000000000000000003.cert
    
    Creating nsp 0100a6200851e000.nsp
    Packing 4nxci_extracted_xci\0100a6200851e0000000000000000003.tik into 0100a6200851e000.nsp
    Packing 4nxci_extracted_xci\0100a6200851e0000000000000000003.cert into 0100a6200851e000.nsp
    Packing 4nxci_extracted_xci\03f91e112e6f3d6a26ece3f2ab229896.cnmt.xml into 0100a6200851e000.nsp
    Packing 4nxci_extracted_xci\321cc2c0c53a61793bb5c3ee08c3c46c.nca into 0100a6200851e000.nsp
    Packing 4nxci_extracted_xci\a2bd29d6b1d72a17d658e14d9797ff78.nca into 0100a6200851e000.nsp
    Packing 4nxci_extracted_xci\6dd715c2ca1454d2e3bd36d803a364e6.nca into 0100a6200851e000.nsp
    Packing 4nxci_extracted_xci\03f91e112e6f3d6a26ece3f2ab229896.cnmt.nca into 0100a6200851e000.nsp
    
    
    Summary:
    Game NSP: 0100a6200851e000.nsp
    
    Done!
    Suggestion : Removing 4nxci_extracted_xci directory after converting by default, and adding an option not to remove it.

    I think the majority of people don't make use of extracted files.
     
    Last edited by Dean_, Aug 18, 2018
  14. peteruk

    peteruk GBAtemp Addict

    Member
    12
    Jun 26, 2015
    Sonic_Mania_Plus_NSW-LiGHTFORCE
     
    kop365, Citrus-Hombre and Alex-Kidd like this.
  15. stingray1059

    stingray1059 GBAtemp Regular

    Member
    3
    Feb 7, 2009
    mine outputs 2 nsps.. i tried voez
     
  16. XaneTenshi

    XaneTenshi GBAtemp Fan

    Member
    4
    Nov 24, 2013
    Denmark
    Thanks, think I'll try this just to confirm everything checks out:)
     
  17. AlternativeZero

    AlternativeZero GBAtemp Regular

    Member
    4
    Apr 7, 2017
    Sure thing, I got mine from a certain switch roms sub reddit with the name 0235 - Sonic Mania Plus (USA, Europe) (En,Ja,Fr,De,Es,It,Zh) [Trimmed].xci and 0236 - Choukaiten Sushi Striker - The Way of Sushido (Japan) (En,Ja,Fr,De,Es,It,Nl) [Trimmed].xci that I renamed to be shorter.

    Sonic Mania Plus' log
    Code:
    Saving Secure Partition...
    Saving 789c76ada44493dab9680bb12e6028dc.nca to 4nxci_extracted_xci\789c76ada4449
    3dab9680bb12e6028dc.nca
    Saving 2f3cdf0292951f34b12ae17c8398bb24.nca to 4nxci_extracted_xci\2f3cdf0292951
    f34b12ae17c8398bb24.nca
    Saving 53ec2194e8ca0d050dbdb5d1ed7f8821.nca to 4nxci_extracted_xci\53ec2194e8ca0
    d050dbdb5d1ed7f8821.nca
    Saving 25d5974fa3fc08089d5f9c95da5388eb.nca to 4nxci_extracted_xci\25d5974fa3fc0
    8089d5f9c95da5388eb.nca
    Saving 7a65b434cfd792048e8edd9d1421eb21.cnmt.nca to 4nxci_extracted_xci\7a65b434
    cfd792048e8edd9d1421eb21.cnmt.nca
    Saving 1175e068bb8b1ae8fba5885516c9a133.nca to 4nxci_extracted_xci\1175e068bb8b1
    ae8fba5885516c9a133.nca
    Saving 8fe5da282fd2d25c993633cf18b8ad4d.cnmt.nca to 4nxci_extracted_xci\8fe5da28
    2fd2d25c993633cf18b8ad4d.cnmt.nca
    Saving e20678a0c8f171cdb2244ed88be48637.nca to 4nxci_extracted_xci\e20678a0c8f17
    1cdb2244ed88be48637.nca
    Saving 9723e1d3322b71984a468b7c75edfcd3.nca to 4nxci_extracted_xci\9723e1d3322b7
    1984a468b7c75edfcd3.nca
    Saving 2d43196a416fb9e0866dbf4e3ea8e0be.nca to 4nxci_extracted_xci\2d43196a416fb
    9e0866dbf4e3ea8e0be.nca
    Saving 693dc0c76c121c7be3687d6921809540.nca to 4nxci_extracted_xci\693dc0c76c121
    c7be3687d6921809540.nca
    Saving 37b8eefd54f161cf5146caa1a07bd50c.cnmt.nca to 4nxci_extracted_xci\37b8eefd
    54f161cf5146caa1a07bd50c.cnmt.nca
    Unknown meta type
    Choukaiten Sushi Striker's log
    Code:
    Saving Secure Partition...
    Saving 321cc2c0c53a61793bb5c3ee08c3c46c.nca to 4nxci_extracted_xci\321cc2c0c53a6
    1793bb5c3ee08c3c46c.nca
    Saving a2bd29d6b1d72a17d658e14d9797ff78.nca to 4nxci_extracted_xci\a2bd29d6b1d72
    a17d658e14d9797ff78.nca
    Saving 6dd715c2ca1454d2e3bd36d803a364e6.nca to 4nxci_extracted_xci\6dd715c2ca145
    4d2e3bd36d803a364e6.nca
    Saving 03f91e112e6f3d6a26ece3f2ab229896.cnmt.nca to 4nxci_extracted_xci\03f91e11
    2e6f3d6a26ece3f2ab229896.cnmt.nca
    Unknown meta type
     
    The-4n and peteruk like this.
  18. peteruk

    peteruk GBAtemp Addict

    Member
    12
    Jun 26, 2015
    would be great if we could get these final few working, the tool would be pretty much complete then


    EDIT..... finally got Sonic Mania Plus working

    I used the command line as opposed to dragging and dropping the file onto the exe file

    Thank you as ever to the creator, great little app
     
    Last edited by peteruk, Aug 18, 2018
  19. The-4n
    OP

    The-4n GBAtemp Regular

    Member
    7
    Aug 3, 2018
    United States
    i tested it my self and @peteruk tested that too
    use command line instead of drag and drop
     
    peteruk likes this.
  20. Xinnayc

    Xinnayc Newbie

    Newcomer
    1
    Aug 15, 2018
    United States
    Getting unknown meta type as well on 2 different versions of dead cells. lfc-anxta.xci and hr-anxta.xci
    Code:
    Saving Secure Partition...
    Saving e82c4e124872f34f33b6b797f7d74692.nca to 4nxci_extracted_xci\e82c4e124872f34f33b6b797f7d74692.nca
    Saving 2d432a34569d282bc71d4593b5989050.nca to 4nxci_extracted_xci\2d432a34569d282bc71d4593b5989050.nca
    Saving c64b5d56dbf9d1e7ae7dc9f2e3dcf2b8.nca to 4nxci_extracted_xci\c64b5d56dbf9d1e7ae7dc9f2e3dcf2b8.nca
    Saving 5877af7e000e4055ff34dc359d148214.cnmt.nca to 4nxci_extracted_xci\5877af7e000e4055ff34dc359d148214.cnmt.nca
    Unknown meta type
    Tested with drag and drop, and from cmd.
     
    Last edited by Xinnayc, Aug 18, 2018
Loading...