fix(lsposed): stop making hook-status file world-readable

`/data/system/vpnhide_hook_active` was being chmodded to 0644 via
`setReadable(true, false)` so the VPN Hide app could read it
directly. But the app already runs every other read of files under
/data/system/ via `suExec` (see DashboardData.kt's read of this
exact file), so the world-readable bit was redundant — and a
discoverable marker for anti-tamper SDKs that scan /data/system/
for known filenames.

Drop the line; the file stays at the default 0640 system:system
mode, readable by system_server (which writes it) and by anything
running as root (which is how the app reads it).
This commit is contained in:
okhsunrog 2026-04-26 15:46:09 +03:00
parent a0bec24576
commit adec082804

View file

@ -212,7 +212,10 @@ class HookEntry : IXposedHookLoadPackage {
val content = "version=$version\nboot_id=$bootId\ntimestamp=$timestamp\n"
val statusFile = File(HOOK_STATUS_FILE)
statusFile.writeText(content)
statusFile.setReadable(true, false)
// Don't expose this file to untrusted apps — anti-tamper SDKs
// scan /data/system/ for known marker filenames. The VPN Hide
// app reads it via root (`suExec("cat ...")`), see
// DashboardData.kt — same pattern as vpnhide_uids.txt.
HookLog.i("VpnHide: wrote hook status file (version=$version, boot_id=$bootId)")
} catch (t: Throwable) {
HookLog.e("VpnHide: failed to write hook status: ${t.message}")