Homebrew RELEASE hacBrewPack - Make NSPs/NCAs from homebrews

M7L7NK7

Well-Known Member
Member
Joined
Oct 16, 2017
Messages
3,896
Trophies
1
Website
youtube.com
XP
5,960
Country
Australia
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,

OkazakiTheOtaku

no thanks, I don't want a custom title
Member
Joined
Jul 20, 2016
Messages
1,461
Trophies
1
Location
127.0.0.1
XP
3,114
Country
Japan
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.
 

The-4n

Well-Known Member
OP
Newcomer
Joined
Aug 3, 2018
Messages
46
Trophies
0
Age
44
XP
2,766
Country
United States
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
 

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,008
Trophies
2
Age
36
XP
4,570
Country
United States
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

Flying Scotsman

Well-Known Member
Member
Joined
Sep 7, 2016
Messages
350
Trophies
0
XP
1,333
Country
United States
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,

Csmrcc

Well-Known Member
Member
Joined
Sep 13, 2018
Messages
412
Trophies
0
Age
37
XP
905
Country
Spain
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.
 

Bigjokker

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
98
Trophies
0
Age
47
XP
356
Country
United States
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

The-4n

Well-Known Member
OP
Newcomer
Joined
Aug 3, 2018
Messages
46
Trophies
0
Age
44
XP
2,766
Country
United States
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
 

sirAnger

Well-Known Member
Member
Joined
Dec 4, 2002
Messages
481
Trophies
0
Age
40
Location
Michigan
XP
605
Country
United States
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.
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,648
Country
France
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 :)
 

The-4n

Well-Known Member
OP
Newcomer
Joined
Aug 3, 2018
Messages
46
Trophies
0
Age
44
XP
2,766
Country
United States
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

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: @SylverReZ, Indeed lol