Homebrew RELEASE hacBrewPack - Make NSPs/NCAs from homebrews

  • Thread starter Thread starter The-4n
  • Start date Start date
  • Views Views 65,776
  • Replies Replies 102
  • Likes Likes 56
If it's like some other custom NSPs, they don't install under SX but if you install them under Rei or whatnot, they work in SX.

It installs fine with SX OS but doesn't open, will installing it with Rei actually make it work? Also tried with Tinfoil under RajNX and wouldn't open in SX OS either

Nope, installed it under ReiNX and doesn't work in SX OS
 
Last edited by M7L7NK7,
W
It installs fine with SX OS but doesn't open, will installing it with Rei actually make it work? Also tried with Tinfoil under RajNX and wouldn't open in SX OS either

Nope, installed it under ReiNX and doesn't work in SX OS
Weird. I make custom NSPs and they work on SX.
 
new build is out, v0.99-beta.2

Changelog:
Added NACP verification for TitleID, Title Name and Author
Added Plaintext option

i just added nacp verification so this prevents using invalid titleids which results some problems
also added --plaintext option so you can create plaintext ncas, remember that they'll work like normal ncas, the difference is that you can easily see nca contens (except header) with hex editor and there's no need to decrypt them
i also updated readme and npdm.json template file

https://github.com/The-4n/hacBrewPack/releases/tag/v0.99-beta.2
 
I made a little python3 script to take a 5 character alphanumeric string and convert it into a Title ID. I did this so that you could easily regenerate your Title ID and you can easily make sure you don't use a title ID someone else used by making your 5 character string meaningful. For example, the homebrew Checkpoint could use the code 'Check' and result in a title ID of 0x010436865636b000. Thought it may be useful for those having trouble thinking up a unique TItle ID. It doesn't cover the entire valid range of 0x0100000000000000 - 0x01ffffffffffffff but it still yields 916,132,832 unique combinations. It also holds to the pattern that base game Title IDs end in '000' so we don't get any that look like updates or DLC content. Here's the source below:

Code:
#!/usr/bin/env python3
# Author: AnalogMan
# Modified Date: 2018-11-06
# Purpose: Generates Nintendo Switch Title IDs based on a 5-character alphanumeric code

import os
import argparse
import re

def main():
    print('\n========== Title ID Generator ==========\n')

    # Arg parser for program options
    parser = argparse.ArgumentParser(description='Generate Title ID from 5-character alphanumeric code')
    parser.add_argument('-c', '--code', help='5-character alphanumeric code')

    # Check passed arguments
    args = parser.parse_args()

    if args.code:
        code = args.code
    else:
        code = input('\nInput 5-character alphanumeric code: ')

    pattern = re.compile("[a-zA-Z0-9]{5}")
    if not pattern.match(code) or len(code) != 5:
        print('\nCode must be alphanumeric (A-Z, a-z, 0-9) and 5 characters in length.\n')
    return

    titleID = '010'
    for char in code:
        titleID += '{:02x}'.format(ord(char))
    titleID += '000'

    sanitized_titleID = int(titleID, 16) & 0xFFFFFFFFFFFFE000

    print('Title ID: 0x{:016x}'.format(sanitized_titleID))

if __name__ == '__main__':
    main()

You may use it by running just the script (in which case it asks for the code) or you can provide a code with the -c argument (python3 titleid_gen.py -c Abc12). Hope someone finds it useful.
 
Last edited by DocKlokMan, , Reason: Fixed oversight that could accidentally create DLC base TIDs
Since you can now make things like the Homebrew menu installable, does that mean it has access to different permissions compared to the existing "load via Album" option?

I ask because I'm fed up with FTPD (Homebrew version) crashing my Switch when I try and do anything (move a file to or from the Switch - regardless of size etc) so if the NSP has file access permissions the existing NRO doesn't, it may fix the crashing for me (last ditch attempt to get it working).
 
Last edited by Flying Scotsman,
Since you can now make things like the Homebrew menu installable, does that mean it has access to different permissions compared to the existing "load via Album" option?

I ask because I'm fed up with FTPD (Homebrew version) crashing my Switch when I try and do anything (move a file to or from the Switch - regardless of size etc) so if the NSP has file access permissions the existing NRO doesn't, it may fix the crashing for me (last ditch attempt to get it working).
What I had read is that way we have access to more ram, don't know other things.
 
new build is out, v0.99-beta.2

Changelog:
Added NACP verification for TitleID, Title Name and Author
Added Plaintext option

i just added nacp verification so this prevents using invalid titleids which results some problems
also added --plaintext option so you can create plaintext ncas, remember that they'll work like normal ncas, the difference is that you can easily see nca contens (except header) with hex editor and there's no need to decrypt them

Do you know if plaintext ncas work with retail games? Also is there a way to encrypt the nca back again?

Thanks for the great tools!!
 
  • Like
Reactions: DarkUnixOs
Since you can now make things like the Homebrew menu installable, does that mean it has access to different permissions compared to the existing "load via Album" option?

I ask because I'm fed up with FTPD (Homebrew version) crashing my Switch when I try and do anything (move a file to or from the Switch - regardless of size etc) so if the NSP has file access permissions the existing NRO doesn't, it may fix the crashing for me (last ditch attempt to get it working).

I've never looked at FTPD source code and idk why does it crash for you
so no idea

Do you know if plaintext ncas work with retail games? Also is there a way to encrypt the nca back again?

Thanks for the great tools!!

plaintext ncas work with retail games, the header is encrypted but sections are plaintext and they are working fine
it is possible to re-encrypt the sections but you should do it manually
 
Since you can now make things like the Homebrew menu installable, does that mean it has access to different permissions compared to the existing "load via Album" option?

The crashing was for a different reason than what the NSP provides for us. There is a more stable version of the FTP HB here, or you can use the sys-ftpd that comes with Tomger's SDFiles, which has faster speeds.
 
that's too late, unless there's a significant update, one like the tool would do something which it didn't yet.
but that tool would have been a very good entry in the competition, a lot of people were waiting for an nsp maker :)
 
Can I convert an .nro into a .nsp with this?

you can make a loader for nro by using nx-hbloader, there's a sample folder for this
otherwise, you have to compile the homebrew with a proper Makefile or you have to extract the nro file which is not that easy

This is hard to understand. How do I convert a PSNES NSA file into a NSP to be installed through SX OS.

sx os blocks some svcs, not sure if you can

How to I modify the npdm.json to force the homebrew not to create a save file?

fs access control bool permission 0x6
https://switchbrew.org/wiki/Filesystem_services#Permissions
 
Last edited by The-4n,

Site & Scene News

Popular threads in this forum