Homebrew Homebrew app sys-patch - sysmod that patches on boot

Always stay away from any prepackaged package unless you know every bit of it and you agree that configuration. I do recommend to follow the next set of steps. PLEASE READ ALL OF THEM THOROUGHLY AND THEN START TO EXECUTE THEM.
  • Backup and remove the SDMC:/atmosphere folder.
  • Backup and remove the SDMC:/bootloader folder.
  • Backup and remove the SDMC:/switch/.overlays folder.
  • Backup and remove the SDMC:/config/sys-patch folder.

  • Download latest Atmosphère from Atmosphère's github EVEN IF YOU THINK YOU HAVE IT, sometimes is silently updated
  • Download latest Hekate from Hekate's github EVEN IF YOU THINK YOU HAVE IT, sometimes is silently updated
  • Download latest Sys-Patch Sysmodule from the Downloads section EVEN IF YOU THINK YOU HAVE IT, sometimes is silently updated
  • Download latest NX-OVLLoader sysmodule from the official Github, EVEN IF YOU THINK YOU HAVE IT, sometimes is silently updated
  • Download latest UltraHand Overlay from the official Github, EVEN IF YOU THINK YOU HAVE IT, sometimes is silently updated

Extract each file to the root of your SD Card, at this point you should not need to «replace» any file because should not be any file on the Atmosphere, Hekate, TESLA (UltraHand) and SYS-Patch paths.

Restore YOUR OWN CUSTOMIZED SDMC:/bootloader/hekate_ipl.ini file from the backup you did before. if is necessary remove any kip1patch=nosigchk line on it because you are not using patches.ini so far.
Or if you like to use it on your console, download latest Sigpatches archive from the post indicated on the thread, but copy only the file SDMC:/bootloader/patches.ini and do not remove the lines on your hekate_ipl.ini. this is not necessary.

Edit your SDMC:/exosphere.ini file and add/change the next values to «1» in order to enable Atmosphère incognito on telemetry:
Code:
blank_prodinfo_sysmmc=1
blank_prodinfo_emummc=1
Enable DNSMiTM, by editing the SDMC:/atmosphere/config/system_settings.ini and be sure the parameter enable_dns_mitm have the value u8!0x1:
enable_dns_mitm = u8!0x1
Be sure you remove the «;» at start of the line.

Reboot your console and check everything is working. for your problem the most possible culprit are SaltyNX or SYS-Tweak sysmodules which are no supported on FW 20 yet.

After everything is working fine, you can install all the overlays and sysmodules/cheats/mods you like, if after install them someting do not work fine, now you know the culprit is one of them and not your CFW and SYS-Patch installation.

NOTES:
  • SDMC:/ is your console's SD Card.
  • If you use Mac or any apple OS to manage your SD card on the computer, BEFORE your first start enter Hekate by pressing VOL- at start of console and run a Archive Bit Flag repair.
  • Read the OP of this thread and the download page of SYS-Patch sysmodule to learn the meaning of Green, Yellow and Red on the Sys-Patch Overlay.
  • Next time read the Ultimate Guide to upgrade your Firmware thread here on GBATemp.

Thank you. The culprit, as you correctly noted, was due to SaltyNX. Strange that the HATS pack had the latest version of SaltyNX 1.4.8 but I guess it's still not supported on FW 20?

Another strange thing is that while the games open and load as usual, the sys-patch log still shows "noncasigchk_new" as unpatched. I guess this doesn't need to be patched in order for games to run?
 
  • Like
Reactions: Blythe93
Another strange thing is that while the games open and load as usual, the sys-patch log still shows "noncasigchk_new" as unpatched. I guess this doesn't need to be patched in order for games to run?
There are two noncasigchk patches you only need one patched to the games works. also look on the options if you have the version skip enabled and on the toggle patches if you have all noncasigchk patches enabled.
 
  • Like
