Repository navigation
v3.1.0: fix all open issues (#2–#7), bedtime alarm, PIN gate - #8
Conversation
- Re-enable parental controls after a write via cmd 1007 RevertRestrictionTemporaryUnlocked; v3.0.0 left them temporarily unlocked, so limits never applied (tailiang2008#3, tailiang2008#6, tailiang2008#7) - Detect an unset network clock and offer to seed it from the system clock; the play timer doesn't count down without it (tailiang2008#2) - Skip cmd 1201 when no PIN is registered and require a PIN before any play-timer write; log every write to sd:/switch/nx_pctl_manager.log (tailiang2008#5) - Model PlayTimerSettings as 4-byte header + 8 x 8-byte day settings and add a bedtime alarm editor, verified against getters 1954-1959 (tailiang2008#4) - Refuse play-timer reads/writes below fw 21.0.0 (0x44-byte struct) - Route "remove limit" through the same guarded write - Per-day editor can set a day back to "no limit" - Launch-time PIN gate; diagnostic report always available - zh-Hans translation Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
….5.0 - Name header bytes: restrictionMode (0 ALARM / 1 FORCED_TERMINATION) and timerMode (0 DAILY / 1 EACH_DAY_OF_THE_WEEK); read the daily slot when timerMode is DAILY - Add "When time is up: suspend software / notify only" option; drop the PROBE header-flip experiments - Document why writes need a PIN (pctl silently drops them otherwise) and a valid network clock (pctl clears `enabled` without one) - docs/pctl-reverse-engineering.md with offsets and evidence Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Drop the unsupported `multiline` Label attribute (pin_gate.xml, and the same latent bug in init_error.xml); borealis treats unknown XML attributes as fatal - Write borealis logs to sd:/switch/nx_pctl_borealis.log (unbuffered) - Catch exceptions from run(): log them and shut borealis down through a final mainLoop() iteration, so its task thread is stopped and the GPU context released; previously abort() returned to hbloader with the thread alive and the console crashed (2168-0001), then hbmenu (2168-0002) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dcb88f2 to
23732c7
Compare
Also drop the README's mention of forgot-PIN recovery, which the launch PIN check no longer allows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hi @puppywang Great work on v3.1.0 — the pctl reverse-engineering notes are excellent, especially the PlayTimerSettings header (restrictionMode / timerMode / daily rule), the silent no-PIN drop in 195101 and the NetworkSystemClock root cause of #2. I maintain PlayGuard, a fork of Pctl Manager that already covers most of these fixes (re-locking with 1007 after a write, setting the network clock on offline consoles, PIN checks, bedtime alarm, diagnostics…). Your findings just helped me fix DAILY-mode consoles, credited here: JigSawFr#133 I'd be really happy to get your feedback, issues or contributions, and to share what we learn on our side too. Joining our efforts would be great! 你好!v3.1.0 做得非常好——pctl 的逆向分析笔记很出色,尤其是 PlayTimerSettings 头部(restrictionMode / timerMode / 每日规则)、195101 在未设置 PIN 时静默丢弃写入,以及 #2 的根本原因(NetworkSystemClock)。 我维护着 PlayGuard,它是 Pctl Manager 的一个分支,已经包含了其中大部分修复(写入后用 1007 重新锁定、为离线主机设置网络时钟、PIN 校验、就寝闹钟、诊断报告等)。你的发现刚刚帮我修复了"每天相同"(DAILY)模式的问题,并在这里注明了出处:JigSawFr#133 非常欢迎你的反馈、issue 或贡献,我们这边的发现也很乐意分享给你。如果能一起合作就太好了! |
|
@puppywang thanks for your contribution |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Play-timer setters patch the stored settings instead of rebuilding them from Sunday's slot, so per-day bedtimes from the companion app survive a limit, mode or remove write. Settings this app wrote itself produce the same bytes as before. The query reports bedtime_varies, shown as "(varies by day)". - guarded_write also switches parental controls back on (cmd 1007) when they were already paused before the write; otherwise the new settings never applied. - pctl_is_temporarily_unlocked returns a Result; a failed 1006 query now counts as still paused and shows the relock_failed dialog. - prompt_hhmm reopens the keypad with an error header on an invalid time instead of returning as if cancelled. - "Set network clock" asks before overwriting a clock that is already set; the seed + refresh + toast code is shared. - borealis log level DEBUG -> INFO (no SD write on every focus change). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes #2, fixes #3, fixes #4, fixes #5, fixes #6, fixes #7.
The root causes come from reversing the fw 22.5.0
pctlsysmodule. Offsets and evidence are indocs/pctl-reverse-engineering.md. Tested on fw 22.5.0 / Atmosphère 1.12.0 (emuMMC).Root causes and fixes
enabledcleared.pctlre-derivesenabledonly if it can read the time from the NetworkSystemClock, and a console that can't reach Nintendo never sets that clock. This matches the QuickNTP finding in #2.time:ssession for this, like QuickNTP.pctl's "no PIN registered" result from the 1201 PIN check. Also, 195101 is silently ignored when no PIN is registered but still returns success.bedtimeEnabled, alarm h/m, reset h/m, limitTimeEnabled, u16 limitTime. The header bytes areenabled,restrictionMode(ALARM / FORCED_TERMINATION) andtimerMode(DAILY / EACH_DAY_OF_THE_WEEK). The new editor verifies each write through getters 1954–1959.Other changes
PtSettingsstruct replaces theu16[34]view. For the same input, writes are byte-identical to v3.0.0, except that unrestricted days keep the 06:00 reset default.restrictionMode).multilineLabel attribute as fatal.init_error.xmlalready had this latent bug.main()now catches exceptions and shuts borealis down through one moremainLoop(). Before,abort()returned to hbloader with the task thread still alive, which caused 2168-0001.sd:/switch/nx_pctl_manager.log(writes) andsd:/switch/nx_pctl_borealis.log. The diagnostic dump is always available. ThePROBEbuild option is removed.Behaviour change to review
The app now asks for the console's PIN at launch when one is registered. Without this check, a child can open the tool and remove the limit, because the tool reads the PIN itself. The downside is that the tool can no longer recover a forgotten PIN, so the README now points to Nintendo's master-key reset. If you'd prefer to keep the recovery path, I can make the gate optional (for example, a flag file on the SD card).
中文简述:修复了 #2–#7。
docs/pctl-reverse-engineering.md。🤖 Generated with Claude Code