AI summary
Xposed module that unlocks your phone with an alternative PIN and runs custom root commands. Supports PAM-style authentication where entered credentials can trigger scripts or decide unlock behavior. Requires Magisk, LSPosed, and root access. Version 1.8.1 fixes compatibility mode auto-enable and first-unlock issues.
Generated by AI. May contain inaccuracies.
Screenshots
About this app
AlternativeUnlockXposed provides an reliable way to run something when providing a specific, wrong PIN on your Android lock screen. Unlike Duress, this app uses Xposed Framework so you can also unlock your phone with a wrong PIN, preventing some social engineering vulunability 😇 And by the way it also works before your first unlock after reboot.
Features
Alternative PIN to unlock phone Run command on alternative PIN, with root Easy to use user interface Material You design Note this is an Xposed app, so it may not work on older Android versions.
Currently tested on:
Android 15 (arm64, LOS 22.1) Xiaomi HyperOS 3.0.8.0 Android 14 (arm64) Android 13 (x86_64) Android 12 (x64_64) Android 11 (arm64, LOS 18.1) Currently NOT working on:
Android <= 10 Samsung OneUI OnePlus OxygenOS Tecno HiOS most other non AOSP It should also work on other architectures .
HowToUse Install Magisk Install LSPosed Install this module Activate this module in LSPosed settings (It automatically enables for SystemUI) Launch AlternativeUnlockXposed, allow superuser access, set your primary password and alternative password (optional) Setup what to do when entered the alternative PIN: change action to sudo, and set your command. e.g. : for i in `pm list packages | grep -i -E 'telegram|sagernet|twitter|discord|tinder' | cut -d : -f 2` ; do pm disable $i; done With "PAM style unlock" enabled, the command receives the entered credential via the $AU_INPUT environment variable, and its exit code decides whether the phone unlocks (0 = unlock, anything else = don't). e.g. : if [ "$AU_INPUT" = $(date +%m%H%M) ]; then exit 0; else exit 1; fi Test your unlock after click "Restart SystemUI" Pro tip: You can use some automation software to make it easier to customize your commands ! just use a command like am broadcast -a safety.intent.test and catch the intent in your favorite app, it could be extended to do some stuff like take a picture, record audio, send a email, etc. like Automate . Note this kind of software can't work before unlock, so just make it an addition to your commands separated with a ;.
If you are using this software, please consider to give it a star ⭐ on Github so we can know how many people are using it, since it doesn't contain any kind of tracking code.
Note
You may need to set mount namespace to system global namespace and disable mount namespace isolation in your superuser app (e.g. Magisk, Apatch) to work on some devices.
Here's how to use this module if you use Pattern for screen lock
How does it work ? When the fake password is provided, this module detects the input and replaces it with the real password. As a result, both the fake and real passwords can unlock the device, regardless of whether it is the first unlock or not.
Furthermore, since the fake password will be replaced with the real one, the fake password can also successfully decrypt the phone after a reboot.
Roadmap Support PIN unlock Run custom command on alternative PIN User interface Run different commands on multiple fake password (implemented with pam_exec style) Support more lockscreen modes Zygisk version (?) Require authentication for settings activity Option to hide the app from launcher (I don't need it because I use SmartLauncher)
GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007
What's new
- Minor update In this update, we fixed some issues:
- compatibility mode being turned on automatically compatibility mode don't work before first unlock This should only affect users who use compatibility mode.
About this version
- Version
- 1.8.1 (12)
- Size
- 27.99 MB
- Requires Android
- 11
- Target SDK
- 30
- Architecture
- x86, x86_64, arm64-v8a, armeabi-v7a
- Downloads
- 20
- Updated
- Oct 9, 2026
- Package
- com.leohearts.alternativeUnlockHook
Similar apps
Ratings & reviews
- 50
- 40
- 30
- 20
- 10