Reactions: Blythe93
There are two noncasigchk patches you only need one patched to the games works. also look on the options if you have the version skip enabled and on the toggle patches if you have all noncasigchk patches enabled.

Everything is enabled so I think I'm good there. When you say check version skip enabled, I'm guessing it should be the default which is on?
 
Always stay away from any prepackaged package unless you know every bit of it and you agree that configuration. I do recommend to follow the next set of steps. PLEASE READ ALL OF THEM THOROUGHLY AND THEN START TO EXECUTE THEM.
  • Backup and remove the SDMC:/atmosphere folder.
  • Backup and remove the SDMC:/bootloader folder.
  • Backup and remove the SDMC:/switch/.overlays folder.
  • Backup and remove the SDMC:/config/sys-patch folder.


Extract each file to the root of your SD Card, at this point you should not need to «replace» any file because should not be any file on the Atmosphere, Hekate, TESLA (UltraHand) and SYS-Patch paths.

Restore YOUR OWN CUSTOMIZED SDMC:/bootloader/hekate_ipl.ini file from the backup you did before. if is necessary remove any kip1patch=nosigchk line on it because you are not using patches.ini so far.
Or if you like to use it on your console, download latest Sigpatches archive from the post indicated on the thread, but copy only the file SDMC:/bootloader/patches.ini and do not remove the lines on your hekate_ipl.ini. this is not necessary.

Edit your SDMC:/exosphere.ini file and add/change the next values to «1» in order to enable Atmosphère incognito on telemetry:
Code:
blank_prodinfo_sysmmc=1
blank_prodinfo_emummc=1
Enable DNSMiTM, by editing the SDMC:/atmosphere/config/system_settings.ini and be sure the parameter enable_dns_mitm have the value u8!0x1:
enable_dns_mitm = u8!0x1
Be sure you remove the «;» at start of the line.

Reboot your console and check everything is working. for your problem the most possible culprit are SaltyNX or SYS-Tweak sysmodules which are no supported on FW 20 yet.

After everything is working fine, you can install all the overlays and sysmodules/cheats/mods you like, if after install them someting do not work fine, now you know the culprit is one of them and not your CFW and SYS-Patch installation.

NOTES:
  • SDMC:/ is your console's SD Card.
  • If you use Mac or any apple OS to manage your SD card on the computer, BEFORE your first start enter Hekate by pressing VOL- at start of console and run a Archive Bit Flag repair.
  • Read the OP of this thread and the download page of SYS-Patch sysmodule to learn the meaning of Green, Yellow and Red on the Sys-Patch Overlay.
  • Next time read the Ultimate Guide to upgrade your Firmware thread here on GBATemp.
Thank you for the help!

i update my switch to latest atmosphere and firmware but i cant open my retroarch and melonds through nsp forwarder. is there a fix?
 
Thank you for the help!

i update my switch to latest atmosphere and firmware but i cant open my retroarch and melonds through nsp forwarder. is there a fix?
Install SYS-Patch Sysmodule and restart your console
Post automatically merged:

Thank you for the help!

i update my switch to latest atmosphere and firmware but i cant open my retroarch and melonds through nsp forwarder. is there a fix?
And RECREATE NEW NSP FORWARDERS, FORWARDERS CREATED FOR FIRMWARE 18 OR LESS WILL NOT WORK ON NEWER FIRMWARES
 
Install SYS-Patch Sysmodule and restart your console
Post automatically merged:


And RECREATE NEW NSP FORWARDERS, FORWARDERS CREATED FOR FIRMWARE 18 OR LESS WILL NOT WORK ON NEWER FIRMWARES
i already copy the sys-patch folder from download, is it already installed? where can i check the sys-patch installed or not?
 
Thank you now it worked.

since i update firmware and atmosphere, my battery right now seems drain more in sleep mode. is there any fix?
 
  • Like
Reactions: Blythe93
Enable DNSMiTM, by editing the SDMC:/atmosphere/config/system_settings.ini and be sure the parameter enable_dns_mitm have the value u8!0x1:
enable_dns_mitm = u8!0x1
Be sure you remove the «;» at start of the line.
Hi Impeeza,

