Skip to content

pplatoon/hacBrewPack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hacBrewPack

License

hacBrewPack is a tool for creating Nintendo Switch NCAs (Nintendo Content Archive) from homebrews and pack them into NSPs (Nintendo Submission Package)
hacBrewPack is WIP and it's at very early stages

Thanks: SciresM, yellows8, SwitchBrew

Usage

You should place your keyset file with "keys.dat" filename in the same folder as hacBewPack
Alternatively, You can use -k or --keyset option to load your keyset file
Required keys are:

Key Name Description
header_key NCA Header Key
key_area_key_application_xx Application key area encryption keys

You need to compile homebrew with proper makefile, you can use the one in template folder
Compiled homebrew must have the following files:

build\exefs\main  
build\exefs\main.npdm  
[TARGET].nacp  

You must place created 'main' and 'main.npdm' files in exefs folder, you can find them in build/exefs
You must place created nacp file with 'control.nacp' filename in control folder
You should place your icon with "icon_{Language}.dat" file name in control folder, "icon_AmericanEnglish.dat" is the default one if you don't manually edit your nacp
Check switchbrew for more info about language names
Your icon file format must be JPEG with 256x256 dimensions
If you see placeholder instead of icon after installing nsp, It's likely due to exif data, To delete extra exif data, Open icon with GIMP or Paint, save as bmp, Open it again and save as jpeg
If you have some exif data that horizon os doesn't like (like Camera Brand), Your app may leave in installing state in qlaunch
If you don't put your icon in control folder, you'll see a general icon after installing nsp (i don't recommend this)
"logo" folder should contain "NintendoLogo.png" and "StartupMovie.gif", they'll appear when the app is loading
Both files are not licensed according to switchbrew but i didn't include them anyway, You can also replace these files with custom ones
You can use --nologo if you don't have any custom logo and you don't have the original ones, as the result switch will show a black screen without nintendo logo at top left and switch animation on bottom right
CLI options:

*nix: ./hacbrewpack [options...]  
Windows: .\hacbrewpack [options...]  
Usage: hackbrewpack [options...]  
  
Options:  
-k, --keyset             Set keyset filepath, default filepath is ./keys.dat  
-h, --help               Display usage  
--tempdir                Set temp directory filepath, default filepath is ./hacbrewpack_temp/  
--ncadir                 Set output nca directory path, default path is ./hacbrewpack_nca/  
--nspdir                 Set output nsp directory path, default path is ./hacbrewpack_nsp/  
--exefsdir               Set program exefs directory path, default path is ./exefs/  
--romfsdir               Set program romfs directory path, default path is ./romfs/  
--logodir                Set program logo directory path, default path is ./logo/  
--controldir             Set control romfs directory path, default path is ./control/  
--noromfs                Skips creating program romfs section  
--nologo                 Skips creating program logo section  

Also check template folder for default folder structure, makefile and npdm json

Delete nca(hacbrewpack_nca) and temp(hacbrewpack_temp) folders before start or you may have bad nsp

Licensing

This software is licensed under the terms of the ISC License.
You can find a copy of the license in the LICENSES file.
Portions of project HacBrewPack are parts of other projects, make sure to check LICENSES folder