├── README.md
├── app
├── build.gradle
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── aidl
│ ├── android
│ │ ├── app
│ │ │ └── IApplicationThread.aidl
│ │ └── content
│ │ │ └── IIntentReceiver.aidl
│ └── com
│ │ └── tile
│ │ └── screenoff
│ │ └── IScreenOff.aidl
│ ├── assets
│ ├── 404.html
│ ├── favicon.png
│ ├── index.html
│ └── starter.sh
│ ├── java
│ └── com
│ │ └── tile
│ │ └── screenoff
│ │ ├── BinderContainer.java
│ │ ├── DisplayControl.java
│ │ ├── GlobalService.java
│ │ ├── HttpRequest.java
│ │ ├── HttpRequestParser.java
│ │ ├── MainActivity.java
│ │ ├── ScrOff.java
│ │ ├── ScrOn.java
│ │ ├── ScreenController.java
│ │ ├── SimpleTcpServer.java
│ │ └── tileService.java
│ └── res
│ ├── drawable
│ ├── arrow.xml
│ ├── fw.xml
│ ├── icon.xml
│ ├── selectground.xml
│ └── tile.xml
│ ├── layout
│ └── main.xml
│ ├── mipmap-anydpi-v26
│ └── icon.xml
│ ├── mipmap
│ └── ic.png
│ ├── values-night-v31
│ └── colors.xml
│ ├── values-night
│ ├── colors.xml
│ └── styles.xml
│ ├── values-v31
│ └── colors.xml
│ ├── values-zh-rTW
│ └── strings.xml
│ ├── values
│ ├── colors.xml
│ ├── strings.xml
│ └── styles.xml
│ ├── xml-v25
│ └── shortcuts.xml
│ └── xml
│ └── a.xml
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── local.properties
└── settings.gradle
/README.md:
--------------------------------------------------------------------------------
1 | # ScreenOff
2 | 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.
3 | # How it works
4 | By reflecting "android.view.SurfaceControl" (the same way with Scrcpy). Check it in "SurfaceControl.java".
5 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | }
4 |
5 | android {
6 | namespace 'com.tile.screenoff'
7 | compileSdk 35
8 |
9 | defaultConfig {
10 | applicationId "com.tile.screenoff"
11 | minSdk 21
12 | targetSdk 35
13 | versionCode 21
14 | versionName "21"
15 | multiDexEnabled false
16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17 | }
18 |
19 | signingConfigs {
20 | release {
21 | storeFile file('D:\\key.keystore') // Keystore文件的路径
22 | storePassword 'wewewe' // Keystore密码
23 | keyAlias 'key0' // Key别名
24 | keyPassword 'wewewe' // Key密码
25 | }
26 | }
27 | buildTypes {
28 | release {
29 | shrinkResources false
30 | signingConfig signingConfigs.release
31 | minifyEnabled false
32 | }
33 | }
34 | compileOptions {
35 | sourceCompatibility JavaVersion.VERSION_1_8
36 | targetCompatibility JavaVersion.VERSION_1_8
37 | }
38 | lintOptions {
39 | checkReleaseBuilds false
40 | abortOnError false
41 | }
42 | buildFeatures {
43 | aidl true
44 | }
45 | }
46 |
47 | dependencies {
48 |
49 | implementation "dev.rikka.shizuku:api:13.1.0"
50 | implementation "dev.rikka.shizuku:provider:13.1.0"
51 | }
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
Please try index.html
14 |您可以在此界面控制主机设备的亮灭屏。上方二维码就是本页面的链接。
86 |设备品牌 | 89 |{{brand}} | 90 |
---|---|
设备信息 | 93 |{{device}} | 94 |
当前状态 | 97 |{{state}} | 98 |