Thanks for all your invaluable contributions to the Switch community. However, I would like to add something about enabling DNS MiTM. As i just successfully created a fresh emummc from v20.4.0 I noticed https://switch.hacks.guide/user_guide/all/sd_preparation.html this guide only refers to place a DNS.MITM DNS redirection config emummc.txt file in the hosts folder and nothing more. As I was aware of the enablement of MiTM in the system_settings.ini I did some testing:

When clean installing Atmoshpere there isn't any \atmosphere\config\system_settings.ini file. There is an example system settings file file \atmosphere\config_templates\system_settings.ini

[atmosphere]
; Controls whether dns.mitm is enabled
; 0 = Disabled, 1 = Enabled
; enable_dns_mitm = u8!0x1

; Controls whether dns.mitm uses the default redirections in addition to
; whatever is specified in the user's hosts file.
; 0 = Disabled (use hosts file contents), 1 = Enabled (use defaults and hosts file contents)
; add_defaults_to_dns_hosts = u8!0x1

So i tested several configurations regarding tot enabling DNSMitm;

Without any system_settings.ini (defaults) Mitm is enabled by default (dns_mitm_startup.log):
DNS Mitm:
Adding defaults to redirection list.
Selecting hosts file...
Skipping /hosts/emummc_31574152.txt because it does not exist...
Selected /hosts/emummc.txt

The same result is also obtained by setting enable_dns_mitm = u8!0x1 but now explicitly enabled. So without this setting mitm is enabled by default.

enable_dns_mitm = u8!0x0 -> Will disable MiTM (no dns_mitm_startup.log)

add_defaults_to_dns_hosts = u8!0x1 -> This is also default enabled and combines the internal and external hosts file

add_defaults_to_dns_hosts = u8!0x0 -> This will just load the hosts file only:
DNS Mitm:
Selecting hosts file...
Skipping /hosts/emummc_31574152.txt because it does not exist...
Selected /hosts/emummc.txt
Redirections:

As far as I can tell the sample settings system_settings.ini does show the defaults when not set:

[atmosphere]
; Controls whether dns.mitm is enabled
; 0 = Disabled, 1 = Enabled
; enable_dns_mitm = u8!0x1

; Controls whether dns.mitm uses the default redirections in addition to
; whatever is specified in the user's hosts file.
; 0 = Disabled (use hosts file contents), 1 = Enabled (use defaults and hosts file contents)
; add_defaults_to_dns_hosts = u8!0x1

Both settings are enabled by default as per my testing and I guess therefore (its a good default) isn't it per se to be called 'enable mitm' as it's enabled by default. But thats just according to my test results. I hope this could be verified ofcourse.!
 
Hi Impeeza,

Thanks for all your invaluable contributions to the Switch community. However, I would like to add something about enabling DNS MiTM. As i just successfully created a fresh emummc from v20.4.0 I noticed https://switch.hacks.guide/user_guide/all/sd_preparation.html this guide only refers to place a DNS.MITM DNS redirection config emummc.txt file in the hosts folder and nothing more. As I was aware of the enablement of MiTM in the system_settings.ini I did some testing:

When clean installing Atmoshpere there isn't any \atmosphere\config\system_settings.ini file. There is an example system settings file file \atmosphere\config_templates\system_settings.ini

[atmosphere]
; Controls whether dns.mitm is enabled
; 0 = Disabled, 1 = Enabled
; enable_dns_mitm = u8!0x1

; Controls whether dns.mitm uses the default redirections in addition to
; whatever is specified in the user's hosts file.
; 0 = Disabled (use hosts file contents), 1 = Enabled (use defaults and hosts file contents)
; add_defaults_to_dns_hosts = u8!0x1

So i tested several configurations regarding tot enabling DNSMitm;

