Sys-patch Switch: Difference between revisions

From GameBrew
No edit summary
No edit summary
Line 1: Line 1:
{{Infobox Switch Homebrews
{{Infobox Switch Homebrews
|title=sys-patch
|title=sys-patch
|image=syspatchswitch.png
|image=syspatchnx.png
|description=A script-like system module that patches fs, es and ldr on boot.
|description=A script-like system module that patches fs, es and ldr on boot.
|author=TotalJustice
|author=TotalJustice
|lastupdated=2023/05/28
|lastupdated=2023/05/28
|type=System Tools
|type=Sysmodules
|version=1.4.2
|version=1.4.2
|license=MIT
|license=MIT
|download=https://dlhb.gamebrew.org/switchhomebrews/syspatchswitch.7z
|download=https://dlhb.gamebrew.org/switchhomebrews/syspatchnx.7z
|website=https://gbatemp.net/threads/sys-patch-sysmod-that-patches-on-boot.633517/
|website=https://gbatemp.net/threads/sys-patch-sysmod-that-patches-on-boot.633517/
|source=https://github.com/ITotalJustice/sys-patch
|source=https://github.com/ITotalJustice/sys-patch
|donation=
|donation=
}}
}}
{{#seo:
A script-like system module that patches fs, es, ldr and nifm on boot. This has the same effect as sigpatches, the benefit of sys-patch is that it only needs updating when something major breaks.  
|title=Switch Homebrew Apps (System Tools) - GameBrew
 
|title_mode=append
sys-patch also outputs a log where you can see which patches are applied, which one failed and some other useful data. You can manually read the log or use the overlay, which you can also use to change the config.
|image=syspatchswitch.png
 
|image_alt=sys-patch
[[Sigpatch-Updater Switch|sigpatch-updater]] was updated to support updating and auto running sys-patch. This means that you can update and apply patches without having to reboot.
}}
Sys-patch is a system module designed to patch fs, es, ldr, and nifm during boot on the Nintendo Switch. Developed by ITotalJustice, sys-patch serves as a script-like utility that effectively replaces sigpatches.


Sys-patch can be used alongside sigpatches, but the developer recommends continuing to use sigpatches. If sys-patch ever breaks, it may not be fixed quickly, so sigpatches can serve as a backup.
'''Note:''' At this time, it's recommended to use this alongside sigpatches, so in case you forget to update patches, sys-patch should continue to work.


==Features==
==Features==
The main features of sys-patch include:
* A simple configuration file for customizing patch options, located at /config/sys-patch/config.ini.
* A simple configuration file for customizing patch options, located at /config/sys-patch/config.ini.
* An overlay that allows you to change the configuration options and see the applied patches.
* An overlay that allows you to change the configuration options and see the applied patches.
* A minimal memory footprint (16 KiB) and binary size (~50 KiB).
* A minimal memory footprint (16 KiB) and binary size (~50 KiB).


== Config ==
==Installation==
'''sys-patch''' features a simple config. This can be manually edited or updated using the overlay.
Extract the zip file to the root of the SD card.
 
==User guide==
=== What is being patched? ===
sys-patch is designed to patch the following components:
 
* fs and es - Require new patches after every new firmware version.
* ldr - Requires new patches after every new Atmosphere release.
* nifm - The ctest patch allows the device to connect to a network without needing to make a connection to a server.
 
These patches are applied on boot, and once they are done, the sys-module stops running.
 
=== Config ===
sys-patch features a simple config. This can be manually edited or updated using the overlay.


The configuration file can be found in <code>/config/sys-patch/config.ini</code>. The file is generated once the module is ran for the first time.
The configuration file can be found in <code>/config/sys-patch/config.ini</code>. The file is generated once the module is ran for the first time.
Line 41: Line 50:
version_skip=1  ; 1=(default) skips out of date patterns, 0=search all patterns</pre>
version_skip=1  ; 1=(default) skips out of date patterns, 0=search all patterns</pre>


== Overlay ==
=== Overlay ===
The overlay can be used to change the config options and to see what patches are applied.
The overlay can be used to change the config options and to see what patches are applied.


Line 47: Line 56:
* Patched (green) means it was patched by sys-patch.
* Patched (green) means it was patched by sys-patch.
* Patched (yellow) means it was already patched, likely by sigpatches or a custom Atmosphere build.
* Patched (yellow) means it was already patched, likely by sigpatches or a custom Atmosphere build.
{| style="width: 80%; margin-left:0em;"
|
https://dlhb.gamebrew.org/switchhomebrews/syspatchswitch-01.jpg
https://dlhb.gamebrew.org/switchhomebrews/syspatchswitch-02.jpg
https://dlhb.gamebrew.org/switchhomebrews/syspatchswitch-03.jpg
https://dlhb.gamebrew.org/switchhomebrews/syspatchswitch-04.jpg
|}


