Goldleaf - A Nintendo Switch multipurpose homebrew tool




Goldleaf is multipurpose homebrew tool for Nintendo Switch.​


Features

Goldleaf has a very similar concept to FBI, which is a similar tool for Nintendo 3DS homebrew.

These are its main features:

  • SD card browser: A simple but fully equiped file browser for the SD card, supporting several file formats (such as NSP, NRO, NACP, NXTheme, JPEG, tickets...), and with support for copying, pasting, renaming, deleting and creating files and directories.

  • Console memory browser: Same browser but to be used with NAND partitions, which also warns when writing or deleting content as it can be dangerous.

  • Remote PC browser: Via this feature, one can browse a PC's drives like any other filesystem, connected by a USB-C cable.

  • Content manager: Browse any kind of content in your SD card, console memory or game cartridge. You can browse all the NCAs, and as title options, you can remove the content, or export it as a NSP. NAND SYSTEM contents (system titles or contents) aren't allowed to be deleted. Invidual contents such as updates or DLC can be removed individually.

  • Ticket manager: Browse all tickets, both common and personalized. You can remove them, but an extra warning will be displayed when attempting to remove tickets being used by some content.

  • Web browser (web applets): Using the console's web applets, Goldleaf allows to search and navigate through web pages. If Goldleaf is launched through hbmenu as a NRO, WifiWebAuth applet will be used, which tends to fail sometimes, along with fewer features, such as lack of video support.

  • User account manager: Select a user account, and easily change things as the user's nickname or even delete it. Via the file browsers you can replace a user's icon with a JPEG image, but it can be a risky action. The icon needs to be a valid JPEG, with 256x256 dimensions. Goldleaf checks if the icon is valid to replace the other one.

  • Console information: Simple menu to see current firmware string, and the total free and occupied size on SD card and console memory.
Among all this features, Goldleaf is a very intuitive tool, with a fancy UI, and fully translated into 5 different languages: English, Spanish, German, French and Italian.

Common controls
  • (L-stick / D-pad) Move through the current menu

  • (R-stick) Move slightly faster through the current menu

  • (ZL / ZR) Show a dialog to shut down or reboot the console.
NRO version
  • (+ / -) Exit the application in order to return to hbmenu.
Disclaimer

NSP installs

Always keep in mind that installing NSPs can be a very easy way to get banned. If you use airplane mode and special DNSs like 90DNS, there is a smaller chance to get banned.

