scrcpyd/README.md
2025-12-20 10:22:16 -06:00

1.8 KiB
Raw Blame History

scrcpyd

scrcpyd icon

A Magisk module that keeps your device unlocked only while scrcpy is running and ADB is connected. It does not remove your PIN/pattern and restores your original lock timeout as soon as scrcpy exits.

Built for long XR sessions where repeated unlocks are disruptive, without weakening security when scrcpy is not in use.

Features

  • Scoped to scrcpy: active only when the scrcpy server process exists.
  • ADBgated: requires ADB connection (USB or wireless).
  • Restores settings: original lock timeout is restored immediately on exit.
  • Optional screenawake: only when scrcpy is started with --stay-awake.

Install

  1. Download the latest ZIP from Releases.
  2. Magisk → Modules → Install from storage → select the ZIP.
  3. Reboot.

Usage

  • Normal (keep unlocked, screen may still dim):

    scrcpy
    
  • Keep the screen awake too:

    scrcpy --stay-awake
    

How It Works

While scrcpy is running and ADB is connected, the module:

  • Sets lock_screen_lock_after_timeout to a very large value.
  • If --stay-awake is detected in the scrcpy process args, it also sets screen_off_timeout to a very large value and issues a wake event.

When scrcpy stops or ADB disconnects, it restores your original values.

Safety & Security

  • Your PIN/pattern remains intact.
  • No changes persist after scrcpy exits.
  • The module is inert when ADB is off or scrcpy is not running.

Compatibility

  • Tested on Android 16 (LineageOS) + Magisk.
  • Should work on most modern Android builds with Magisk and root.

Files

  • service.sh: background watcher/keepalive loop
  • module.prop: Magisk metadata
  • icon.svg: module icon

Uninstall

  • Magisk → Modules → Remove
  • Reboot

Release

Latest release: https://github.com/sudoxreboot/scrcpyd/releases