息屏运行
20 · GitHub
More about this app
Turn off your Android's screen without entering standby/sleep mode
ScreenOff
An android app to control your Android's screen to display or not display via Shizuku. This is not the same with pressing power key, since other APPs will CONTINUE working after turning off the screen.
How it works
By reflecting "android.view.SurfaceControl" (the same way with Scrcpy). Check it in "SurfaceControl.java".
How Shizuku is used
Can turn the screen off without sleeping and back on via `SurfaceControl.setDisplayPowerMode` through Shizuku.
This is an AI-assisted analysis of Shizuku-related usages in the app's public source code. It is best effort, so it may not catch every single usage.
How this app uses Shizuku
Shizuku is used to start a privileged helper that controls the display power while keeping the device awake.
- Turn screen off awake: turn the display off without entering standby and turn it back on from the in app switch, using display power control through Shizuku.
- Trigger from system controls: start the screen off or on from the quick tile, shortcut activities, volume keys and floating control, using the same privileged display control through Shizuku.
- Control over local network: check the current screen state and switch the display off or on from a local web page, using the same privileged display control through Shizuku.
Android APIs or commands used
android.view.SurfaceControl.setDisplayPowerModeandroid.view.SurfaceControl.getBuiltInDisplayandroid.view.SurfaceControl.getInternalDisplayTokencom.android.server.display.DisplayControl.getPhysicalDisplayIdscom.android.server.display.DisplayControl.getPhysicalDisplayTokenandroid.app.IActivityManager.broadcastIntentandroid.app.IActivityManager.unbroadcastIntentpm grantapp_processsh
Changelog
What's new for version 20
Permissions
6 permissions requested