mirror of
https://github.com/okhsunrog/vpnhide.git
synced 2026-05-02 00:22:14 +00:00
The "Debug logging" toggle in Diagnostics drove three sinks: app process (VpnHideLog.enabled), system_server hooks (/data/system/ vpnhide_debug_logging via inotify FileObserver), and the Zygisk module (/data/adb/modules/vpnhide_zygisk/debug_logging at fork). The kernel module's /proc/vpnhide_debug was its own little channel, flipped only inside exportDebugZip's capture window — so a user who enabled "Debug logging" persistently still got silent kmod, and the kmod-flip in exportDebugZip would even reset it back to 0 at the end regardless of the user's preference. Make kmod the fourth sink: - writeDebugFlagFiles now drives /proc/vpnhide_debug alongside the other two file flags, batched into a single su invocation so the toggle UI doesn't pay three round-trips. - /proc/vpnhide_debug is per-boot in-kernel state, so kmod's service.sh re-seeds it from the canonical /data/system/ vpnhide_debug_logging at every boot — same model as targets.txt → /proc/vpnhide_targets. - Manual echo 1/echo 0 > /proc/vpnhide_debug calls in exportDebugZip go away — applyDebugLoggingRuntime + the existing loggingWasForced save/restore block now handle kmod uniformly with the other sinks, fixing the "kmod stays OFF after capture even if user toggle was ON" bug as a side effect. - Updated en + ru toggle description to mention dmesg, since the toggle is no longer logcat-only. - docs/state.md §3 and §4 updated; new "Debug-logging fan-out" subsection in §3 with a diagram. Behaviour change worth a changelog entry: a user with toggle ON will now get verbose kmod entries in dmesg too. |
||
|---|---|---|
| .. | ||
| META-INF/com/google/android | ||
| customize.sh | ||
| module.prop | ||
| post-fs-data.sh | ||
| service.sh | ||