== What is being patched? ==
=== FAQ ===
sys-patch is designed to patch the following components:
'''Q. If I am using sigpatches already, is there any point in using this?'''


* fs and es: Require new patches after every new firmware version.
Yes, in 3 situations.
* ldr: Requires new patches after every new Atmosphere release.
* nifm: The ctest patch allows the device to connect to a network without needing to make a connection to a server.


These patches are applied on boot, and once they are done, the sys-module stops running.
# A new "ldr" patch needs to be created after every Atmosphere update. Sometimes, a new silent Atmosphere update is released. This tool will always patch "ldr" without having to update patches.
# Building Atmosphere from src will require you to generate a new "ldr" patch for that custom built Atmosphere. This is easy enough due to the public scripts / tools that exist out there, however this will always be able to patch "ldr".
# If you forget to update your patches when you update your firmware / Atmosphere, this sys-module should be able to patch everything. So it can be used as a fall back.


== FAQ: ==
'''Q. Does this mean that I should stop downloading / using sigpatches?'''
=== If I am using sigpatches already, is there any point in using this? ===
Yes, in 3 situations.


# A new '''ldr''' patch needs to be created after every Atmosphere update. Sometimes, a new silent Atmosphere update is released. This tool will always patch '''ldr''' without having to update patches.
No, I would personally recommend continuing to use sigpatches. Reason being is that should this tool ever break, I likely wont be quick to fix it.
# Building Atmosphere from src will require you to generate a new '''ldr''' patch for that custom built Atmosphere. This is easy enough due to the public scripts / tools that exist out there, however this will always be able to patch '''ldr'''.
# If you forget to update your patches when you update your firmware / Atmosphere, this sys-module should be able to patch everything. So it can be used as a fall back.


=== Does this mean that I should stop downloading / using sigpatches? ===
==Screenshots==
No, I would personally recommend continuing to use sigpatches. Reason being is that should this tool ever break, i likely wont be quick to fix it.
{| style="width: 80%; margin-left:0em;"
|
https://dlhb.gamebrew.org/switchhomebrews/syspatchnx2.jpg
https://dlhb.gamebrew.org/switchhomebrews/syspatchnx3.jpg
https://dlhb.gamebrew.org/switchhomebrews/syspatchnx4.jpg
https://dlhb.gamebrew.org/switchhomebrews/syspatchnx5.jpg
|}


==Changelog==  
==Changelog==  
'''v1.4.2'''
'''v1.4.2'''
*fix options "logging" key missmatch between sysmod and overlay
* Fix options "logging" key missmatch between sysmod and overlay.
'''v1.4.1'''
'''v1.4.1'''
* the patch itself always worked, however it failed to detect if the patch was already applied.
* The patch itself always worked, however it failed to detect if the patch was already applied.
* this isn't a big issue, and the only one to notice was probably me ;)
* This isn't a big issue, and the only one to notice was probably me.
'''v1.4.0'''
'''v1.4.0'''
*add ctest patch, add per patch toggle, made overlay more organised
* Add ctest patch, add per patch toggle, made overlay more organised.
'''v1.3'''
'''v1.3.0'''
*add more logging, pattern version skipping, min/max fs pattern versions
* Add more logging, pattern version skipping, min/max fs pattern versions.
'''v1.2'''
'''v1.2.0'''
*todo: document changes
* Todo: document changes.
'''v1.1.1'''
'''v1.1.1'''
* whilst the previous release worked, it did so out of sheer luck.
* Whilst the previous release worked, it did so out of sheer luck..
* the path size passed to the fs set of functions was way too small. this is now fixed :)
* The path size passed to the fs set of functions was way too small. this is now fixed.
'''v1.1.0'''
'''v1.1.0'''
* config can be found in /config/sys-patch/config.ini
* Config can be found in /config/sys-patch/config.ini.
* if no config file is found, a default one is created.
* If no config file is found, a default one is created.
** [options]
** [options]
** patch_sysmmc=1
** patch_sysmmc=1
** patch_emummc=1
** patch_emummc=1
* change either of the above to disable sys-patch from running when booted as sys/emu.
* Change either of the above to disable sys-patch from running when booted as sys/emu.
'''v1.0'''
'''v1.0.0'''
* First Release.
* First Release.


Line 114: Line 118:


