NX Game Info for macOS and Windows

I want to share something that I've been working on for a while
It started of as an experiment to add LibHac to Switch Backup Manager, but as it was easier to make a new project instead of doing with an existing app with already lots of things in it, it progressed as a separate project. Although because now it is a separate project, a macOS build was made possible


NX Game Info

Tool to read information from Nintendo Switch game files, with the following features
  • Read NSP, XCI and installed titles from SD card
  • Game files structure (Scene release, CDN rip, converted)
  • NCA signature (Verify if it's official Nintendo titles. Unmodified titles should pass this test)
  • FS permission (Read filesystem permission. Game titles should not have excessive filesystem permissions such as EraseMmc)
  • macOS and Windows build

To use this app, you need to provide 4 files
  • prod.keys: Your usual keys file, also commonly found as keys.txt in other apps. Can be obtained from your Switch using Lockpick
  • console.keys: SD seed key, can also be obtained using Lockpick. Please refer to this for more details. This is only required for Open SD Card to function, and only sd_seed key (along with sd_card_kek_source and sd_card_nca_key_source in prod.keys) is required. Other keys can be ignored
  • title.keys: Title keys file, support any popular format such as from newkeydb or nutdb. This is required to read FS permission for games using Titlekey Crypto. Also used to map game title name and latest version if available. For more details see https://github.com/garoxas/LibHac/blob/NX_Game_Info/KEYS.md#title-keys
  • hac_versionlist.json: Version list file, can be downloaded from https://pastebin.com/raw/9N26Bx10 (updated daily). No DLC version
For more details, please refer to https://github.com/garoxas/NX_Game_Info#how-to


NX_Game_Info_macOS.png

NX_Game_Info_macOS_SD_Card.png

NX_Game_Info_Windows.png

NX_Game_Info_Windows_SD_Card.png


Download

https://github.com/garoxas/NX_Game_Info/releases


Thanks to


For macOS Users

If the app suddenly closes when you try to run it, go to System Preferences then to Security & Privacy, there you'll need to select Open Anyway to be able to run this app

gatekeeper.png
 

Garou

Well-Known Member
OP
Member
Joined
Jan 13, 2015
Messages
1,213
Trophies
0
XP
1,667
Country
v0.3.2-alpha has been released

Changelog
  • Debug Log
  • Lots of fixes
for those who'd like raise some issues, please enable Debug Log before reporting and send me the debug.log file (warning the file can be very big, so don't leave this option on for too long)

@ReikaRin
please try this one and see if the directory scan works. although I still couldn't find the root cause so some files will be skipped
it would be very helpful if you can submit the files that are skipped so I can test them myself

@Cyan
I've looked the logic at my code and even tried it myself (no title.keys, improperly formatted title.keys even an exe file renamed as title.keys to check if there's file handling error) but I couldn't seem to reproduce this issue
the old one is using whichever title.keys file it can find (either in app directory or in C:\Users\yourname\.switch), so do you have title.keys on C:\Users\yourname\.switch?
but the latest one will use title.keys file in the same directory as prod.keys, so if you have prod.keys in your app directory, even if you title.keys file in C:\Users\yourname\.switch it will be ignored
 
Last edited by Garou,
  • Like
Reactions: hippy dave

ReikaRin

Well-Known Member
Member
Joined
Mar 21, 2018
Messages
113
Trophies
0
XP
538
Country
Indonesia
wait what? how do I gonna test it then :lol:

i think these files are nca files only, but it can read normally with switch backup manager.
in switch backup manager the files structur are nca and after doing those steps the files structure change to converted xci


Processing file E:\Game Switch\Ace of Seafood [0100ff1004d56000][v0].nsp
Processing NSP E:\Game Switch\Ace of Seafood [0100ff1004d56000][v0].nsp
Processing CNMT XML
at NX_Game_Info.Process.processCnmtXml(IStorage cnmtXml, Title& title)
at NX_Game_Info.Process.processNsp(String filename)
at NX_Game_Info.Process.processFile(String filename)
File E:\Game Switch\Ace of Seafood [0100ff1004d56000][v0].nsp has failed to process
 
Last edited by ReikaRin,

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
I tested again with 0.3.1:
- I don't have username/.switch/ folder. I place prod.keys in the same folder than the program.
- without console.keys AND title.keys : crash
- with at least one missing keys file : crash
- with both files, it launches.

I did my test with empty files.
it doesn't crash if hac_versionlist.json is missing. only if it's missing at least one from console.keys or title.keys.


Tested 0.3.2
It works fine with just prod.keys, no more issues with missing files.


I made a script to update the version list with wget:
Code:
@echo off
set theFilename=

