mirror of
https://github.com/okhsunrog/vpnhide.git
synced 2026-04-28 06:31:27 +00:00
Reinstalling a native module via KSU/Magisk replaces /data/adb/modules/<id>/ wholesale with the contents of the new zip, so the runtime flag file `debug_logging` (which is not part of the zip) is wiped — even though the user's persisted preference in SharedPrefs still says ON. After such a reinstall, zygisk silently dropped its log filter to error-only and the user had to toggle the setting off-then-on to get logs back. Re-apply the persisted preference to disk in MainActivity.onCreate via applyDebugLoggingRuntime, on a background dispatcher. Two `su` roundtrips per app start, only when the user actually had logging enabled — cheap.
941 B
941 B
2026-04-26
English
Restore debug-logging flag for the zygisk module on app start. KSU/Magisk replace the module dir wholesale on reinstall, wiping the runtime flag file even though the user's preference is still ON; the app now re-applies the persisted preference to disk on every start so logs stay enabled.
Русский
Восстанавливаем флаг отладочного логирования для zygisk-модуля при старте приложения. KSU/Magisk при переустановке модуля заменяют его папку целиком, удаляя runtime-файл флага, хотя в настройках логирование всё ещё включено; приложение теперь переписывает сохранённое значение на диск при каждом старте, так что логи остаются включёнными.