Fix: patch every SSSE check site, not just the first - #120
ForUltraplayer wants to merge 2 commits into
Conversation
Update-SSSEBinary detects all viable (Primary, Secondary) check-site pairs but only patched $viableCandidates[0]. SSSE 8.0.5.0 contains two such sites, so the second one stayed live and SamsungSystemSupportEngine.exe crashed with 0xc0000409 in ucrtbase.dll as soon as Samsung Settings reached that path -- surfacing as "the service is not working" (Bananz0#51, Bananz0#94, Bananz0#99). Iterate over every detected candidate instead. Binaries with a single site behave exactly as before.
PR Summary by QodoPatch every detected SSSE hardware-check site
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can ask Qodo to dismiss a finding you disagree with, with your reason on record |
|
Hi I tried using your ps1 but I am still facing the same error i selected book 4 ultra and fresh install am I missing something thanks.... i fixed it by using the 6.3.3.0 SSSE version which made settings work i am hesitant on trying to upgrade to 8.0.5.0 since that seems to have been the issue for me..... |
The secondary check paired with a primary site was searched for within a hardcoded 512 bytes. On SSSE 8.0.5.0 the second site's secondary sits 466 bytes past its primary, leaving 46 bytes of margin, so a modest layout change in a future build would drop that site from the viable set entirely and the crash would return even with every viable candidate patched. Widen the window to 1024 bytes and stop the scan at the next primary candidate, so a secondary can never be paired across site boundaries. The window sizes and the pattern length are named constants instead of magic numbers. Verified against the four SSSE builds the installer can obtain from the Microsoft Update Catalog (6.1.8.0, 6.3.3.0, 7.1.2.0, 8.0.5.0): the patched output is byte-identical to the previous commit for every one of them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Thanks for testing, and good news — your 6.3.3.0 result actually fits this PR's I pulled every SSSE build the installer can get from the Microsoft Update Catalog and
The installer patches only the first site it finds. Up to 7.1.2.0 there is only one, Also, to clear one thing up: the "Book 4 Ultra" choice is a device profile and doesn't Which file did you actually run, though? The documented one-liner For what it's worth, here is what the two code paths produce from an untouched 8.0.5.0
The middle row is byte-for-byte what was sitting in If you ever want to check an 8.0.5.0 install without reinstalling anything, this is $b = [IO.File]::ReadAllBytes('C:\GalaxyBook\SamsungSystemSupportEngine.exe')
foreach ($o in 0x12CA4,0x12E15,0x68135,0x6830F) { '{0:X6}: {1:X2} {2:X2}' -f $o,$b[$o],$b[$o+1] }No need to touch your working setup on my account, though — I'm mainly trying to work |
|
So what i did is i went to your branch, and downloaded the ps1 which you had send for a commit and then I ran it. ./Install on it with bypass execution policy.... I tried a few times to make it work with 8.0 but I think I was messing it up somewhere until I decided to leave it at 6.3 I will try to get it to 8.0 I will test and let you know my outputs. |
|
I think I'll just have to disable the 8.0.5.0 path for now. There's an issue that fixes this. For now have a look at this: My guess is that the issue lies in the registry settings rather than the driver files. After overwriting the Galaxy Book 3 configuration files, it worked normally, but as a result of the overwrite, unsupported hardware features were also displayed (battery settings, activated when the lid is opened). After the SamsungSystemSupportService started running and I performed several reboots, the unsupported hardware features disappeared. sfourswcomp15.inf_amd64_aa796d95102eb75d.zip Originally posted by @Minpeach0501 in #51 (comment) |
Samsung Settings closes with "service is not working": SSSE binary patch is applied to only one of multiple check sites
Likely the root cause behind #51, #94 and #99.
Summary
Update-SSSEBinarylocates every viable (Primary, Secondary) check-site pair inSamsungSystemSupportEngine.exe, but then patches only the first one:SSSE 8.0.5.0 is the first build with two such sites. Every earlier version the
installer can reach has exactly one, which is why
[0]was correct until now — andwhy the bug appeared out of nowhere with the current
$LATEST_SSSE_VERSION.I extracted the binary from each CAB the installer downloads from the Microsoft
Update Catalog (
Search.aspx?q=sam0428) and ran the script's own detector over it:This also explains the workaround that has been circulating since #38 — "install
6.3.3.0 and stay there". It works because 6.3.3.0 has a single check site, so the
old code happens to patch all of it. Nothing about 6.3.3.0 is special beyond that.
Symptom
Samsung Settings opens, reports that the service is not working, and exits. Event log:
The installer reports success, so the install looks healthy:
GBeSupportServiceis running,the DriverStore entry is present, and the registry spoof is applied.
Evidence
Running the pre-fix and post-fix
Update-SSSEBinaryover an untouched 8.0.5.0binary (
md5 db6b9854dba3bc718d970cdb9ab3cc26, exactly what the Catalog serves):0F 8575 240F 8575 2Ddb6b9854…48 E9EB 240F 8575 2D95cd8b3d…48 E9EB 2448 E9EB 2D9c986331…Those two output hashes are not hypothetical. On the machine where I hit this,
95cd8b3d…is byte-for-byte what v3.1.5 left inC:\GalaxyBook(and in theDriverStore) while Samsung Settings was crashing, and
9c986331…is the binarysitting there now with Samsung Settings working. The only difference between the
crashing and the working binary is the second check site.
Both sites use the identical instruction shapes the existing detector already recognises
(
0F 85->48 E9,75->EB, Pattern B), so no new pattern handling is required.Fix
Commit 1 iterates over every viable candidate instead of taking
[0]. Theper-site patch/skip logic is unchanged; it is just moved inside a
foreach, and theoffset is added to the "already present" messages so partially patched binaries are
readable in the log.
Commit 2 addresses a related weakness found while verifying the first. A
secondary check was searched for within a hardcoded 512 bytes of its primary. Site 2
on 8.0.5.0 sits 466 bytes out — 46 bytes of margin. A modest layout change in a
future build would push it out of range, drop the site from
$viableCandidatesbefore the loop ever sees it, and bring the crash back. The window is now 1024 bytes
and the scan stops at the next primary candidate, so a secondary can never be paired
across site boundaries. The magic numbers are named constants.
Commit 2 is behaviour-preserving: patching all four Catalog builds produces output
byte-identical to commit 1 (identical md5 for 6.1.8.0, 6.3.3.0, 7.1.2.0 and 8.0.5.0).
Verified on
Install-GalaxyBookEnabler.ps1v3.1.5, default install path$LATEST_SSSE_VERSION, so a default installreaches this binary without choosing anything unusual
960XGL(Galaxy Book4 Ultra), region KRboth sites, and the Buds auto-switch page (Galaxy Buds app -> Connection management
-> Buds auto switch) is reachable
Note
The failure is not hardware dependent: the dropped candidate is decided purely by the
contents of the SSSE binary, so any install landing on 8.0.5.0 leaves the same site live.
Worth flagging for diagnosis: everything
Update-SSSEBinaryprints goes throughWrite-Host, soApplied N patch(es)never reaches the install log. That is part ofwhy this went unexplained for so long — the logs attached to #94 and #99 could not
have shown it. I left that alone here to keep the diff focused, but it would be a
cheap improvement.