Without any system_settings.ini (defaults) Mitm is enabled by default (dns_mitm_startup.log):
DNS Mitm:
Adding defaults to redirection list.
Selecting hosts file...
Skipping /hosts/emummc_31574152.txt because it does not exist...
Selected /hosts/emummc.txt

The same result is also obtained by setting enable_dns_mitm = u8!0x1 but now explicitly enabled. So without this setting mitm is enabled by default.

enable_dns_mitm = u8!0x0 -> Will disable MiTM (no dns_mitm_startup.log)

add_defaults_to_dns_hosts = u8!0x1 -> This is also default enabled and combines the internal and external hosts file

add_defaults_to_dns_hosts = u8!0x0 -> This will just load the hosts file only:
DNS Mitm:
Selecting hosts file...
Skipping /hosts/emummc_31574152.txt because it does not exist...
Selected /hosts/emummc.txt
Redirections:

As far as I can tell the sample settings system_settings.ini does show the defaults when not set:

[atmosphere]
; Controls whether dns.mitm is enabled
; 0 = Disabled, 1 = Enabled
; enable_dns_mitm = u8!0x1

; Controls whether dns.mitm uses the default redirections in addition to
; whatever is specified in the user's hosts file.
; 0 = Disabled (use hosts file contents), 1 = Enabled (use defaults and hosts file contents)
; add_defaults_to_dns_hosts = u8!0x1

Both settings are enabled by default as per my testing and I guess therefore (its a good default) isn't it per se to be called 'enable mitm' as it's enabled by default. But thats just according to my test results. I hope this could be verified ofcourse.!
a ha ha, you and me are mind connected, while I was upgrading to 20.4.0 yesterday, noted the lack of some steps. thanks for your help, next monday will update the posts.
 
Once the patch is applied on boot does it stay patched forever until maybe a new firmware is out or it will patch every time the system boots? I guess the question is if it's safe to delete the sys patch after the first successful boot?
 
Once the patch is applied on boot does it stay patched forever until maybe a new firmware is out or it will patch every time the system boots? I guess the question is if it's safe to delete the sys patch after the first successful boot?
The memory is kept patched until next reboot of system, then if you have the sysmodule turn on, the memory is patched again. the sysmodule patches the memory on the fly, DO NOT CHANGE any file on your console nor firmware.
 
sys-patch status for 21.0.0 (version 1.5.6)

working:
ES (the patch required to start signature intact games)
NIFM patch (the one that force-enables network connectivity) (*needs verification on console)
FS patch for noncasigchk_new (required for installed homebrew, and signature broken ncas) (fixed by me in upcoming PR)
NIM patch (the one that fixes crash on startup from blank prodinfo) (fixed by me in upcoming PR)



Post automatically merged:


matching function for noncasigchk_new identified at 0x265f0 (21.0.0). (was 0x23e0 20.5.0)


before (20.5.0):
BL
TBZ
MOV
ADD
BL

now (21.0.0):
BL
TBZ
ADD
MOV
MOV
BL

before:
.. 94 .. .. 00 36 .. 25 80 52
5a 08 - [00] 94 [60 09] 00 36 [02] -> 25 80 52 e0 23 01 91 e1 03 1f 2a 96 a8 06 94

after:
.. 94 .. .. 00 36 .. .. .. .. .. .. .. .. .. 25 80 52
79 07 - [00] 94 [00 09] 00 36 [e0 23 01 91 e1 03 1f 2a 02] -> 25 80 52 -> 1c b0 06 94



FS most important to address, corrected, will see whats up with nim, nifm then send PR
NIFM pattern is "correct", but the stp instruction desired to be patched has been changed out with 00 00 00 00, which works in our favour. sys-patch never verifies the bytes, so i assume it will be fine to leave that as is, since we're applying a "'MOV X0, #0xD180 + MOVK X0, #0x8F0, LSL #16 + SVC #0XB + MOV X0, XZR + RET'" anyway

