From a6d724d971c8ce53d44aab6beb70cee445966360 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Fri, 25 Aug 2023 20:37:42 +0800 Subject: [PATCH] support v1.3.0 --- app/build.gradle | 9 +-- app/src/main/AndroidManifest.xml | 3 +- .../com/xtaolabs/fuck_huaya/hook/HookEntry.kt | 12 ---- .../fuck_huaya/hook/apps/CaiyunHooker.kt | 70 ------------------- .../fuck_huaya/hook/apps/CimocHooker.kt | 49 ------------- .../fuck_huaya/hook/apps/HuayaHooker.kt | 12 +++- .../fuck_huaya/hook/apps/XLXiaoMiHooker.kt | 38 ---------- app/src/main/res/values/array.xml | 3 - .../META-INF}/yukihookapi_init | 0 build.gradle | 10 +-- gradle.properties | 4 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 12 files changed, 24 insertions(+), 188 deletions(-) delete mode 100644 app/src/main/java/com/xtaolabs/fuck_huaya/hook/apps/CaiyunHooker.kt delete mode 100644 app/src/main/java/com/xtaolabs/fuck_huaya/hook/apps/CimocHooker.kt delete mode 100644 app/src/main/java/com/xtaolabs/fuck_huaya/hook/apps/XLXiaoMiHooker.kt rename app/src/main/{assets => resources/META-INF}/yukihookapi_init (100%) diff --git a/app/build.gradle b/app/build.gradle index d31acfd..3749bfe 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -40,15 +40,16 @@ android { buildFeatures { viewBinding true } - lintOptions { + namespace 'com.xtaolabs.fuck_huaya' + lint { checkReleaseBuilds false } } dependencies { compileOnly 'de.robv.android.xposed:api:82' - implementation 'com.highcapable.yukihookapi:api:1.1.6' - ksp 'com.highcapable.yukihookapi:ksp-xposed:1.1.6' + implementation 'com.highcapable.yukihookapi:api:1.1.11' + ksp 'com.highcapable.yukihookapi:ksp-xposed:1.1.11' implementation 'com.github.duanhong169:drawabletoolbox:1.0.7' implementation 'androidx.core:core-ktx:1.9.0' implementation 'androidx.appcompat:appcompat:1.5.1' @@ -57,4 +58,4 @@ dependencies { testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' -} \ No newline at end of file +} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 0eb74a7..da42ef7 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools"> ().equals("svip")) { - result = true - } - } - } - } - } - - override fun onHook() { - fuckVip() - } -} diff --git a/app/src/main/java/com/xtaolabs/fuck_huaya/hook/apps/CimocHooker.kt b/app/src/main/java/com/xtaolabs/fuck_huaya/hook/apps/CimocHooker.kt deleted file mode 100644 index 5dbeaaa..0000000 --- a/app/src/main/java/com/xtaolabs/fuck_huaya/hook/apps/CimocHooker.kt +++ /dev/null @@ -1,49 +0,0 @@ -package com.xtaolabs.fuck_huaya.hook.apps - -import android.content.Context -import com.highcapable.yukihookapi.hook.entity.YukiBaseHooker - -object CimocHooker : YukiBaseHooker() { - - private fun fuckAd() { - findClass("com.haleydu.cimoc.manager.PreferenceManager", appClassLoader).hook { - injectMember { - method { - name = "getBoolean" - paramCount = 2 - } - afterHook { - if (args().first().cast().equals("pref_global_shutdown_ad")) { - result = true - } - } - } - } - } - - private fun fuckPermissionCheck() { - findClass("com.haleydu.cimoc.ui.activity.MainActivity", appClassLoader).hook { - injectMember { - method { - name = "showPermission" - } - replaceUnit { } - } - } - } - - override fun onHook() { - "com.stub.StubApp".hook { - injectMember { - method { - name = "attachBaseContext" - } - afterHook { - appClassLoader = args().first().cast()!!.classLoader - fuckAd() - fuckPermissionCheck() - } - } - } - } -} diff --git a/app/src/main/java/com/xtaolabs/fuck_huaya/hook/apps/HuayaHooker.kt b/app/src/main/java/com/xtaolabs/fuck_huaya/hook/apps/HuayaHooker.kt index d2c7cbf..00f304a 100644 --- a/app/src/main/java/com/xtaolabs/fuck_huaya/hook/apps/HuayaHooker.kt +++ b/app/src/main/java/com/xtaolabs/fuck_huaya/hook/apps/HuayaHooker.kt @@ -20,7 +20,10 @@ object HuayaHooker : YukiBaseHooker() { private fun fuckReadAd() { // bookReadLimitDialog.show(); - findClass("cn.fzhuayantcoltd.huayaapp.ui.activity.longcartoon.LongBookDetailActivity", appClassLoader).hook { + findClass( + "cn.fzhuayantcoltd.huayaapp.ui.activity.longcartoon.LongBookDetailActivity", + appClassLoader + ).hook { injectMember { method { name = "a" @@ -48,7 +51,10 @@ object HuayaHooker : YukiBaseHooker() { private fun fuckSignInRewardAd() { // AdFromEnum.SIGNIN - findClass("cn.fzhuayantcoltd.huayaapp.ui.activity.task.TasksCenterActivity", appClassLoader).hook { + findClass( + "cn.fzhuayantcoltd.huayaapp.ui.activity.task.TasksCenterActivity", + appClassLoader + ).hook { injectMember { method { name = "j" @@ -82,7 +88,7 @@ object HuayaHooker : YukiBaseHooker() { findClass("cn.fzhuayantcoltd.huayaapp.util.y", appClassLoader).hook { injectMember { method { - name = "s" + name = "r" } replaceToTrue() } diff --git a/app/src/main/java/com/xtaolabs/fuck_huaya/hook/apps/XLXiaoMiHooker.kt b/app/src/main/java/com/xtaolabs/fuck_huaya/hook/apps/XLXiaoMiHooker.kt deleted file mode 100644 index 3d1ae99..0000000 --- a/app/src/main/java/com/xtaolabs/fuck_huaya/hook/apps/XLXiaoMiHooker.kt +++ /dev/null @@ -1,38 +0,0 @@ -package com.xtaolabs.fuck_huaya.hook.apps - -import android.os.Environment -import com.highcapable.yukihookapi.hook.entity.YukiBaseHooker - -object XLXiaoMiHooker : YukiBaseHooker() { - - private val CacheFilePATH = Environment.getExternalStorageDirectory().absolutePath + "/Download/DLManager" - - private fun fuckXL() { - "com.android.providers.downloads.XLDownloadApplication".hook { - injectMember { - method { - name = "generateCacheFileDir" - } - replaceTo(CacheFilePATH) - } - } - "com.android.providers.downloads.config.XLConfig".hook { - injectMember { - method { - name = "setDebug" - } - replaceUnit { } - } - injectMember { - method { - name = "isDebug" - } - replaceToFalse() - } - } - } - - override fun onHook() { - fuckXL() - } -} diff --git a/app/src/main/res/values/array.xml b/app/src/main/res/values/array.xml index f7c6d7b..19e97cb 100644 --- a/app/src/main/res/values/array.xml +++ b/app/src/main/res/values/array.xml @@ -2,8 +2,5 @@ cn.fzhuayantcoltd.huayaapp - com.cimoc.haleydu - com.nowcasting.activity - com.android.providers.downloads \ No newline at end of file diff --git a/app/src/main/assets/yukihookapi_init b/app/src/main/resources/META-INF/yukihookapi_init similarity index 100% rename from app/src/main/assets/yukihookapi_init rename to app/src/main/resources/META-INF/yukihookapi_init diff --git a/build.gradle b/build.gradle index aaa87fb..691f130 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,11 @@ plugins { - id 'com.android.application' version '7.4.0' apply false - id 'com.android.library' version '7.4.0' apply false + id 'com.android.application' version '8.1.0' apply false + id 'com.android.library' version '8.1.0' apply false id 'org.jetbrains.kotlin.android' version '1.8.0' apply false } ext { - appVersionName = "1.2.0" - appVersionCode = 6 + appVersionName = "1.3.0" + appVersionCode = 7 enableR8 = false -} \ No newline at end of file +} diff --git a/gradle.properties b/gradle.properties index 453b5ca..e3831c2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,4 +22,6 @@ kotlin.code.style=official # thereby reducing the size of the R class for that library android.nonTransitiveRClass=true # Incremental -kotlin.incremental.useClasspathSnapshot=true \ No newline at end of file +kotlin.incremental.useClasspathSnapshot=true +android.defaults.buildfeatures.buildconfig=true +android.nonFinalResIds=false diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3baaa2a..be14350 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Sun Jan 29 21:22:14 CST 2023 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME \ No newline at end of file