rem date (french) "La date du jour est : 13/01/2019" Starts counting at the first number.
set year=%date:~6,4%
set month=%date:~3,2%
set day=%date:~0,2%
set theFilename=hac_versionlist.json %year% %month% %day%

rem if file exist, backup and download new version. Don't overwrite existing backup.
if exist hac_versionlist.json (
if not exist %theFilename% ( ren hac_versionlist.json "%theFilename%" & wget.exe --output-document hac_versionlist.json https://pastebin.com/raw/9N26Bx10
)
)

I know this is alpha, but here some suggestions:
- allow multiple folders to be loaded at the same time. something like Wiibackupmanager, or ShowMiiWads.
- setting to Auto-load specific paths at launch
 
Last edited by Cyan,

Garou

Well-Known Member
OP
Member
Joined
Jan 13, 2015
Messages
1,213
Trophies
0
XP
1,667
Country
i think these files are nca files only, but it can read normally with switch backup manager.
in switch backup manager the files structur are nca and after doing those steps the files structure change to converted xci


Processing file E:\Game Switch\Ace of Seafood [0100ff1004d56000][v0].nsp
Processing NSP E:\Game Switch\Ace of Seafood [0100ff1004d56000][v0].nsp
Processing CNMT XML
at NX_Game_Info.Process.processCnmtXml(IStorage cnmtXml, Title& title)
at NX_Game_Info.Process.processNsp(String filename)
at NX_Game_Info.Process.processFile(String filename)
File E:\Game Switch\Ace of Seafood [0100ff1004d56000][v0].nsp has failed to process

switch backup manager marked a game as NCA when it couldn't find cnmt.xml, that means 4nxci was the one re-adding this file when converting to nsp
the information on the xml should be available on other files so I'm gonna skip it if it detects an invalid xml and read the information elsewhere
thank you

Tested 0.3.2
It works fine with just prod.keys, no more issues with missing files.

I made a script to update the version list with wget:

I know this is alpha, but here some suggestions:
- allow multiple folders to be loaded at the same time. something like Wiibackupmanager, or ShowMiiWads.
- setting to Auto-load specific paths at launch
lol still not sure what causing the error on 0.3.1 but glad it's sorted out :lol:

you mean like selecting multiple directories? should be trivial to add, let me check on that
the app already saved the latest opened directory but opted not to auto load it because people might not want to do the same action all the time (they wouldn't want the app to scan a directory at launch when they only want to scan a single file). the best approach might be cached the added file like what switch backup manager did, but we'll see about that

and thanks for script :)
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
Ah, it already saves the latest dir? you are right, I just tested it and it's nice :)


I think it's best to not auto-load at boot by default. for example if the path is not reachable (external device, disconnected nas, etc.)
Maybe add a menu where the user can add its own "auto load paths". don't re-load previous path automatically if not part of this menu, and check if the path exists and is responding first to prevent locking the program's launch until drive is available (nas takes few second to init). Maybe a refresh list button ? once nas is available, reload folder's content. or refresh if you add a new game without closing the program or selecting the same folder.
It's only ideas, don't feel obliged to do any of it. do what you like for your tool.


The update script is a quick thing I did, and works for french locale only. but thought it might be useful to others.
There's a way to make it local independent, but needs regedit access, I wanted to keep it as simple as possible.
it's making a backup of current file with the current day's date, and download a new one. it doesn't update if it's the same day.


Oh, happy 4th year on gbatemp ! just saw the cake icon.
 
Last edited by Cyan,

Garou

Well-Known Member
OP
Member
Joined
Jan 13, 2015
Messages
1,213
Trophies
0
XP
1,667
Country
It's only ideas, don't feel obliged to do any of it. do what you like for your tool.
no, please share if you have more ideas
it's just I'm trying to limit the number of features for this app, because as I said before I'm planning to merge this to switch backup manager eventually, so everything that's already in that app might not take priority. but we'll see :)

Oh, happy 4th year on gbatemp ! just saw the cake icon.
thanks haha
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
I see you updated it today.
thanks for your work.

do you plan adding support for compressed xci/nsp?
https://gbatemp.net/threads/nszip-nsp-compressor-decompressor-to-reduce-storage.530313/

or maybe rared files?
the advantage of nszip is that it retain its nca checksum and could be used directly by installers. I didn't test, so maybe if it keeps its checksum it's already supported by NXGameInfo?
it's still a work in progress, so maybe add it later when it's complete.
 
Last edited by Cyan,

Garou

Well-Known Member
OP
Member
Joined
Jan 13, 2015
Messages
1,213
Trophies
0
XP
1,667
Country
@Cyan
I know about nsZip but do people really use that? I do find it interesting, but since I rarely find any discussion for it so I just assume it's not widely used yet. are the existing installers support it already?
but that'll surely go to my todo list once I see people start using it

