Skip to content

Latest commit

ย 

History

History
95 lines (72 loc) ยท 2.42 KB

File metadata and controls

95 lines (72 loc) ยท 2.42 KB

PinGuard

LSPosed module โ€” require fingerprint / password to unpin screen-pinned apps

License: MIT Android 15+ LSPosed

็ฎ€ไฝ“ไธญๆ–‡


Features

  • Intercepts screen unpin and requires system credential verification (fingerprint / PIN / pattern)
  • Goes directly to home screen after verification โ€” no lock screen
  • Only protects apps in LSPosed scope; other apps unpin normally
  • Optional: suppress the system "To unpin this app..." toast
  • Debug logging toggle

Requirements

  • Android 15+ (API 35+)
  • LSPosed / LSPosed Fork
  • Root (Magisk / KernelSU / APatch)

Installation

  1. Download and install APK from Releases
  2. Enable module in LSPosed Manager
  3. Select scope:
    • System Framework (android) โ€” required
    • Apps to protect โ€” select as needed
  4. Reboot
  5. Open PinGuard and confirm the green status indicator

Usage

  1. Open a protected app and enable Screen Pinning
  2. When trying to unpin, the system credential dialog appears
  3. Successful verification โ†’ unpins and returns to home
  4. Failed / cancelled โ†’ stays pinned

Settings

Option Description
Enable Protection Master switch; disabling allows normal unpin
Hide Exit Toast Suppress the system "To unpin..." toast
Debug Log Output verbose logs to logcat (filter: PinGuard)

How It Works

User attempts to unpin
        โ”‚
        โ–ผ
  stopSystemLockTaskMode()  โ† Hooked
        โ”‚
        โ–ผ
  Is app in protected list? โ”€โ”€Noโ”€โ”€โ–ถ Allow normally
        โ”‚Yes
        โ–ผ
  Broadcast to pinned app
        โ”‚
        โ–ผ
  Show KeyguardManager credential dialog
        โ”‚
    โ”Œโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”
    โ–ผ       โ–ผ
  Pass     Fail
    โ”‚       โ”‚
    โ–ผ       โ–ผ
 Manually   Stay
 dismantle  pinned
 LockTask
 internals
    โ”‚
    โ–ผ
 Return to home
 (no lock screen)

Related

๐Ÿ“„ License

This project is open-sourced under the MIT License. Issues and PRs are welcome.

โšก