== External links ==
== External links ==
* Gbatemp - https://gbatemp.net/threads/sys-patch-sysmod-that-patches-on-boot.633517/
* GitHub - https://github.com/ITotalJustice/sys-patch
* Github - https://github.com/ITotalJustice/sys-patch
* GBAtemp - https://gbatemp.net/threads/sys-patch-sysmod-that-patches-on-boot.633517/

Revision as of 13:36, 10 June 2023

sys-patch
Syspatchnx.png
General
AuthorTotalJustice
TypeSysmodules
Version1.4.2
LicenseMIT License
Last Updated2023/05/28
Links
Download
Website
Source

A script-like system module that patches fs, es, ldr and nifm on boot. This has the same effect as sigpatches, the benefit of sys-patch is that it only needs updating when something major breaks.

sys-patch also outputs a log where you can see which patches are applied, which one failed and some other useful data. You can manually read the log or use the overlay, which you can also use to change the config.

sigpatch-updater was updated to support updating and auto running sys-patch. This means that you can update and apply patches without having to reboot.

Note: At this time, it's recommended to use this alongside sigpatches, so in case you forget to update patches, sys-patch should continue to work.

Features

  • A simple configuration file for customizing patch options, located at /config/sys-patch/config.ini.
  • An overlay that allows you to change the configuration options and see the applied patches.
  • A minimal memory footprint (16 KiB) and binary size (~50 KiB).

Installation

Extract the zip file to the root of the SD card.

User guide

What is being patched?

sys-patch is designed to patch the following components:

  • fs and es - Require new patches after every new firmware version.
  • ldr - Requires new patches after every new Atmosphere release.
  • nifm - The ctest patch allows the device to connect to a network without needing to make a connection to a server.

These patches are applied on boot, and once they are done, the sys-module stops running.

Config

sys-patch features a simple config. This can be manually edited or updated using the overlay.

The configuration file can be found in /config/sys-patch/config.ini. The file is generated once the module is ran for the first time.

[options]
patch_sysmmc=1   ; 1=(default) patch sysmmc, 0=don't patch sysmmc
patch_emummc=1   ; 1=(default) patch emummc, 0=don't patch emummc
enable_logging=1 ; 1=(default) output /config/sys-patch/log.ini 0=no log
version_skip=1   ; 1=(default) skips out of date patterns, 0=search all patterns

Overlay

The overlay can be used to change the config options and to see what patches are applied.

  • Unpatched means the patch wasn't applied (likely not found).
  • Patched (green) means it was patched by sys-patch.
  • Patched (yellow) means it was already patched, likely by sigpatches or a custom Atmosphere build.

FAQ

Q. If I am using sigpatches already, is there any point in using this?

Yes, in 3 situations.

  1. A new "ldr" patch needs to be created after every Atmosphere update. Sometimes, a new silent Atmosphere update is released. This tool will always patch "ldr" without having to update patches.
  2. Building Atmosphere from src will require you to generate a new "ldr" patch for that custom built Atmosphere. This is easy enough due to the public scripts / tools that exist out there, however this will always be able to patch "ldr".
  3. If you forget to update your patches when you update your firmware / Atmosphere, this sys-module should be able to patch everything. So it can be used as a fall back.

Q. Does this mean that I should stop downloading / using sigpatches?

No, I would personally recommend continuing to use sigpatches. Reason being is that should this tool ever break, I likely wont be quick to fix it.

Screenshots

syspatchnx2.jpgsyspatchnx3.jpgsyspatchnx4.jpgsyspatchnx5.jpg

Changelog

v1.4.2

  • Fix options "logging" key missmatch between sysmod and overlay.

v1.4.1

  • The patch itself always worked, however it failed to detect if the patch was already applied.
  • This isn't a big issue, and the only one to notice was probably me.

v1.4.0

  • Add ctest patch, add per patch toggle, made overlay more organised.

v1.3.0

  • Add more logging, pattern version skipping, min/max fs pattern versions.

v1.2.0

  • Todo: document changes.

v1.1.1

  • Whilst the previous release worked, it did so out of sheer luck..
  • The path size passed to the fs set of functions was way too small. this is now fixed.

v1.1.0

  • Config can be found in /config/sys-patch/config.ini.
  • If no config file is found, a default one is created.
    • [options]
    • patch_sysmmc=1
    • patch_emummc=1
  • Change either of the above to disable sys-patch from running when booted as sys/emu.

v1.0.0

  • First Release.

Credits / Thanks

Software is built on the shoulders of giants. This tool wouldn't be possible without these people:

External links

Advertising: