Giter Site home page Giter Site logo

exelix11 / switchthemeinjector Goto Github PK

View Code? Open in Web Editor NEW
905.0 39.0 60.0 25.55 MB

Create custom themes for the nintendo switch !

License: GNU General Public License v2.0

C# 4.17% JavaScript 0.01% HTML 0.12% CSS 0.02% C++ 37.65% C 57.72% Makefile 0.25% CMake 0.07% Shell 0.01%
nintendo-switch homebrew switch customization nx nxtheme

switchthemeinjector's Introduction

Switch theme injector

Discord Latest release Download ko-fi

ThemeScreenshot

The Switch theme injector project is split into three parts:

  • Switch theme injector (Windows app): An app to create and edit custom themes
  • NXThemes installer: An homebrew app that runs on the switch itself and can be used to install and manage themes.
  • Switch theme injector online (also called WebInjector): A port of the windows injector as a web app, it lacks some features like custom applet icons and common.szs layouts support.

The main objective is to develop a complete toolset to create and install custom themes on the switch. As the console os doesn't implement custom themes natively most of this is done by patching system SZS files to get the desidered aspect.

Unfortunately SZS files from the switch os contain copyrighted data and can't be shared online that's why the nxtheme format has been developed, it contains only differential info and can be freely shared. Unless you're dealing with making your own patches and custom layouts you should only use nxtheme files.

Getting started

To use custom themes you need an hacked switch that's at least on firmware 5.0

Installing themes

This is the most common scenario, you just need the theme installer homebrew.
Make a folder called themes in the root of your sd card and copy your themes in either nxtheme or szs format in it. Then launch the theme installer and you should be able to select and install them.
Reboot and your theme should be applied.

Note that each file is a single home menu part (eg just the lockscreen or just the main menu), a full home menu theme is composed by multiple nxtheme files.

To remove a theme just select uninstall in the theme installer. You can just install a different theme to overwrite the currently installed one.

When a new firmware comes out before upgrading (or downgrading) remember to uninstall any theme you have installed to avoid compatibility issues, if you forget your console may not boot untill the theme is removed as explained next.

In case your console doesn't boot anymore due to a bad theme (mostly with szs themes) delete the \atmosphere\contents\01000000001000 folder from your sd (it's \<cfw name>\titles\01000000001000 for old atmosphere and other CFWs), now your console should be booting, launch the theme installer and select uninstall theme to finish the cleanup process.

Making themes

To make themes you need either the Theme injector application or the web version.

Format differences

In the past themes have been distributed as szs files, this is not supported anymore as these szs files also contain copyrighted data, now you should only use the nxtheme format.

Making an nxtheme

Open the injector and go to the NXThemes builder tab, open any 720p JPG image (1280x720 pixels), select a custom layout and click on build nxtheme.

For making themes you can only use JPG images or DXT1-encoded DDS images. For best quality it's better to manually encode the image to DDS so you can have a preview of how will it look like with the compression applied.

Linux Support

The GUI only works on windows, on linux you can use the CLI through mono, you will need the mono-complete package.
Then you should be able to launch the app by running mono SwitchThemes.exe help.

Command line usage (CLI)

Building nxthemes

SwitchThemes.exe buildNX home "<your image.png/jpg/dds>" "<json layout file, optional>" "name=<theme name>" "author=<author name>"  "out=<OutputPath>.nxtheme"

this will build a theme for the home menu, instead of home you can use: lock for lockscreen, apps for the all apps screen, set for the settings applet, user for the user page applet and news for the news applet. Only the image and out file args are needed.
Other options specific to the theme target such as applet icons are availbale as well, run SwitchThemes.exe help for more info

Remote install

Launch the theme installer and select remote install, then run the following command:

SwitchThemes.exe install 192.168.X.Y "<nxtheme/szs file>"

Where 192.168.X.Y is your console IP address.

Custom layouts

Custom layouts are JSON files that allow changing the appearence of the home menu by moving the UI components.
To create a custom layout you will need the original home menu szs files found in /themes/systemData on your sd (if you ever used the theme installer) and a tool capable of editing them like the switch layout editor.

Here you can find more info about layouts and the supported properties.

For layout editing read the Layout editor wiki to get started, parts of the main home menu layout are documented in this repo wiki.

switchthemeinjector's People

Contributors

crc-32 avatar cvfiredragon avatar dependabot[bot] avatar enspiron avatar exelix11 avatar migushthe2nd avatar twnlink avatar uaevuon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

switchthemeinjector's Issues

Console Crash in Themes menu

When in the Theme tab of the NXThemes Installer and having no themes installed, pressing the A button 2 times crashes the console.

NXThemes Installer v1.5
Console 7.0.0

Documentation for JSON template files

Hey,

Thanks for the work you put on this, it's a very nice tool :)

I've been peeking at the template files and I want to tweak some of them. However I haven't found any docs on what are the elements' names. There are some I can guess, like L_BtnShop, but for others I have no idea. I'd also appreciate some comments on the general usage of the files.

Thanks!

User Page doesn't change

Hello, I recently updated my switch to 9.1.0 and before I deleted my theme in case of incompatibility.
Now I reinstall my theme but the user page doesn't change. Any idea ? All others pages/images are changed.

Still crashes

i use sx os for homebrew and i am trying to use nxthemes the themes dont install i don't know why but it needs a fix.

Crashing when Extracting Home Menu

Iā€™m on Firmware 10.0.3
Atmosphere 0.12.0-master
Every time I open the theme installer it asks me to extract the home menu and I do but when it starts it crashes
Error code 1266-0002 (0x4a8)

systemData

Where does the systemData folder go on the SD to be recognized by the homebrew? It's driving me crazy. I have put the folder with every .szs file in it, into several locations, since I can't get the auto home menu extraction method to work from the app itself without crashing my switch.

So please just tell me where i need to place this folder. This app used to work perfectly and have had several custom themes installed on my switch already, but since the last couple updates, All I get is bullshit messages telling me it's missing .szs files, when they are in like 4 different locations on my SD, or I get black screen error crashes when trying to extract the systemData folder from the app, despite having the files already.
It's driving me up the wall, any assistance would be much obliged.

is there a hydrated default layout template json available?

I was thinking about making a ""parser"" for the json layouts (a simple way of previewing that that layout will look like and in the future maybe some sort of visual editor).

An json file of the unmodified home menu completely hydrated (with the values for size, scale, rotation, pos, and the such) would be really useful to know where and what size to draw elements.

(My B plan is to load a scz, change all the values by 1, create the diff json, offset the values to their original value. But maybe you have a clean dump already)

Thanks!

Clock cut off with "ClearLayout"

With ClearLayout patch for home screen, the clock is too far to the left and gets partly cut off. (Time is 12:54 AM in this screenshot)

2019011900543300-57b4628d2267231d57e0fc1078c0596d

Theme options

Allow the user to choose from different preset options from the json (e.g. visibility).
Just a main layout in the json which the injector applies every time and then optional sections with specific changes people can pick from when installing.

Options example

sxos Error Code: 2168-0002

I have tried everything to get nxtheme loader to work with sxos it said i was missing the folder i made one it crashes with that error code. I delete the folder it works up to the point that it tells me that i need the folder and then it tells me to hit+ i do that and then i get the same error code. my card is formatted to fat32 i tried it both ways i still have the same issues. no matter what after i make the folder and try to run it i get the error can you please help me?

battery indicator RoundedSmallCompact layout

hi, i test some layouts on NXThemesInstaller, but someones don't have the battery % like "RoundedSamllCompact", the picture seems showing this %, any idea ? thanks
Firmware 9.2.0
AMS 0.10.5

No All Software Option

Hi Developer(s),
I
love it. However, my games are being cutout from the home menu and I cannot seem to find the All Software button on it. I am on 6.2.0. Is there a fix to this? Thank you!

Talk soon! :)