NIM old: (up to 20.5.0)
.. 0F 00 35 1F 20 03 D5 .. .. .. ..

nim new: (21.0.0+)
.. 07 00 35 1F 20 03 D5 .. .. .. ..


https://github.com/impeeza/sys-patch/pull/15

@impeeza since you're the current maintainer it's best you merge and push 1.5.7 as soon as possible, anyway i consider it fixed with https://github.com/impeeza/sys-patch/pull/15/commits/0de0f4abac478b662139fb6a191debfdd95dcab0
 
Last edited by bth,
sys-patch status for 21.0.0 (version 1.5.6)

working:
ES (the patch required to start signature intact games)
NIFM patch (the one that force-enables network connectivity) (*needs verification on console)
FS patch for noncasigchk_new (required for installed homebrew, and signature broken ncas) (fixed by me in upcoming PR)
NIM patch (the one that fixes crash on startup from blank prodinfo) (fixed by me in upcoming PR)



Post automatically merged:


matching function for noncasigchk_new identified at 0x265f0 (21.0.0). (was 0x23e0 20.5.0)


before (20.5.0):
BL
TBZ
MOV
ADD
BL

now (21.0.0):
BL
TBZ
ADD
MOV
MOV
BL

before:
.. 94 .. .. 00 36 .. 25 80 52
5a 08 - [00] 94 [60 09] 00 36 [02] -> 25 80 52 e0 23 01 91 e1 03 1f 2a 96 a8 06 94

after:
.. 94 .. .. 00 36 .. .. .. .. .. .. .. .. .. 25 80 52
79 07 - [00] 94 [00 09] 00 36 [e0 23 01 91 e1 03 1f 2a 02] -> 25 80 52 -> 1c b0 06 94



FS most important to address, corrected, will see whats up with nim, nifm then send PR
NIFM pattern is "correct", but the stp instruction desired to be patched has been changed out with 00 00 00 00, which works in our favour. sys-patch never verifies the bytes, so i assume it will be fine to leave that as is, since we're applying a "'MOV X0, #0xD180 + MOVK X0, #0x8F0, LSL #16 + SVC #0XB + MOV X0, XZR + RET'" anyway

NIM old: (up to 20.5.0)
.. 0F 00 35 1F 20 03 D5 .. .. .. ..

nim new: (21.0.0+)
.. 07 00 35 1F 20 03 D5 .. .. .. ..


https://github.com/impeeza/sys-patch/pull/15

@impeeza since you're the current maintainer it's best you merge and push 1.5.7 as soon as possible, anyway i consider it fixed with https://github.com/impeeza/sys-patch/pull/15/commits/0de0f4abac478b662139fb6a191debfdd95dcab0
Hello there, I am just waking up, will approve now
Post automatically merged:

Sadly the new code doesn't build ;(
 
Last edited by impeeza,
Hello there, I am just waking up, will approve now
Post automatically merged:

Sadly the new code doesn't build ;(

https://github.com/impeeza/sys-patch/actions/runs/19272139438/job/55102905704#step:4:35

next time, read the build logs and instead mention me in the PR instead of reverting, you just made it very messy.

https://github.com/borntohonk/sys-patch/commit/45312d8897466d7dc563b95a99bc6bee1605292b

it builds just by addressing the forgotten change of nim to nim_old and nim_new, i re-submitted PR with fix
 
  • Like
Reactions: Blythe93
https://github.com/impeeza/sys-patch/actions/runs/19272139438/job/55102905704#step:4:35

next time, read the build logs and instead mention me in the PR instead of reverting, you just made it very messy.

https://github.com/borntohonk/sys-patch/commit/45312d8897466d7dc563b95a99bc6bee1605292b

it builds just by addressing the forgotten change of nim to nim_old and nim_new, i re-submitted PR with fix
Thanks, sorry for the confusion, I am really not too versed on the GitHub administration.
 
  • Like
Reactions: Blythe93

Site & Scene News

Popular threads in this forum