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

Ivellios

Well-Known Member
Member
Joined
Sep 5, 2009
Messages
128
Trophies
0
XP
569
Country
Brazil
Hello, recently i have a problem with this.

Im using Goldleaf 0.4 nro and when i try to install a 6-7GB NSP on system memory which has free 20gb, i receive the following error:

"Not enough space to install title, need 6,25gb more"

I tried to install through USB but it always stop mid transfer as well.

So how can i fix this? Thanks!
 

starburst

Well-Known Member
Member
Joined
Apr 15, 2017
Messages
155
Trophies
0
XP
256
Country
Spain
I already commented this issue on GitHub, but I could not find it here.
Using version 0.4 on a Switch 6.2.0 and Atmosphere 0.8.5, the program hangs at the step 4 of 4 while installing NSP Updates, producing a system crash with the error message 2168-0002 (0x4a8) upon every installation. After the forced restarts, the updates themselves seem to be working correctly.

Edit: I installed six other different updates and all of them failed at the step 4 of 4, produced a system crash and showed the same error message.

Replying to myself, in case someone else faces this issue. I checked the commits tree [1] and tried four different builds [2] of Goldleaf 0.5:
f74d9b7 from March 17, the latest available
69fba6e from March 9, the last of that day's commits
d212c5a from Feb 25, the last build of that month
be5ddeb from Feb 16, from commits about a week earlier

While the three most recent builds could install Updates without producing a system crash, build d212c5a was the only version that could also manage installed titles. All the builds from March use a different title layout which, on my system, is unusable. If one clicks on a title within the manager, Goldleaf either shows information about another one (sometimes the one right above, but some others an entirely different one) or just does nothing.

After installing about twenty titles and their updates, I can say that build d212c5a installed them all correctly and did not cause a system crash after an installation. However, the application did show a garbled error message when trying to install a title immediately after installing an update. Closing the application and reopening it cleared the message and allowed me to continue installing other titles.
It was a cumbersome to exit the application after installing every update, but at least no system crash was triggered and all titles installed correctly.


[1] https://github.com/XorTroll/Goldleaf/compare/0.4...master
[2] https://bsnx.lavatech.top/goldleaf/
 

lettuce

Well-Known Member
Member
Joined
Jul 27, 2006
Messages
811
Trophies
0
XP
471
Country
Just just tried the latest nightly goldleaf-f74d9b7 for the 17th of this month and had it crash to a black screen twice and when it has worked when i quit the app via the home button it once again crashes to a black screen, so it seems very unstable has anyone else had these issues (on ReiNX and FW 7.0.1)

Also unable to get the UBS method to work it just seems to sit on the 'Connection was established. Waiting for NSP request from PC..... even after i have selected the nsp to install
 

mikifantastik98

Well-Known Member
Member
Joined
Dec 12, 2018
Messages
289
Trophies
0
Age
37
XP
1,435
Country
Italy
Just just tried the latest nightly goldleaf-f74d9b7 for the 17th of this month and had it crash to a black screen twice and when it has worked when i quit the app via the home button it once again crashes to a black screen, so it seems very unstable has anyone else had these issues (on ReiNX and FW 7.0.1)
it works for me on Kosmos 11.11.1 ( atmosphere 0.8.5 )
 

Hashtastrophe

Wizard
Member
Joined
Jan 12, 2015
Messages
442
Trophies
0
Location
Yes that kind of wizard.
XP
425
Country
Canada
-Snip-

Also unable to get the UBS method to work it just seems to sit on the 'Connection was established. Waiting for NSP request from PC..... even after i have selected the nsp to install

For USB installs: try Goldtree v3 or v4 (shouldn't matter that much) and goldleaf v3.

For installing off of your SD card: use build f74d9b7 or d212c5a. Second one is older but you can actually manage installed titles even if a bunch are missing names. Also, you can try using a program like NRO2NSP to create a "Forwarder" for Goldleaf. That way it has full access to the console's RAM unlike using HBL via the Album applet. And depending on how you have it set up, it can be updated without uninstalling the forwarder app.
(Choose SDMC for location and point it to the goldleaf.nro on your SD card which lets you update it as needed. Example: "/switch/Goldleaf/Goldleaf.nro")
 

XorTroll

Switching between my 2DS and my Switch
OP
Developer
Joined
Dec 28, 2017
Messages
636
Trophies
1
Location
Nowhere
Website
github.com
XP
4,106
Country
Spain
Heya, so happy to announce that Goldleaf and Goldtree v0.5 are finally out!
Have to point out that this is the most stable update ever of Goldleaf.

Check it out! https://github.com/XorTroll/Goldleaf/releases/tag/0.5

Changelog (big one!)
  • Huge UI refactor:
    • Dialogs have been refactored, now they aren't full-screen, and are roundy and well designed :)
    • Several graphics have changed (main logo)
    • Touch support, mainly noticeable in dialogs and menus. (scrolling still not supported)
    • On file browsers (SD / console memory), the element size has been changed from 100 to 50, doubling the element count being showed, and improving browsing in very populated directories.
    • As Plutonium changed on 0.2.1, now moving up on the top element in a menu will move to the latest one, and down on the latest one to the top one.
  • USB is in a better state now:
    • Installations are no longer handled by two different threads, which makes them more stable.
    • USB system has been changed on the libnx fork, hence some things are easy to handle now, like connection issues or callbacks while USB reading.
    • Don't worry, multi-installation USB is planned for 0.6 or sooner versions :)
  • New and rebuilt content manager:
    • Titles are sorted by all their subcontents (in case they have updates or DLC)
    • Any kind of content can be deleted individually
    • System titles are also supported, but deleting them is not allowed by default.
  • New config file! Goldleaf.ini:
    • Support to replace UI colors and assets.
    • Support to enforce a custom language
    • Via RomFs replacing icons, texts, even translations can be replaced!
  • File browsers:
    • Files and directories are sorted properly now.
  • NSP installs:
    • 7.x installs are supported by doing a temporary copy of CNMT and control NCAs to NAND SYSTEM (which gets deleted right after the install, don't worry)
    • Install dialog might take a few seconds to show up as the change mentioned above. Just a small delay, nothing dangerous.
    • Bad installs will (attempt) to remove half-installed contents to avoid corrupted installs.
    • If the title is already installed, Goldleaf will uninstall it so that the new one can be installed. This might happen with updates (share the same application Id so are considered as the same title internally)
  • USB installs:
    • Sizes were fixed, transferring methods were revised... now USB installs are more stable than ever :) (after those tons of bugs with 0.4)
    • Goldtree also had small changes related to USB commands, so other PC clients should get updated too. Not a big change, but a really relevant one.
  • Error handling:
    • Not a very big addition, but now caught errors are displayed on a FBI-ish style (dialog showing error type, description..., not just the error code on the footer)
  • NXTheme installs:
    • Now Goldleaf doesn't handle these installs itself, instead it uses NxThemes installer, which should be installed in order to install themes. This fixes compatibility with new changes.
  • User accounts:
    • Now icons are checked whether they are valid 256x256 JPEG icons before using them for account icons.
    • On previous versions the only user (in case there was just one) could be deleted. Now that has been corrected.
  • Removed features!?
    • NCA file support (extractions) was removed as a new system to dynamically mount and access NCAs is being worked on for next versions :)
    • CFW support as it resulted in a pointless menu, which just was useful to see whether qlaunch was replaced in the selected CFW.
  • General system stability improvements to enhance the user's experience.
Also, thanks a lot to the testers, who have done a huge job for making 0.5 what it is now.
And, as always, have fun with this multitool!
 

developer_su

Developer
Developer
Joined
Feb 18, 2019
Messages
157
Trophies
0
XP
1,403
Country
Russia
Goldtree also had small changes related to USB commands, so other PC clients should get updated too. Not a big change, but a really relevant one.
Could you please provide any additional information for this? Quickly looked on GoldTree and I see the same commands set as it was before (didn't dig deep enough yet).
 
  • Like
Reactions: Deleted User

DaniPoo

Well-Known Member
Member
Joined
Jan 2, 2013
Messages
813
Trophies
0
Age
33
XP
1,661
Country
Every time I close Goldleaf atmosphere crash with error code:

"2000-0000 (0x0)
Title: 0100000000000006
Firmware 7.0.1 (Atmosphère 0.8.6-master-2d27dab)

An error has occured."

The reboot to payload using VOL buttons does not work for some reason.

Using the the latest Atmospere from today and also the lastest goldleaf from today.
This happens for both the .nsp and the .nro.

Anyone has any idea why this happens and if there is a fix for this?
 

developer_su

Developer
Developer
Joined
Feb 18, 2019
Messages
157
Trophies
0
XP
1,403
Country
Russia
Goldtree used to read every command just in one read, now the command id and the magic are read into two different reads of u32, like old Tinfoil and old Goldleaf versions did, as reading them liken this seems to be way more safe.
Really appreciate your assistance. Released my NS-USBloader for GoldTree v0.5. It's really a way more stable and solid USB transfers than it was before! Good job:switch:
 

JJTapia19

I fight for my friends.
Member
Joined
May 31, 2015
Messages
2,170
Trophies
1
Age
30
XP
2,380
Country
Puerto Rico
@XorTroll The switch goes to sleep during title installation and messes everything up :( I had to find the title id and delete it's ticket to be able to reinstall it.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    KenniesNewName @ KenniesNewName: Heartland, Bread Cranberry Orange, 32 Ounce https://a.co/d/hu6QB8a lul fartland bread