mirror of
https://github.com/sudoxreboot/scrcpyd
synced 2026-04-14 11:36:40 +00:00
Compare commits
8 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b9ef5969c | ||
|
|
36c61df6a6 | ||
|
|
9a8db41d31 | ||
|
|
672dca33e6 | ||
|
|
7cbdb16e83 | ||
|
|
6988e55a46 | ||
|
|
a5a0ae7039 | ||
|
|
eafb2fc5af |
2 changed files with 73 additions and 2 deletions
60
README.md
60
README.md
|
|
@ -1,5 +1,61 @@
|
||||||
# scrcpyd
|
# scrcpyd
|
||||||
|
|
||||||
Magisk module for scrcpy keep-unlock with optional screen-awake when using `--stay-awake`.
|
<p align="center">
|
||||||
|
<img src="icon.svg" alt="scrcpyd icon" width="256">
|
||||||
|
</p>
|
||||||
|
|
||||||
Latest release contains the installable ZIP.
|

|
||||||
|
|
||||||
|
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.
|
||||||
|
- **ADB‑gated**: requires ADB connection (USB or wireless).
|
||||||
|
- **Restores settings**: original lock timeout is restored immediately on exit.
|
||||||
|
- **Optional screen‑awake**: 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):
|
||||||
|
```bash
|
||||||
|
scrcpy
|
||||||
|
```
|
||||||
|
|
||||||
|
- Keep the screen awake too:
|
||||||
|
```bash
|
||||||
|
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/keep‑alive loop
|
||||||
|
- `module.prop`: Magisk metadata
|
||||||
|
- `icon.png`: module icon
|
||||||
|
|
||||||
|
## Uninstall
|
||||||
|
- Magisk → Modules → Remove
|
||||||
|
- Reboot
|
||||||
|
|
||||||
|
## Release
|
||||||
|
Latest release: https://github.com/sudoxreboot/scrcpyd/releases
|
||||||
|
|
|
||||||
15
icon.svg
Normal file
15
icon.svg
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="512" height="512" fill="none" stroke="url(#iconStroke)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" role="img" aria-label="scrcpyd icon">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="iconStroke" x1="0" y1="0" x2="1" y2="0">
|
||||||
|
<stop offset="0%" stop-color="#00FFD5"/>
|
||||||
|
<stop offset="33.3333%" stop-color="#B79CFF"/>
|
||||||
|
<stop offset="66.6667%" stop-color="#7FFFD4"/>
|
||||||
|
<stop offset="100%" stop-color="#FF4FD8"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<path d="M13 3H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-3" />
|
||||||
|
<path d="M8 21h8" />
|
||||||
|
<path d="M12 17v4" />
|
||||||
|
<path d="m22 3-5 5" />
|
||||||
|
<path d="m17 3 5 5" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 713 B |
Loading…
Reference in a new issue