(This may not be the best forum to ask, but I couldn't find anything more obvious. Please feel free to move if appropriate.)
I have what I think should be a simple question - how to view details about a switch ROM, whether XCI or NSP? Basically, how to view the title id, name, version, required system version, etc. I'd figure hactool could do that pretty easily, but I just get this:
I'd guess the information I'm looking for is in that Encrypted Header, but I can't for the life of me figure out how to decrypt and view that info.
I know hactool requires a keystore. I have the keys from my switch dumped and saved to ~/.switch/prod.keys, and I can use hactool to decrypt and unpack ROM files successfully with, eg., the following:
So, I know my keys work. There's also a utility called NX_Game_Info that prints out basically the exact info I'm looking for:
So the data is clearly there. And while NX_Game_Info does nearly everything I want, it requires .NET/mono and I'm trying to run this on a Linux system that doesn't have mono.
Is there any way to have hactool decrypt and print readable header info? or am I barking up the wrong tree here? If the latter, any suggestions on another app similar to NX_Game_Info, but maybe C- or python-based or something similar, that can do the job?
I have what I think should be a simple question - how to view details about a switch ROM, whether XCI or NSP? Basically, how to view the title id, name, version, required system version, etc. I'd figure hactool could do that pretty easily, but I just get this:
Code:
$ hactool --disablekeywarns -i -t xci Cave\ Story+.xci
XCI:
Magic: HEAD
Header Signature: 374AA94DAFD71256203D65ACFAB44A15B1A98A183D8A136AA5123F176C16952A
3FB3D3AEB3B2F534B2ABA73E1F972EED85FCD73DE424A48B98D7355B415CA032
ADB86616490353358E74052F61517481FE4C36A646140ED7734FE168919A429F
8C0250B3089CB50BAF1BB9A6BACD843FCD6D397130418D5C030F7B1BC5865643
58BE215A80BD032FE57621E4F50E5BD4723DDBE77183AF52C5839B1B392AAD1A
BDCA0F33B67575ED81190DAEF8C166D762D0E67CACD17D97461273A43AEEC9FD
C0A715D9103DC9E1BA2579158191596266D5656A5F9052892D03FA33B363CC99
9F5DE1EBC0910A3527A51D294C6D09A0D5FB3D2AA2C21315629E8EF6B139B5AE
Cartridge Type: 2GB
Cartridge Size: 000020797c00
Header IV: 7B4C55FF475D871368AFC56A76C05BBE
Encrypted Header: 2B21AA2E41CBC29E8A7D1415646FE07CF2D8C0C07E62BD2F2C8AD97A1D1267C1
F54592F13181B0AC4B68158DB5080B58B0E73B98ABD82A2418171EC257825FD9
4E270DDC96250853CC5818E871FD26DCC3740A9E5A4CA1F153EBC96077CA4521
874B12607E7B870C11A9BC1A40B9FF17
Encrypted Header Data:
Compatibility Type: Global
Root Partition:
Magic: HFS0
Offset: 00000000f000
Number of files: 3
Files: rootpt:/update 000000000000-000017ff0000
rootpt:/normal 000017ff0000-000018022000
rootpt:/secure 000018028e00-000020788a00
Update Partition:
Magic: HFS0
Offset: 00000000f200
Number of files: 167
Normal Partition:
Magic: HFS0
Offset: 000017fff200
Number of files: 2
Files: normal:/d33d01630cf1282b3869d0c8c04a278d.nca 000000000000-000000030e00
normal:/2d9121fedb032265233c3082c24e5060.cnmt.nca 000000030e00-000000031e00
Secure Partition:
Magic: HFS0
Offset: 000018038000
Number of files: 4
Files: secure:/97e31c6e7b60b1effcc89f6bc608e9b6.nca 000000000000-00000870c000
secure:/d33d01630cf1282b3869d0c8c04a278d.nca 00000870c000-00000873ce00
secure:/50fe36bd0b0e8a71d905f083a83eb474.nca 00000873ce00-00000875ea00
secure:/2d9121fedb032265233c3082c24e5060.cnmt.nca 00000875ea00-00000875fa00
Done!
I'd guess the information I'm looking for is in that Encrypted Header, but I can't for the life of me figure out how to decrypt and view that info.
I know hactool requires a keystore. I have the keys from my switch dumped and saved to ~/.switch/prod.keys, and I can use hactool to decrypt and unpack ROM files successfully with, eg., the following:
Code:
hactool -x -t xci --securedir="Cave Story+" "Cave Story+.xci"
hactool -x -t nca --romfsdir="Cave Story+/romfs "Cave Story+/97e31c6e7b60b1effcc89f6bc608e9b6.nca.ncz"
So, I know my keys work. There's also a utility called NX_Game_Info that prints out basically the exact info I'm looking for:
Code:
$ mono ~/1/NX.Game.Info_0.7.1_cli/nxgameinfo_cli.exe Cave\ Story+.xci
NX Game Info 0.7.1.0
Copyright © 2018-2019 Garoxas
Opening file Cave Story+.xci
Cave Story+.xci
├ Title ID: 0100B7D0022EE000
├ Base Title ID: 0100B7D0022EE000
├ Title Name: Cave Story+
├ Display Version: 1.0
├ Version: 0
├ Latest Version:
├ System Update:
├ System Version: 0
├ Application Version:
├ Masterkey: 0 (1.0.0-2.3.0)
├ Title Key:
├ Publisher: Nicalis, Inc
├ Languages: en-US
├ Filename: Cave Story+.xci
├ Filesize: 1.86 GB
├ Type: Base
├ Distribution: Cartridge
├ Structure: Scene
├ Signature: Passed
├ Permission: Safe
└ Error:
1 titles processed
So the data is clearly there. And while NX_Game_Info does nearly everything I want, it requires .NET/mono and I'm trying to run this on a Linux system that doesn't have mono.
Is there any way to have hactool decrypt and print readable header info? or am I barking up the wrong tree here? If the latter, any suggestions on another app similar to NX_Game_Info, but maybe C- or python-based or something similar, that can do the job?