├── .gitignore
├── .idea
├── codeStyles
│ └── codeStyleConfig.xml
├── encodings.xml
├── kotlinc.xml
└── misc.xml
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── net
│ │ └── maple3142
│ │ └── lktmanager
│ │ └── lktmanager
│ │ └── ExampleInstrumentedTest.kt
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── net
│ │ │ └── maple3142
│ │ │ └── lktmanager
│ │ │ ├── MainActivity.kt
│ │ │ └── Utils.kt
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ └── ic_launcher_background.xml
│ │ ├── layout
│ │ └── activity_main.xml
│ │ ├── menu
│ │ └── main_menu.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── values-zh-rCN
│ │ └── strings.xml
│ │ ├── values-zh-rTW
│ │ └── strings.xml
│ │ ├── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ │ └── xml
│ │ └── shortcuts.xml
│ └── test
│ └── java
│ └── net
│ └── maple3142
│ └── lktmanager
│ └── lktmanager
│ └── ExampleUnitTest.kt
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── preview.jpg
├── settings.gradle
└── shortcuts.jpg
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Created by https://www.gitignore.io/api/kotlin,android,intellij
3 | # Edit at https://www.gitignore.io/?templates=kotlin,android,intellij
4 |
5 | ### Android ###
6 | # Built application files
7 | *.apk
8 | *.ap_
9 | *.aab
10 |
11 | # Files for the ART/Dalvik VM
12 | *.dex
13 |
14 | # Java class files
15 | *.class
16 |
17 | # Generated files
18 | bin/
19 | gen/
20 | out/
21 |
22 | # Gradle files
23 | .gradle/
24 | build/
25 |
26 | # Local configuration file (sdk path, etc)
27 | local.properties
28 |
29 | # Proguard folder generated by Eclipse
30 | proguard/
31 |
32 | # Log Files
33 | *.log
34 |
35 | # Android Studio Navigation editor temp files
36 | .navigation/
37 |
38 | # Android Studio captures folder
39 | captures/
40 |
41 | # IntelliJ
42 | *.iml
43 | .idea/workspace.xml
44 | .idea/tasks.xml
45 | .idea/gradle.xml
46 | .idea/assetWizardSettings.xml
47 | .idea/dictionaries
48 | .idea/libraries
49 | .idea/caches
50 | # Android Studio 3 in .gitignore file.
51 | .idea/caches/build_file_checksums.ser
52 | .idea/modules.xml
53 |
54 | # Keystore files
55 | # Uncomment the following lines if you do not want to check your keystore files in.
56 | #*.jks
57 | #*.keystore
58 |
59 | # External native build folder generated in Android Studio 2.2 and later
60 | .externalNativeBuild
61 |
62 | # Google Services (e.g. APIs or Firebase)
63 | # google-services.json
64 |
65 | # Freeline
66 | freeline.py
67 | freeline/
68 | freeline_project_description.json
69 |
70 | # fastlane
71 | fastlane/report.xml
72 | fastlane/Preview.html
73 | fastlane/screenshots
74 | fastlane/test_output
75 | fastlane/readme.md
76 |
77 | # Version control
78 | vcs.xml
79 |
80 | # lint
81 | lint/intermediates/
82 | lint/generated/
83 | lint/outputs/
84 | lint/tmp/
85 | # lint/reports/
86 |
87 | ### Android Patch ###
88 | gen-external-apklibs
89 | output.json
90 |
91 | ### Intellij ###
92 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
93 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
94 |
95 | # User-specific stuff
96 | .idea/**/workspace.xml
97 | .idea/**/tasks.xml
98 | .idea/**/usage.statistics.xml
99 | .idea/**/dictionaries
100 | .idea/**/shelf
101 |
102 | # Generated files
103 | .idea/**/contentModel.xml
104 |
105 | # Sensitive or high-churn files
106 | .idea/**/dataSources/
107 | .idea/**/dataSources.ids
108 | .idea/**/dataSources.local.xml
109 | .idea/**/sqlDataSources.xml
110 | .idea/**/dynamic.xml
111 | .idea/**/uiDesigner.xml
112 | .idea/**/dbnavigator.xml
113 |
114 | # Gradle
115 | .idea/**/gradle.xml
116 | .idea/**/libraries
117 |
118 | # Gradle and Maven with auto-import
119 | # When using Gradle or Maven with auto-import, you should exclude module files,
120 | # since they will be recreated, and may cause churn. Uncomment if using
121 | # auto-import.
122 | # .idea/modules.xml
123 | # .idea/*.iml
124 | # .idea/modules
125 |
126 | # CMake
127 | cmake-build-*/
128 |
129 | # Mongo Explorer plugin
130 | .idea/**/mongoSettings.xml
131 |
132 | # File-based project format
133 | *.iws
134 |
135 | # IntelliJ
136 |
137 | # mpeltonen/sbt-idea plugin
138 | .idea_modules/
139 |
140 | # JIRA plugin
141 | atlassian-ide-plugin.xml
142 |
143 | # Cursive Clojure plugin
144 | .idea/replstate.xml
145 |
146 | # Crashlytics plugin (for Android Studio and IntelliJ)
147 | com_crashlytics_export_strings.xml
148 | crashlytics.properties
149 | crashlytics-build.properties
150 | fabric.properties
151 |
152 | # Editor-based Rest Client
153 | .idea/httpRequests
154 |
155 | # Android studio 3.1+ serialized cache file
156 |
157 | # JetBrains templates
158 | **___jb_tmp___
159 |
160 | ### Intellij Patch ###
161 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
162 |
163 | # *.iml
164 | # modules.xml
165 | # .idea/misc.xml
166 | # *.ipr
167 |
168 | # Sonarlint plugin
169 | .idea/sonarlint
170 |
171 | ### Kotlin ###
172 | # Compiled class file
173 |
174 | # Log file
175 |
176 | # BlueJ files
177 | *.ctxt
178 |
179 | # Mobile Tools for Java (J2ME)
180 | .mtj.tmp/
181 |
182 | # Package Files #
183 | *.jar
184 | *.war
185 | *.nar
186 | *.ear
187 | *.zip
188 | *.tar.gz
189 | *.rar
190 |
191 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
192 | hs_err_pid*
193 |
194 | # End of https://www.gitignore.io/api/kotlin,android,intellij
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/kotlinc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # LKT Manager
2 |
3 | A manager app for [LKT](https://github.com/Magisk-Modules-Repo/legendary_kernel_tweaks).
4 |
5 | 
6 | 
7 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | apply plugin: 'kotlin-android'
4 |
5 | apply plugin: 'kotlin-android-extensions'
6 |
7 | android {
8 | compileSdkVersion 26
9 | defaultConfig {
10 | applicationId "net.maple3142.lktmanager"
11 | minSdkVersion 24
12 | targetSdkVersion 26
13 | versionCode 7
14 | versionName "0.0.7"
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 | }
17 | buildTypes {
18 | release {
19 | minifyEnabled true
20 | shrinkResources true
21 | zipAlignEnabled true
22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 | compileOptions {
26 | sourceCompatibility JavaVersion.VERSION_1_8
27 | targetCompatibility JavaVersion.VERSION_1_8
28 | }
29 | buildToolsVersion '27.0.3'
30 | }
31 | repositories {
32 | maven { url 'https://jitpack.io' }
33 | }
34 | dependencies {
35 | implementation fileTree(include: ['*.jar'], dir: 'libs')
36 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
37 | implementation 'com.android.support:appcompat-v7:26.1.0'
38 | implementation 'com.android.support:support-annotations:27.1.1'
39 | testImplementation 'junit:junit:4.12'
40 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
41 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
42 | implementation 'com.github.topjohnwu.libsu:core:2.3.3'
43 | }
44 |
--------------------------------------------------------------------------------
/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
22 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/net/maple3142/lktmanager/lktmanager/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package net.maple3142.lktmanager.lktmanager
2 |
3 | import android.support.test.InstrumentationRegistry
4 | import android.support.test.runner.AndroidJUnit4
5 | import org.junit.Assert.assertEquals
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | /**
10 | * Instrumented test, which will execute on an Android device.
11 | *
12 | * See [testing documentation](http://d.android.com/tools/testing).
13 | */
14 | @RunWith(AndroidJUnit4::class)
15 | class ExampleInstrumentedTest {
16 | @Test
17 | fun useAppContext() {
18 | // Context of the app under test.
19 | val appContext = InstrumentationRegistry.getTargetContext()
20 | assertEquals("lktm.maple3142.net.lktmanager", appContext.packageName)
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/java/net/maple3142/lktmanager/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package net.maple3142.lktmanager
2 |
3 | import android.app.ActivityManager
4 | import android.app.ProgressDialog
5 | import android.content.Intent
6 | import android.net.Uri
7 | import android.os.Bundle
8 | import android.os.StrictMode
9 | import android.support.v7.app.AlertDialog
10 | import android.support.v7.app.AppCompatActivity
11 | import android.text.Html
12 | import android.text.method.LinkMovementMethod
13 | import android.view.Menu
14 | import android.view.MenuItem
15 | import android.widget.Button
16 | import android.widget.TextView
17 | import com.topjohnwu.superuser.Shell
18 |
19 | class MainActivity : AppCompatActivity() {
20 |
21 | val ids = arrayListOf(R.id.battery, R.id.balanced, R.id.performance, R.id.turbo)
22 | var btns: List