NEVER install untrusted NSPs. Goldleaf can identify (according to the NSP's application ID) whether the NSP is a homebrew NSP (IDs starting with "05", usually for forwarders), or a regular title (official ID range just allows IDs starting with "01")

Tickets

Tickets represent a game purchase, but technically speaking, you can't boot a title if the ticket isn't present (in case the title requires the ticket).

NSPs which don't have (nor require) a ticket are "standard crypto" NSPs. Standard-crypto titles aren't offical (usually reconverted content to avoid importing tickets).

Goldleaf will display whether a ticket is present or not, and if so, it's titlekey. Titlekeys are required to decrypt and access titles' content which require a ticket. Otherwise, they are undecryptable, hence unlaunchable by the system.

TL;DR: Always try to avoid untrusted NSPs, and if you go ahead and install CDN NSPs with tickets, avoid going online, or use special tools such as 90DNS, or you'll be banned for sure.

Forwarding

Goldleaf is released along with a NSP, in order to launch Goldleaf as an installed title, and take advantage of extra RAM and features such as web browsing.

The NSP is a forwarder since 0.6, what means that, instead of having Goldleaf's source inside the NSP, it simply loads the NRO from the SD card, meaning that only the NRO should be updated instead of having to reinstall the NSP.

Goldleaf's forwarding code tries to locate Goldleaf (Goldleaf.nro) in sd:/switch/ and sd:/switch/Goldleaf/. If it isn't found, an error message is displayed.

Settings

Goldleaf supports the customization of colors, assets and other options via a JSON file located at Goldleaf's folder: sd:/switch/Goldleaf/settings.json.

Sample

This is an example JSON for Goldleaf settings:

Code:
{
   "general": {
       "customLanguage": "es",
       "keysPath": "/switch/prod.keys",
       "externalRomfs": "/switch/Goldleaf/theme/rom"
   },
   "ui": {
       "background": "#aabbccdd",
       "base": "#aabbccdd",
       "baseFocus": "#aabbccdd",
       "text": "#aabbccdd",
       "menuItemSize": 80
   },
   "installs": {
       "ignoreRequiredFwVersion": true
   }
}

If a certain attribute isn't present Goldleaf will use default values. For colors, Goldleaf will initially load default light/dark themes according to the console's theme color, and later, colors present in the JSON will be used instead of default theme ones.

Notes

Via RomFs replacement, when Goldleaf tries to locate, for instance, romfs:/FileSystem/FileDataFont.ttf resource font, if romfsReplace is true and romfsReplacePath is, for instance, /switch/Goldleaf/testromfs, Goldleaf will look if sd:/switch/Goldleaf/testromfs/FileSystem/FileDataFont.ttf exists and use it if so, otherwise will use RomFs's one.

So, via this configurations, UI's images, resources, element sizes and even translations (using custom JSON translations) can be used, plus some more assets which will be added in future updates.

Known bugs
  • On Atmosphère and SX OS, exiting Goldleaf via HOME menu (as a NRO) seems to crash the system on 7.x firmwares.

  • Remote PC browsing in general seems to have several bugs, most of them related to the UI system.
Contributing

If you would like to contribute with new features, you are free to fork Goldleaf and open pull requests showcasing your additions.

If you just would like to suggest new ideas, but without actual code implementations, you're free to open an issue. Please try not to duplicate those, if the idea or problem is already reported in another issue.

Translations

Read this before making any new translations:

  • Goldleaf's aim is to, mainly, support languages supported by the console itself, so those not yet supported by Goldleaf and which aren't supported by consoles should have less priority and won't be probably accepted.

  • UI (Plutonium) lacks special UTF16 characters, so some languages like Russian or Korean will not work, at least on the UI's current state.
Credits and support

Credits

The main concepts of Goldleaf are and have been developed by me (XorTroll), but without the effort and support of many others, this project wouldn't have been a thing:

  • Adubbz and all the (old) Tinfoil contributors, for their huge work with title installing.

  • C4Phoenix, for his awesome work doing this project's logo, and the GIF displayed when launching the installed forwarder.

  • All the graphics except Goldleaf's logo (see credit above) were grabbed from Icons8.

  • 2767mr, for all the support given in Goldtree.

  • Simon for his libusbK implementation for C#, which has made Goldtree client possible.

  • shchmue and blawar for the system to get titlekeys without breaking processes, found in Lockpick.

  • Translators: unbranched and exelix for Italian, tiliarou and FuryBaguette for French, and LoOkYe and C4Phoenix for German.

  • All the testers, for reporting bugs and helping a lot with the project's development.
Discord server and beta testing

If you would like to be more informed about my projects' status and support, you should check my Discord server. It's a simple server for Nintendo hacking and homebrew, mainly focused on my projects. If you would like to be a beta-tester, then this is what you're looking for.

Enjoy this amazing homebrew!
 
Last edited by XorTroll, , Reason: 0.6 README changes

XorTroll

Switching between my 2DS and my Switch
OP
Developer
Joined
Dec 28, 2017
Messages
637
Trophies
1
Location
Nowhere
Website
github.com
XP
4,136
Country
Spain
Well guys, as I've been testing with admin stuff in account services, and the results look nice, Goldleaf now has basic account management.
What does this mean? Rename accounts, delete them and customize icon

2019011917351200-DB1426D1DFD034027CECDE9C2DD914B8.jpg

2019011917351800-DB1426D1DFD034027CECDE9C2DD914B8.jpg


Have fun using the nightly builds!

As a remainder.: customizing account icons is almost a guaranteed ban, I can do it myself because I'm already banned, but WATCH OUT!

--------------------- MERGED ---------------------------

And no, unlike avatool this WON'T MAKE THE CONSOLE CRASH. This uses DevMenu's system so same results.
 

eyeliner

Has an itch needing to be scratched.
Member
Joined
Feb 17, 2006
Messages
2,516
Trophies
2
Age
43
XP
4,586
Country
Portugal
Xortroll will hopefully stop working on new features long enough to fix bugs in usb install :hrth:
I am sure he can do it easily. Possiby he has other priorities, but I'm not one to complain. I'm sure I can't be of any use, but I just might look at the source code of the .net app and do stuff.
 

adamswagem

Member
Newcomer
Joined
Jan 13, 2016
Messages
12
Trophies
0
Age
30
XP
95
Country
United States
What can I do when the .nsp gets stuck on Starting Installation for USB install? Is my only move to power it off and boot into CFW again? Or is there a faster way to exit out of it? Of course I can just use the .nro version but just wondering.
 

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,143
Trophies
2
XP
20,171
Country
United Kingdom
What can I do when the .nsp gets stuck on Starting Installation for USB install? Is my only move to power it off and boot into CFW again? Or is there a faster way to exit out of it? Of course I can just use the .nro version but just wondering.
Can you press home & then X to close? That's what I do, but I'm running it from the homebrew launcher which is loaded as an app.
 

szczuru

Well-Known Member
Member
Joined
May 3, 2014
Messages
193
Trophies
0
Age
34
Location
Poland
XP
1,341
Country
Poland
I may be wrong but isn't nsp is like forwarder on wii? So we can use latest (even nightly) nro version of Goldleaf and boot it via nps bundled in officiall zip?
 

fallingrat

Well-Known Member
Newcomer
Joined
Jun 24, 2018
Messages
94
Trophies
0
XP
619
Country
Spain
If you've got python and pyusb set up, you can use this: https://github.com/friedkeenan/GoldtreePy
Afaik the install failures you get will be because of goldleaf bugs. Unplug the cable from your computer and reconnect it before trying again.

I tried it today, but I'm getting the following errors:

Code:
Connection was established with Goldleaf.
NSP name sent to Goldleaf
Goldleaf is ready for the installation. Preparing everything...
Traceback (most recent call last):
  File "./Goldtree.py", line 142, in <module>
    sys.exit(main())
  File "./Goldtree.py", line 92, in main
    write(file.name.encode())
  File "./Goldtree.py", line 53, in write
    ep[0].write(buffer)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/usb/core.py", line 387, in write
    return self.device.write(self, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/usb/core.py", line 948, in write
    self.__get_timeout(timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/usb/backend/libusb1.py", line 824, in bulk_write
    timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/usb/backend/libusb1.py", line 920, in __write
    _check(retval)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/usb/backend/libusb1.py", line 595, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 32] Pipe error
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

It looks like there is some kind of problem with the libusb drivers. I installed them with the command: brew install libusb. Any ideas? Thank you in advance
 

Reecey

Mario 64 (favorite game of all time)
Member
Joined
Mar 7, 2010
Messages
5,867
Trophies
2
Location
At Home :)
XP
4,141
Country
Try this one. I just compiled it myselfe.
Nice works a treat not sure why mine was kicking me out I might of been doing something wrong my end. It was probably the ID that was corrupting mine I didn’t realise I was rushing it I had to go out.
 
Last edited by Reecey,

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,143
Trophies
2
XP
20,171
Country
United Kingdom
I tried it today, but I'm getting the following errors:

Code:
Connection was established with Goldleaf.
NSP name sent to Goldleaf
Goldleaf is ready for the installation. Preparing everything...
Traceback (most recent call last):
  File "./Goldtree.py", line 142, in <module>
    sys.exit(main())
  File "./Goldtree.py", line 92, in main
    write(file.name.encode())
  File "./Goldtree.py", line 53, in write
    ep[0].write(buffer)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/usb/core.py", line 387, in write
    return self.device.write(self, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/usb/core.py", line 948, in write
    self.__get_timeout(timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/usb/backend/libusb1.py", line 824, in bulk_write
    timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/usb/backend/libusb1.py", line 920, in __write
    _check(retval)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/usb/backend/libusb1.py", line 595, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 32] Pipe error
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

It looks like there is some kind of problem with the libusb drivers. I installed them with the command: brew install libusb. Any ideas? Thank you in advance
Like I said, this is a common bug with usb install with Goldleaf. Close goldleaf, disconnect the cable, then try again. If it just won't work with that particular nsp then you'll have to use another installer for now.
 
  • Like
Reactions: fallingrat
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Skelletonike @ Skelletonike:
    3h left until work finishes, bah
  • Skelletonike @ Skelletonike:
    link doesn't work
    +2
  • Skelletonike @ Skelletonike:
    1H left, such a slow week.
  • Sonic Angel Knight @ Sonic Angel Knight:
    Okay, I had spaghetti :P
  • SylverReZ @ SylverReZ:
    Hope they made lots of spaget
  • K3N1 @ K3N1:
    Chill dog
  • SylverReZ @ SylverReZ:
    Chilli dog
  • Skelletonike @ Skelletonike:
    Damn, I'm loving the new zelda.
  • xtremegamer @ xtremegamer:
    loving the new zelda, i started a game, it was so fucking good, so i
    am waiting on my friend to get home so we can start a new one together
  • Skelletonike @ Skelletonike:
    I just dislike that they don't let me choose the voices before the game starts. Happened with botw as well, had to change to japanese and restart.
  • K3N1 @ K3N1:
    But the important question is can you choose gender
  • Skelletonike @ Skelletonike:
    Same way you can choose Gerald's gender.
  • Skelletonike @ Skelletonike:
    *Geralt, damn autocorrect.
  • Psionic Roshambo @ Psionic Roshambo:
    But can he be trans? Lol
  • K3N1 @ K3N1:
    Zelda transforms into link
  • Psionic Roshambo @ Psionic Roshambo:
    Link I'm not the princess your looking for.... *Pulls a crying game*
  • K3N1 @ K3N1:
    *skirt up* it's exactly what I always wanted
  • Skelletonike @ Skelletonike:
    Just scanned all my zelda amiibos, took a while but didn't get anything that cool, did get the lon lon ranch hylian fabrics though.
  • Skelletonike @ Skelletonike:
    It was pretty funny when I scanned wolf link and got a shit load of meat.
  • K3N1 @ K3N1:
    @Skelletonike, btw I ran that custom for mgs4 on the deck I'm amazed it got that far in game
  • K3N1 @ K3N1:
    Plug in*
    K3N1 @ K3N1: Plug in*