Having trouble booting to ReiNX (version 2.2) with NXThemesInstaller theme enabled

So, I raised an issue of me having the aforementioned error in the title with ReiNX where Rei herself pointed to be a likely issue with an enabled custom theme. Apparently, I was indeed using a custom theme installed with NXThemesInstaller which might have indeed caused the issue.

This is on firmware 8.0.0, by the way.

Is there a way to disable the custom theme by merely configuring the setup of the micro-SD Card?

Reboot to Payload not working

When I change themes and select reboot it goes to sysnand and not CFW. Iā€™m on emuMMC fully updated freshly and if I select reboot to payload in hbmenu and Hekate it works but not NxThemes

Crash After Boot

Whenever I try to load the nro (running version 1.2) it says "Loading" then it crashes my switch giving me the error code 2168-0002.

lockscreen not showing

after apply nxtheme lockscreen ,then reboot, the lockscreen not showing and cant unlock switch. cant do anything

Add Theme Installer version check

Add a theme installer minimum version entry to the json when diffing.
The ThemeInjector, Layout Editor and ThemeInstaller should request the user to update the tool upon installing the NXTheme or when applying a diff.

Unable to theme on v7.0.1

I have installed your NRO file. It automatically dumps my home menu. It successfully does. I close out and drop in the Reykja theme folder to /themes/Reykja. I relaunch the NRO File. It detects the folder and when I press A to open the folder, this causes Atmosphere 0.8.4 to crash and it does this no matter how many times I try. Any tips?

Home Menu won't extract

I was on FW 6.2.0 and successively dumped the home menu at that point (so, yes, I had the prod keys at the time including key 06). But, before installing themes, I decided I wanted to update to 7.0.1. Figured I'd do that, then redump the keys (using lockpick) and home menu. Problem is that the home menu won't re-extract. I deleted the old extraction of them, redumped the keys (they are identical to the old except the new keys file includes a few bis keys, and tried to dump the home menu. Fails every time with the message "residentmenu not found in lyt dir". I've googled that error and it said I got a bad key or something, which is untrue; again, the keys worked before when I did this on 6.2.0 and they haven't changed except for the addition of the bis keys.

Lockpick 1.2.1
NXThemesInstaller 1.2
Atmosphere 0.8.4

Feature request: Preview .szs theme

Hi,
Would it be possible to add a preview feature for .szs themes? I realize we switched to new file format and it has preview, but asking for some of the legacy files that I have.

Thanks!

No more transparency

Hi

I had used the theme injector for switch 5.1. I choosen "two rows home" for my theme. In menue (settings for example) i have seen my custom wallpaper. Well, i have update to 7.0.1 and make a new custom theme. All good, but the transparency are lost. Have i overseen an option? I will my transparency back :)

I have used Atmosphere 8.3 at 5.1 and 8.4 on 7.1

You need more informations?

Thanx a lot for your great programm.

License?

As you have linked with GPL2 code (mbedtls), this is presumably GPL2, but it is unclear.

Cant create themes due to error

I keep geeting this error "ERROR: The applet image must be 64:56 and (if you're using a DDS) DXT1/3/4/5 encoded." Is there any way to fix this?

Theme partially incompatible with 8.0.0

8.0.0 modified the home menu quite a bit and current themes have a tendency of getting stuck on a specific app using the dpad or the joy stick. Touch screen is working fine.

This is not a valid theme file

I keep getting this error with every 6.0.0 szs I use except entrance.szs and residentmenu.szs. I dumped them myself btw. I can send you my dump on discord if you want

Move panels to front/back

Add an option (that doesn't have to be supported by the differ) to move a panel to the beginning or end of the bflyt file.

The eshop's N_Tip is placed before the other items in the bflyt, which means the text is displayed behind everything. This is probably a mistake made by someone at Nintendo, since changing the panel orders doesn't change anything (no glitching and stuff). Could an option be added to the json to move the N_Tip after the rest of the panels in the RdtBtnShop.bflyt? I've had trouble with this before, but thought it wasn't that important and I 'd just remove the text or make it a legacy release

Random crashes when installing a theme in version 2.4

There have been a few reports of seemingly random crashes while installing a theme in latest version of the theme installer.

I likely found the cause but i'm not sure whether i fixed it or not as there doesn't seem to be a way of reliably triggering the crash. This is a test build if you want to try it, please report here or on discord if you crash with the provided build.

For the build currently in the releases the crash log for this issue looks like this (in bold parts to look for):

LR: 0000000dc899b470 (SwitchThemesNX + 0x50470)
SP: 0000000048380760
PC: 0000000dc899b4fc (SwitchThemesNX + 0x504fc)

NXTheme No Backgrounds, and Settings Crash

I'm on FW 6.2 running ReiNX 2.0, and I'm using the latest 1.2 build of NXTheme, I have all my keys dumped, and I extracted the Home Menu to be able to install 6.x theme's, but whenever I do none of the backgrounds seem to show up, I don't see a common.szs in the title folder, only the resident menu layout changes, and for whatever reason if I try to install a NXtheme to the settings it crash's the console when I try to load into the settings app.

Here are the theme's I use, IDK what else to offer to resolve this issue.

Theme.zip

cannot complie the SwitchThemesNX

when i try to complie the switchThemesNx there are some error .

/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/10.1.0/../../../../aarch64-none-elf/bin/ld: BaseEntry.o: in function `NxEntry::NxThemeGetBgImage()':
BaseEntry.cpp:(.text._ZN7NxEntry17NxThemeGetBgImageEv[_ZN7NxEntry17NxThemeGetBgImageEv]+0x1d8): undefined reference to `DDSConv::ImageToDDS(std::vector<unsigned char, std::allocator<unsigned char> > const&, bool, int, int)'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/10.1.0/../../../../aarch64-none-elf/bin/ld: BaseEntry.cpp:(.text._ZN7NxEntry17NxThemeGetBgImageEv[_ZN7NxEntry17NxThemeGetBgImageEv]+0x2e8): undefined reference to `DDSConv::GetError[abi:cxx11]()'
/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/10.1.0/../../../../aarch64-none-elf/bin/ld: BaseEntry.o: in function `NxEntry::DoInstall(bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
BaseEntry.cpp:(.text._ZN7NxEntry9DoInstallEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN7NxEntry9DoInstallEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x1bb8): undefined reference to `DDSConv::ImageToDDS(std::vector<unsigned char, std::allocator<unsigned char> > const&, bool, int, int)'

what should i do can solve the problem .
i thought devkitpro version have too high level .
what the version of devkitpro when you complie and link the code .

No themes found

I'm running 6.1.0 SXOS 2.5.2, Nxthemes 1.2, exFAT genuine SanDisk SD card.
I've dumped my keys, run lockpick, and dumped the NCA. However, the Themes tab suggests no themes are in the /themes folder, even though they are!
Pressing A anyways causes the app to crash.

Suggestion: Navigation

I'm using your NX Theme Installer. I find it hard to navigate through pages. Lets say there are 7 pages and I need to go to page 3. I have to push down button so many times. Can you please make L button (previous page) and R button (next page) ?

Another note is when i view some theme (lets say it's in page 3) and press back, it jumps back to page 1 instead of staying at previous page and previous item

PNG on Player Select page

Hi !

I think you must add a PNG pic on Player page, for some raison, with "Transparant Playerselect 90% Scale", we can't make a JPG file, it compress the picture and its not good. with PNG, we can a Transparant backgroung and it will be good.

Sory for my english :(

Suggestion: Apply common.szs to user page too

Currently the common.szs option in the injector only applies the diff to common.szs in 0100000000001000 (home menu). The thing is, 0100000000001013 (user page) uses the same file copied to its directory.

Error on the web version.

On the v2 version. So I choose my 1280/720 jpg image, put in the name and author name, choose CarefulLayout.json, hit build, and then the website just freezes. Any fix?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.