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

Anyone else having the issue where games still don't work AND atmosphere crashes after 50 seconds with sys-patch installed?
In addition, trying to open the Nintendo Switch Online tab also causes a crash
 
I didn't specify, but when I removed sys-patch, the WiFi and sleep mode issues disappeared
NIFM patch would be the cause of that then. (which you can disable without removing sys-patch)

a dns-mitm config would/could replace that, but i would prefer not having to rely on a third-party host that just returns "X-org: Nintendo" for the lan/wifi module to be enabled.

i did find some minor differences diffing NIFM, but i assumed the new extra 4 bytes of zero wouldn't impact much due to the nifm patch itself returns and ends the function...

it might be nintendo padded it so that the patch itself doesn't overwrite and end the function, i will look at that, i guess.
 
the issue with the NIFM patch itself is sys-patch never actually validate the bytes that its supposed to patch for NIFM.

the 8 byte padding nintendo added makes the patch end up in the wrong function.
sp1.jpg
 
the issue with the NIFM patch itself is sys-patch never actually validate the bytes that its supposed to patch for NIFM.

the 8 byte padding nintendo added makes the patch end up in the wrong function.View attachment 539749
that's the problem of using binary patches in memory... sometimes you patch random stuff... at least it should be simple to patch
 
that's the problem of using binary patches in memory... sometimes you patch random stuff... at least it should be simple to patch

nah, sys-patch has code to verify the bytes being patched.


the issue is the NIFM patch was never properly implemented and just finds and verifies bytes that have nothing to do with the function being patched.

anyway fix would be something this


C++:
constexpr auto stp_cond(u32 inst) -> bool {
    return (inst >> 24) == 0xA9; // stp x29, x30, [sp, #-0x30]!
}


    { "ctest2", "14...........91...........97...............14", 41, 0, stp_cond, ctest_patch, ctest_applied, true, MAKEHOSVERSION(19,0,0), MAKEHOSVERSION(20,5,0) }, //19.0.0 - 20.5.0
    { "ctest3", "14...........91...........97...............14", 49, 0, stp_cond, ctest_patch, ctest_applied, true, MAKEHOSVERSION(21,0,0), FW_VER_ANY }, //21.0.0
 
Last edited by bth,
  • Like
Reactions: Zoria and Blythe93
I’m experiencing WiFi issues on Atmosphere 1.10.0 pre-release with sys-patches 1.5.8, and all games/backups keep requesting an ‘internet connection for verification’.

On my OLED Switch I use PRODINFO blanked via NxNANDManager. In previous sys-patch versions this setup never caused issues. I switched to PRODINFO blanking after noticing that DBI, whose Russian developer once threatened to add malware if people used the English version, could still read my real serial even with Exosphere enabled, and since then I’ve moved to Awoo instead.
 
nah, sys-patch has code to verify the bytes being patched.


the issue is the NIFM patch was never properly implemented and just finds and verifies bytes that have nothing to do with the function being patched.

anyway fix would be something this


C++:
constexpr auto stp_cond(u32 inst) -> bool {
    return (inst >> 24) == 0xA9; // stp x29, x30, [sp, #-0x30]!
}


    { "ctest2", "14...........91...........97...............14", 41, 0, stp_cond, ctest_patch, ctest_applied, true, MAKEHOSVERSION(19,0,0), MAKEHOSVERSION(20,5,0) }, //19.0.0 - 20.5.0
    { "ctest3", "14...........91...........97...............14", 49, 0, stp_cond, ctest_patch, ctest_applied, true, MAKEHOSVERSION(21,0,0), FW_VER_ANY }, //21.0.0
We should put a PR on the repo?
 
btw it still doesn't work... I mean, now it doesn't crash and wifi icon is ok, but softwares doesn't start (yes, I uninstalled and reinstalled them)... it's looping on Waiting...
 
Are you sure? The github still says the same version as previous (1.10 prerelease)
the hash is different, he doesn't make other releases, he just replaces fusee.bin and the atmosphere that has a different git hash in the filename.
Post automatically merged:

@impeeza i pushed a pr for addressing nifm that needs to be rebuilt with libnx 4.10 to your repository, and it needs testing to verify it works on an actual console. I only test synthetically myself :^)
 
Last edited by bth,
i pushed a pr for addressing nifm that needs to be rebuilt with libnx 4.10 to your repository, and it needs testing to verify it works on an actual console. I only test synthetically myself :^)
I see ctest3 is applied successfully, but I still have my problem and I don't know why :/
Code:
[fs]
noacidsigchk1=Skipped
noacidsigchk2=Skipped
noncasigchk_old=Skipped
noncasigchk_old2=Skipped
noncasigchk_new=Patched (sys-patch)
nocntchk=Skipped
nocntchk2=Patched (sys-patch)
[ldr]
noacidsigchk=Patched (sys-patch)
[es]
es1=Skipped
es2=Skipped
es3=Patched (sys-patch)
[nifm]
ctest=Skipped
ctest2=Skipped
ctest3=Patched (sys-patch)
[nim]
nim_old=Skipped
nim_new=Patched (sys-patch)
[ssl]
disablecaverification1=Disabled
disablecaverification2=Disabled
disablecaverification3=Disabled
[stats]
version=1.5.8-ce3c04c
build_date=16.11.2025 20:36:33
fw_version=21.0.0
ams_version=1.10.0
ams_target_version=0.0.0
ams_keygen=20
ams_hash=bfe98bc5
is_emummc=0
heap_size=4096
buffer_size=4096
patch_time=0.057s
 
the hash is different, he doesn't make other releases, he just replaces fusee.bin and the atmosphere that has a different git hash in the filename.
Post automatically merged:

@impeeza i pushed a pr for addressing nifm that needs to be rebuilt with libnx 4.10 to your repository, and it needs testing to verify it works on an actual console. I only test synthetically myself :^)
 

Attachments

Site & Scene News

Popular threads in this forum