vpnhide/kmod/module
okhsunrog 16578a15d2 feat: target apps across all user profiles (work profile, etc.)
Android user profiles (work profile, MIUI Second Space, Private Space,
secondary users) each give the same package its own UID in the
namespace `<user>*100000 + <app_id>`. Previously every pkg→UID
resolver used plain `pm list packages -U`, which only emits UIDs for
the primary user, so the work-profile copy of Telegram kept seeing
the VPN even though the user had marked Telegram as a target.

Switch every resolver to `pm list packages -U --user all`. The pm
output format for multi-profile apps is comma-separated on one line:

    package:com.android.chrome uid:10187,1010187

Each call site now splits on `,` and emits one UID per line so every
profile's copy is individually matched by the hooks. No UI changes —
"mark Telegram as a target" just now means "in every profile it's
installed in".

Resolvers touched (all places found by an audit, no duplicates left):

  Shell (boot-time):
    kmod/module/service.sh
    zygisk/module/service.sh
    portshide/module/vpnhide_ports_apply.sh

  Kotlin (save-time via suExec):
    AppPickerScreen.kt       — buildUidResolver
    AppHidingScreen.kt       — buildHidingUidResolver
    ShellUtils.kt            — ensureSelfInTargets
    TargetsCache.kt          — PM_LIST batch script + parser

Verified on a Pixel 4a with a managed profile (user 10):
  - Chrome toggled in LZ on primary → both 10187 and 1010187 land in
    /data/system/vpnhide_uids.txt.
  - Primary-only apps (Ozon, etc.) still resolve to a single UID.
  - ensureSelfInTargets correctly adds both UIDs when vpnhide is
    installed across profiles.
2026-04-20 01:27:11 +03:00
..
META-INF/com/google/android fix(modules): add META-INF for Magisk versions before v28 2026-04-16 00:23:05 +03:00
customize.sh Fix hardcoded v0.1.0 in customize.sh — read version from module.prop 2026-04-14 16:56:57 +03:00
module.prop chore: release v0.6.2 2026-04-17 16:24:53 +03:00
post-fs-data.sh feat: diagnose wrong-variant kmod installs end-to-end 2026-04-19 20:41:30 +03:00
service.sh feat: target apps across all user profiles (work profile, etc.) 2026-04-20 01:27:11 +03:00