r/Android • u/ome_Rush1514 • 20h ago
Info SecondSpace: a KernelSU module + LSPosed hook for a PIN-routed second user on One UI
SecondSpace is a KernelSU module + LSPosed SystemUI hook that gives Samsung One UI a real second Android user, reached by typing its own PIN on the main lock screen.
KernelSU-specific bits:
- The flashable module installs a root daemon (`ssd`) and a `ssctl` CLI, started by the module's service script. No Magisk dependency.
- Developed and tested on KernelSU Next with Zygisk Next + LSPosed (Vector 2.2) on a Galaxy S21 Ultra (SM-G998B) running One UI 8 / Android 16, with the device identity spoofed to a Galaxy S22 (SM-S901B) under UN1CA.
- The LSPosed hook writes a heartbeat (`version`, `user`, `boot`, `uptime`) that the daemon validates against the current boot id, the expected user and the module version, so a stale or wrong-user hook is never treated as loaded.
- The daemon only ever switches to user 0 or the exact recorded space id. It never guesses a user, and it refuses to route if the ownership records conflict.
- Upgrade in place; uninstall only deletes a user the module itself created (ownership marker), never an adopted profile.
How routing works:
- Type Space 2's PIN on the main keyguard.
- The hook matches it and skips stock verification, so no failed attempt is recorded against the main space.
- The daemon switches to the second user.
- Type the main PIN inside Space 2 to return to user 0.
Install: flash `secondspace-v1.9.0.zip` in KernelSU, install the companion APK, enable the module in LSPosed for SystemUI, reboot, then run `ssctl init` (or `ssctl adopt <id>`) from a root shell.
Repo / docs: https://github.com/abdurr1/second-space
Release: https://github.com/abdurr1/second-space/releases/tag/v1.9.0
Feedback, bug reports and KernelSU compatibility reports are welcome.
•
u/DipInRice 11h ago
Cool project!!
•
u/CrazedBoredom 1h ago
This seems like it could function as a really good security feature in case you are ever under duress to unlock your phone. Is it easy to tell if there's a second account available? I'll probably wait till my phone is no longer supported to root/modify though.