by the way, here's the changelog since the last one I posted (v0.3.2)
  • NRO support, not very useful but maybe someone just interested to find out what version of NRO they have
  • Installed titles without Meta NCA are ignored in the past, now it's been fixed
  • title.keys are no longer necessary to get Permission info. it can now read the titlekey directly from .tik file in XCI and NSP if it exists
  • Export list to text file
  • some bug fixes and improvement
 
  • Like
Reactions: hippy dave

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
I didn't see any installer using it yet.
it can be useful for now only for storage purpose, or maybe site sharing (if it's smaller than rar). but I don't think it's used a lot yet, it's probably not well known nor advertised.
 

Garou

Well-Known Member
OP
Member
Joined
Jan 13, 2015
Messages
1,213
Trophies
0
XP
1,667
Country
I didn't see any installer using it yet.
it can be useful for now only for storage purpose, or maybe site sharing (if it's smaller than rar). but I don't think it's used a lot yet, it's probably not well known nor advertised.
alright, I'll give it a shot
 

Garou

Well-Known Member
OP
Member
Joined
Jan 13, 2015
Messages
1,213
Trophies
0
XP
1,667
Country
@Cyan
done that and not sure if I'll add it to the main branch. it's just too slow even if I did decompression and NCA reencryption directly in RAM, not to mention it's too costly on the RAM for big games

for reference, I was using VOEZ update which was 726 MB compressed to 309 MB
nspz.PNG


if you want to try it yourself, I've put the binary here https://mega.nz/#!BZ1HXIxb!t1oeTbqO7xDb0Q3wT9oevkXsxvNRH9jKdtKnUlQsJGU
note that support is very minimal now, NSPZ without .cnmt.xml.nsz is not supported. .tca.nsz file also not supported
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
thank you for looking at it.
too bad that it's too slow, I thought the decompression algorithm was fast enough to be even used to play in real time (by emulators).
Well, for now there's not a lot of users with this format so I suppose it's not very useful, but even if it's slow maybe it's up to the user to choose whether he wants to use it or not? (if he has enough RAM too)
you can always add it on a future version, if there is a high demand.
Too bad, the compression looks good, half the size for Voez.

thanks for the test binary.
I don't have any nspz yet, but I can convert some to test.
 
Last edited by Cyan,

Calahan

Member
Newcomer
Joined
Oct 30, 2016
Messages
18
Trophies
0
Age
59
XP
667
Country
Gambia, The
Hello Garou,
thank you for the tool.
Would it be possible to add a content verify, to see if the nsp or xci file is corrupt?
At the moment I'm using NSPVerify by caitsith2 (https://gbatemp.net/download/nspverify.35153/)
As the checking is time consuming, you maybe could offer a checkbox, to verify the contents of the files too.
Thanks for considering :)
All the best,
Calahan
 
Last edited by Calahan,

Garou

Well-Known Member
OP
Member
Joined
Jan 13, 2015
Messages
1,213
Trophies
0
XP
1,667
Country
Hello Garou,
thank you for the tool.
Would it be possible to add a content verify, to see if the nsp or xci file is corrupt?
At the moment I'm using NSPVerify by caitsith2 (https://gbatemp.net/download/nspverify.35153/)
As the checking is time consuming, you maybe could offer a checkbox, to verify the contents of the files too.
Thanks for considering :)
All the best,
Calahan
yeah sure, I've looked at NSPverify code and it seems it's just checking the NCA hash. that should be easy
but I'm not really clear on your checkbox suggestion
 
  • Like
Reactions: SaffronXL

Calahan

Member
Newcomer
Joined
Oct 30, 2016
Messages
18
Trophies
0
Age
59
XP
667
Country
Gambia, The
I think checking the NCA hashes slows the process of reading the files down significantly.
NSPVerify needed 8 minutes to read a directory of 50 files with a size of about 50 GB.
NX Game Info read the same directory and filled the table in about 5 seconds.
So I thought it would be a good idea to add a checkbox in the "Open"-Dialogs or maybe even better an extra checkbox setting in the menu, wether the hashes should be checked too.
So the user can decide if he wants a fast check or if the NCA hashes should be checked too, to find corrupt files.
 
  • Like
Reactions: Garou

Dust2dust

Well-Known Member
Member
Joined
Jun 17, 2010
Messages
2,419
Trophies
2
XP
4,363
Country
Canada
Great tool, Garou! I use it regularly. Another suggestion, if I may ask, would be to somehow highlight in the table all titles where the latest version update was not found. It would make it easy to find immediately what games need new updates. Or maybe an option to export in a text file all titles that need a new update. Thanks again for all your efforts.
 
  • Like
Reactions: SaffronXL and Garou

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Pass