├── .gitattributes
├── .github
├── dependabot.yml
└── workflows
│ └── android.yml
├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── app
├── .gitignore
├── build.gradle.kts
├── proguard-log.pro
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── assets
│ └── xposed_init
│ ├── kotlin
│ └── com
│ │ └── yuk
│ │ └── hyperOS_XXL
│ │ ├── activity
│ │ ├── MainActivity.kt
│ │ └── pages
│ │ │ ├── AndroidPage.kt
│ │ │ ├── MainPage.kt
│ │ │ ├── MediaEditorPage.kt
│ │ │ ├── MiuiHomePage.kt
│ │ │ ├── PackageInstallerPage.kt
│ │ │ ├── PersonalAssistantPage.kt
│ │ │ ├── PowerKeeperPage.kt
│ │ │ ├── SecurityCenterPage.kt
│ │ │ ├── SettingsPage.kt
│ │ │ ├── SystemUIPage.kt
│ │ │ └── ThemeManagerPage.kt
│ │ ├── blur
│ │ ├── BlurView.kt
│ │ └── MiBlurUtilities.kt
│ │ ├── hooks
│ │ ├── MainHook.kt
│ │ └── modules
│ │ │ ├── BaseHook.kt
│ │ │ ├── framework
│ │ │ ├── MaxWallpaperScale.kt
│ │ │ ├── RemoveScreenshotRestriction.kt
│ │ │ ├── RemoveSmallWindowRestriction1.kt
│ │ │ └── corepatch
│ │ │ │ ├── CorePatchForU.kt
│ │ │ │ ├── CorePatchHelper.kt
│ │ │ │ ├── CorePatchMainHook.kt
│ │ │ │ └── ReturnConstant.kt
│ │ │ ├── guardprovider
│ │ │ └── AntiDefraudAppManager.kt
│ │ │ ├── mediaeditor
│ │ │ └── RemoveCropRestriction.kt
│ │ │ ├── miuihome
│ │ │ ├── AlwaysShowStatusBarClock.kt
│ │ │ ├── AnimDurationRatio.kt
│ │ │ ├── BlurWhenOpenFolder.kt
│ │ │ ├── CategoryFeatures.kt
│ │ │ ├── DockBlur.kt
│ │ │ ├── DoubleTapToSleep.kt
│ │ │ ├── FuckValidateTheme5.kt
│ │ │ ├── MinusOneOverlapMode.kt
│ │ │ ├── RecentViewRemoveCardAnim.kt
│ │ │ ├── RemoveSmallWindowRestriction2.kt
│ │ │ ├── ScrollIconName.kt
│ │ │ ├── SetDeviceLevel.kt
│ │ │ ├── ShortcutAddSmallWindow.kt
│ │ │ ├── ShowRealMemory.kt
│ │ │ ├── TaskViewCardSize.kt
│ │ │ ├── UnlockAnim.kt
│ │ │ └── UseCompleteBlur.kt
│ │ │ ├── packageinstaller
│ │ │ ├── AllowUpdateSystemApp.kt
│ │ │ ├── DisableCountCheck.kt
│ │ │ ├── RemovePackageInstallerAds.kt
│ │ │ └── ShowMoreApkInfo.kt
│ │ │ ├── personalassistant
│ │ │ └── BlurWhenGotoMinusOne.kt
│ │ │ ├── powerkeeper
│ │ │ └── DisableDynamicRefreshRate.kt
│ │ │ ├── securitycenter
│ │ │ ├── RemoveMacroBlacklist.kt
│ │ │ ├── ShowBatteryTemperature.kt
│ │ │ └── SkipWarningWaitTime.kt
│ │ │ ├── settings
│ │ │ └── NotificationImportance.kt
│ │ │ ├── systemui
│ │ │ └── StatusBarShowSeconds.kt
│ │ │ └── thememanager
│ │ │ └── RemoveThemeManagerAds.kt
│ │ └── utils
│ │ ├── AppUtils.kt
│ │ ├── BackupUtils.kt
│ │ ├── KotlinXposedHelper.kt
│ │ └── XSharedPreferences.kt
│ └── res
│ ├── color
│ ├── ic_mediaeditor_color_1.xml
│ ├── ic_mediaeditor_color_2.xml
│ └── ic_mediaeditor_color_3.xml
│ ├── drawable
│ ├── ic_android.xml
│ ├── ic_launcher.xml
│ ├── ic_launcher_foreground.xml
│ ├── ic_mediaeditor.xml
│ ├── ic_miuihome.xml
│ ├── ic_miuihome_small_window_dark.xml
│ ├── ic_miuihome_small_window_light.xml
│ ├── ic_packageinstaller.xml
│ ├── ic_packageinstaller_background_dark.xml
│ ├── ic_packageinstaller_background_light.xml
│ ├── ic_personalassistant.webp
│ ├── ic_powerkeeper.xml
│ ├── ic_securitycenter.xml
│ ├── ic_settings.xml
│ ├── ic_systemui.xml
│ └── ic_thememanager.xml
│ ├── values-night
│ ├── colors.xml
│ └── themes.xml
│ ├── values-zh-rCN
│ └── strings.xml
│ └── values
│ ├── array.xml
│ ├── colors.xml
│ ├── strings.xml
│ └── themes.xml
├── build.gradle.kts
├── gradle.properties
├── gradle
├── libs.versions.toml
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle.kts
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # To get started with Dependabot version updates, you'll need to specify which
2 | # package ecosystems to update and where the package manifests are located.
3 | # Please see the documentation for all configuration options:
4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5 |
6 | version: 2
7 | updates:
8 | - package-ecosystem: "gradle"
9 | directory: "/"
10 | schedule:
11 | interval: "daily"
12 | registries:
13 | - maven-google
14 | - gralde-plugin
15 |
16 | - package-ecosystem: "github-actions"
17 | directory: "/"
18 | schedule:
19 | interval: "daily"
20 |
21 | - package-ecosystem: "gitsubmodule"
22 | directory: "/"
23 | schedule:
24 | interval: "daily"
25 |
26 |
27 | registries:
28 | maven-google:
29 | type: maven-repository
30 | url: "https://dl.google.com/dl/android/maven2/"
31 | gralde-plugin:
32 | type: maven-repository
33 | url: "https://plugins.gradle.org/m2/"
34 |
--------------------------------------------------------------------------------
/.github/workflows/android.yml:
--------------------------------------------------------------------------------
1 | name: Android CI
2 |
3 | on:
4 | push:
5 | branches: [ main ]
6 | paths-ignore:
7 | - 'README.md'
8 |
9 | jobs:
10 | build:
11 | runs-on: ubuntu-latest
12 |
13 | steps:
14 | - uses: actions/checkout@v4.1.1
15 | with:
16 | fetch-depth: 0
17 | submodules: true
18 |
19 | - name: Setup JDK 17
20 | uses: actions/setup-java@v4.0.0
21 | with:
22 | java-version: '17'
23 | distribution: 'adopt'
24 |
25 | - name: Cache Gradle Dependencies
26 | uses: actions/cache@v4.0.0
27 | with:
28 | path: |
29 | ~/.gradle/caches
30 | ~/.gradle/wrapper
31 | !~/.gradle/caches/build-cache-*
32 | key: gradle-deps-core-${{ hashFiles('**/build.gradle.kts') }}
33 | restore-keys: gradle-deps
34 |
35 | - name: Cache Gradle Build
36 | uses: actions/cache@v4.0.0
37 | with:
38 | path: |
39 | ~/.gradle/caches/build-cache-*
40 | ~/.gradle/buildOutputCleanup/cache.properties
41 | key: gradle-builds-core-${{ github.sha }}
42 | restore-keys: gradle-builds
43 |
44 | - name: Build with Gradle
45 | run: |
46 | echo ${{ secrets.SIGNING_KEY }} | base64 -d > keystore.jks
47 | bash ./gradlew assemble
48 | env:
49 | KEYSTORE_PATH: "../keystore.jks"
50 | KEYSTORE_PASS: ${{ secrets.KEY_STORE_PASSWORD }}
51 | KEY_ALIAS: ${{ secrets.ALIAS }}
52 | KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
53 |
54 | - name: Upload Release APK
55 | uses: actions/upload-artifact@v4.2.0
56 | with:
57 | name: HyperOS_XXL-Release
58 | path: "app/build/outputs/apk/release/*.apk"
59 |
60 | - name: Upload Debug APK
61 | uses: actions/upload-artifact@v4.2.0
62 | with:
63 | name: HyperOS_XXL-Debug
64 | path: "app/build/outputs/apk/debug/*.apk"
65 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by https://www.toptal.com/developers/gitignore/api/java,linux,macos,gradle,kotlin,windows,androidstudio,android,jetbrains
2 | # Edit at https://www.toptal.com/developers/gitignore?templates=java,linux,macos,gradle,kotlin,windows,androidstudio,android,jetbrains
3 |
4 | ### Android ###
5 | # Gradle files
6 | .gradle/
7 | build/
8 |
9 | # Local configuration file (sdk path, etc)
10 | local.properties
11 |
12 | # Log/OS Files
13 | *.log
14 |
15 | # Android Studio generated files and folders
16 | captures/
17 | .externalNativeBuild/
18 | .cxx/
19 | *.apk
20 | output.json
21 |
22 | # IntelliJ
23 | *.iml
24 | .idea/
25 | misc.xml
26 | deploymentTargetDropDown.xml
27 | render.experimental.xml
28 |
29 | # Keystore files
30 | *.jks
31 | *.keystore
32 |
33 | # Google Services (e.g. APIs or Firebase)
34 | google-services.json
35 |
36 | # Android Profiling
37 | *.hprof
38 |
39 | ### Android Patch ###
40 | gen-external-apklibs
41 |
42 | # Replacement of .externalNativeBuild directories introduced
43 | # with Android Studio 3.5.
44 |
45 | ### Java ###
46 | # Compiled class file
47 | *.class
48 |
49 | # Log file
50 |
51 | # BlueJ files
52 | *.ctxt
53 |
54 | # Mobile Tools for Java (J2ME)
55 | .mtj.tmp/
56 |
57 | # Package Files #
58 | *.jar
59 | *.war
60 | *.nar
61 | *.ear
62 | *.zip
63 | *.tar.gz
64 | *.rar
65 |
66 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
67 | hs_err_pid*
68 | replay_pid*
69 |
70 | ### JetBrains ###
71 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
72 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
73 |
74 | # User-specific stuff
75 | .idea/**/workspace.xml
76 | .idea/**/tasks.xml
77 | .idea/**/usage.statistics.xml
78 | .idea/**/dictionaries
79 | .idea/**/shelf
80 |
81 | # AWS User-specific
82 | .idea/**/aws.xml
83 |
84 | # Generated files
85 | .idea/**/contentModel.xml
86 |
87 | # Sensitive or high-churn files
88 | .idea/**/dataSources/
89 | .idea/**/dataSources.ids
90 | .idea/**/dataSources.local.xml
91 | .idea/**/sqlDataSources.xml
92 | .idea/**/dynamic.xml
93 | .idea/**/uiDesigner.xml
94 | .idea/**/dbnavigator.xml
95 |
96 | # Gradle
97 | .idea/**/gradle.xml
98 | .idea/**/libraries
99 |
100 | # Gradle and Maven with auto-import
101 | # When using Gradle or Maven with auto-import, you should exclude module files,
102 | # since they will be recreated, and may cause churn. Uncomment if using
103 | # auto-import.
104 | # .idea/artifacts
105 | # .idea/compiler.xml
106 | # .idea/jarRepositories.xml
107 | # .idea/modules.xml
108 | # .idea/*.iml
109 | # .idea/modules
110 | # *.iml
111 | # *.ipr
112 |
113 | # CMake
114 | cmake-build-*/
115 |
116 | # Mongo Explorer plugin
117 | .idea/**/mongoSettings.xml
118 |
119 | # File-based project format
120 | *.iws
121 |
122 | # IntelliJ
123 | out/
124 |
125 | # mpeltonen/sbt-idea plugin
126 | .idea_modules/
127 |
128 | # JIRA plugin
129 | atlassian-ide-plugin.xml
130 |
131 | # Cursive Clojure plugin
132 | .idea/replstate.xml
133 |
134 | # SonarLint plugin
135 | .idea/sonarlint/
136 |
137 | # Crashlytics plugin (for Android Studio and IntelliJ)
138 | com_crashlytics_export_strings.xml
139 | crashlytics.properties
140 | crashlytics-build.properties
141 | fabric.properties
142 |
143 | # Editor-based Rest Client
144 | .idea/httpRequests
145 |
146 | # Android studio 3.1+ serialized cache file
147 | .idea/caches/build_file_checksums.ser
148 |
149 | ### JetBrains Patch ###
150 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
151 |
152 | # *.iml
153 | # modules.xml
154 | # .idea/misc.xml
155 | # *.ipr
156 |
157 | # Sonarlint plugin
158 | # https://plugins.jetbrains.com/plugin/7973-sonarlint
159 | .idea/**/sonarlint/
160 |
161 | # SonarQube Plugin
162 | # https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
163 | .idea/**/sonarIssues.xml
164 |
165 | # Markdown Navigator plugin
166 | # https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
167 | .idea/**/markdown-navigator.xml
168 | .idea/**/markdown-navigator-enh.xml
169 | .idea/**/markdown-navigator/
170 |
171 | # Cache file creation bug
172 | # See https://youtrack.jetbrains.com/issue/JBR-2257
173 | .idea/$CACHE_FILE$
174 |
175 | # CodeStream plugin
176 | # https://plugins.jetbrains.com/plugin/12206-codestream
177 | .idea/codestream.xml
178 |
179 | # Azure Toolkit for IntelliJ plugin
180 | # https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
181 | .idea/**/azureSettings.xml
182 |
183 | ### Kotlin ###
184 | # Compiled class file
185 |
186 | # Log file
187 |
188 | # BlueJ files
189 |
190 | # Mobile Tools for Java (J2ME)
191 |
192 | # Package Files #
193 |
194 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
195 |
196 | ### Linux ###
197 | *~
198 |
199 | # temporary files which can be created if a process still has a handle open of a deleted file
200 | .fuse_hidden*
201 |
202 | # KDE directory preferences
203 | .directory
204 |
205 | # Linux trash folder which might appear on any partition or disk
206 | .Trash-*
207 |
208 | # .nfs files are created when an open file is removed but is still being accessed
209 | .nfs*
210 |
211 | ### macOS ###
212 | # General
213 | .DS_Store
214 | .AppleDouble
215 | .LSOverride
216 |
217 | # Icon must end with two \r
218 | Icon
219 |
220 |
221 | # Thumbnails
222 | ._*
223 |
224 | # Files that might appear in the root of a volume
225 | .DocumentRevisions-V100
226 | .fseventsd
227 | .Spotlight-V100
228 | .TemporaryItems
229 | .Trashes
230 | .VolumeIcon.icns
231 | .com.apple.timemachine.donotpresent
232 |
233 | # Directories potentially created on remote AFP share
234 | .AppleDB
235 | .AppleDesktop
236 | Network Trash Folder
237 | Temporary Items
238 | .apdisk
239 |
240 | ### macOS Patch ###
241 | # iCloud generated files
242 | *.icloud
243 |
244 | ### Windows ###
245 | # Windows thumbnail cache files
246 | Thumbs.db
247 | Thumbs.db:encryptable
248 | ehthumbs.db
249 | ehthumbs_vista.db
250 |
251 | # Dump file
252 | *.stackdump
253 |
254 | # Folder config file
255 | [Dd]esktop.ini
256 |
257 | # Recycle Bin used on file shares
258 | $RECYCLE.BIN/
259 |
260 | # Windows Installer files
261 | *.cab
262 | *.msi
263 | *.msix
264 | *.msm
265 | *.msp
266 |
267 | # Windows shortcuts
268 | *.lnk
269 |
270 | ### Gradle ###
271 | .gradle
272 | **/build/
273 | !src/**/build/
274 |
275 | # Ignore Gradle GUI config
276 | gradle-app.setting
277 |
278 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
279 | !gradle-wrapper.jar
280 |
281 | # Avoid ignore Gradle wrappper properties
282 | !gradle-wrapper.properties
283 |
284 | # Cache of project
285 | .gradletasknamecache
286 |
287 | # Eclipse Gradle plugin generated files
288 | # Eclipse Core
289 | .project
290 | # JDT-specific (Eclipse Java Development Tools)
291 | .classpath
292 |
293 | ### Gradle Patch ###
294 | # Java heap dump
295 |
296 | ### AndroidStudio ###
297 | # Covers files to be ignored for android development using Android Studio.
298 |
299 | # Built application files
300 | *.ap_
301 | *.aab
302 |
303 | # Files for the ART/Dalvik VM
304 | *.dex
305 |
306 | # Java class files
307 |
308 | # Generated files
309 | bin/
310 | gen/
311 |
312 | # Gradle files
313 |
314 | # Signing files
315 | .signing/
316 |
317 | # Local configuration file (sdk path, etc)
318 |
319 | # Proguard folder generated by Eclipse
320 | proguard/
321 |
322 | # Log Files
323 |
324 | # Android Studio
325 | /*/build/
326 | /*/local.properties
327 | /*/out
328 | /*/*/build
329 | /*/*/production
330 | /app/release/
331 | .navigation/
332 | *.ipr
333 | *.swp
334 |
335 | # Keystore files
336 |
337 | # Google Services (e.g. APIs or Firebase)
338 | # google-services.json
339 |
340 | # Android Patch
341 |
342 | # External native build folder generated in Android Studio 2.2 and later
343 | .externalNativeBuild
344 |
345 | # NDK
346 | obj/
347 |
348 | # IntelliJ IDEA
349 | /out/
350 |
351 | # User-specific configurations
352 | .idea/caches/
353 | .idea/libraries/
354 | .idea/shelf/
355 | .idea/workspace.xml
356 | .idea/tasks.xml
357 | .idea/.name
358 | .idea/compiler.xml
359 | .idea/copyright/profiles_settings.xml
360 | .idea/encodings.xml
361 | .idea/misc.xml
362 | .idea/modules.xml
363 | .idea/scopes/scope_settings.xml
364 | .idea/dictionaries
365 | .idea/vcs.xml
366 | .idea/jsLibraryMappings.xml
367 | .idea/datasources.xml
368 | .idea/dataSources.ids
369 | .idea/sqlDataSources.xml
370 | .idea/dynamic.xml
371 | .idea/uiDesigner.xml
372 | .idea/assetWizardSettings.xml
373 | .idea/gradle.xml
374 | .idea/jarRepositories.xml
375 | .idea/navEditor.xml
376 |
377 | # Legacy Eclipse project files
378 | .cproject
379 | .settings/
380 |
381 | # Mobile Tools for Java (J2ME)
382 |
383 | # Package Files #
384 |
385 | # virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
386 |
387 | ## Plugin-specific files:
388 |
389 | # mpeltonen/sbt-idea plugin
390 |
391 | # JIRA plugin
392 |
393 | # Mongo Explorer plugin
394 | .idea/mongoSettings.xml
395 |
396 | # Crashlytics plugin (for Android Studio and IntelliJ)
397 |
398 | ### AndroidStudio Patch ###
399 |
400 | !/gradle/wrapper/gradle-wrapper.jar
401 |
402 | # End of https://www.toptal.com/developers/gitignore/api/java,linux,macos,gradle,kotlin,windows,androidstudio,android,jetbrains
403 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "blockmiui"]
2 | path = blockmiui
3 | url = https://github.com/Block-Network/blockmiui
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
HyperOS XXL
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/build.gradle.kts:
--------------------------------------------------------------------------------
1 | import com.android.build.gradle.internal.api.BaseVariantOutputImpl
2 | import java.io.ByteArrayOutputStream
3 | import java.util.Properties
4 |
5 | @Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
6 | plugins {
7 | alias(libs.plugins.androidApplication)
8 | alias(libs.plugins.kotlinAndroid)
9 | }
10 |
11 | android {
12 | namespace = "com.yuk.HyperOS_XXL"
13 | compileSdk = 34
14 |
15 | defaultConfig {
16 | applicationId = namespace
17 | minSdk = 34
18 | targetSdk = 34
19 | versionCode = getVersionCode()
20 | versionName = "1.0" + "-" + getVersionName()
21 | //noinspection ChromeOsAbiSupport
22 | ndk.abiFilters += arrayOf("arm64-v8a")
23 | }
24 | val properties = Properties()
25 | runCatching { properties.load(project.rootProject.file("local.properties").inputStream()) }
26 | val keystorePath = properties.getProperty("KEYSTORE_PATH") ?: System.getenv("KEYSTORE_PATH")
27 | val keystorePwd = properties.getProperty("KEYSTORE_PASS") ?: System.getenv("KEYSTORE_PASS")
28 | val alias = properties.getProperty("KEY_ALIAS") ?: System.getenv("KEY_ALIAS")
29 | val pwd = properties.getProperty("KEY_PASSWORD") ?: System.getenv("KEY_PASSWORD")
30 | if (keystorePath != null) {
31 | signingConfigs {
32 | create("release") {
33 | storeFile = file(keystorePath)
34 | storePassword = keystorePwd
35 | keyAlias = alias
36 | keyPassword = pwd
37 | enableV3Signing = true
38 | }
39 | }
40 | }
41 | buildTypes {
42 | release {
43 | isShrinkResources = true
44 | isMinifyEnabled = true
45 | proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro", "proguard-log.pro")
46 | if (keystorePath != null) signingConfig = signingConfigs.getByName("release")
47 | }
48 | debug {
49 | if (keystorePath != null) signingConfig = signingConfigs.getByName("release")
50 | }
51 | }
52 | androidResources {
53 | additionalParameters += arrayOf("--allow-reserved-package-id", "--package-id", "0x52")
54 | }
55 | compileOptions {
56 | sourceCompatibility = JavaVersion.VERSION_17
57 | targetCompatibility = JavaVersion.VERSION_17
58 | }
59 | packaging {
60 | resources {
61 | excludes += "**"
62 | }
63 | applicationVariants.all {
64 | outputs.all {
65 | (this as BaseVariantOutputImpl).outputFileName = "HyperOS_XXL-$versionName($versionCode)-$name.apk"
66 | }
67 | }
68 | }
69 | kotlinOptions {
70 | jvmTarget = JavaVersion.VERSION_17.majorVersion
71 | freeCompilerArgs = listOf(
72 | "-Xno-param-assertions",
73 | "-Xno-call-assertions",
74 | "-Xno-receiver-assertions",
75 | "-language-version=2.0",
76 | )
77 | }
78 | }
79 |
80 | fun getGitCommitCount(): Int {
81 | val out = ByteArrayOutputStream()
82 | exec {
83 | commandLine("git", "rev-list", "--count", "HEAD")
84 | standardOutput = out
85 | }
86 | return out.toString().trim().toInt()
87 | }
88 |
89 | fun getGitDescribe(): String {
90 | val out = ByteArrayOutputStream()
91 | exec {
92 | commandLine("git", "describe", "--tags", "--always")
93 | standardOutput = out
94 | }
95 | return out.toString().trim()
96 | }
97 |
98 | fun getVersionCode(): Int {
99 | val commitCount = getGitCommitCount()
100 | val major = 5
101 | return major + commitCount
102 | }
103 |
104 | fun getVersionName(): String {
105 | return getGitDescribe()
106 | }
107 |
108 | dependencies {
109 | compileOnly(libs.xposed.api)
110 | implementation(project(":blockmiui"))
111 | implementation(libs.ezXHelper)
112 | implementation(libs.dexKit)
113 | implementation(libs.hiddenapibypass)
114 | }
115 |
--------------------------------------------------------------------------------
/app/proguard-log.pro:
--------------------------------------------------------------------------------
1 | ##########################################################################################################
2 | # 作者:Sollyu
3 | # 日期:2020-11-02
4 | # 内容:发布版本移除日志,kotlin编译时带的而外信息,增强反调试难度
5 | # 使用:proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro', 'proguard-log.pro'
6 | ##########################################################################################################
7 |
8 | ##########################################################################################################
9 | # 删除安卓日志
10 | -assumenosideeffects class android.util.Log {
11 | public static *** d(...);
12 | public static *** v(...);
13 | public static *** w(...);
14 | public static *** e(...);
15 | }
16 |
17 | ##########################################################################################################
18 | # 删除Kotlin编译时可能生成显示变量的方法
19 | -assumenosideeffects class kotlin.jvm.internal.Intrinsics {
20 | public static void checkExpressionValueIsNotNull(java.lang.Object, java.lang.String);
21 | public static void checkFieldIsNotNull(java.lang.Object, java.lang.String);
22 | public static void checkFieldIsNotNull(java.lang.Object, java.lang.String, java.lang.String);
23 | public static void checkNotNull(java.lang.Object);
24 | public static void checkNotNull(java.lang.Object, java.lang.String);
25 | public static void checkNotNullExpressionValue(java.lang.Object, java.lang.String);
26 | public static void checkNotNullParameter(java.lang.Object, java.lang.String);
27 | public static void checkParameterIsNotNull(java.lang.Object, java.lang.String);
28 | public static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String);
29 | public static void throwUninitializedPropertyAccessException(java.lang.String);
30 | }
31 |
32 | ##########################################################################################################
33 | # 会暴露变量名称
34 | -assumenosideeffects class java.util.Objects {
35 | public static java.lang.Object requireNonNull(java.lang.Object, java.lang.String);
36 | }
37 |
38 | ##########################################################################################################
39 | # 删除slf4j的日志输出
40 | -assumenosideeffects interface org.slf4j.Logger {
41 | public void trace(...);
42 | public void debug(...);
43 | public void info(...);
44 | public void warn(...);
45 | public void error(...);
46 |
47 | public boolean isTraceEnabled(...);
48 | public boolean isDebugEnabled(...);
49 | public boolean isWarnEnabled(...);
50 | }
51 |
52 | -assumenosideeffects class org.slf4j.LoggerFactory {
53 | public static ** getLogger(...);
54 | }
--------------------------------------------------------------------------------
/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 |
23 | -keep class com.yuk.hyperOS_XXL.hooks.MainHook {
24 | ();
25 | }
26 |
27 | -assumenosideeffects class kotlin.jvm.internal.Intrinsics {
28 | public static void check*(...);
29 | public static void throw*(...);
30 | }
31 |
32 | -allowaccessmodification
33 | -overloadaggressively
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
13 |
16 |
19 |
20 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/assets/xposed_init:
--------------------------------------------------------------------------------
1 | com.yuk.hyperOS_XXL.hooks.MainHook
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/activity/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.activity
2 |
3 | import android.annotation.SuppressLint
4 | import android.content.Intent
5 | import android.graphics.Color
6 | import android.os.Bundle
7 | import android.view.View
8 | import cn.fkj233.ui.activity.MIUIActivity
9 | import cn.fkj233.ui.dialog.MIUIDialog
10 | import com.yuk.HyperOS_XXL.R
11 | import com.yuk.hyperOS_XXL.activity.pages.AndroidPage
12 | import com.yuk.hyperOS_XXL.activity.pages.MainPage
13 | import com.yuk.hyperOS_XXL.activity.pages.MediaEditorPage
14 | import com.yuk.hyperOS_XXL.activity.pages.MiuiHomePage
15 | import com.yuk.hyperOS_XXL.activity.pages.PackageInstallerPage
16 | import com.yuk.hyperOS_XXL.activity.pages.PersonalAssistantPage
17 | import com.yuk.hyperOS_XXL.activity.pages.PowerKeeperPage
18 | import com.yuk.hyperOS_XXL.activity.pages.SecurityCenterPage
19 | import com.yuk.hyperOS_XXL.activity.pages.SettingsPage
20 | import com.yuk.hyperOS_XXL.activity.pages.SystemUIPage
21 | import com.yuk.hyperOS_XXL.activity.pages.ThemeManagerPage
22 | import com.yuk.hyperOS_XXL.utils.AppUtils.isDarkMode
23 | import com.yuk.hyperOS_XXL.utils.AppUtils.perfFileName
24 | import com.yuk.hyperOS_XXL.utils.BackupUtils
25 | import kotlin.system.exitProcess
26 |
27 | class MainActivity : MIUIActivity() {
28 | override fun onCreate(savedInstanceState: Bundle?) {
29 | checkLSPosed()
30 | window.decorView.layoutDirection = resources.configuration.layoutDirection
31 | window.statusBarColor = if (isDarkMode(this.applicationContext)) Color.parseColor("#000000") else Color.parseColor("#FFFFFF")
32 | window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
33 | super.onCreate(savedInstanceState)
34 | }
35 |
36 | @SuppressLint("WorldReadableFiles")
37 | private fun checkLSPosed() {
38 | try {
39 | setSP(getSharedPreferences(perfFileName(), MODE_WORLD_READABLE))
40 | } catch (exception: SecurityException) {
41 | isLoad = false
42 | MIUIDialog(this) {
43 | setTitle(R.string.tips)
44 | setMessage(R.string.not_support)
45 | setCancelable(false)
46 | setRButton(R.string.done) {
47 | exitProcess(0)
48 | }
49 | }.show()
50 | }
51 | }
52 |
53 | init {
54 | activity = this
55 | registerPage(MainPage::class.java)
56 | registerPage(AndroidPage::class.java)
57 | registerPage(MiuiHomePage::class.java)
58 | registerPage(PowerKeeperPage::class.java)
59 | registerPage(SecurityCenterPage::class.java)
60 | registerPage(SystemUIPage::class.java)
61 | registerPage(ThemeManagerPage::class.java)
62 | registerPage(SettingsPage::class.java)
63 | registerPage(MediaEditorPage::class.java)
64 | registerPage(PersonalAssistantPage::class.java)
65 | registerPage(PackageInstallerPage::class.java)
66 | }
67 |
68 | override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
69 | if (data != null && resultCode == RESULT_OK) {
70 | when (requestCode) {
71 | BackupUtils.CREATE_DOCUMENT_CODE -> {
72 | BackupUtils.handleCreateDocument(activity, data.data)
73 | }
74 |
75 | BackupUtils.OPEN_DOCUMENT_CODE -> {
76 | BackupUtils.handleReadDocument(activity, data.data)
77 | }
78 |
79 | }
80 | }
81 | }
82 |
83 | }
84 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/activity/pages/AndroidPage.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.activity.pages
2 |
3 | import cn.fkj233.ui.activity.MIUIActivity.Companion.safeSP
4 | import cn.fkj233.ui.activity.annotation.BMPage
5 | import cn.fkj233.ui.activity.data.BasePage
6 | import cn.fkj233.ui.activity.view.SwitchV
7 | import cn.fkj233.ui.activity.view.TextSummaryV
8 | import cn.fkj233.ui.dialog.MIUIDialog
9 | import com.yuk.HyperOS_XXL.R
10 |
11 | @BMPage("AndroidPage", hideMenu = false)
12 | class AndroidPage : BasePage() {
13 | override fun getTitle(): String {
14 | setTitle(getString(R.string.android))
15 | return getString(R.string.android)
16 | }
17 |
18 | override fun onCreate() {
19 | TextSummaryWithSwitch(
20 | TextSummaryV(textId = R.string.android_remove_small_window_restriction, tipsId = R.string.android_remove_small_window_restriction_summary),
21 | SwitchV("android_remove_small_window_restriction")
22 | )
23 | TextSummaryWithSwitch(
24 | TextSummaryV(textId = R.string.android_remove_screenshot_restriction, tipsId = R.string.android_remove_screenshot_restriction_summary),
25 | SwitchV("android_remove_screenshot_restriction")
26 | )
27 | TextSummaryWithArrow(
28 | TextSummaryV(textId = R.string.android_max_wallpaper_scale, tipsId = R.string.android_max_wallpaper_scale_summary, onClickListener = {
29 | MIUIDialog(activity) {
30 | setTitle(R.string.android_max_wallpaper_scale)
31 | setMessage(
32 | "${activity.getString(R.string.def)}1.2,${activity.getString(R.string.current)}${
33 | safeSP.getFloat("android_max_wallpaper_scale", 1.2f)
34 | }"
35 | )
36 | setEditText("", "${activity.getString(R.string.scope)}1.0-2.0")
37 | setLButton(textId = R.string.cancel) {
38 | dismiss()
39 | }
40 | setRButton(textId = R.string.done) {
41 | if (getEditText() != "") {
42 | safeSP.putAny("android_max_wallpaper_scale", getEditText().toFloat())
43 | }
44 | dismiss()
45 | }
46 | }.show()
47 | })
48 | )
49 | Line()
50 | TitleText(textId = R.string.android_corepacth)
51 | TextSummaryWithSwitch(
52 | TextSummaryV(textId = R.string.android_corepacth_downgr, tipsId = R.string.android_corepacth_downgr_summary),
53 | SwitchV("downgrade")
54 | )
55 | TextSummaryWithSwitch(
56 | TextSummaryV(textId = R.string.android_corepacth_authcreak, tipsId = R.string.android_corepacth_authcreak_summary),
57 | SwitchV("authcreak")
58 | )
59 | TextSummaryWithSwitch(
60 | TextSummaryV(textId = R.string.android_corepacth_digestCreak, tipsId = R.string.android_corepacth_digestCreak_summary),
61 | SwitchV("digestCreak")
62 | )
63 | TextSummaryWithSwitch(
64 | TextSummaryV(textId = R.string.android_corepacth_UsePreSig, tipsId = R.string.android_corepacth_UsePreSig_summary),
65 | SwitchV("UsePreSig")
66 | )
67 | TextSummaryWithSwitch(
68 | TextSummaryV(textId = R.string.android_corepacth_enhancedMode, tipsId = R.string.android_corepacth_enhancedMode_summary),
69 | SwitchV("enhancedMode")
70 | )
71 | }
72 |
73 | }
74 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/activity/pages/MainPage.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.activity.pages
2 |
3 | import android.annotation.SuppressLint
4 | import android.app.Activity
5 | import android.content.ComponentName
6 | import android.content.Context
7 | import android.content.pm.PackageManager
8 | import android.widget.Toast
9 | import cn.fkj233.ui.activity.MIUIActivity
10 | import cn.fkj233.ui.activity.annotation.BMMainPage
11 | import cn.fkj233.ui.activity.data.BasePage
12 | import cn.fkj233.ui.activity.view.SwitchV
13 | import cn.fkj233.ui.activity.view.TextSummaryV
14 | import cn.fkj233.ui.activity.view.TextV
15 | import cn.fkj233.ui.dialog.MIUIDialog
16 | import com.yuk.HyperOS_XXL.R
17 | import com.yuk.hyperOS_XXL.activity.MainActivity
18 | import com.yuk.hyperOS_XXL.utils.AppUtils.exec
19 | import com.yuk.hyperOS_XXL.utils.AppUtils.perfFileName
20 | import com.yuk.hyperOS_XXL.utils.BackupUtils
21 |
22 | @BMMainPage("HyperOS XXL")
23 | class MainPage : BasePage() {
24 | @SuppressLint("WorldReadableFiles")
25 | override fun onCreate() {
26 | Page(this.getDrawable(R.drawable.ic_android), TextSummaryV(textId = R.string.android, tipsId = R.string.android_reboot), round = 8f, onClickListener = { showFragment("AndroidPage") })
27 | Line()
28 | Page(this.getDrawable(R.drawable.ic_systemui), TextSummaryV(textId = R.string.systemui), round = 8f, onClickListener = { showFragment("SystemUIPage") })
29 | Page(this.getDrawable(R.drawable.ic_settings), TextSummaryV(textId = R.string.settings), round = 8f, onClickListener = { showFragment("SettingsPage") })
30 | Page(this.getDrawable(R.drawable.ic_miuihome), TextSummaryV(textId = R.string.miuihome), round = 8f, onClickListener = { showFragment("MiuiHomePage") })
31 | Page(this.getDrawable(R.drawable.ic_personalassistant), TextSummaryV(textId = R.string.personalassistant), round = 8f, onClickListener = { showFragment("PersonalAssistantPage") })
32 | Page(this.getDrawable(R.drawable.ic_securitycenter), TextSummaryV(textId = R.string.securitycenter), round = 8f, onClickListener = { showFragment("SecurityCenterPage") })
33 | Page(this.getDrawable(R.drawable.ic_thememanager), TextSummaryV(textId = R.string.thememanager), round = 8f, onClickListener = { showFragment("ThemeManagerPage") })
34 | Page(this.getDrawable(R.drawable.ic_mediaeditor), TextSummaryV(textId = R.string.mediaeditor), round = 8f, onClickListener = { showFragment("MediaEditorPage") })
35 | Page(this.getDrawable(R.drawable.ic_powerkeeper), TextSummaryV(textId = R.string.powerkeeper), round = 8f, onClickListener = { showFragment("PowerKeeperPage") })
36 | Page(this.getDrawable(R.drawable.ic_packageinstaller), TextSummaryV(textId = R.string.packageinstaller), round = 8f, onClickListener = { showFragment("PackageInstallerPage") })
37 | Line()
38 | TextWithSwitch(TextV(textId = R.string.hide_desktop_icon), SwitchV("hide_desktop_icon", onClickListener = {
39 | val pm = MIUIActivity.activity.packageManager
40 | val mComponentEnabledState: Int = if (it) {
41 | PackageManager.COMPONENT_ENABLED_STATE_DISABLED
42 | } else {
43 | PackageManager.COMPONENT_ENABLED_STATE_ENABLED
44 | }
45 | pm.setComponentEnabledSetting(ComponentName(MIUIActivity.activity, MainActivity::class.java.name + "Alias"), mComponentEnabledState, PackageManager.DONT_KILL_APP)
46 | }))
47 | TextWithArrow(TextV(textId = R.string.backup, onClickListener = {
48 | BackupUtils.backup(activity, activity.createDeviceProtectedStorageContext().getSharedPreferences(perfFileName(), Context.MODE_WORLD_READABLE))
49 | }))
50 | TextWithArrow(TextV(textId = R.string.recovery, onClickListener = {
51 | BackupUtils.recovery(activity, activity.createDeviceProtectedStorageContext().getSharedPreferences(perfFileName(), Context.MODE_WORLD_READABLE))
52 | }))
53 | TextWithArrow(TextV(textId = R.string.reset_module) {
54 | MIUIDialog(activity) {
55 | setTitle(R.string.tips)
56 | setMessage(R.string.reset_module_summary)
57 | setLButton(R.string.cancel) {
58 | dismiss()
59 | }
60 | setRButton(R.string.done) {
61 | activity.getSharedPreferences(perfFileName(), Activity.MODE_WORLD_READABLE).edit().clear().apply()
62 | Toast.makeText(activity, activity.getString(R.string.reset_module_finished), Toast.LENGTH_LONG).show()
63 | }
64 | }.show()
65 | })
66 | TextWithArrow(TextV(textId = R.string.restart_scope) {
67 | MIUIDialog(activity) {
68 | setTitle(R.string.tips)
69 | setMessage(R.string.restart_scope_summary)
70 | setLButton(R.string.cancel) {
71 | dismiss()
72 | }
73 | setRButton(R.string.done) {
74 | val command = arrayOf(
75 | "am force-stop com.android.thememanager",
76 | "am force-stop com.android.settings",
77 | "am force-stop com.miui.gallery",
78 | "am force-stop com.miui.guardprovider",
79 | "am force-stop com.miui.home",
80 | "am force-stop com.miui.mediaeditor",
81 | "am force-stop com.miui.packageinstaller",
82 | "am force-stop com.miui.personalassistant",
83 | "am force-stop com.miui.powerkeeper",
84 | "am force-stop com.miui.screenshot",
85 | "am force-stop com.miui.securitycenter",
86 | "killall com.android.systemui"
87 | )
88 | exec(command)
89 | Toast.makeText(activity, getString(R.string.restart_scope_finished), Toast.LENGTH_SHORT).show()
90 | Thread.sleep(500)
91 | dismiss()
92 | }
93 | }.show()
94 | })
95 | TextWithArrow(TextV(textId = R.string.reboot_system) {
96 | MIUIDialog(activity) {
97 | setTitle(R.string.tips)
98 | setMessage(R.string.reboot_system_summary)
99 | setLButton(R.string.cancel) {
100 | dismiss()
101 | }
102 | setRButton(R.string.done) {
103 | exec("reboot")
104 | }
105 | }.show()
106 | })
107 | }
108 |
109 | }
110 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/activity/pages/MediaEditorPage.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.activity.pages
2 |
3 | import cn.fkj233.ui.activity.annotation.BMPage
4 | import cn.fkj233.ui.activity.data.BasePage
5 | import cn.fkj233.ui.activity.view.SwitchV
6 | import cn.fkj233.ui.activity.view.TextSummaryV
7 | import com.yuk.HyperOS_XXL.R
8 |
9 | @BMPage("MediaEditorPage", hideMenu = false)
10 | class MediaEditorPage : BasePage() {
11 | override fun getTitle(): String {
12 | setTitle(getString(R.string.mediaeditor))
13 | return getString(R.string.mediaeditor)
14 | }
15 |
16 | override fun onCreate() {
17 | TextSummaryWithSwitch(
18 | TextSummaryV(textId = R.string.mediaeditor_remove_crop_restriction, tipsId = R.string.mediaeditor_remove_crop_restriction_summary),
19 | SwitchV("mediaeditor_remove_crop_restriction", false)
20 | )
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/activity/pages/MiuiHomePage.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.activity.pages
2 |
3 | import android.view.View
4 | import cn.fkj233.ui.activity.MIUIActivity.Companion.safeSP
5 | import cn.fkj233.ui.activity.annotation.BMPage
6 | import cn.fkj233.ui.activity.data.BasePage
7 | import cn.fkj233.ui.activity.view.SeekBarWithTextV
8 | import cn.fkj233.ui.activity.view.SwitchV
9 | import cn.fkj233.ui.activity.view.TextSummaryV
10 | import cn.fkj233.ui.activity.view.TextV
11 | import com.yuk.HyperOS_XXL.R
12 |
13 | @BMPage("MiuiHomePage", hideMenu = false)
14 | class MiuiHomePage : BasePage() {
15 | override fun getTitle(): String {
16 | setTitle(getString(R.string.miuihome))
17 | return getString(R.string.miuihome)
18 | }
19 |
20 | override fun onCreate() {
21 | TextSummaryWithSwitch(
22 | TextSummaryV(textId = R.string.miuihome_always_show_statusbar_clock, tipsId = R.string.miuihome_always_show_statusbar_clock_summary),
23 | SwitchV("miuihome_always_show_statusbar_clock", false)
24 | )
25 | TextSummaryWithSwitch(
26 | TextSummaryV(textId = R.string.miuihome_double_tap_to_sleep, tipsId = R.string.miuihome_double_tap_to_sleep_summary),
27 | SwitchV("miuihome_double_tap_to_sleep", false)
28 | )
29 | val blurBinding = GetDataBinding({ safeSP.getBoolean("miuihome_use_complete_blur", false) }) { view, flags, data ->
30 | if (flags == 1) view.visibility = if (data as Boolean) View.VISIBLE else View.GONE
31 | }
32 | TextSummaryWithSwitch(
33 | TextSummaryV(textId = R.string.miuihome_use_complete_blur, tipsId = R.string.miuihome_use_complete_blur_summary),
34 | SwitchV("miuihome_use_complete_blur", false, dataBindingSend = blurBinding.bindingSend)
35 | )
36 | TextSummaryWithSwitch(
37 | TextSummaryV(textId = R.string.miuihome_highend_device, tipsId = R.string.miuihome_highend_device_summary),
38 | SwitchV("miuihome_highend_device", false)
39 | )
40 | TextSummaryWithSwitch(
41 | TextSummaryV(textId = R.string.miuihome_unlock_animation, tipsId = R.string.miuihome_unlock_animation_summary),
42 | SwitchV("miuihome_unlock_animation", false)
43 | )
44 | TextSummaryWithSwitch(
45 | TextSummaryV(textId = R.string.miuihome_recentview_remove_card_animation, tipsId = R.string.miuihome_recentview_remove_card_animation_summary),
46 | SwitchV("miuihome_recentview_remove_card_animation", false)
47 | )
48 | TextSummaryWithSwitch(
49 | TextSummaryV(textId = R.string.miuihome_blur_when_open_folder, tipsId = R.string.miuihome_blur_when_open_folder_summary),
50 | SwitchV("miuihome_blur_when_open_folder", false)
51 | )
52 | TextSummaryWithSwitch(
53 | TextSummaryV(textId = R.string.miuihome_add_dock_blur, tipsId = R.string.miuihome_add_dock_blur_summary),
54 | SwitchV("miuihome_add_dock_blur", false)
55 | )
56 | TextSummaryWithSwitch(
57 | TextSummaryV(textId = R.string.miuihome_hide_allapps_category_all, tipsId = R.string.miuihome_hide_allapps_category_all_summary),
58 | SwitchV("miuihome_hide_allapps_category_all", false)
59 | )
60 | TextSummaryWithSwitch(
61 | TextSummaryV(textId = R.string.miuihome_hide_allapps_category_paging_edit, tipsId = R.string.miuihome_hide_allapps_category_paging_edit_summary),
62 | SwitchV("miuihome_hide_allapps_category_paging_edit", false)
63 | )
64 | TextSummaryWithSwitch(
65 | TextSummaryV(textId = R.string.miuihome_shortcut_add_small_window, tipsId = R.string.miuihome_shortcut_add_small_window_summary),
66 | SwitchV("miuihome_shortcut_add_small_window", false)
67 | )
68 | TextSummaryWithSwitch(
69 | TextSummaryV(textId = R.string.miuihome_scroll_icon_name, tipsId = R.string.miuihome_scroll_icon_name_summary),
70 | SwitchV("miuihome_scroll_icon_name", false)
71 | )
72 | val animRatioBinding = GetDataBinding({ safeSP.getBoolean("miuihome_anim_ratio_binding", false) }) { view, flags, data ->
73 | if (flags == 1) view.visibility = if (data as Boolean) View.VISIBLE else View.GONE
74 | }
75 | TextSummaryWithSwitch(
76 | TextSummaryV(textId = R.string.miuihome_show_real_memory, tipsId = R.string.miuihome_show_real_memory_summary),
77 | SwitchV("miuihome_show_real_memory", false)
78 | )
79 | TextSummaryWithSwitch(
80 | TextSummaryV(textId = R.string.miuihome_anim_ratio_binding, tipsId = R.string.miuihome_anim_ratio_binding_summary),
81 | SwitchV("miuihome_anim_ratio_binding", dataBindingSend = animRatioBinding.bindingSend)
82 | )
83 | TextSummaryWithSeekBar(
84 | TextSummaryV(textId = R.string.miuihome_anim_ratio, tipsId = R.string.miuihome_anim_ratio_summary),
85 | SeekBarWithTextV("miuihome_anim_ratio", 0, 300, 100),
86 | dataBindingRecv = animRatioBinding.getRecv(1)
87 | )
88 | TextSummaryWithSeekBar(
89 | TextSummaryV(textId = R.string.miuihome_anim_ratio_recent, tipsId = R.string.miuihome_anim_ratio_recent_summary),
90 | SeekBarWithTextV("miuihome_anim_ratio_recent", 0, 300, 100),
91 | dataBindingRecv = animRatioBinding.getRecv(1)
92 | )
93 | val cardSizeBinding = GetDataBinding({ safeSP.getBoolean("miuihome_task_view_card_size_binding", false) }) { view, flags, data ->
94 | if (flags == 1) view.visibility = if (data as Boolean) View.VISIBLE else View.GONE
95 | }
96 | TextSummaryWithSwitch(
97 | TextSummaryV(textId = R.string.miuihome_task_view_card_size_binding, tipsId = R.string.miuihome_task_view_card_size_binding_summary),
98 | SwitchV("miuihome_task_view_card_size_binding", dataBindingSend = cardSizeBinding.bindingSend)
99 | )
100 | TextWithSeekBar(
101 | TextV(textId = R.string.miuihome_task_view_card_size_vertical),
102 | SeekBarWithTextV("miuihome_task_view_card_size_vertical", 80, 120, 100),
103 | dataBindingRecv = cardSizeBinding.getRecv(1)
104 | )
105 | TextWithSeekBar(
106 | TextV(textId = R.string.miuihome_task_view_card_size_horizontal1),
107 | SeekBarWithTextV("miuihome_task_view_card_size_horizontal1", 80, 120, 100),
108 | dataBindingRecv = cardSizeBinding.getRecv(1)
109 | )
110 | TextWithSeekBar(
111 | TextV(textId = R.string.miuihome_task_view_card_size_horizontal2),
112 | SeekBarWithTextV("miuihome_task_view_card_size_horizontal2", 80, 120, 100),
113 | dataBindingRecv = cardSizeBinding.getRecv(1)
114 | )
115 | }
116 |
117 | }
118 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/activity/pages/PackageInstallerPage.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.activity.pages
2 |
3 | import cn.fkj233.ui.activity.annotation.BMPage
4 | import cn.fkj233.ui.activity.data.BasePage
5 | import cn.fkj233.ui.activity.view.SwitchV
6 | import cn.fkj233.ui.activity.view.TextV
7 | import com.yuk.HyperOS_XXL.R
8 |
9 | @BMPage("PackageInstallerPage", hideMenu = false)
10 | class PackageInstallerPage : BasePage() {
11 | override fun getTitle(): String {
12 | setTitle(getString(R.string.packageinstaller))
13 | return getString(R.string.packageinstaller)
14 | }
15 |
16 | override fun onCreate() {
17 | TextWithSwitch(
18 | TextV(textId = R.string.packageinstaller_remove_ads),
19 | SwitchV("packageinstaller_remove_ads", false)
20 | )
21 | TextWithSwitch(
22 | TextV(textId = R.string.packageinstaller_allow_update_system_app),
23 | SwitchV("packageinstaller_allow_update_system_app", false)
24 | )
25 | TextWithSwitch(
26 | TextV(textId = R.string.packageinstaller_show_more_apk_info),
27 | SwitchV("packageinstaller_show_more_apk_info", false)
28 | )
29 | TextWithSwitch(
30 | TextV(textId = R.string.packageinstaller_disable_count_check),
31 | SwitchV("packageinstaller_disable_count_check", false)
32 | )
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/activity/pages/PersonalAssistantPage.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.activity.pages
2 |
3 | import android.view.View
4 | import cn.fkj233.ui.activity.MIUIActivity
5 | import cn.fkj233.ui.activity.annotation.BMPage
6 | import cn.fkj233.ui.activity.data.BasePage
7 | import cn.fkj233.ui.activity.view.SwitchV
8 | import cn.fkj233.ui.activity.view.TextSummaryV
9 | import cn.fkj233.ui.activity.view.TextV
10 | import com.yuk.HyperOS_XXL.R
11 |
12 | @BMPage("PersonalAssistantPage", hideMenu = false)
13 | class PersonalAssistantPage : BasePage() {
14 | override fun getTitle(): String {
15 | setTitle(getString(R.string.personalassistant))
16 | return getString(R.string.personalassistant)
17 | }
18 |
19 | override fun onCreate() {
20 | val blurBinding = GetDataBinding({ MIUIActivity.safeSP.getBoolean("personalassistant_minus_one_blur", false) }) { view, flags, data ->
21 | if (flags == 1) view.visibility = if (data as Boolean) View.VISIBLE else View.GONE
22 | }
23 | TextWithSwitch(
24 | TextV(textId = R.string.personalassistant_minus_one_blur),
25 | SwitchV("personalassistant_minus_one_blur", false, dataBindingSend = blurBinding.bindingSend)
26 | )
27 | TextSummaryWithSwitch(
28 | TextSummaryV(textId = R.string.miuihome_minus_one_overlap_mode, tipsId = R.string.miuihome_minus_one_overlap_mode_summary),
29 | SwitchV("miuihome_minus_one_overlap_mode", false),
30 | dataBindingRecv = blurBinding.binding.getRecv(1)
31 | )
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/activity/pages/PowerKeeperPage.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.activity.pages
2 |
3 | import cn.fkj233.ui.activity.annotation.BMPage
4 | import cn.fkj233.ui.activity.data.BasePage
5 | import cn.fkj233.ui.activity.view.SwitchV
6 | import cn.fkj233.ui.activity.view.TextSummaryV
7 | import com.yuk.HyperOS_XXL.R
8 |
9 | @BMPage("PowerKeeperPage", hideMenu = false)
10 | class PowerKeeperPage : BasePage() {
11 | override fun getTitle(): String {
12 | setTitle(getString(R.string.powerkeeper))
13 | return getString(R.string.powerkeeper)
14 | }
15 |
16 | override fun onCreate() {
17 | TextSummaryWithSwitch(
18 | TextSummaryV(textId = R.string.powerkeeper_disable_dynamic_refresh_rate, tipsId = R.string.powerkeeper_disable_dynamic_refresh_rate_summary),
19 | SwitchV("powerkeeper_disable_dynamic_refresh_rate", false)
20 | )
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/activity/pages/SecurityCenterPage.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.activity.pages
2 |
3 | import cn.fkj233.ui.activity.annotation.BMPage
4 | import cn.fkj233.ui.activity.data.BasePage
5 | import cn.fkj233.ui.activity.view.SwitchV
6 | import cn.fkj233.ui.activity.view.TextSummaryV
7 | import cn.fkj233.ui.activity.view.TextV
8 | import com.yuk.HyperOS_XXL.R
9 |
10 | @BMPage("SecurityCenterPage", hideMenu = false)
11 | class SecurityCenterPage : BasePage() {
12 | override fun getTitle(): String {
13 | setTitle(getString(R.string.securitycenter))
14 | return getString(R.string.securitycenter)
15 | }
16 |
17 | override fun onCreate() {
18 | TextSummaryWithSwitch(
19 | TextSummaryV(textId = R.string.securitycenter_skip_warning_wait_time, tipsId = R.string.securitycenter_skip_warning_wait_time_summary),
20 | SwitchV("securitycenter_skip_warning_wait_time", false)
21 | )
22 | TextSummaryWithSwitch(
23 | TextSummaryV(textId = R.string.securitycenter_show_battery_temperature, tipsId = R.string.securitycenter_show_battery_temperature_summary),
24 | SwitchV("securitycenter_show_battery_temperature", false)
25 | )
26 | TextWithSwitch(
27 | TextV(textId = R.string.securitycenter_remove_macro_blacklist),
28 | SwitchV("securitycenter_remove_macro_blacklist", false)
29 | )
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/activity/pages/SettingsPage.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.activity.pages
2 |
3 | import cn.fkj233.ui.activity.annotation.BMPage
4 | import cn.fkj233.ui.activity.data.BasePage
5 | import cn.fkj233.ui.activity.view.SwitchV
6 | import cn.fkj233.ui.activity.view.TextSummaryV
7 | import com.yuk.HyperOS_XXL.R
8 |
9 | @BMPage("SettingsPage", hideMenu = false)
10 | class SettingsPage : BasePage() {
11 | override fun getTitle(): String {
12 | setTitle(getString(R.string.settings))
13 | return getString(R.string.settings)
14 | }
15 |
16 | override fun onCreate() {
17 | TextSummaryWithSwitch(
18 | TextSummaryV(textId = R.string.settings_notification_importance, tipsId = R.string.settings_notification_importance_summary),
19 | SwitchV("settings_notification_importance", false)
20 | )
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/activity/pages/SystemUIPage.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.activity.pages
2 |
3 | import cn.fkj233.ui.activity.annotation.BMPage
4 | import cn.fkj233.ui.activity.data.BasePage
5 | import cn.fkj233.ui.activity.view.SwitchV
6 | import cn.fkj233.ui.activity.view.TextSummaryV
7 | import com.yuk.HyperOS_XXL.R
8 |
9 | @BMPage("SystemUIPage", hideMenu = false)
10 | class SystemUIPage : BasePage() {
11 | override fun getTitle(): String {
12 | setTitle(getString(R.string.systemui))
13 | return getString(R.string.systemui)
14 | }
15 |
16 | override fun onCreate() {
17 | TextSummaryWithSwitch(
18 | TextSummaryV(textId = R.string.systemui_statusbar_show_seconds, tipsId = R.string.systemui_statusbar_show_seconds_summary),
19 | SwitchV("systemui_statusbar_show_seconds", false)
20 | )
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/activity/pages/ThemeManagerPage.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.activity.pages
2 |
3 | import cn.fkj233.ui.activity.annotation.BMPage
4 | import cn.fkj233.ui.activity.data.BasePage
5 | import cn.fkj233.ui.activity.view.SwitchV
6 | import cn.fkj233.ui.activity.view.TextSummaryV
7 | import com.yuk.HyperOS_XXL.R
8 |
9 | @BMPage("ThemeManagerPage", hideMenu = false)
10 | class ThemeManagerPage : BasePage() {
11 | override fun getTitle(): String {
12 | setTitle(getString(R.string.thememanager))
13 | return getString(R.string.thememanager)
14 | }
15 |
16 | override fun onCreate() {
17 | TextSummaryWithSwitch(
18 | TextSummaryV(textId = R.string.thememanager_remove_ads, tipsId = R.string.thememanager_remove_ads_summary),
19 | SwitchV("thememanager_remove_ads", false)
20 | )
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/blur/BlurView.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.blur
2 |
3 | import android.annotation.SuppressLint
4 | import android.content.Context
5 | import android.view.View
6 | import cn.fkj233.ui.activity.dp2px
7 | import com.yuk.hyperOS_XXL.blur.MiBlurUtilities.mSupportedMiBlur
8 | import com.yuk.hyperOS_XXL.utils.AppUtils.isDarkMode
9 |
10 | @SuppressLint("ViewConstructor")
11 | class BlurView(context: Context, private val radius: Int) : View(context) {
12 |
13 | private fun setBlur() {
14 | //MiBlurUtilities.resetBlurColor(this.parent as View)
15 | MiBlurUtilities.setPassWindowBlurEnable(this.parent as View, true)
16 | MiBlurUtilities.setViewBlur(this.parent as View, 1)
17 | MiBlurUtilities.setBlurRoundRect(this.parent as View, dp2px(context, radius.toFloat()))
18 | //MiBlurUtilities.setBlurColor(this.parent as View, if (isDarkMode(this.context)) 0x14ffffff else 0x14000000, 3)
19 | }
20 |
21 | override fun onAttachedToWindow() {
22 | super.onAttachedToWindow()
23 | if (mSupportedMiBlur) {
24 | setBlur()
25 | }
26 | }
27 |
28 | override fun onDetachedFromWindow() {
29 | super.onDetachedFromWindow()
30 | MiBlurUtilities.clearAllBlur(this.parent as View)
31 | }
32 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/blur/MiBlurUtilities.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.blur
2 |
3 | import android.graphics.Outline
4 | import android.util.Log
5 | import android.view.View
6 | import android.view.ViewOutlineProvider
7 | import com.yuk.hyperOS_XXL.utils.AppUtils.isDarkMode
8 | import org.lsposed.hiddenapibypass.HiddenApiBypass
9 |
10 | object MiBlurUtilities {
11 | var mSupportedMiBlur: Boolean = true
12 |
13 | fun setViewBackgroundBlur(view: View?, i: Int) {
14 | HiddenApiBypass.invoke(View::class.java, view, "setMiBackgroundBlurMode", i)
15 | }
16 |
17 | fun setViewBlur(view: View, i: Int) {
18 | HiddenApiBypass.invoke(View::class.java, view, "setMiViewBlurMode", i)
19 | }
20 |
21 | fun setBlurRadius(view: View, i: Int) {
22 | if (i < 0 || i > 200) {
23 | Log.e("MiBlurUtilities", "setMiBackgroundBlurRadius error radius is " + i + " " + view.javaClass.getName() + " hashcode " + view.hashCode())
24 | return
25 | }
26 | HiddenApiBypass.invoke(View::class.java, view, "setMiBackgroundBlurRadius", i)
27 | }
28 |
29 | fun setPassWindowBlurEnable(view: View, z: Boolean) {
30 | Log.d("Launcher.BlurUtilities", "setViewBlur: view $view")
31 | HiddenApiBypass.invoke(View::class.java, view, "setPassWindowBlurEnabled", z)
32 | }
33 |
34 | fun disableMiBackgroundContainBelow(view: View, z: Boolean) {
35 | HiddenApiBypass.invoke(View::class.java, view, "disableMiBackgroundContainBelow", z)
36 | }
37 |
38 | fun setBlurColor(view: View, i: Int, i2: Int) {
39 | HiddenApiBypass.invoke(View::class.java, view, "addMiBackgroundBlendColor", i, i2)
40 | }
41 |
42 | fun resetBlurColor(view: View) {
43 | HiddenApiBypass.invoke(View::class.java, view, "clearMiBackgroundBlendColor")
44 | }
45 |
46 | fun setBlurRoundRect(view: View, i: Int, i2: Int, i3: Int, i4: Int, i5: Int) {
47 | view.setClipToOutline(false)
48 | val outlineProvider = object : ViewOutlineProvider() {
49 | override fun getOutline(view: View, outline: Outline) {
50 | outline.setRoundRect(
51 | i2, i3, i4, i5, i.toFloat()
52 | )
53 | }
54 | }
55 | view.outlineProvider = outlineProvider
56 | }
57 |
58 | fun setBlurRoundRect(view: View, i: Int) {
59 | view.setClipToOutline(true)
60 | val outlineProvider = object : ViewOutlineProvider() {
61 | override fun getOutline(view: View, outline: Outline) {
62 | outline.setRoundRect(
63 | 0, 0, view.width, view.height, i.toFloat()
64 | )
65 | }
66 | }
67 | view.outlineProvider = outlineProvider
68 | }
69 |
70 |
71 | fun clearAllBlur(view: View) {
72 | resetBlurColor(view)
73 | setViewBackgroundBlur(view, 0)
74 | setViewBlur(view, 0)
75 | setBlurRadius(view, 0)
76 | setPassWindowBlurEnable(view, false)
77 | }
78 |
79 | fun setElementBlur(view: View, i: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int) {
80 | resetBlurColor(view)
81 | setViewBlur(view, i)
82 | setBlurRoundRect(view, i2)
83 | if (isDarkMode(view.context)) {
84 | setBlurColor(view, i3, i4)
85 | setBlurColor(view, i7, i8)
86 | return
87 | }
88 | setBlurColor(view, i5, i6)
89 | setBlurColor(view, i9, i10)
90 | }
91 |
92 | fun setContainerBlur(view: View, i: Int, z: Boolean, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int) {
93 | resetBlurColor(view)
94 | setViewBackgroundBlur(view, i)
95 | if (z) {
96 | setPassWindowBlurEnable(view, true)
97 | }
98 | setBlurRadius(view, i2)
99 | if (isDarkMode(view.context)) {
100 | setBlurColor(view, i3, i4)
101 | } else {
102 | setBlurColor(view, i5, i6)
103 | }
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/MainHook.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks
2 |
3 | import com.github.kyuubiran.ezxhelper.EzXHelper
4 | import com.github.kyuubiran.ezxhelper.Log
5 | import com.github.kyuubiran.ezxhelper.LogExtensions.logexIfThrow
6 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
7 | import com.yuk.hyperOS_XXL.hooks.modules.framework.MaxWallpaperScale
8 | import com.yuk.hyperOS_XXL.hooks.modules.framework.RemoveScreenshotRestriction
9 | import com.yuk.hyperOS_XXL.hooks.modules.framework.RemoveSmallWindowRestriction1
10 | import com.yuk.hyperOS_XXL.hooks.modules.framework.corepatch.CorePatchMainHook
11 | import com.yuk.hyperOS_XXL.hooks.modules.guardprovider.AntiDefraudAppManager
12 | import com.yuk.hyperOS_XXL.hooks.modules.mediaeditor.RemoveCropRestriction
13 | import com.yuk.hyperOS_XXL.hooks.modules.miuihome.AlwaysShowStatusBarClock
14 | import com.yuk.hyperOS_XXL.hooks.modules.miuihome.AnimDurationRatio
15 | import com.yuk.hyperOS_XXL.hooks.modules.miuihome.BlurWhenOpenFolder
16 | import com.yuk.hyperOS_XXL.hooks.modules.miuihome.CategoryFeatures
17 | import com.yuk.hyperOS_XXL.hooks.modules.miuihome.DockBlur
18 | import com.yuk.hyperOS_XXL.hooks.modules.miuihome.DoubleTapToSleep
19 | import com.yuk.hyperOS_XXL.hooks.modules.miuihome.MinusOneOverlapMode
20 | import com.yuk.hyperOS_XXL.hooks.modules.miuihome.RecentViewRemoveCardAnim
21 | import com.yuk.hyperOS_XXL.hooks.modules.miuihome.RemoveSmallWindowRestriction2
22 | import com.yuk.hyperOS_XXL.hooks.modules.miuihome.ScrollIconName
23 | import com.yuk.hyperOS_XXL.hooks.modules.miuihome.SetDeviceLevel
24 | import com.yuk.hyperOS_XXL.hooks.modules.miuihome.ShortcutAddSmallWindow
25 | import com.yuk.hyperOS_XXL.hooks.modules.miuihome.ShowRealMemory
26 | import com.yuk.hyperOS_XXL.hooks.modules.miuihome.TaskViewCardSize
27 | import com.yuk.hyperOS_XXL.hooks.modules.miuihome.UnlockAnim
28 | import com.yuk.hyperOS_XXL.hooks.modules.miuihome.UseCompleteBlur
29 | import com.yuk.hyperOS_XXL.hooks.modules.packageinstaller.AllowUpdateSystemApp
30 | import com.yuk.hyperOS_XXL.hooks.modules.packageinstaller.DisableCountCheck
31 | import com.yuk.hyperOS_XXL.hooks.modules.packageinstaller.RemovePackageInstallerAds
32 | import com.yuk.hyperOS_XXL.hooks.modules.packageinstaller.ShowMoreApkInfo
33 | import com.yuk.hyperOS_XXL.hooks.modules.personalassistant.BlurWhenGotoMinusOne
34 | import com.yuk.hyperOS_XXL.hooks.modules.powerkeeper.DisableDynamicRefreshRate
35 | import com.yuk.hyperOS_XXL.hooks.modules.securitycenter.RemoveMacroBlacklist
36 | import com.yuk.hyperOS_XXL.hooks.modules.securitycenter.ShowBatteryTemperature
37 | import com.yuk.hyperOS_XXL.hooks.modules.securitycenter.SkipWarningWaitTime
38 | import com.yuk.hyperOS_XXL.hooks.modules.settings.NotificationImportance
39 | import com.yuk.hyperOS_XXL.hooks.modules.systemui.StatusBarShowSeconds
40 | import com.yuk.hyperOS_XXL.hooks.modules.thememanager.RemoveThemeManagerAds
41 | import de.robv.android.xposed.IXposedHookLoadPackage
42 | import de.robv.android.xposed.IXposedHookZygoteInit
43 | import de.robv.android.xposed.callbacks.XC_LoadPackage
44 |
45 | private const val TAG = "HyperOS XXL"
46 | private val PACKAGE_NAME_HOOKED = setOf(
47 | "android",
48 | "com.android.settings",
49 | "com.android.systemui",
50 | "com.android.thememanager",
51 | "com.miui.gallery",
52 | "com.miui.guardprovider",
53 | "com.miui.home",
54 | "com.miui.mediaeditor",
55 | "com.miui.packageinstaller",
56 | "com.miui.personalassistant",
57 | "com.miui.powerkeeper",
58 | "com.miui.screenshot",
59 | "com.miui.securitycenter"
60 | )
61 |
62 | class MainHook : IXposedHookLoadPackage, IXposedHookZygoteInit {
63 |
64 | override fun initZygote(startupParam: IXposedHookZygoteInit.StartupParam) {
65 | EzXHelper.initZygote(startupParam)
66 | CorePatchMainHook().initZygote(startupParam)
67 | }
68 |
69 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
70 | if (lpparam.packageName in PACKAGE_NAME_HOOKED) {
71 | // Init EzXHelper
72 | EzXHelper.initHandleLoadPackage(lpparam)
73 | EzXHelper.setLogTag(TAG)
74 | EzXHelper.setToastTag(TAG)
75 | // Init hooks
76 | when (lpparam.packageName) {
77 | "android" -> {
78 | CorePatchMainHook().handleLoadPackage(lpparam)
79 | initHooks(
80 | MaxWallpaperScale,
81 | RemoveSmallWindowRestriction1,
82 | RemoveScreenshotRestriction,
83 | )
84 | }
85 |
86 | "com.android.settings" -> {
87 | initHooks(
88 | NotificationImportance,
89 | )
90 | }
91 |
92 | "com.android.systemui" -> {
93 | initHooks(
94 | StatusBarShowSeconds,
95 | )
96 | }
97 |
98 | "com.android.thememanager" -> {
99 | initHooks(
100 | RemoveThemeManagerAds,
101 | )
102 | }
103 |
104 | "com.miui.gallery" -> {
105 | initHooks(
106 | RemoveCropRestriction,
107 | )
108 | }
109 |
110 | "com.miui.guardprovider" -> {
111 | AntiDefraudAppManager().handleLoadPackage(lpparam)
112 | }
113 |
114 | "com.miui.home" -> {
115 | initHooks(
116 | SetDeviceLevel,
117 | DoubleTapToSleep,
118 | ScrollIconName,
119 | AnimDurationRatio,
120 | UnlockAnim,
121 | RecentViewRemoveCardAnim,
122 | CategoryFeatures,
123 | ShortcutAddSmallWindow,
124 | RemoveSmallWindowRestriction2,
125 | BlurWhenOpenFolder,
126 | AlwaysShowStatusBarClock,
127 | TaskViewCardSize,
128 | UseCompleteBlur,
129 | MinusOneOverlapMode,
130 | ShowRealMemory,
131 | DockBlur
132 | )
133 | }
134 |
135 | "com.miui.mediaeditor" -> {
136 | initHooks(
137 | RemoveCropRestriction,
138 | )
139 | }
140 |
141 | "com.miui.packageinstaller" -> {
142 | AllowUpdateSystemApp().handleLoadPackage(lpparam)
143 | initHooks(
144 | RemovePackageInstallerAds,
145 | ShowMoreApkInfo,
146 | DisableCountCheck,
147 | )
148 | }
149 |
150 | "com.miui.personalassistant" -> {
151 | initHooks(
152 | BlurWhenGotoMinusOne,
153 | )
154 | }
155 |
156 | "com.miui.powerkeeper" -> {
157 | initHooks(
158 | DisableDynamicRefreshRate,
159 | )
160 | }
161 |
162 | "com.miui.screenshot" -> {
163 | initHooks(
164 | RemoveCropRestriction,
165 | )
166 | }
167 |
168 | "com.miui.securitycenter" -> {
169 | RemoveMacroBlacklist().handleLoadPackage(lpparam)
170 | initHooks(
171 | SkipWarningWaitTime,
172 | ShowBatteryTemperature,
173 | )
174 | }
175 |
176 | else -> return
177 | }
178 | }
179 | }
180 |
181 | private fun initHooks(vararg hook: BaseHook) {
182 | hook.forEach {
183 | runCatching {
184 | if (it.isInit) return@forEach
185 | it.init()
186 | it.isInit = true
187 | Log.i("Inited hook: ${it.javaClass.simpleName}")
188 | }.logexIfThrow("Failed init hook: ${it.javaClass.simpleName}")
189 | }
190 | }
191 |
192 | }
193 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/BaseHook.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules
2 |
3 | abstract class BaseHook {
4 | var isInit: Boolean = false
5 | abstract fun init()
6 | }
7 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/framework/MaxWallpaperScale.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.framework
2 |
3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks
6 | import com.github.kyuubiran.ezxhelper.ObjectHelper.Companion.objectHelper
7 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
8 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
9 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getFloat
10 |
11 | object MaxWallpaperScale : BaseHook() {
12 | override fun init() {
13 |
14 | val value = getFloat("android_max_wallpaper_scale", 1.2f)
15 | if (value == 1.2f) return
16 | val wallpaperControllerClass = loadClass("com.android.server.wm.WallpaperController")
17 | wallpaperControllerClass.methodFinder().filterByName("zoomOutToScale").filterByParamTypes(Float::class.java).first().createHook {
18 | before {
19 | it.thisObject.objectHelper().setObject("mMaxWallpaperScale", value)
20 | }
21 | }
22 | wallpaperControllerClass.declaredConstructors.createHooks {
23 | after {
24 | it.thisObject.objectHelper().setObject("mMaxWallpaperScale", value)
25 | }
26 | }
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/framework/RemoveScreenshotRestriction.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.framework
2 |
3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks
6 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
7 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
8 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
9 |
10 | object RemoveScreenshotRestriction : BaseHook() {
11 | override fun init() {
12 |
13 | if (!getBoolean("android_remove_screenshot_restriction", false)) return
14 | val windowStateClass = loadClass("com.android.server.wm.WindowState")
15 | val windowSurfaceControllerClass = loadClass("com.android.server.wm.WindowSurfaceController")
16 | windowStateClass.methodFinder().filterByName("isSecureLocked").first().createHook {
17 | returnConstant(false)
18 | }
19 | windowSurfaceControllerClass.methodFinder().filterByName("setSecure").first().createHook {
20 | returnConstant(false)
21 | }
22 | windowSurfaceControllerClass.constructors.createHooks {
23 | before {
24 | var flags = it.args[2] as Int
25 | val secureFlag = 128
26 | flags = flags and secureFlag.inv()
27 | it.args[2] = flags
28 | }
29 | }
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/framework/RemoveSmallWindowRestriction1.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.framework
2 |
3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks
6 | import com.github.kyuubiran.ezxhelper.ObjectHelper.Companion.objectHelper
7 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
8 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
9 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
10 |
11 | object RemoveSmallWindowRestriction1 : BaseHook() {
12 | override fun init() {
13 |
14 | if (!getBoolean("android_remove_small_window_restriction", false)) return
15 | val taskClass = loadClass("com.android.server.wm.Task")
16 | val miuiMultiWindowAdapterClass = loadClass("android.util.MiuiMultiWindowAdapter")
17 | val miuiMultiWindowUtilsClass = loadClass("android.util.MiuiMultiWindowUtils")
18 | val mActivityTaskManagerServiceClass = loadClass("com.android.server.wm.ActivityTaskManagerService")
19 | runCatching {
20 | mActivityTaskManagerServiceClass.methodFinder().filterByName("retrieveSettings").toList().createHooks {
21 | after {
22 | it.thisObject.objectHelper().setObject("mDevEnableNonResizableMultiWindow", true)
23 | }
24 | }
25 | }
26 | taskClass.methodFinder().filterByName("isResizeable").first().createHook {
27 | returnConstant(true)
28 | }
29 | miuiMultiWindowAdapterClass.methodFinder().filterByName("getFreeformBlackList").first().createHook {
30 | returnConstant(mutableListOf())
31 | }
32 | miuiMultiWindowAdapterClass.methodFinder().filterByName("getFreeformBlackListFromCloud").first().createHook {
33 | returnConstant(mutableListOf())
34 | }
35 |
36 | miuiMultiWindowAdapterClass.methodFinder().filterByName("getStartFromFreeformBlackListFromCloud").first().createHook {
37 | returnConstant(mutableListOf())
38 | }
39 |
40 | miuiMultiWindowUtilsClass.methodFinder().filterByName("isForceResizeable").first().createHook {
41 | returnConstant(true)
42 | }
43 | miuiMultiWindowUtilsClass.methodFinder().filterByName("supportFreeform").first().createHook {
44 | returnConstant(true)
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/framework/corepatch/CorePatchHelper.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.framework.corepatch
2 |
3 | import com.yuk.HyperOS_XXL.BuildConfig
4 | import de.robv.android.xposed.XC_MethodHook
5 | import de.robv.android.xposed.XposedBridge
6 | import de.robv.android.xposed.XposedHelpers
7 |
8 | open class CorePatchHelper {
9 | var SIGNATURE =
10 | "308203c6308202aea003020102021426d148b7c65944abcf3a683b4c3dd3b139c4ec85300d06092a864886f70d01010b05003074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f6964301e170d3139303130323138353233385a170d3439303130323138353233385a3074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f696430820122300d06092a864886f70d01010105000382010f003082010a028201010087fcde48d9beaeba37b733a397ae586fb42b6c3f4ce758dc3ef1327754a049b58f738664ece587994f1c6362f98c9be5fe82c72177260c390781f74a10a8a6f05a6b5ca0c7c5826e15526d8d7f0e74f2170064896b0cf32634a388e1a975ed6bab10744d9b371cba85069834bf098f1de0205cdee8e715759d302a64d248067a15b9beea11b61305e367ac71b1a898bf2eec7342109c9c5813a579d8a1b3e6a3fe290ea82e27fdba748a663f73cca5807cff1e4ad6f3ccca7c02945926a47279d1159599d4ecf01c9d0b62e385c6320a7a1e4ddc9833f237e814b34024b9ad108a5b00786ea15593a50ca7987cbbdc203c096eed5ff4bf8a63d27d33ecc963990203010001a350304e300c0603551d13040530030101ff301d0603551d0e04160414a361efb002034d596c3a60ad7b0332012a16aee3301f0603551d23041830168014a361efb002034d596c3a60ad7b0332012a16aee3300d06092a864886f70d01010b0500038201010022ccb684a7a8706f3ee7c81d6750fd662bf39f84805862040b625ddf378eeefae5a4f1f283deea61a3c7f8e7963fd745415153a531912b82b596e7409287ba26fb80cedba18f22ae3d987466e1fdd88e440402b2ea2819db5392cadee501350e81b8791675ea1a2ed7ef7696dff273f13fb742bb9625fa12ce9c2cb0b7b3d94b21792f1252b1d9e4f7012cb341b62ff556e6864b40927e942065d8f0f51273fcda979b8832dd5562c79acf719de6be5aee2a85f89265b071bf38339e2d31041bc501d5e0c034ab1cd9c64353b10ee70b49274093d13f733eb9d3543140814c72f8e003f301c7a00b1872cc008ad55e26df2e8f07441002c4bcb7dc746745f0db"
11 |
12 | fun hookAllMethods(packageManagerServiceUtils: Class<*>?, verifySignatures: String?, methodHook: XC_MethodHook?) {
13 | try {
14 | XposedBridge.hookAllMethods(packageManagerServiceUtils, verifySignatures, methodHook)
15 | } catch (e: Throwable) {
16 | if (BuildConfig.DEBUG) XposedBridge.log(e)
17 | }
18 | }
19 |
20 | companion object {
21 | fun findAndHookMethod(p1: String?, lpparam: ClassLoader?, p2: String?, vararg parameterTypesAndCallback: Any?) {
22 | try {
23 | if (findClass(p1, lpparam) != null) {
24 | XposedHelpers.findAndHookMethod(p1, lpparam, p2, *parameterTypesAndCallback)
25 | }
26 | } catch (e: Throwable) {
27 | if (BuildConfig.DEBUG) XposedBridge.log(e)
28 | }
29 | }
30 |
31 | fun hookAllMethods(p1: String?, lpparam: ClassLoader?, methodName: String?, parameterTypesAndCallback: XC_MethodHook?) {
32 | try {
33 | val packageParser = findClass(p1, lpparam)
34 | XposedBridge.hookAllMethods(packageParser, methodName, parameterTypesAndCallback)
35 | } catch (e: Throwable) {
36 | if (BuildConfig.DEBUG) XposedBridge.log(e)
37 | }
38 | }
39 |
40 | fun hookAllConstructors(p1: String?, parameterTypesAndCallback: XC_MethodHook) {
41 | try {
42 | val packageParser = findClass(p1, null)
43 | hookAllConstructors(packageParser, parameterTypesAndCallback)
44 | } catch (e: Throwable) {
45 | if (BuildConfig.DEBUG) XposedBridge.log(e)
46 | }
47 | }
48 |
49 | private fun hookAllConstructors(hookClass: Class<*>?, callback: XC_MethodHook): Set? {
50 | return try {
51 | XposedBridge.hookAllConstructors(hookClass, callback)
52 | } catch (e: Throwable) {
53 | if (BuildConfig.DEBUG) XposedBridge.log(e)
54 | null
55 | }
56 | }
57 |
58 | private fun findClass(className: String?, classLoader: ClassLoader?): Class<*>? {
59 | try {
60 | return className?.let { Class.forName(it, false, classLoader) }
61 | } catch (e: Throwable) {
62 | if (BuildConfig.DEBUG) XposedBridge.log(e)
63 | }
64 | return null
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/framework/corepatch/CorePatchMainHook.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.framework.corepatch
2 |
3 | import android.os.Build
4 | import com.github.kyuubiran.ezxhelper.Log
5 | import de.robv.android.xposed.IXposedHookLoadPackage
6 | import de.robv.android.xposed.IXposedHookZygoteInit
7 | import de.robv.android.xposed.IXposedHookZygoteInit.StartupParam
8 | import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam
9 |
10 | class CorePatchMainHook : IXposedHookLoadPackage, IXposedHookZygoteInit {
11 | override fun handleLoadPackage(lpparam: LoadPackageParam) {
12 | if ("android" == lpparam.packageName && lpparam.processName == "android") {
13 | Log.d("CorePatch: Current sdk version " + Build.VERSION.SDK_INT)
14 | when (Build.VERSION.SDK_INT) {
15 | Build.VERSION_CODES.UPSIDE_DOWN_CAKE -> CorePatchForU().handleLoadPackage(lpparam)
16 | else -> Log.ex("CorePatch: Warning: Unsupported Version of Android " + Build.VERSION.SDK_INT)
17 | }
18 | }
19 | }
20 |
21 | override fun initZygote(startupParam: StartupParam) {
22 | if (startupParam.startsSystemServer) {
23 | Log.d("CorePatch: Current sdk version " + Build.VERSION.SDK_INT)
24 | when (Build.VERSION.SDK_INT) {
25 | Build.VERSION_CODES.UPSIDE_DOWN_CAKE -> CorePatchForU().initZygote(startupParam)
26 | else -> Log.ex("CorePatch: Warning: Unsupported Version of Android " + Build.VERSION.SDK_INT)
27 | }
28 | }
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/framework/corepatch/ReturnConstant.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.framework.corepatch
2 |
3 | import de.robv.android.xposed.XC_MethodHook
4 | import de.robv.android.xposed.XSharedPreferences
5 |
6 | class ReturnConstant(private val prefs: XSharedPreferences, private val prefsKey: String, private val value: Any?) : XC_MethodHook() {
7 | override fun beforeHookedMethod(param: MethodHookParam) {
8 | super.beforeHookedMethod(param)
9 | prefs.reload()
10 | if (prefs.getBoolean(prefsKey, false)) {
11 | param.result = value
12 | }
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/guardprovider/AntiDefraudAppManager.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.guardprovider
2 |
3 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
4 | import de.robv.android.xposed.IXposedHookLoadPackage
5 | import de.robv.android.xposed.callbacks.XC_LoadPackage
6 | import org.luckypray.dexkit.DexKitBridge
7 |
8 | class AntiDefraudAppManager : IXposedHookLoadPackage {
9 |
10 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
11 | System.loadLibrary("dexkit")
12 | val bridge = DexKitBridge.create(lpparam.appInfo.sourceDir) ?: throw NullPointerException("DexKitBridge.create() failed")
13 | bridge.findMethod {
14 | matcher {
15 | usingStrings = listOf("AntiDefraudAppManager", "https://flash.sec.miui.com/detect/app")
16 | }
17 | }.firstOrNull()?.getMethodInstance(lpparam.classLoader)?.createHook {
18 | replace {
19 | return@replace null
20 | }
21 | bridge.close()
22 | }
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/mediaeditor/RemoveCropRestriction.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.mediaeditor
2 |
3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
4 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClassOrNull
5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
6 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
7 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
8 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
9 |
10 | object RemoveCropRestriction : BaseHook() {
11 | override fun init() {
12 |
13 | if (!getBoolean("mediaeditor_remove_crop_restriction", false)) return
14 | val resizeDetectorCropClass = loadClassOrNull("com.miui.gallery.editor.photo.core.imports.obsoletes.Crop\$ResizeDetector")
15 | val resizeDetectorScreenCropViewClass = loadClassOrNull("com.miui.gallery.editor.photo.screen.crop.ScreenCropView\$ResizeDetector")
16 |
17 | if (resizeDetectorCropClass != null) {
18 | resizeDetectorCropClass.methodFinder().filterByName("calculateMinSize").first().createHook {
19 | returnConstant(0)
20 | }
21 | } else {
22 | var resizeDetectorCrop = 'a'
23 | for (i in 0..25) {
24 | try {
25 | loadClass("com.miui.gallery.editor.photo.core.imports.obsoletes.Crop\$${resizeDetectorCrop}").methodFinder()
26 | .filterByReturnType(Int::class.java)
27 | .filterByParamCount(0).first().createHook {
28 | returnConstant(0)
29 | }
30 | } catch (t: Throwable) {
31 | resizeDetectorCrop++
32 | }
33 | }
34 | }
35 | if (resizeDetectorScreenCropViewClass != null) {
36 | resizeDetectorScreenCropViewClass.methodFinder().filterByName("calculateMinSize").first().createHook {
37 | returnConstant(0)
38 | }
39 | } else {
40 | var resizeDetectorScreenCropView = 'a'
41 | for (i in 0..25) {
42 | try {
43 | loadClass("com.miui.gallery.editor.photo.screen.crop.ScreenCropView\$${resizeDetectorScreenCropView}").methodFinder()
44 | .filterByReturnType(Int::class.java)
45 | .filterByParamCount(0).first().createHook {
46 | returnConstant(0)
47 | }
48 | } catch (t: Throwable) {
49 | resizeDetectorScreenCropView++
50 | }
51 | }
52 | }
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/miuihome/AlwaysShowStatusBarClock.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.miuihome
2 |
3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
6 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
7 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
8 |
9 | object AlwaysShowStatusBarClock : BaseHook() {
10 | override fun init() {
11 |
12 | if (!getBoolean("miuihome_always_show_statusbar_clock", false)) return
13 | val workspaceClass = loadClass("com.miui.home.launcher.Workspace")
14 | try {
15 | workspaceClass.methodFinder().filterByName("isScreenHasClockGadget").first()
16 | } catch (e: Exception) {
17 | workspaceClass.methodFinder().filterByName("isScreenHasClockWidget").first()
18 | } catch (e: Exception) {
19 | workspaceClass.methodFinder().filterByName("isClockWidget").first()
20 | }.createHook {
21 | returnConstant(false)
22 | }
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/miuihome/AnimDurationRatio.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.miuihome
2 |
3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
6 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
7 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
8 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getInt
9 |
10 | object AnimDurationRatio : BaseHook() {
11 | override fun init() {
12 |
13 | if (!getBoolean("miuihome_anim_ratio_binding", false)) return
14 | val value1 = getInt("miuihome_anim_ratio", 100).toFloat() / 100f
15 | val value2 = getInt("miuihome_anim_ratio_recent", 100).toFloat() / 100f
16 | val rectFSpringAnimClass = loadClass("com.miui.home.recents.util.RectFSpringAnim")
17 | val deviceLevelUtilsClass = loadClass("com.miui.home.launcher.common.DeviceLevelUtils")
18 | rectFSpringAnimClass.methodFinder().filterByName("getModifyResponse").first().createHook {
19 | before {
20 | it.result = it.args[0] as Float * value1
21 | }
22 | }
23 | deviceLevelUtilsClass.methodFinder().filterByName("getDeviceLevelTransitionAnimRatio").first().createHook {
24 | returnConstant(value2)
25 | }
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/miuihome/BlurWhenOpenFolder.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.miuihome
2 |
3 | import android.app.Activity
4 | import android.view.MotionEvent
5 | import android.view.View
6 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
7 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.callMethod
8 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.callStaticMethod
9 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.findClass
10 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.hookAfterAllMethods
11 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.hookAfterMethod
12 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.hookBeforeAllMethods
13 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.hookBeforeMethod
14 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
15 |
16 | object BlurWhenOpenFolder : BaseHook() {
17 | override fun init() {
18 |
19 | if (!getBoolean("miuihome_blur_when_open_folder", false)) return
20 | val folderInfo = "com.miui.home.launcher.FolderInfo".findClass()
21 | val launcherClass = "com.miui.home.launcher.Launcher".findClass()
22 | val blurUtilsClass = "com.miui.home.launcher.common.BlurUtils".findClass()
23 | val navStubViewClass = "com.miui.home.recents.NavStubView".findClass()
24 | val applicationClass = "com.miui.home.launcher.Application".findClass()
25 |
26 | try {
27 | // Replace it if official MiuiHome supports it
28 | launcherClass.hookBeforeMethod("isShouldBlur") {
29 | it.result = false
30 | }
31 | blurUtilsClass.hookBeforeMethod("fastBlurWhenOpenOrCloseFolder", launcherClass, Boolean::class.java) {
32 | it.result = null
33 | }
34 | } catch (_: Exception) {
35 | // Official MiuiHome doesn't support this feature
36 | }
37 |
38 | var isShouldBlur = false
39 |
40 | launcherClass.hookAfterMethod("openFolder", folderInfo, View::class.java) {
41 | val mLauncher = applicationClass.callStaticMethod("getLauncher") as Activity
42 | val isInNormalEditing = mLauncher.callMethod("isInNormalEditing") as Boolean
43 | if (!isInNormalEditing) blurUtilsClass.callStaticMethod("fastBlur", 1.0f, mLauncher.window, true)
44 | }
45 |
46 | launcherClass.hookAfterMethod("isFolderShowing") {
47 | isShouldBlur = it.result as Boolean
48 | }
49 |
50 | launcherClass.hookAfterMethod("closeFolder", Boolean::class.java) {
51 | isShouldBlur = false
52 | val mLauncher = applicationClass.callStaticMethod("getLauncher") as Activity
53 | val isInNormalEditing = mLauncher.callMethod("isInNormalEditing") as Boolean
54 | if (isInNormalEditing) blurUtilsClass.callStaticMethod("fastBlur", 1.0f, mLauncher.window, true, 0L)
55 | else blurUtilsClass.callStaticMethod("fastBlur", 0.0f, mLauncher.window, true)
56 | }
57 |
58 | launcherClass.hookBeforeMethod("onGesturePerformAppToHome") {
59 | val mLauncher = applicationClass.callStaticMethod("getLauncher") as Activity
60 | if (isShouldBlur) blurUtilsClass.callStaticMethod("fastBlur", 1.0f, mLauncher.window, true, 0L)
61 | }
62 |
63 | blurUtilsClass.hookBeforeAllMethods("fastBlurWhenStartOpenOrCloseApp") {
64 | val mLauncher = applicationClass.callStaticMethod("getLauncher") as Activity
65 | val isInEditing = mLauncher.callMethod("isInEditing") as Boolean
66 | if (isShouldBlur) it.result = blurUtilsClass.callStaticMethod("fastBlur", 1.0f, mLauncher.window, true, 0L)
67 | else if (isInEditing) it.result = blurUtilsClass.callStaticMethod("fastBlur", 1.0f, mLauncher.window, true, 0L)
68 | }
69 |
70 | blurUtilsClass.hookBeforeAllMethods("fastBlurWhenFinishOpenOrCloseApp") {
71 | val mLauncher = applicationClass.callStaticMethod("getLauncher") as Activity
72 | val isInEditing = mLauncher.callMethod("isInEditing") as Boolean
73 | if (isShouldBlur) it.result = blurUtilsClass.callStaticMethod("fastBlur", 1.0f, mLauncher.window, true, 0L)
74 | else if (isInEditing) it.result = blurUtilsClass.callStaticMethod("fastBlur", 1.0f, mLauncher.window, true, 0L)
75 | }
76 |
77 | blurUtilsClass.hookAfterAllMethods("fastBlurWhenEnterRecents") {
78 | val mLauncher = applicationClass.callStaticMethod("getLauncher") as Activity
79 | val isInShortcutMenuState = mLauncher.callMethod("isInShortcutMenuState") as Boolean
80 | if (isInShortcutMenuState) mLauncher.callMethod("hideShortcutMenuWithoutAnim")
81 | }
82 |
83 | blurUtilsClass.hookAfterAllMethods("fastBlurWhenExitRecents") {
84 | val mLauncher = applicationClass.callStaticMethod("getLauncher") as Activity
85 | val isInEditing = mLauncher.callMethod("isInEditing") as Boolean
86 | if (isShouldBlur) it.result = blurUtilsClass.callStaticMethod("fastBlur", 1.0f, mLauncher.window, true, 0L)
87 | else if (isInEditing) it.result = blurUtilsClass.callStaticMethod("fastBlur", 1.0f, mLauncher.window, true, 0L)
88 | }
89 |
90 | blurUtilsClass.hookBeforeAllMethods("fastBlurDirectly") {
91 | val blurRatio = it.args[0] as Float
92 | if (isShouldBlur && blurRatio == 0.0f) it.result = null
93 | }
94 |
95 | if (!getBoolean("miuihome_use_complete_blur", false)) {
96 | navStubViewClass.hookBeforeMethod("onPointerEvent", MotionEvent::class.java) {
97 | val mLauncher = applicationClass.callStaticMethod("getLauncher") as Activity
98 | val motionEvent = it.args[0] as MotionEvent
99 | val action = motionEvent.action
100 | if (action == 2 && isShouldBlur) blurUtilsClass.callStaticMethod("fastBlurDirectly", 1.0f, mLauncher.window)
101 | }
102 | }
103 | }
104 |
105 | }
106 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/miuihome/CategoryFeatures.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.miuihome
2 |
3 | import android.view.View
4 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
5 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClassOrNull
6 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
7 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
8 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
9 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.callMethodAs
10 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.findClass
11 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.getObjectFieldAs
12 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.hookAfterMethod
13 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
14 |
15 | object CategoryFeatures : BaseHook() {
16 | override fun init() {
17 |
18 | if (getBoolean("miuihome_hide_allapps_category_all", false)) {
19 | val baseAllAppsCategoryListContainerClass = loadClassOrNull("com.miui.home.launcher.allapps.category.BaseAllAppsCategoryListContainer")
20 | val allAppsCategoryListContainer = loadClass("com.miui.home.launcher.allapps.category.AllAppsCategoryListContainer")
21 | try {
22 | baseAllAppsCategoryListContainerClass!!.methodFinder().filterByName("buildSortCategoryList").first()
23 | } catch (e: Exception) {
24 | allAppsCategoryListContainer.methodFinder().filterByName("buildSortCategoryList").first()
25 | }.createHook {
26 | after {
27 | val list = it.result as ArrayList<*>
28 | if (list.size > 1) {
29 | list.removeAt(0)
30 | it.result = list
31 | }
32 | }
33 | }
34 | }
35 |
36 | if (getBoolean("miuihome_hide_allapps_category_paging_edit", false)) {
37 | "com.miui.home.launcher.allapps.AllAppsGridAdapter".hookAfterMethod(
38 | "onBindViewHolder", "com.miui.home.launcher.allapps.AllAppsGridAdapter.ViewHolder".findClass(), Int::class.javaPrimitiveType
39 | ) {
40 | if (it.args[0].callMethodAs("getItemViewType") == 64) {
41 | it.args[0].getObjectFieldAs("itemView").visibility = View.INVISIBLE
42 | }
43 | }
44 | }
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/miuihome/DockBlur.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.miuihome
2 |
3 | import android.view.Gravity
4 | import android.widget.FrameLayout
5 | import cn.fkj233.ui.activity.dp2px
6 | import com.github.kyuubiran.ezxhelper.EzXHelper.appContext
7 | import com.yuk.hyperOS_XXL.blur.BlurView
8 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
9 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.findClass
10 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.getObjectField
11 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.hookAfterMethod
12 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
13 |
14 | object DockBlur : BaseHook() {
15 | override fun init() {
16 |
17 | if (!getBoolean("miuihome_add_dock_blur", false)) return
18 |
19 | val launcherClass = "com.miui.home.launcher.Launcher".findClass()
20 |
21 | // DockBlur, ONLY FOR XIAOMI14 WITH HYPER OS
22 | // 差解锁动画跟随
23 | launcherClass.hookAfterMethod("setupViews") {
24 | val mHotSeats = it.thisObject.getObjectField("mHotSeats") as FrameLayout
25 | val mDockBlurParent = FrameLayout(appContext)
26 | val mDockBlur = BlurView(appContext, 30)
27 | val mDockHeight = dp2px(mDockBlurParent.context, 94f)
28 | val mDockMargin = dp2px(mDockBlurParent.context, 10f)
29 | val mDockBottomMargin = dp2px(mDockBlurParent.context, 14f)
30 | mDockBlurParent.layoutParams = FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, mDockHeight).also { layoutParams ->
31 | layoutParams.gravity = Gravity.BOTTOM
32 | layoutParams.setMargins(mDockMargin, 0, mDockMargin, mDockBottomMargin)
33 | }
34 | mDockBlur.layoutParams = FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT)
35 | mHotSeats.addView(mDockBlurParent, 0)
36 | mDockBlurParent.addView(mDockBlur, 0)
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/miuihome/DoubleTapToSleep.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.miuihome
2 |
3 | import android.content.Context
4 | import android.content.Intent
5 | import android.os.SystemClock
6 | import android.view.MotionEvent
7 | import android.view.ViewConfiguration
8 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
9 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
10 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks
11 | import com.github.kyuubiran.ezxhelper.finders.ConstructorFinder.`-Static`.constructorFinder
12 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
13 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
14 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.callMethod
15 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.callMethodAs
16 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.getObjectField
17 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
18 | import de.robv.android.xposed.XposedHelpers
19 |
20 | object DoubleTapToSleep : BaseHook() {
21 | override fun init() {
22 |
23 | if (!getBoolean("miuihome_double_tap_to_sleep", false)) return
24 | val workspaceClass = loadClass("com.miui.home.launcher.Workspace")
25 | workspaceClass.constructorFinder().toList().createHooks {
26 | after {
27 | var mDoubleTapControllerEx = XposedHelpers.getAdditionalInstanceField(it.thisObject, "mDoubleTapControllerEx")
28 | if (mDoubleTapControllerEx != null) return@after
29 | mDoubleTapControllerEx = DoubleTapController(it.args[0] as Context)
30 | XposedHelpers.setAdditionalInstanceField(it.thisObject, "mDoubleTapControllerEx", mDoubleTapControllerEx)
31 | }
32 | }
33 | workspaceClass.methodFinder().filterByName("dispatchTouchEvent").filterByParamCount(1).first().createHook {
34 | before {
35 | val mDoubleTapControllerEx = XposedHelpers.getAdditionalInstanceField(it.thisObject, "mDoubleTapControllerEx") as DoubleTapController
36 | if (!mDoubleTapControllerEx.isDoubleTapEvent(it.args[0] as MotionEvent)) return@before
37 | val mCurrentScreenIndex = it.thisObject.getObjectField("mCurrentScreenIndex")
38 | val cellLayout = it.thisObject.callMethod("getCellLayout", mCurrentScreenIndex)
39 | if (cellLayout != null) if (cellLayout.callMethodAs("lastDownOnOccupiedCell")) return@before
40 | if (it.thisObject.callMethodAs("isInNormalEditingMode")) return@before
41 | val context = it.thisObject.callMethodAs("getContext")
42 | context.sendBroadcast(
43 | Intent("com.miui.app.ExtraStatusBarManager.action_TRIGGER_TOGGLE").putExtra("com.miui.app.ExtraStatusBarManager.extra_TOGGLE_ID", 10)
44 | )
45 | }
46 | }
47 | }
48 | }
49 |
50 | class DoubleTapController internal constructor(mContext: Context) {
51 | private val maxDuration: Long = 500
52 | private var mActionDownRawX: Float = 0f
53 | private var mActionDownRawY: Float = 0f
54 | private var mClickCount: Int = 0
55 | private var mFirstClickRawX: Float = 0f
56 | private var mFirstClickRawY: Float = 0f
57 | private var mLastClickTime: Long = 0
58 | private val mTouchSlop: Int = ViewConfiguration.get(mContext).scaledTouchSlop * 2
59 | fun isDoubleTapEvent(motionEvent: MotionEvent): Boolean {
60 | val action = motionEvent.actionMasked
61 | return when {
62 | action == MotionEvent.ACTION_DOWN -> {
63 | mActionDownRawX = motionEvent.rawX
64 | mActionDownRawY = motionEvent.rawY
65 | false
66 | }
67 |
68 | action != MotionEvent.ACTION_UP -> false
69 | else -> {
70 | val rawX = motionEvent.rawX
71 | val rawY = motionEvent.rawY
72 | if (kotlin.math.abs(rawX - mActionDownRawX) <= mTouchSlop.toFloat() && kotlin.math.abs(
73 | rawY - mActionDownRawY
74 | ) <= mTouchSlop.toFloat()
75 | ) {
76 | if (SystemClock.elapsedRealtime() - mLastClickTime > maxDuration || rawY - mFirstClickRawY > mTouchSlop.toFloat() || rawX - mFirstClickRawX > mTouchSlop.toFloat()) mClickCount =
77 | 0
78 | mClickCount++
79 | if (mClickCount == 1) {
80 | mFirstClickRawX = rawX
81 | mFirstClickRawY = rawY
82 | mLastClickTime = SystemClock.elapsedRealtime()
83 | return false
84 | } else if (kotlin.math.abs(rawY - mFirstClickRawY) <= mTouchSlop.toFloat() && kotlin.math.abs(
85 | rawX - mFirstClickRawX
86 | ) <= mTouchSlop.toFloat() && SystemClock.elapsedRealtime() - mLastClickTime <= maxDuration
87 | ) {
88 | mClickCount = 0
89 | return true
90 | }
91 | }
92 | mClickCount = 0
93 | false
94 | }
95 | }
96 | }
97 |
98 | }
99 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/miuihome/FuckValidateTheme5.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.miuihome
2 |
3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
5 | import com.github.kyuubiran.ezxhelper.Log
6 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
7 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
8 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
9 |
10 | object FuckValidateTheme5 : BaseHook() {
11 | override fun init() {
12 |
13 | if (!getBoolean("thememanager_fuck_validate_theme", false)) return
14 | try {
15 | loadClass("com.miui.maml.widget.edit.MamlutilKt").methodFinder().filterByName("themeManagerSupportPaidWidget").first().createHook {
16 | returnConstant(false)
17 | }
18 | loadClass("com.miui.home.launcher.gadget.MaMlPendingHostView").methodFinder().filterByName("isCanAutoStartDownload").first().createHook {
19 | returnConstant(true)
20 | }
21 | } catch (t: Throwable) {
22 | Log.ex(t)
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/miuihome/MinusOneOverlapMode.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.miuihome
2 |
3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
6 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
7 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
8 |
9 | object MinusOneOverlapMode : BaseHook() {
10 | override fun init() {
11 |
12 | if (!getBoolean("miuihome_minus_one_overlap_mode", false) || !getBoolean("personalassistant_minus_one_blur", false)) return
13 | val assistantDeviceAdapterClass = loadClass("com.miui.home.launcher.overlay.assistant.AssistantDeviceAdapter")
14 | assistantDeviceAdapterClass.methodFinder().filterByName("inOverlapMode").first().createHook {
15 | returnConstant(true)
16 | }
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/miuihome/RecentViewRemoveCardAnim.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.miuihome
2 |
3 | import android.animation.ObjectAnimator
4 | import android.animation.TimeInterpolator
5 | import android.view.MotionEvent
6 | import android.view.View
7 | import com.github.kyuubiran.ezxhelper.ObjectHelper.Companion.objectHelper
8 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
9 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.callMethod
10 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.callStaticMethod
11 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.findClass
12 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.hookAfterMethod
13 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.new
14 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.replaceMethod
15 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
16 |
17 | object RecentViewRemoveCardAnim : BaseHook() {
18 | override fun init() {
19 |
20 | if (!getBoolean("miuihome_recentview_remove_card_animation", false)) return
21 | "com.miui.home.recents.views.SwipeHelperForRecents".hookAfterMethod("onTouchEvent", MotionEvent::class.java) {
22 | val mCurrView = it.thisObject.objectHelper().getObjectOrNullUntilSuperclassAs("mCurrView")
23 | if (mCurrView != null) {
24 | mCurrView.alpha *= 0.9f + 0.1f
25 | mCurrView.scaleX = 1f
26 | mCurrView.scaleY = 1f
27 | }
28 | }
29 |
30 | "com.miui.home.recents.TaskStackViewLayoutStyleHorizontal".replaceMethod("createScaleDismissAnimation", View::class.java, Float::class.java) {
31 | val view = it.args[0] as View
32 | val getScreenHeight = "com.miui.home.launcher.DeviceConfig".findClass().callStaticMethod("getScreenHeight") as Int
33 | val ofFloat = ObjectAnimator.ofFloat(view, View.TRANSLATION_Y, view.translationY, -getScreenHeight * 1.1484375f)
34 | val physicBasedInterpolator = "com.miui.home.launcher.anim.PhysicBasedInterpolator".findClass().new(0.72f, 0.72f) as TimeInterpolator
35 | ofFloat.interpolator = physicBasedInterpolator
36 | ofFloat.duration = 450L
37 | return@replaceMethod ofFloat
38 | }
39 |
40 | "com.miui.home.recents.views.VerticalSwipe".hookAfterMethod("calculate", Float::class.java) {
41 | val f = it.args[0] as Float
42 | val asScreenHeightWhenDismiss = "com.miui.home.recents.views.VerticalSwipe".findClass().callStaticMethod("getAsScreenHeightWhenDismiss") as Int
43 | val f2 = f / asScreenHeightWhenDismiss
44 | val mTaskViewHeight = it.thisObject.objectHelper().getObjectOrNullAs("mTaskViewHeight")
45 | val mCurScale = it.thisObject.objectHelper().getObjectOrNullAs("mCurScale")
46 | val f3: Float = mTaskViewHeight!! * mCurScale!!
47 | val i = if (f2 > 0.0f) 1 else if (f2 == 0.0f) 0 else -1
48 | val afterFrictionValue: Float = it.thisObject.callMethod("afterFrictionValue", f, asScreenHeightWhenDismiss) as Float
49 | if (i < 0) it.thisObject.objectHelper().setObject("mCurTransY", (mTaskViewHeight / 2f + afterFrictionValue * 2f) - (f3 / 2f))
50 | it.thisObject.objectHelper().setObject("mCurAlpha", it.thisObject.objectHelper().getObjectOrNull("mCurAlpha") as Float * 0.9f + 0.1f)
51 | }
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/miuihome/RemoveSmallWindowRestriction2.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.miuihome
2 |
3 | import android.util.ArraySet
4 | import com.github.kyuubiran.ezxhelper.ClassUtils.invokeStaticMethodBestMatch
5 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
6 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
7 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks
8 | import com.github.kyuubiran.ezxhelper.ObjectHelper.Companion.objectHelper
9 | import com.github.kyuubiran.ezxhelper.ObjectUtils.getObjectOrNullAs
10 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
11 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
12 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
13 |
14 | object RemoveSmallWindowRestriction2 : BaseHook() {
15 | override fun init() {
16 |
17 | if (!getBoolean("android_remove_small_window_restriction", false)) return
18 | val recentsAndFSGestureUtilsClass = loadClass("com.miui.home.launcher.RecentsAndFSGestureUtils")
19 | recentsAndFSGestureUtilsClass.methodFinder().filterByName("canTaskEnterSmallWindow").first().createHook {
20 | returnConstant(true)
21 | }
22 | recentsAndFSGestureUtilsClass.methodFinder().filterByName("canTaskEnterMiniSmallWindow").first().createHook {
23 | before {
24 | it.result = invokeStaticMethodBestMatch(loadClass("com.miui.home.smallwindow.SmallWindowStateHelper"), "getInstance")!!.objectHelper()
25 | .invokeMethodBestMatch("canEnterMiniSmallWindow") as Boolean
26 | }
27 | }
28 | loadClass("com.miui.home.smallwindow.SmallWindowStateHelperUseManager").methodFinder().filterByName("canEnterMiniSmallWindow").first().createHook {
29 | before {
30 | it.result = getObjectOrNullAs>(it.thisObject, "mMiniSmallWindowInfoSet")!!.isEmpty()
31 | }
32 | }
33 | loadClass("miui.app.MiuiFreeFormManager").methodFinder().filterByName("getAllFreeFormStackInfosOnDisplay").toList().createHooks {
34 | before { param ->
35 | if (Throwable().stackTrace.any {
36 | it.className == "android.util.MiuiMultiWindowUtils" && it.methodName == "startSmallFreeform"
37 | }) {
38 | param.result = null
39 | }
40 | }
41 | }
42 | loadClass("android.util.MiuiMultiWindowUtils").methodFinder().filterByName("hasSmallFreeform").toList().createHooks {
43 | before { param ->
44 | if (Throwable().stackTrace.any {
45 | it.className == "android.util.MiuiMultiWindowUtils" && it.methodName == "startSmallFreeform"
46 | }) {
47 | param.result = false
48 | }
49 | }
50 | }
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/miuihome/ScrollIconName.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.miuihome
2 |
3 | import android.annotation.SuppressLint
4 | import android.content.Context
5 | import android.text.TextUtils
6 | import android.view.View
7 | import android.view.ViewGroup
8 | import android.widget.TextView
9 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
10 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.callMethod
11 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.findClass
12 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.getObjectField
13 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.hookAfterMethod
14 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
15 |
16 | object ScrollIconName : BaseHook() {
17 | @SuppressLint("DiscouragedApi")
18 | override fun init() {
19 |
20 | if (!getBoolean("miuihome_scroll_icon_name", false)) return
21 | val launcherClass = "com.miui.home.launcher.Launcher".findClass()
22 | val shortcutInfoClass = "com.miui.home.launcher.ShortcutInfo".findClass()
23 |
24 | try {
25 | "com.miui.home.launcher.ItemIcon".hookAfterMethod(
26 | "onFinishInflate"
27 | ) {
28 | val mTitle = it.thisObject.getObjectField("mTitle") as TextView
29 | mTitleScrolling(mTitle)
30 | }
31 | "com.miui.home.launcher.maml.MaMlWidgetView".hookAfterMethod(
32 | "onFinishInflate"
33 | ) {
34 | val mTitle = it.thisObject.getObjectField("mTitleTextView") as TextView
35 | mTitleScrolling(mTitle)
36 | }
37 | "com.miui.home.launcher.LauncherMtzGadgetView".hookAfterMethod(
38 | "onFinishInflate"
39 | ) {
40 | val mTitle = it.thisObject.getObjectField("mTitleTextView") as TextView
41 | mTitleScrolling(mTitle)
42 | }
43 | "com.miui.home.launcher.LauncherWidgetView".hookAfterMethod(
44 | "onFinishInflate"
45 | ) {
46 | val mTitle = it.thisObject.getObjectField("mTitleTextView") as TextView
47 | mTitleScrolling(mTitle)
48 | }
49 | "com.miui.home.launcher.ShortcutIcon".hookAfterMethod(
50 | "fromXml", Int::class.javaPrimitiveType, launcherClass, ViewGroup::class.java, shortcutInfoClass
51 | ) {
52 | val buddyIconView = it.args[3].callMethod("getBuddyIconView", it.args[2]) as View
53 | val mTitle = buddyIconView.getObjectField("mTitle") as TextView
54 | mTitleScrolling(mTitle)
55 | }
56 | "com.miui.home.launcher.ShortcutIcon".hookAfterMethod(
57 | "createShortcutIcon", Int::class.javaPrimitiveType, launcherClass, ViewGroup::class.java
58 | ) {
59 | val buddyIcon = it.result as View
60 | val mTitle = buddyIcon.getObjectField("mTitle") as TextView
61 | mTitleScrolling(mTitle)
62 | }
63 | "com.miui.home.launcher.common.Utilities".hookAfterMethod(
64 | "adaptTitleStyleToWallpaper", Context::class.java, TextView::class.java, Int::class.javaPrimitiveType, Int::class.javaPrimitiveType
65 | ) {
66 | val mTitle = it.args[1] as TextView
67 | if (mTitle.id == mTitle.resources.getIdentifier("icon_title", "id", "com.miui.home")) {
68 | mTitleScrolling(mTitle)
69 | }
70 | }
71 | } catch (_: Exception) {
72 | }
73 | }
74 |
75 | private fun mTitleScrolling(mTitle: TextView) {
76 | mTitle.ellipsize = TextUtils.TruncateAt.MARQUEE
77 | mTitle.isHorizontalFadingEdgeEnabled = true
78 | mTitle.setSingleLine()
79 | mTitle.marqueeRepeatLimit = -1
80 | mTitle.isSelected = true
81 | mTitle.setHorizontallyScrolling(true)
82 | }
83 |
84 | }
85 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/miuihome/SetDeviceLevel.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.miuihome
2 |
3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
6 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
7 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.findClass
8 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.hookBeforeMethod
9 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.replaceMethod
10 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
11 |
12 | object SetDeviceLevel : BaseHook() {
13 | override fun init() {
14 |
15 | if (!getBoolean("miuihome_highend_device", false)) return
16 | try {
17 | loadClass("com.miui.home.launcher.common.CpuLevelUtils").methodFinder().filterByName("getQualcommCpuLevel").filterByParamCount(1)
18 | } catch (_: Exception) {
19 | loadClass("miuix.animation.utils.DeviceUtils").methodFinder().filterByName("getQualcommCpuLevel").filterByParamCount(1)
20 | }.first().createHook {
21 | returnConstant(2)
22 | }
23 | try {
24 | "com.miui.home.launcher.common.DeviceLevelUtils".hookBeforeMethod("getDeviceLevel") {
25 | it.result = 2
26 | }
27 | } catch (_: Exception) {
28 | }
29 | try {
30 | "com.miui.home.launcher.DeviceConfig".hookBeforeMethod("isSupportCompleteAnimation") {
31 | it.result = true
32 | }
33 | } catch (_: Exception) {
34 | }
35 | try {
36 | "com.miui.home.launcher.common.DeviceLevelUtils".hookBeforeMethod("isLowLevelOrLiteDevice") {
37 | it.result = false
38 | }
39 | } catch (_: Exception) {
40 | }
41 | try {
42 | "com.miui.home.launcher.DeviceConfig".hookBeforeMethod("isMiuiLiteVersion") {
43 | it.result = false
44 | }
45 | } catch (_: Exception) {
46 | }
47 | try {
48 | "com.miui.home.launcher.util.noword.NoWordSettingHelperKt".hookBeforeMethod("isNoWordAvailable") {
49 | it.result = true
50 | }
51 | } catch (_: Exception) {
52 | }
53 | try {
54 | "android.os.SystemProperties".hookBeforeMethod(
55 | "getBoolean", String::class.java, Boolean::class.java
56 | ) {
57 | if (it.args[0] == "ro.config.low_ram.threshold_gb") it.result = false
58 | }
59 | } catch (_: Exception) {
60 | }
61 | try {
62 | "android.os.SystemProperties".hookBeforeMethod(
63 | "getBoolean", String::class.java, Boolean::class.java
64 | ) {
65 | if (it.args[0] == "ro.miui.backdrop_sampling_enabled") it.result = true
66 | }
67 | } catch (_: Exception) {
68 | }
69 | try {
70 | "com.miui.home.launcher.common.Utilities".hookBeforeMethod("canLockTaskView") {
71 | it.result = true
72 | }
73 | } catch (_: Exception) {
74 | }
75 | try {
76 | "com.miui.home.launcher.MIUIWidgetUtil".hookBeforeMethod("isMIUIWidgetSupport") {
77 | it.result = true
78 | }
79 | } catch (_: Exception) {
80 | }
81 | try {
82 | "com.miui.home.launcher.MiuiHomeLog".findClass().replaceMethod(
83 | "log", String::class.java, String::class.java
84 | ) {
85 | return@replaceMethod null
86 | }
87 | } catch (_: Exception) {
88 | }
89 | try {
90 | "com.xiaomi.onetrack.OneTrack".hookBeforeMethod("isDisable") {
91 | it.result = true
92 | }
93 | } catch (_: Exception) {
94 |
95 | }
96 | try {
97 | loadClass("com.miui.home.launcher.common.DeviceLevelUtils").methodFinder().filterByName("needMamlProgressIcon").first().createHook {
98 | returnConstant(true)
99 | }
100 | } catch (_: Exception) {
101 |
102 | }
103 | try {
104 | loadClass("com.miui.home.launcher.common.DeviceLevelUtils").methodFinder().filterByName("needRemoveDownloadAnimationDevice").first().createHook {
105 | returnConstant(false)
106 | }
107 | } catch (_: Exception) {
108 |
109 | }
110 |
111 | try {
112 | loadClass("com.miui.home.launcher.graphics.MonochromeUtils").methodFinder().filterByName("isSupportMonochrome").first().createHook {
113 | returnConstant(true)
114 | }
115 | } catch (_: Exception) {
116 |
117 | }
118 | }
119 |
120 | }
121 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/miuihome/ShortcutAddSmallWindow.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.miuihome
2 |
3 | import android.app.AndroidAppHelper
4 | import android.content.ComponentName
5 | import android.content.Intent
6 | import android.content.res.Configuration
7 | import android.os.Bundle
8 | import android.view.View
9 | import com.github.kyuubiran.ezxhelper.ClassUtils.getStaticObjectOrNullAs
10 | import com.github.kyuubiran.ezxhelper.ClassUtils.invokeStaticMethodBestMatch
11 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
12 | import com.github.kyuubiran.ezxhelper.ClassUtils.setStaticObject
13 | import com.github.kyuubiran.ezxhelper.EzXHelper.moduleRes
14 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks
15 | import com.github.kyuubiran.ezxhelper.ObjectUtils.invokeMethodBestMatch
16 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
17 | import com.yuk.HyperOS_XXL.R
18 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
19 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.new
20 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
21 |
22 | object ShortcutAddSmallWindow : BaseHook() {
23 | override fun init() {
24 |
25 | if (!getBoolean("miuihome_shortcut_add_small_window", false)) return
26 | val mViewDarkModeHelper = loadClass("com.miui.home.launcher.util.ViewDarkModeHelper")
27 | val mSystemShortcutMenu = loadClass("com.miui.home.launcher.shortcuts.SystemShortcutMenu")
28 | val mSystemShortcutMenuItem = loadClass("com.miui.home.launcher.shortcuts.SystemShortcutMenuItem")
29 | val mAppShortcutMenu = loadClass("com.miui.home.launcher.shortcuts.AppShortcutMenu")
30 | val mShortcutMenuItem = loadClass("com.miui.home.launcher.shortcuts.ShortcutMenuItem")
31 | val mAppDetailsShortcutMenuItem = loadClass("com.miui.home.launcher.shortcuts.SystemShortcutMenuItem\$AppDetailsShortcutMenuItem")
32 | val mActivityUtilsCompat = loadClass("com.miui.launcher.utils.ActivityUtilsCompat")
33 |
34 | mViewDarkModeHelper.methodFinder().filterByName("onConfigurationChanged").toList().createHooks {
35 | after {
36 | invokeStaticMethodBestMatch(mSystemShortcutMenuItem, "createAllSystemShortcutMenuItems")
37 | }
38 | }
39 |
40 | mShortcutMenuItem.methodFinder().filterByName("getShortTitle").toList().createHooks {
41 | after {
42 | if (it.result == "应用信息") it.result = "信息"
43 | }
44 | }
45 |
46 | mAppDetailsShortcutMenuItem.methodFinder().filterByName("getOnClickListener").toList().createHooks {
47 | before {
48 | val mShortTitle = invokeMethodBestMatch(it.thisObject, "getShortTitle") as CharSequence
49 | if (mShortTitle == moduleRes.getString(R.string.miuihome_shortcut_add_small_window_title)) {
50 | it.result = View.OnClickListener { view ->
51 | val mComponentName = invokeMethodBestMatch(it.thisObject, "getComponentName") as ComponentName
52 | val intent = Intent()
53 | intent.action = "android.intent.action.MAIN"
54 | intent.addCategory("android.intent.category.LAUNCHER")
55 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
56 | intent.component = mComponentName
57 | val makeFreeformActivityOptions =
58 | invokeStaticMethodBestMatch(mActivityUtilsCompat, "makeFreeformActivityOptions", null, view.context, mComponentName.packageName)
59 | if (makeFreeformActivityOptions != null) view.context.startActivity(
60 | intent,
61 | invokeMethodBestMatch(makeFreeformActivityOptions, "toBundle") as Bundle
62 | )
63 | }
64 | }
65 | }
66 | }
67 |
68 | mSystemShortcutMenu.methodFinder().filterByName("getMaxShortcutItemCount").toList().createHooks {
69 | returnConstant(5)
70 | }
71 |
72 | mAppShortcutMenu.methodFinder().filterByName("getMaxShortcutItemCount").toList().createHooks {
73 | returnConstant(5)
74 | }
75 |
76 | mSystemShortcutMenuItem.methodFinder().filterByName("createAllSystemShortcutMenuItems").toList().createHooks {
77 | after {
78 | val isDarkMode =
79 | AndroidAppHelper.currentApplication().applicationContext.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK == Configuration.UI_MODE_NIGHT_YES
80 | val mAllSystemShortcutMenuItems = getStaticObjectOrNullAs>(mSystemShortcutMenuItem, "sAllSystemShortcutMenuItems")
81 | val mSmallWindowInstance = mAppDetailsShortcutMenuItem.new()
82 | invokeMethodBestMatch(mSmallWindowInstance, "setShortTitle", null, moduleRes.getString(R.string.miuihome_shortcut_add_small_window_title))
83 | invokeMethodBestMatch(
84 | mSmallWindowInstance,
85 | "setIconDrawable",
86 | null,
87 | if (isDarkMode) moduleRes.getDrawable(R.drawable.ic_miuihome_small_window_dark) else moduleRes.getDrawable(R.drawable.ic_miuihome_small_window_light)
88 | )
89 | val sAllSystemShortcutMenuItems = ArrayList()
90 | sAllSystemShortcutMenuItems.add(mSmallWindowInstance)
91 | sAllSystemShortcutMenuItems.addAll(mAllSystemShortcutMenuItems!!)
92 | setStaticObject(mSystemShortcutMenuItem, "sAllSystemShortcutMenuItems", sAllSystemShortcutMenuItems)
93 | }
94 | }
95 | }
96 |
97 | }
98 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/miuihome/ShowRealMemory.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.miuihome
2 |
3 | import android.annotation.SuppressLint
4 | import android.app.ActivityManager
5 | import android.content.Context
6 | import android.text.format.Formatter
7 | import android.widget.TextView
8 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
9 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
10 | import com.github.kyuubiran.ezxhelper.finders.ConstructorFinder.`-Static`.constructorFinder
11 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
12 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
13 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.getObjectField
14 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
15 |
16 | object ShowRealMemory : BaseHook() {
17 |
18 | @SuppressLint("DiscouragedApi")
19 | override fun init() {
20 |
21 | var context: Context? = null
22 |
23 | if (!getBoolean("miuihome_show_real_memory", false)) return
24 | loadClass("com.miui.home.recents.views.RecentsContainer").constructorFinder().filterByParamCount(2).first().createHook {
25 | after {
26 | context = it.args[0] as Context
27 | }
28 | }
29 |
30 | loadClass("com.miui.home.recents.views.RecentsContainer").methodFinder().filterByName("refreshMemoryInfo").first().createHook {
31 | before {
32 | val memoryInfo = ActivityManager.MemoryInfo()
33 | val activityManager = context!!.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager
34 | activityManager.getMemoryInfo(memoryInfo)
35 | val totalMem = Formatter.formatFileSize(context, memoryInfo.totalMem)
36 | val availMem = Formatter.formatFileSize(context, memoryInfo.availMem)
37 | val mTxtMemoryInfo1 = it.thisObject.getObjectField("mTxtMemoryInfo1") as TextView
38 | mTxtMemoryInfo1.text = context!!.getString(context!!.resources.getIdentifier("status_bar_recent_memory_info1", "string", "com.miui.home"), availMem, totalMem)
39 | val mTxtMemoryInfo2 = it.thisObject.getObjectField("mTxtMemoryInfo2") as TextView
40 | mTxtMemoryInfo2.text = context!!.getString(context!!.resources.getIdentifier("status_bar_recent_memory_info2", "string", "com.miui.home"), availMem, totalMem)
41 | it.result = null
42 | }
43 | }
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/miuihome/TaskViewCardSize.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.miuihome
2 |
3 | import android.graphics.RectF
4 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
5 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.callMethod
6 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.callStaticMethod
7 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.findClass
8 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.hookAfterMethod
9 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
10 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getInt
11 |
12 | object TaskViewCardSize : BaseHook() {
13 | override fun init() {
14 |
15 | if (!getBoolean("miuihome_task_view_card_size_binding", false)) return
16 | val value = getInt("miuihome_task_view_card_size_vertical", 100).toFloat() / 100f
17 | val value1 = getInt("miuihome_task_view_card_size_horizontal1", 100).toFloat() / 100f
18 | val value2 = getInt("miuihome_task_view_card_size_horizontal2", 100).toFloat() / 100f
19 |
20 | "com.miui.home.recents.views.TaskStackViewsAlgorithmVertical".hookAfterMethod(
21 | "scaleTaskView", RectF::class.java
22 | ) {
23 | "com.miui.home.recents.util.Utilities".findClass().callStaticMethod(
24 | "scaleRectAboutCenter", it.args[0], value
25 | )
26 | }
27 |
28 | "com.miui.home.recents.views.TaskStackViewsAlgorithmHorizontal".hookAfterMethod(
29 | "scaleTaskView", RectF::class.java,
30 | ) {
31 | "com.miui.home.recents.util.Utilities".findClass().callStaticMethod(
32 | "scaleRectAboutCenter", it.args[0], if (it.thisObject.callMethod("isLandscapeVisually") as Boolean) value2 else value1
33 | )
34 | }
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/miuihome/UnlockAnim.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.miuihome
2 |
3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
6 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
7 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
8 |
9 | object UnlockAnim : BaseHook() {
10 | override fun init() {
11 |
12 | if (!getBoolean("miuihome_unlock_animation", false)) return
13 | loadClass("com.miui.home.launcher.compat.UserPresentAnimationCompatV12Phone").methodFinder().filterByName("getSpringAnimator").filterByParamCount(6)
14 | .first().createHook {
15 | before {
16 | it.args[4] = 0.6f
17 | it.args[5] = 0.4f
18 | }
19 | }
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/miuihome/UseCompleteBlur.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.miuihome
2 |
3 | import android.app.Activity
4 | import android.view.MotionEvent
5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
6 | import com.github.kyuubiran.ezxhelper.ObjectHelper.Companion.objectHelper
7 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
8 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
9 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.callStaticMethod
10 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.findClass
11 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.hookBeforeMethod
12 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
13 |
14 | object UseCompleteBlur : BaseHook() {
15 | override fun init() {
16 |
17 | if (!getBoolean("miuihome_use_complete_blur", false)) return
18 | val blurUtilsClass = "com.miui.home.launcher.common.BlurUtils".findClass()
19 | blurUtilsClass.methodFinder().filterByName("getBlurType").first().createHook {
20 | returnConstant(2)
21 | }
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/packageinstaller/AllowUpdateSystemApp.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.packageinstaller
2 |
3 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
4 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
5 | import de.robv.android.xposed.IXposedHookLoadPackage
6 | import de.robv.android.xposed.XposedBridge
7 | import de.robv.android.xposed.callbacks.XC_LoadPackage
8 | import org.luckypray.dexkit.DexKitBridge
9 | import java.lang.reflect.Modifier
10 |
11 | class AllowUpdateSystemApp : IXposedHookLoadPackage {
12 |
13 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
14 | if (!getBoolean("packageinstaller_allow_update_system_app", false)) return
15 | System.loadLibrary("dexkit")
16 | val bridge = DexKitBridge.create(lpparam.appInfo.sourceDir) ?: throw NullPointerException("DexKitBridge.create() failed")
17 | bridge.findMethod {
18 | matcher {
19 | modifiers = Modifier.PUBLIC or Modifier.STATIC
20 | paramTypes = listOf("android.content.pm.ApplicationInfo")
21 | returnType = "boolean"
22 | }
23 | }.forEach {
24 | XposedBridge.log(it.name)
25 | it.getMethodInstance(lpparam.classLoader).createHook {
26 | returnConstant(false)
27 | }
28 | }
29 | bridge.close()
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/packageinstaller/DisableCountCheck.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.packageinstaller
2 |
3 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
4 | import com.github.kyuubiran.ezxhelper.Log
5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
6 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
7 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.findClass
8 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
9 |
10 | object DisableCountCheck : BaseHook() {
11 | override fun init() {
12 |
13 | if (!getBoolean("packageinstaller_disable_count_check", false)) return
14 | val riskControlRulesClass = "com.miui.packageInstaller.model.RiskControlRules".findClass()
15 |
16 | try {
17 | riskControlRulesClass.methodFinder().filterByName("getCurrentLevel").first().createHook {
18 | returnConstant(0)
19 | }
20 | } catch (t: Throwable) {
21 | Log.ex(t)
22 | }
23 |
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/packageinstaller/RemovePackageInstallerAds.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.packageinstaller
2 |
3 | import android.view.View
4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks
5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
6 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
7 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.callMethodOrNullAs
8 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.findClassOrNull
9 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
10 |
11 | object RemovePackageInstallerAds : BaseHook() {
12 | override fun init() {
13 |
14 | if (!getBoolean("packageinstaller_remove_ads", false)) return
15 | val miuiSettingsCompatClass = "com.android.packageinstaller.compat.MiuiSettingsCompat".findClassOrNull()
16 | val mSafeModeTipViewObjectClass = "com.miui.packageInstaller.ui.listcomponets.SafeModeTipViewObject".findClassOrNull()
17 | val mSafeModeTipViewObjectViewHolderClass = "com.miui.packageInstaller.ui.listcomponets.SafeModeTipViewObject\$ViewHolder".findClassOrNull()
18 | try {
19 | miuiSettingsCompatClass!!.methodFinder().filterByName("isPersonalizedAdEnabled").filterByReturnType(Boolean::class.java).toList().createHooks {
20 | returnConstant(false)
21 | }
22 | } catch (_: Throwable) {
23 | }
24 | try {
25 | mSafeModeTipViewObjectClass!!.methodFinder().filterByParamTypes(mSafeModeTipViewObjectViewHolderClass).toList().createHooks {
26 | after {
27 | it.args[0].callMethodOrNullAs("getClContentView")?.visibility = View.GONE
28 | }
29 | }
30 | } catch (_: Throwable) {
31 | }
32 | }
33 |
34 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/personalassistant/BlurWhenGotoMinusOne.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.personalassistant
2 |
3 | import android.content.res.Configuration
4 | import com.github.kyuubiran.ezxhelper.ObjectHelper.Companion.objectHelper
5 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
6 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.callMethod
7 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.findClass
8 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.getIntField
9 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.hookBeforeAllMethods
10 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.hookBeforeMethod
11 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.new
12 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.replaceMethod
13 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
14 |
15 | object BlurWhenGotoMinusOne : BaseHook() {
16 | override fun init() {
17 |
18 | if (!getBoolean("personalassistant_minus_one_blur", false)) return
19 | val deviceAdapter = "com.miui.personalassistant.device.DeviceAdapter".findClass()
20 | val foldableDeviceAdapter = "com.miui.personalassistant.device.FoldableDeviceAdapter".findClass()
21 | deviceAdapter.hookBeforeAllMethods("create") {
22 | it.result = foldableDeviceAdapter.new(it.args[0])
23 | }
24 | try {
25 | foldableDeviceAdapter.hookBeforeMethod("onEnter", Boolean::class.java) {
26 | it.thisObject.objectHelper().setObject("mScreenSize", 3)
27 | }
28 | } catch (e: ClassNotFoundException) {
29 | foldableDeviceAdapter.hookBeforeMethod("onOpened") {
30 | it.thisObject.objectHelper().setObject("mScreenSize", 3)
31 | }
32 | }
33 | foldableDeviceAdapter.hookBeforeMethod("onConfigurationChanged", Configuration::class.java) {
34 | it.thisObject.objectHelper().setObject("mScreenSize", 3)
35 | }
36 | foldableDeviceAdapter.replaceMethod("onScroll", Float::class.java) {
37 | val f = it.args[0] as Float
38 | val i = (f * 100.0f).toInt()
39 | val mCurrentBlurRadius: Int = it.thisObject.getIntField("mCurrentBlurRadius")
40 | if (mCurrentBlurRadius != i) {
41 | if (mCurrentBlurRadius <= 0 || i >= 0) {
42 | it.thisObject.objectHelper().setObject("mCurrentBlurRadius", i)
43 | } else {
44 | it.thisObject.objectHelper().setObject("mCurrentBlurRadius", 0)
45 | }
46 | it.thisObject.callMethod("blurOverlayWindow", mCurrentBlurRadius)
47 | }
48 | }
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/powerkeeper/DisableDynamicRefreshRate.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.powerkeeper
2 |
3 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
4 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.hookBeforeMethod
5 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
6 |
7 | object DisableDynamicRefreshRate : BaseHook() {
8 | override fun init() {
9 |
10 | if (!getBoolean("powerkeeper_disable_dynamic_refresh_rate", false)) return
11 | "com.miui.powerkeeper.statemachine.DisplayFrameSetting".hookBeforeMethod("isFeatureOn") {
12 | it.result = false
13 | }
14 | "com.miui.powerkeeper.statemachine.DisplayFrameSetting".hookBeforeMethod(
15 | "setScreenEffect", String::class.java, Int::class.javaPrimitiveType, Int::class.javaPrimitiveType
16 | ) {
17 | it.result = null
18 | }
19 | "com.miui.powerkeeper.statemachine.DisplayFrameSetting".hookBeforeMethod(
20 | "setScreenEffectInternal", Int::class.javaPrimitiveType, Int::class.javaPrimitiveType, String::class.java
21 | ) {
22 | it.result = null
23 | }
24 | }
25 |
26 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/securitycenter/RemoveMacroBlacklist.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.securitycenter
2 |
3 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
4 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
5 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
6 | import de.robv.android.xposed.IXposedHookLoadPackage
7 | import de.robv.android.xposed.callbacks.XC_LoadPackage
8 | import org.luckypray.dexkit.DexKitBridge
9 | import java.lang.reflect.Method
10 |
11 | class RemoveMacroBlacklist : IXposedHookLoadPackage {
12 |
13 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
14 | if (!getBoolean("securitycenter_remove_macro_blacklist", false)) return
15 | System.loadLibrary("dexkit")
16 | val bridge = DexKitBridge.create(lpparam.appInfo.sourceDir) ?: throw NullPointerException("DexKitBridge.create() failed")
17 | bridge.findClass {
18 | matcher {
19 | usingStrings = listOf("pref_gb_unsupport_macro_apps", "gb_game_gunsight", "com.tencent.tmgp.sgame")
20 | }
21 | }.firstOrNull()?.getInstance(lpparam.classLoader)!!.methodFinder().filterByReturnType(Boolean::class.java).filterByParamCount(1).first().createHook {
22 | returnConstant(false)
23 | }
24 | bridge.findClass {
25 | matcher {
26 | usingStrings = listOf("key_macro_toast", "content://com.xiaomi.macro.MacroStatusProvider/game_macro_change")
27 | }
28 | }.firstOrNull()?.getInstance(lpparam.classLoader)!!.methodFinder().filterByReturnType(Boolean::class.java).filterByParamCount(2).first().createHook {
29 | returnConstant(true)
30 | }
31 | val macro = bridge.findMethod {
32 | matcher {
33 | usingStrings = listOf("pref_gb_unsupport_macro_apps")
34 | }
35 | }
36 | assert(macro.isNotEmpty())
37 | var macroDescriptor = macro[0]
38 | var macroMethod: Method = macroDescriptor.getMethodInstance(lpparam.classLoader)
39 | if (macroMethod.returnType != ArrayList::class.java) {
40 | macroDescriptor = macro[1]
41 | macroMethod = macroDescriptor.getMethodInstance(lpparam.classLoader)
42 | }
43 | macroMethod.createHook {
44 | returnConstant(ArrayList())
45 | }
46 | bridge.close()
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/securitycenter/ShowBatteryTemperature.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.securitycenter
2 |
3 | import android.annotation.SuppressLint
4 | import android.app.AndroidAppHelper
5 | import android.content.res.Configuration
6 | import android.graphics.Color
7 | import android.graphics.Typeface
8 | import android.util.TypedValue
9 | import android.view.Gravity
10 | import android.view.View
11 | import android.widget.LinearLayout
12 | import android.widget.RelativeLayout
13 | import android.widget.TextView
14 | import cn.fkj233.ui.activity.dp2px
15 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
16 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
17 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
18 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
19 | import com.yuk.hyperOS_XXL.utils.AppUtils.getBatteryTemperature
20 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.findClassOrNull
21 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.getObjectFieldAs
22 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
23 |
24 | object ShowBatteryTemperature : BaseHook() {
25 | @SuppressLint("DiscouragedApi")
26 | override fun init() {
27 |
28 | if (!getBoolean("securitycenter_show_battery_temperature", false)) return
29 | val batteryFragmentClass = "com.miui.powercenter.BatteryFragment".findClassOrNull()
30 | if (batteryFragmentClass != null) {
31 | loadClass("com.miui.powercenter.BatteryFragment").methodFinder().filterByParamCount(1).filterByReturnType(String::class.java).filterStatic().first()
32 | } else {
33 | loadClass("com.miui.powercenter.a").methodFinder().filterByParamCount(1).filterByReturnType(String::class.java).filterStatic().first()
34 | }.createHook {
35 | after {
36 | it.result = getBatteryTemperature().toInt().toString()
37 | }
38 | }
39 |
40 | if (batteryFragmentClass != null) {
41 | loadClass("com.miui.powercenter.BatteryFragment\$a").methodFinder().filterByName("run").first()
42 |
43 | } else {
44 | loadClass("com.miui.powercenter.a\$a").methodFinder().filterByName("run").first()
45 |
46 | }.createHook {
47 | after { hookParam ->
48 | val context = AndroidAppHelper.currentApplication().applicationContext
49 | val isDarkMode = context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK == Configuration.UI_MODE_NIGHT_YES
50 | val currentTemperatureState = context.resources.getIdentifier("current_temperature_state", "id", "com.miui.securitycenter")
51 | val view = hookParam.thisObject.getObjectFieldAs("a")
52 |
53 | val textView = view.findViewById(currentTemperatureState)
54 | textView.apply {
55 | when (layoutParams) {
56 | is LinearLayout.LayoutParams -> {
57 | (layoutParams as LinearLayout.LayoutParams).topMargin = 0
58 | setPadding(0, dp2px(context, 4f), 0, 0)
59 | height = dp2px(context, 49f)
60 | }
61 | }
62 | setTextSize(TypedValue.COMPLEX_UNIT_DIP, 37f)
63 | gravity = Gravity.NO_GRAVITY
64 | typeface = Typeface.create(null, 700, false)
65 | textAlignment = View.TEXT_ALIGNMENT_VIEW_START
66 | }
67 |
68 | val temperatureContainer = context.resources.getIdentifier("temperature_container", "id", "com.miui.securitycenter")
69 | when (val childView = view.findViewById(temperatureContainer).getChildAt(1)) {
70 | is LinearLayout -> {
71 | childView.orientation = LinearLayout.VERTICAL
72 | val l1 = childView.getChildAt(0)
73 | val l2 = childView.getChildAt(1)
74 | val linearLayout = LinearLayout(context)
75 | val linearLayout1 = LinearLayout(context).apply { orientation = LinearLayout.HORIZONTAL }
76 | val tempView = TextView(context).apply {
77 | layoutParams = LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT)
78 | (layoutParams as LinearLayout.LayoutParams).marginStart = dp2px(context, 3.6f)
79 | setTextSize(TypedValue.COMPLEX_UNIT_DIP, 13.1f)
80 | setTextColor(Color.parseColor(if (isDarkMode) "#e6e6e6" else "#333333"))
81 | setPadding(0, dp2px(context, 26f), 0, 0)
82 | text = "℃"
83 | gravity = Gravity.NO_GRAVITY
84 | typeface = Typeface.create(null, 700, false)
85 | textAlignment = View.TEXT_ALIGNMENT_VIEW_START
86 | }
87 | childView.removeAllViews()
88 | linearLayout.addView(l1)
89 | linearLayout1.addView(l2)
90 | linearLayout1.addView(tempView)
91 | childView.addView(linearLayout)
92 | childView.addView(linearLayout1)
93 | }
94 |
95 | is RelativeLayout -> {
96 | val relativeLayout = RelativeLayout(context)
97 | val l1 = childView.getChildAt(0)
98 | val l2 = childView.getChildAt(1).apply {
99 | layoutParams = RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT).also {
100 | it.addRule(RelativeLayout.BELOW, l1.id)
101 | it.addRule(RelativeLayout.ALIGN_START, l1.id)
102 | }
103 | (layoutParams as RelativeLayout.LayoutParams).topMargin = -dp2px(context, 0.78f)
104 | }
105 | val tempView = TextView(context).apply {
106 | layoutParams = RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT).also {
107 | it.addRule(RelativeLayout.END_OF, l2.id)
108 | it.addRule(RelativeLayout.ALIGN_BOTTOM, l2.id)
109 | }
110 | setPadding(dp2px(context, 3.6f), 0, 0, dp2px(context, 5.4f))
111 | setTextSize(TypedValue.COMPLEX_UNIT_DIP, 15f)
112 | setTextColor(Color.parseColor(if (isDarkMode) "#e6e6e6" else "#333333"))
113 | text = "℃"
114 | gravity = Gravity.NO_GRAVITY
115 | typeface = Typeface.create(null, 700, false)
116 | textAlignment = View.TEXT_ALIGNMENT_VIEW_START
117 | }
118 | childView.removeAllViews()
119 | relativeLayout.addView(l1)
120 | relativeLayout.addView(l2)
121 | relativeLayout.addView(tempView)
122 | childView.addView(relativeLayout)
123 | }
124 | }
125 | }
126 | }
127 | }
128 |
129 | }
130 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/securitycenter/SkipWarningWaitTime.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.securitycenter
2 |
3 | import android.widget.TextView
4 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
5 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.hookBeforeMethod
6 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
7 |
8 | object SkipWarningWaitTime : BaseHook() {
9 | override fun init() {
10 |
11 | if (!getBoolean("securitycenter_skip_warning_wait_time", false)) return
12 | TextView::class.java.hookBeforeMethod(
13 | "setText", CharSequence::class.java, TextView.BufferType::class.java, Boolean::class.java, Int::class.java
14 | ) {
15 | if (getBoolean("securitycenter_skip_warning_wait_time", false)) {
16 | if (it.args.isNotEmpty() && it.args[0]?.toString()?.startsWith("确定(") == true) {
17 | it.args[0] = "确定"
18 | }
19 | }
20 | }
21 | TextView::class.java.hookBeforeMethod(
22 | "setEnabled", Boolean::class.java
23 | ) {
24 | if (getBoolean("securitycenter_skip_warning_wait_time", false)) {
25 | it.args[0] = true
26 | }
27 | }
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/settings/NotificationImportance.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.settings
2 |
3 | import android.app.NotificationChannel
4 | import com.github.kyuubiran.ezxhelper.ClassLoaderProvider
5 | import com.github.kyuubiran.ezxhelper.ObjectHelper.Companion.objectHelper
6 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
7 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.callMethod
8 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.findClass
9 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.hookAfterMethod
10 | import com.yuk.hyperOS_XXL.utils.KotlinXposedHelper.hookBeforeAllMethods
11 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
12 | import java.lang.reflect.InvocationHandler
13 | import java.lang.reflect.Proxy
14 |
15 | object NotificationImportance : BaseHook() {
16 | override fun init() {
17 |
18 | if (!getBoolean("settings_notification_importance", false)) return
19 | val mBaseNotificationSettings = "com.android.settings.notification.BaseNotificationSettings".findClass()
20 | val mChannelNotificationSettings = "com.android.settings.notification.ChannelNotificationSettings".findClass()
21 | mBaseNotificationSettings.hookBeforeAllMethods("setPrefVisible") {
22 | val pref = it.args[0]
23 | if (pref != null) {
24 | val prefKey = pref.callMethod("getKey") as String
25 | if ("importance" == prefKey) it.args[1] = true
26 | }
27 | }
28 | mChannelNotificationSettings.hookAfterMethod("setupChannelDefaultPrefs") {
29 | val pref = it.thisObject.callMethod("findPreference", "importance")
30 | it.thisObject.objectHelper().setObject("mImportance", pref)
31 | val mBackupImportance = it.thisObject.objectHelper().getObjectOrNull("mBackupImportance") as Int
32 | if (mBackupImportance > 0) {
33 | val index = pref?.callMethod("findSpinnerIndexOfValue", mBackupImportance.toString()) as Int
34 | if (index > -1) pref.callMethod("setValueIndex", index)
35 | val importanceListenerClass = ("androidx.preference.Preference\$OnPreferenceChangeListener").findClass()
36 | val handler = InvocationHandler { _, method, args ->
37 | if (method.name == "onPreferenceChange") {
38 | it.thisObject.objectHelper().setObject("mBackupImportance", (args[1] as String).toInt())
39 | val mChannel = it.thisObject.objectHelper().getObjectOrNull("mChannel") as NotificationChannel
40 | mChannel.importance = (args[1] as String).toInt()
41 | mChannel.callMethod("lockFields", 4)
42 | val mBackend = it.thisObject.objectHelper().getObjectOrNull("mBackend")
43 | val mPkg = it.thisObject.objectHelper().getObjectOrNull("mPkg") as String
44 | val mUid = it.thisObject.objectHelper().getObjectOrNull("mUid") as Int
45 | mBackend?.callMethod("updateChannel", mPkg, mUid, mChannel)
46 | it.thisObject.callMethod("updateDependents", false)
47 | }
48 | true
49 | }
50 | val mImportanceListener: Any = Proxy.newProxyInstance(ClassLoaderProvider.classLoader, arrayOf(importanceListenerClass), handler)
51 | pref.callMethod("setOnPreferenceChangeListener", mImportanceListener)
52 | }
53 | }
54 |
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/systemui/StatusBarShowSeconds.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.systemui
2 |
3 | import android.annotation.SuppressLint
4 | import android.content.Context
5 | import android.os.Handler
6 | import android.provider.Settings
7 | import android.widget.TextView
8 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
9 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
10 | import com.github.kyuubiran.ezxhelper.finders.ConstructorFinder.`-Static`.constructorFinder
11 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
12 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
13 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
14 | import java.lang.reflect.Method
15 | import java.text.SimpleDateFormat
16 | import java.util.Calendar
17 | import java.util.Locale
18 | import java.util.Timer
19 | import java.util.TimerTask
20 |
21 | object StatusBarShowSeconds : BaseHook() {
22 | @SuppressLint("SimpleDateFormat", "SetTextI18n")
23 | override fun init() {
24 |
25 | if (!getBoolean("systemui_statusbar_show_seconds", false)) return
26 | try {
27 | var c: Context? = null
28 | try {
29 | loadClass("com.android.systemui.statusbar.views.MiuiClock").constructorFinder().filterByParamCount(3).first().createHook {
30 | after {
31 | try {
32 | c = it.args[0] as Context
33 | val textV = it.thisObject as TextView?
34 | if (textV != null) {
35 | val d: Method = textV.javaClass.getDeclaredMethod("updateTime")
36 | val r = Runnable {
37 | d.isAccessible = true
38 | d.invoke(textV)
39 | }
40 |
41 | class T : TimerTask() {
42 | override fun run() {
43 | Handler(textV.context.mainLooper).post(r)
44 | }
45 | }
46 | if (textV.resources.getResourceEntryName(textV.id) == "clock") {
47 | Timer().scheduleAtFixedRate(T(), 1000 - System.currentTimeMillis() % 1000, 1000)
48 | }
49 | }
50 | } catch (_: Exception) {
51 | }
52 | }
53 | }
54 | } catch (_: Exception) {
55 | }
56 | try {
57 | loadClass("com.android.systemui.statusbar.views.MiuiClock").methodFinder().filterByName("updateTime").first().createHook {
58 | after {
59 | try {
60 | val textV = it.thisObject as TextView?
61 | if (textV != null && c != null) {
62 | val t = Settings.System.getString(c!!.contentResolver, Settings.System.TIME_12_24)
63 | if (textV.resources.getResourceEntryName(textV.id) == "clock") {
64 | if (t == "24") {
65 | textV.text = SimpleDateFormat("HH:mm:ss").format(Calendar.getInstance().time)
66 | } else {
67 | var string = ""
68 | if (Locale.getDefault().country == "US") {
69 | string = textV.text.toString().substring(textV.text.toString().length - 3, textV.text.toString().length)
70 | }
71 | val text = textV.text.toString().replace("AM", "").replace("PM", "").replace(" ", "")
72 | textV.text = text + SimpleDateFormat(":ss").format(Calendar.getInstance().time) + string
73 | }
74 | }
75 | }
76 | } catch (_: Exception) {
77 | }
78 | }
79 | }
80 | } catch (_: Exception) {
81 | }
82 | } catch (_: Exception) {
83 | }
84 | }
85 |
86 | }
87 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/hooks/modules/thememanager/RemoveThemeManagerAds.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.hooks.modules.thememanager
2 |
3 | import android.view.View
4 | import android.widget.FrameLayout
5 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
6 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
7 | import com.github.kyuubiran.ezxhelper.Log
8 | import com.github.kyuubiran.ezxhelper.finders.ConstructorFinder.`-Static`.constructorFinder
9 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
10 | import com.yuk.hyperOS_XXL.hooks.modules.BaseHook
11 | import com.yuk.hyperOS_XXL.utils.XSharedPreferences.getBoolean
12 |
13 | object RemoveThemeManagerAds : BaseHook() {
14 | override fun init() {
15 |
16 | if (!getBoolean("thememanager_remove_ads", false)) return
17 | try {
18 | loadClass("com.android.thememanager.basemodule.ad.model.AdInfoResponse").methodFinder().filterByName("isAdValid").filterByParamCount(1).first()
19 | .createHook {
20 | returnConstant(false)
21 | }
22 | } catch (t: Throwable) {
23 | Log.ex(t)
24 | }
25 |
26 | removeAds(loadClass("com.android.thememanager.recommend.view.listview.viewholder.SelfFontItemAdViewHolder"))
27 | removeAds(loadClass("com.android.thememanager.recommend.view.listview.viewholder.SelfRingtoneItemAdViewHolder"))
28 | }
29 |
30 | private fun removeAds(clazz: Class<*>) {
31 | try {
32 | clazz.constructorFinder().filterByParamCount(2).first().createHook {
33 | after {
34 | if (it.args[0] != null) {
35 | val view = it.args[0] as View
36 | val params = FrameLayout.LayoutParams(0, 0)
37 | view.layoutParams = params
38 | view.visibility = View.GONE
39 | }
40 | }
41 | }
42 | } catch (t: Throwable) {
43 | Log.ex(t)
44 | }
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/utils/AppUtils.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.utils
2 |
3 | import android.annotation.SuppressLint
4 | import android.content.Context
5 | import android.content.res.Configuration
6 | import android.os.BatteryManager
7 | import com.yuk.HyperOS_XXL.BuildConfig
8 | import de.robv.android.xposed.XSharedPreferences
9 | import java.io.BufferedReader
10 | import java.io.DataOutputStream
11 | import java.io.FileReader
12 | import java.io.IOException
13 | import java.io.InputStreamReader
14 | import kotlin.math.abs
15 |
16 | object AppUtils {
17 |
18 | fun perfFileName() = "HyperOS_XXL_Config"
19 |
20 | fun prefs() = XSharedPreferences(BuildConfig.APPLICATION_ID, perfFileName())
21 |
22 | @SuppressLint("PrivateApi")
23 | @Suppress("RECEIVER_NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS")
24 | fun getProp(mKey: String): String = Class.forName("android.os.SystemProperties").getMethod("get", String::class.java).invoke(Class.forName("android.os.SystemProperties"), mKey).toString()
25 |
26 | @SuppressLint("PrivateApi")
27 | fun getProp(mKey: String, defaultValue: Boolean): Boolean = Class.forName("android.os.SystemProperties").getMethod("getBoolean", String::class.java, Boolean::class.javaPrimitiveType)
28 | .invoke(Class.forName("android.os.SystemProperties"), mKey, defaultValue) as Boolean
29 |
30 | fun exec(command: String): String {
31 | var process: Process? = null
32 | var reader: BufferedReader? = null
33 | var `is`: InputStreamReader? = null
34 | var os: DataOutputStream? = null
35 | return try {
36 | process = Runtime.getRuntime().exec("su")
37 | `is` = InputStreamReader(process.inputStream)
38 | reader = BufferedReader(`is`)
39 | os = DataOutputStream(process.outputStream)
40 | os.writeBytes(command.trimIndent())
41 | os.writeBytes("\nexit\n")
42 | os.flush()
43 | var read: Int
44 | val buffer = CharArray(4096)
45 | val output = StringBuilder()
46 | while (reader.read(buffer).also { read = it } > 0) output.appendRange(buffer, 0, read)
47 | process.waitFor()
48 | output.toString()
49 | } catch (e: IOException) {
50 | throw RuntimeException(e)
51 | } catch (e: InterruptedException) {
52 | throw RuntimeException(e)
53 | } finally {
54 | try {
55 | os?.close()
56 | `is`?.close()
57 | reader?.close()
58 | process?.destroy()
59 | } catch (e: IOException) {
60 | e.printStackTrace()
61 | }
62 | }
63 | }
64 |
65 | fun exec(commands: Array): String {
66 | val stringBuilder = java.lang.StringBuilder()
67 | for (command in commands) {
68 | stringBuilder.append(exec(command))
69 | stringBuilder.append("\n")
70 | }
71 | return stringBuilder.toString()
72 | }
73 |
74 | private fun String.readFile(): String? = kotlin.runCatching { BufferedReader(FileReader(this)).use { it.readLine() } }.getOrNull()
75 |
76 | private fun readDoubleFromFile(filePath: String): Double? = filePath.readFile()?.toDoubleOrNull()
77 |
78 | fun getBatteryTemperature(): Double {
79 | return readDoubleFromFile("/sys/class/power_supply/battery/temp")?.div(10.0) ?: 0.0
80 | }
81 |
82 | fun getBatteryVoltage(): Double {
83 | return readDoubleFromFile("/sys/class/power_supply/battery/voltage_now")?.div(1000000.0) ?: 0.0
84 | }
85 |
86 | fun getBatteryCurrent(context: Context): Double {
87 | val batteryManager = context.getSystemService(Context.BATTERY_SERVICE) as BatteryManager
88 | return abs(batteryManager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CURRENT_NOW) / 1000 / 1000.0)
89 | }
90 |
91 | fun isDarkMode(context: Context): Boolean = context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK == Configuration.UI_MODE_NIGHT_YES
92 |
93 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/utils/BackupUtils.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.utils
2 |
3 | import android.annotation.SuppressLint
4 | import android.app.Activity
5 | import android.content.Intent
6 | import android.content.SharedPreferences
7 | import android.net.Uri
8 | import android.widget.Toast
9 | import com.yuk.HyperOS_XXL.R
10 | import org.json.JSONObject
11 | import java.io.BufferedReader
12 | import java.io.BufferedWriter
13 | import java.io.InputStreamReader
14 | import java.io.OutputStreamWriter
15 | import java.text.SimpleDateFormat
16 |
17 | object BackupUtils {
18 | const val CREATE_DOCUMENT_CODE = 255774
19 | const val OPEN_DOCUMENT_CODE = 277451
20 |
21 | private lateinit var sharedPreferences: SharedPreferences
22 |
23 | @SuppressLint("SimpleDateFormat")
24 | fun backup(activity: Activity, sp: SharedPreferences) {
25 | sharedPreferences = sp
26 | saveFile(activity, "HyperOS_XXL-${SimpleDateFormat("yyMMdd_HHmmss").format(System.currentTimeMillis())}.json")
27 | }
28 |
29 | fun recovery(activity: Activity, sp: SharedPreferences) {
30 | sharedPreferences = sp
31 | openFile(activity)
32 | }
33 |
34 | private fun openFile(activity: Activity) {
35 | val intent = Intent(Intent.ACTION_OPEN_DOCUMENT)
36 | intent.addCategory(Intent.CATEGORY_OPENABLE)
37 | intent.type = "application/json"
38 | intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, false)
39 | activity.startActivityForResult(intent, OPEN_DOCUMENT_CODE)
40 | }
41 |
42 |
43 | private fun saveFile(activity: Activity, fileName: String) {
44 | val intent = Intent(Intent.ACTION_CREATE_DOCUMENT)
45 | intent.addCategory(Intent.CATEGORY_OPENABLE)
46 | intent.type = "application/json"
47 | intent.putExtra(Intent.EXTRA_TITLE, fileName)
48 | activity.startActivityForResult(intent, CREATE_DOCUMENT_CODE)
49 | }
50 |
51 | fun handleReadDocument(activity: Activity, data: Uri?) {
52 | val edit = sharedPreferences.edit()
53 | val uri = data ?: return
54 | try {
55 | activity.contentResolver.openInputStream(uri)?.let { loadFile ->
56 | BufferedReader(InputStreamReader(loadFile)).apply {
57 | val sb = StringBuffer()
58 | var line = readLine()
59 | while (line != null) {
60 | sb.append(line)
61 | line = readLine()
62 | }
63 | val read = sb.toString()
64 | JSONObject(read).apply {
65 | val key = keys()
66 | while (key.hasNext()) {
67 | val keys = key.next()
68 | when (val value = get(keys)) {
69 | is String -> {
70 | if (value.startsWith("Float:")) {
71 | edit.putFloat(keys, value.substring(value.indexOf("Float:")).toFloat() / 1000)
72 | } else {
73 | edit.putString(keys, value)
74 | }
75 | }
76 |
77 | is Boolean -> edit.putBoolean(keys, value)
78 | is Int -> edit.putInt(keys, value)
79 | }
80 | }
81 | }
82 | close()
83 | }
84 | }
85 | edit.apply()
86 | Toast.makeText(activity, activity.getText(R.string.recovery_finished), Toast.LENGTH_LONG).show()
87 | } catch (e: Throwable) {
88 | Toast.makeText(activity, "${activity.getText(R.string.recovery_failed)}/n$e", Toast.LENGTH_LONG).show()
89 | }
90 | }
91 |
92 | fun handleCreateDocument(activity: Activity, data: Uri?) {
93 | val uri = data ?: return
94 | try {
95 | activity.contentResolver.openOutputStream(uri)?.let { saveFile ->
96 | BufferedWriter(OutputStreamWriter(saveFile)).apply {
97 | write(JSONObject().also {
98 | for (entry: Map.Entry in sharedPreferences.all) {
99 | when (entry.value) {
100 | Float -> it.put(entry.key, "Float:" + (entry.value as Float * 1000).toInt().toString())
101 | else -> it.put(entry.key, entry.value)
102 | }
103 | }
104 | }.toString())
105 | close()
106 | }
107 | }
108 | Toast.makeText(activity, activity.getText(R.string.backup_finished), Toast.LENGTH_LONG).show()
109 | } catch (e: Throwable) {
110 | Toast.makeText(activity, "${activity.getText(R.string.backup_failed)}/n$e", Toast.LENGTH_LONG).show()
111 | }
112 | }
113 |
114 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/yuk/hyperOS_XXL/utils/XSharedPreferences.kt:
--------------------------------------------------------------------------------
1 | package com.yuk.hyperOS_XXL.utils
2 |
3 | import com.yuk.hyperOS_XXL.utils.AppUtils.prefs
4 |
5 | object XSharedPreferences {
6 | fun getBoolean(key: String, defValue: Boolean): Boolean {
7 | if (prefs().hasFileChanged()) prefs().reload()
8 | return prefs().getBoolean(key, defValue)
9 | }
10 |
11 | fun getInt(key: String, defValue: Int): Int {
12 | if (prefs().hasFileChanged()) prefs().reload()
13 | return prefs().getInt(key, defValue)
14 | }
15 |
16 | fun getFloat(key: String, defValue: Float): Float {
17 | if (prefs().hasFileChanged()) prefs().reload()
18 | return prefs().getFloat(key, defValue)
19 | }
20 |
21 | fun getString(key: String, defValue: String): String {
22 | if (prefs().hasFileChanged()) prefs().reload()
23 | return prefs().getString(key, defValue) ?: defValue
24 | }
25 |
26 | fun getStringSet(key: String, defValue: MutableSet): MutableSet {
27 | if (prefs().hasFileChanged()) prefs().reload()
28 | return prefs().getStringSet(key, defValue) ?: defValue
29 | }
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/color/ic_mediaeditor_color_1.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
13 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/color/ic_mediaeditor_color_2.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
13 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/color/ic_mediaeditor_color_3.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
13 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_android.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
13 |
16 |
19 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
13 |
16 |
19 |
22 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_mediaeditor.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_miuihome.xml:
--------------------------------------------------------------------------------
1 |
3 | -
4 |
5 |
8 |
9 |
10 |
11 | -
12 |
18 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_miuihome_small_window_dark.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_miuihome_small_window_light.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_packageinstaller.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_packageinstaller_background_dark.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_packageinstaller_background_light.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_personalassistant.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YuKongA/HyperOS_XXL/c9392de49555d00e12cdff0ab875dcc59d101e4d/app/src/main/res/drawable/ic_personalassistant.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_powerkeeper.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
11 |
15 |
18 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_securitycenter.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_settings.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
13 |
16 |
19 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_systemui.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
7 |
8 |
9 |
10 |
11 | -
12 |
18 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_thememanager.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
11 |
15 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/values-night/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | @android:color/system_accent1_800
4 | @android:color/system_accent1_200
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values-zh-rCN/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 自用大杂烩
3 | 提示
4 | 模块未激活,请激活模块后重试
5 | 隐藏桌面图标
6 |
7 | 确定
8 | 取消
9 |
10 | 备份模块配置
11 | 备份模块配置失败
12 | 备份模块配置成功
13 |
14 | 恢复模块配置
15 | 恢复模块配置失败
16 | 恢复模块配置成功
17 |
18 | 重置模块配置
19 | 重置模块配置成功
20 | 确定要重置模块配置么?
21 |
22 | 默认:
23 | 当前:
24 | 范围:
25 |
26 | 重启系统
27 | 确定要重启系统么?
28 |
29 | 重启作用域
30 | 确定要重启全部作用域么?
31 | 作用域重启完成
32 |
33 | 系统框架
34 | 修改需要重启系统后生效
35 | 核心破解
36 | 允许降级安装应用
37 | 允许应用在安装新版本的情况下直接覆盖安装旧版本
38 | 禁用软件包管理器签名验证
39 | 关闭安装应用时的签名验证,可以安装被篡改的应用
40 | 禁用应用签名验证
41 | 允许直接覆盖安装同包名不同签名的应用
42 | 安装时始终使用已安装应用的签名
43 | 不是一般的危险,仅在绝对需要时启用
44 | 增强模式
45 | 可以解决一些应用内部的完整性校验,一般不需要开启
46 | 壁纸缩放
47 | 系统桌面开关应用时的壁纸缩放倍率
48 | 移除小窗打开限制
49 | 使大多数应用支持小窗口打开\n需同时作用于系统界面和系统桌面
50 | 取消截屏限制
51 | 允许对所有界面进行截图
52 |
53 | 相册编辑
54 | 取消裁切限制
55 | 需同时作用于相册和截图
56 |
57 | 系统桌面
58 | 双击熄屏
59 | 双击桌面空白处熄灭屏幕
60 | 解除设备限制
61 | 将被默认识别为高端,同时去除部分日志
62 | 滚动显示应用名称
63 | 过长的应用名称将滚动进行显示,不再进行换行
64 | 自定义动画速度
65 | 设置不同场景下过渡动画的速度
66 | 过渡动画速度「开关应用」
67 | 生效于打开关闭应用程序时的过渡动画速度
68 | 过渡动画速度「进出后台」
69 | 生效于进出最近任务时的过渡动画速度
70 | 修改划卡动画
71 | 修改最近任务横向排布时移除卡片的动画效果
72 | 优化解锁动画
73 | 优化解锁时从锁屏过渡到桌面的过渡效果
74 | 移除「全部」分页
75 | 移除抽屉内应用分组的「全部」分页
76 | 移除「编辑」按钮
77 | 移除抽屉内应用分页的「编辑」按钮
78 | 快捷菜单添加小窗
79 | 桌面图标长按快捷菜单位置添加快速打开小窗
80 | 小窗
81 | 文件夹视图模糊
82 | 打开文件夹时启用模糊。如果该功能受到官方支持,开启则替换为模块的实现
83 | 时钟常显
84 | 桌面上有时钟小部件时,不隐藏状态栏时钟
85 | 自定义最近任务卡片大小
86 | 设置不同样式下最近任务卡片的大小
87 | 瀑布卡片大小
88 | 平铺卡片大小「竖屏时」
89 | 平铺卡片大小「横屏时」
90 | 完整模糊
91 | 使用米米官方搞的半成品完整模糊功能
92 | 覆盖模式
93 | 配合「背景模糊」使用,该功能作用域为系统桌面
94 | 显示真实内存使用情况
95 | 在最近任务中显示真实内存使用情况,需在桌面设置中开启“显示内存信息”
96 | 添加 Dock 模糊
97 | 未完成,缺解锁动画
98 |
99 | 主题壁纸
100 | 去广告
101 | 猜你喜欢内的广告将显示为空白卡片,其余位置的广告将完全移除
102 |
103 | 系统界面
104 | 状态栏时间显秒
105 | 状态栏位置的时间以秒为单位显示,不包括通知栏及控制中心
106 |
107 | 电量和性能
108 | 锁定刷新率
109 | 禁用动态刷新率,实现除相机外全局高帧率
110 |
111 | 手机管家
112 | 跳过警告等待
113 | 跳过大部分危险选项的等待确认倒计时时间
114 | 显示具体温度
115 | 省电与电池内电池页当前温度显示具体温度
116 | 移除自动连招黑名单
117 |
118 | 系统设置
119 | 通知重要程度
120 | 还原被米米阉割的原生「通知重要程度」功能
121 |
122 | 智能助理
123 | 背景模糊
124 |
125 | 应用包管理组件
126 | 允许更新系统应用
127 | 移除安全守护提示
128 | 显示更多应用信息
129 | 版本名
130 | 版本号
131 | SDK
132 | 大小
133 | 禁用频繁安装应用检查
134 |
135 |
136 |
--------------------------------------------------------------------------------
/app/src/main/res/values/array.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - android
5 | - com.android.settings
6 | - com.android.systemui
7 | - com.android.thememanager
8 | - com.miui.gallery
9 | - com.miui.guardprovider
10 | - com.miui.home
11 | - com.miui.mediaeditor
12 | - com.miui.packageinstaller
13 | - com.miui.personalassistant
14 | - com.miui.powerkeeper
15 | - com.miui.screenshot
16 | - com.miui.securitycenter
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FF000000
4 | #FFFFFFFF
5 | @android:color/system_accent1_0
6 | @android:color/system_accent1_300
7 |
8 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/build.gradle.kts:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | @Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
3 | plugins {
4 | alias(libs.plugins.androidApplication) apply false
5 | alias(libs.plugins.kotlinAndroid) apply false
6 | }
7 | true // Needed to make the Suppress annotation work for the plugins block
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Kotlin code style for this project: "official" or "obsolete":
19 | kotlin.code.style=official
20 | # Enables namespacing of each library's R class so that its R class includes only the
21 | # resources declared in the library itself and none from the library's dependencies,
22 | # thereby reducing the size of the R class for that library
23 | android.nonTransitiveRClass=true
24 | # Generate compile-time only R class for app modules
25 | android.enableAppCompileTimeRClass=true
26 | # Only keep the single relevant constructor for types mentioned in XML files
27 | # instead of using a parameter wildcard which keeps them all
28 | android.useMinimalKeepRules=true
29 | # Enable resource optimizations for release build
30 | android.enableResourceOptimizations=true
31 | # Enable BuildConfig
32 | android.defaults.buildfeatures.buildconfig=true
33 | # Disabled R8 FullMode
34 | android.enableR8.fullMode=false
35 | # Other
36 | org.gradle.parallel=true
37 | org.gradle.configureondemand=true
38 | org.gradle.caching=true
39 |
--------------------------------------------------------------------------------
/gradle/libs.versions.toml:
--------------------------------------------------------------------------------
1 | [versions]
2 | agp = "8.2.1"
3 | dexKit = "2.0.0"
4 | ezXHelper = "2.0.8"
5 | xposed-api = "82"
6 | kotlin = "1.9.22"
7 | hiddenapibypass = "4.3"
8 |
9 | [libraries]
10 | dexKit = { module = "org.luckypray:dexkit", version.ref = "dexKit" }
11 | ezXHelper = { module = "com.github.kyuubiran:EzXHelper", version.ref = "ezXHelper" }
12 | xposed-api = { module = "de.robv.android.xposed:api", version.ref = "xposed-api" }
13 | hiddenapibypass = { module = "org.lsposed.hiddenapibypass:hiddenapibypass", version.ref = "hiddenapibypass" }
14 |
15 | [plugins]
16 | androidApplication = { id = "com.android.application", version.ref = "agp" }
17 | kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YuKongA/HyperOS_XXL/c9392de49555d00e12cdff0ab875dcc59d101e4d/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Sep 12 08:04:26 GMT+08:00 2023
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
5 | networkTimeout=10000
6 | validateDistributionUrl=true
7 | zipStoreBase=GRADLE_USER_HOME
8 | zipStorePath=wrapper/dists
9 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #
4 | # Copyright © 2015-2021 the original authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | #
21 | # Gradle start up script for POSIX generated by Gradle.
22 | #
23 | # Important for running:
24 | #
25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26 | # noncompliant, but you have some other compliant shell such as ksh or
27 | # bash, then to run this script, type that shell name before the whole
28 | # command line, like:
29 | #
30 | # ksh Gradle
31 | #
32 | # Busybox and similar reduced shells will NOT work, because this script
33 | # requires all of these POSIX shell features:
34 | # * functions;
35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37 | # * compound commands having a testable exit status, especially «case»;
38 | # * various built-in commands including «command», «set», and «ulimit».
39 | #
40 | # Important for patching:
41 | #
42 | # (2) This script targets any POSIX shell, so it avoids extensions provided
43 | # by Bash, Ksh, etc; in particular arrays are avoided.
44 | #
45 | # The "traditional" practice of packing multiple parameters into a
46 | # space-separated string is a well documented source of bugs and security
47 | # problems, so this is (mostly) avoided, by progressively accumulating
48 | # options in "$@", and eventually passing that to Java.
49 | #
50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52 | # see the in-line comments for details.
53 | #
54 | # There are tweaks for specific operating systems such as AIX, CygWin,
55 | # Darwin, MinGW, and NonStop.
56 | #
57 | # (3) This script is generated from the Groovy template
58 | # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59 | # within the Gradle project.
60 | #
61 | # You can find Gradle at https://github.com/gradle/gradle/.
62 | #
63 | ##############################################################################
64 |
65 | # Attempt to set APP_HOME
66 |
67 | # Resolve links: $0 may be a link
68 | app_path=$0
69 |
70 | # Need this for daisy-chained symlinks.
71 | while
72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73 | [ -h "$app_path" ]
74 | do
75 | ls=$( ls -ld "$app_path" )
76 | link=${ls#*' -> '}
77 | case $link in #(
78 | /*) app_path=$link ;; #(
79 | *) app_path=$APP_HOME$link ;;
80 | esac
81 | done
82 |
83 | # This is normally unused
84 | # shellcheck disable=SC2034
85 | APP_BASE_NAME=${0##*/}
86 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
87 |
88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90 |
91 | # Use the maximum available, or set MAX_FD != -1 to use that value.
92 | MAX_FD=maximum
93 |
94 | warn () {
95 | echo "$*"
96 | } >&2
97 |
98 | die () {
99 | echo
100 | echo "$*"
101 | echo
102 | exit 1
103 | } >&2
104 |
105 | # OS specific support (must be 'true' or 'false').
106 | cygwin=false
107 | msys=false
108 | darwin=false
109 | nonstop=false
110 | case "$( uname )" in #(
111 | CYGWIN* ) cygwin=true ;; #(
112 | Darwin* ) darwin=true ;; #(
113 | MSYS* | MINGW* ) msys=true ;; #(
114 | NONSTOP* ) nonstop=true ;;
115 | esac
116 |
117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
118 |
119 |
120 | # Determine the Java command to use to start the JVM.
121 | if [ -n "$JAVA_HOME" ] ; then
122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
123 | # IBM's JDK on AIX uses strange locations for the executables
124 | JAVACMD=$JAVA_HOME/jre/sh/java
125 | else
126 | JAVACMD=$JAVA_HOME/bin/java
127 | fi
128 | if [ ! -x "$JAVACMD" ] ; then
129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
130 |
131 | Please set the JAVA_HOME variable in your environment to match the
132 | location of your Java installation."
133 | fi
134 | else
135 | JAVACMD=java
136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137 |
138 | Please set the JAVA_HOME variable in your environment to match the
139 | location of your Java installation."
140 | fi
141 |
142 | # Increase the maximum file descriptors if we can.
143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144 | case $MAX_FD in #(
145 | max*)
146 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147 | # shellcheck disable=SC3045
148 | MAX_FD=$( ulimit -H -n ) ||
149 | warn "Could not query maximum file descriptor limit"
150 | esac
151 | case $MAX_FD in #(
152 | '' | soft) :;; #(
153 | *)
154 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155 | # shellcheck disable=SC3045
156 | ulimit -n "$MAX_FD" ||
157 | warn "Could not set maximum file descriptor limit to $MAX_FD"
158 | esac
159 | fi
160 |
161 | # Collect all arguments for the java command, stacking in reverse order:
162 | # * args from the command line
163 | # * the main class name
164 | # * -classpath
165 | # * -D...appname settings
166 | # * --module-path (only if needed)
167 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
168 |
169 | # For Cygwin or MSYS, switch paths to Windows format before running java
170 | if "$cygwin" || "$msys" ; then
171 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
172 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
173 |
174 | JAVACMD=$( cygpath --unix "$JAVACMD" )
175 |
176 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
177 | for arg do
178 | if
179 | case $arg in #(
180 | -*) false ;; # don't mess with options #(
181 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
182 | [ -e "$t" ] ;; #(
183 | *) false ;;
184 | esac
185 | then
186 | arg=$( cygpath --path --ignore --mixed "$arg" )
187 | fi
188 | # Roll the args list around exactly as many times as the number of
189 | # args, so each arg winds up back in the position where it started, but
190 | # possibly modified.
191 | #
192 | # NB: a `for` loop captures its iteration list before it begins, so
193 | # changing the positional parameters here affects neither the number of
194 | # iterations, nor the values presented in `arg`.
195 | shift # remove old arg
196 | set -- "$@" "$arg" # push replacement arg
197 | done
198 | fi
199 |
200 | # Collect all arguments for the java command;
201 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202 | # shell script including quotes and variable substitutions, so put them in
203 | # double quotes to make sure that they get re-expanded; and
204 | # * put everything else in single quotes, so that it's not re-expanded.
205 |
206 | set -- \
207 | "-Dorg.gradle.appname=$APP_BASE_NAME" \
208 | -classpath "$CLASSPATH" \
209 | org.gradle.wrapper.GradleWrapperMain \
210 | "$@"
211 |
212 | # Stop when "xargs" is not available.
213 | if ! command -v xargs >/dev/null 2>&1
214 | then
215 | die "xargs is not available"
216 | fi
217 |
218 | # Use "xargs" to parse quoted args.
219 | #
220 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
221 | #
222 | # In Bash we could simply go:
223 | #
224 | # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
225 | # set -- "${ARGS[@]}" "$@"
226 | #
227 | # but POSIX shell has neither arrays nor command substitution, so instead we
228 | # post-process each arg (as a line of input to sed) to backslash-escape any
229 | # character that might be a shell metacharacter, then use eval to reverse
230 | # that process (while maintaining the separation between arguments), and wrap
231 | # the whole thing up as a single "set" statement.
232 | #
233 | # This will of course break if any of these variables contains a newline or
234 | # an unmatched quote.
235 | #
236 |
237 | eval "set -- $(
238 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
239 | xargs -n1 |
240 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
241 | tr '\n' ' '
242 | )" '"$@"'
243 |
244 | exec "$JAVACMD" "$@"
245 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%"=="" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%"=="" set DIRNAME=.
29 | @rem This is normally unused
30 | set APP_BASE_NAME=%~n0
31 | set APP_HOME=%DIRNAME%
32 |
33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
35 |
36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
38 |
39 | @rem Find java.exe
40 | if defined JAVA_HOME goto findJavaFromJavaHome
41 |
42 | set JAVA_EXE=java.exe
43 | %JAVA_EXE% -version >NUL 2>&1
44 | if %ERRORLEVEL% equ 0 goto execute
45 |
46 | echo.
47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48 | echo.
49 | echo Please set the JAVA_HOME variable in your environment to match the
50 | echo location of your Java installation.
51 |
52 | goto fail
53 |
54 | :findJavaFromJavaHome
55 | set JAVA_HOME=%JAVA_HOME:"=%
56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
57 |
58 | if exist "%JAVA_EXE%" goto execute
59 |
60 | echo.
61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62 | echo.
63 | echo Please set the JAVA_HOME variable in your environment to match the
64 | echo location of your Java installation.
65 |
66 | goto fail
67 |
68 | :execute
69 | @rem Setup the command line
70 |
71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
72 |
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if %ERRORLEVEL% equ 0 goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | set EXIT_CODE=%ERRORLEVEL%
85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1
86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87 | exit /b %EXIT_CODE%
88 |
89 | :mainEnd
90 | if "%OS%"=="Windows_NT" endlocal
91 |
92 | :omega
93 |
--------------------------------------------------------------------------------
/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | @file:Suppress("UnstableApiUsage")
2 |
3 | pluginManagement {
4 | repositories {
5 | google()
6 | mavenCentral()
7 | gradlePluginPortal()
8 | }
9 | }
10 |
11 | dependencyResolutionManagement {
12 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
13 | repositories {
14 | google()
15 | mavenCentral()
16 | gradlePluginPortal()
17 | maven("https://api.xposed.info/")
18 | }
19 | }
20 |
21 | rootProject.name = ("HyperOS_XXL")
22 | include(":app", ":blockmiui")
23 |
--------------------------------------------------------------------------------