From 547c886e6ab188989a1cc1e4144cbd2b135c922b Mon Sep 17 00:00:00 2001 From: xtaodada Date: Thu, 25 May 2023 21:57:56 +0800 Subject: [PATCH] support v1.2.0 --- app/src/main/AndroidManifest.xml | 3 +- .../com/xtaolabs/fuck_huaya/hook/HookEntry.kt | 8 +++ .../fuck_huaya/hook/apps/CaiyunHooker.kt | 70 +++++++++++++++++++ .../fuck_huaya/hook/apps/HuayaHooker.kt | 10 ++- .../fuck_huaya/hook/apps/XLXiaoMiHooker.kt | 38 ++++++++++ .../fuck_huaya/ui/activity/MainActivity.kt | 5 +- app/src/main/res/values/array.xml | 2 + build.gradle | 4 +- 8 files changed, 133 insertions(+), 7 deletions(-) create mode 100644 app/src/main/java/com/xtaolabs/fuck_huaya/hook/apps/CaiyunHooker.kt create mode 100644 app/src/main/java/com/xtaolabs/fuck_huaya/hook/apps/XLXiaoMiHooker.kt diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index fb5df55..0eb74a7 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -11,7 +11,8 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/Theme.AppDefault" - tools:targetApi="31"> + tools:targetApi="31" + tools:remove="android:appComponentFactory"> ().equals("svip")) { + result = true + } + } + } + } + } + + override fun onHook() { + fuckVip() + } +} 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 000957a..d2c7cbf 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 @@ -7,6 +7,7 @@ import com.highcapable.yukihookapi.hook.type.java.UnitType object HuayaHooker : YukiBaseHooker() { private fun fuckSplashAd() { + // return openScreenDto != null && openScreenDto.isNoSplash(); findClass("cn.fzhuayantcoltd.huayaapp.dto.ConfigDto", appClassLoader).hook { injectMember { method { @@ -18,6 +19,7 @@ object HuayaHooker : YukiBaseHooker() { } private fun fuckReadAd() { + // bookReadLimitDialog.show(); findClass("cn.fzhuayantcoltd.huayaapp.ui.activity.longcartoon.LongBookDetailActivity", appClassLoader).hook { injectMember { method { @@ -31,6 +33,7 @@ object HuayaHooker : YukiBaseHooker() { } private fun fuckSignInAd() { + // return this.m.user.isValidVip(); findClass("cn.fzhuayantcoltd.huayaapp.a.a", appClassLoader).hook { injectMember { method { @@ -44,6 +47,7 @@ object HuayaHooker : YukiBaseHooker() { } private fun fuckSignInRewardAd() { + // AdFromEnum.SIGNIN findClass("cn.fzhuayantcoltd.huayaapp.ui.activity.task.TasksCenterActivity", appClassLoader).hook { injectMember { method { @@ -61,6 +65,7 @@ object HuayaHooker : YukiBaseHooker() { } private fun fuckUpdate() { + // bookUpdateDialog.show(); findClass("cn.fzhuayantcoltd.huayaapp.util.f", appClassLoader).hook { injectMember { method { @@ -73,10 +78,11 @@ object HuayaHooker : YukiBaseHooker() { } private fun fuckTeen() { - findClass("cn.fzhuayantcoltd.huayaapp.util.x", appClassLoader).hook { + // isTodayPreventionAddictionDialog1_ + findClass("cn.fzhuayantcoltd.huayaapp.util.y", appClassLoader).hook { injectMember { method { - name = "o" + name = "s" } 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 new file mode 100644 index 0000000..3d1ae99 --- /dev/null +++ b/app/src/main/java/com/xtaolabs/fuck_huaya/hook/apps/XLXiaoMiHooker.kt @@ -0,0 +1,38 @@ +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/java/com/xtaolabs/fuck_huaya/ui/activity/MainActivity.kt b/app/src/main/java/com/xtaolabs/fuck_huaya/ui/activity/MainActivity.kt index f685173..b892d3e 100644 --- a/app/src/main/java/com/xtaolabs/fuck_huaya/ui/activity/MainActivity.kt +++ b/app/src/main/java/com/xtaolabs/fuck_huaya/ui/activity/MainActivity.kt @@ -6,6 +6,7 @@ import android.content.ComponentName import android.content.pm.PackageManager import androidx.core.view.isVisible import com.highcapable.yukihookapi.YukiHookAPI +import com.highcapable.yukihookapi.YukiHookAPI.Status.Executor import com.xtaolabs.fuck_huaya.BuildConfig import com.xtaolabs.fuck_huaya.R import com.xtaolabs.fuck_huaya.databinding.ActivityMainBinding @@ -79,9 +80,9 @@ class MainActivity : BaseActivity() { ) binding.mainTextApiWay.isVisible = YukiHookAPI.Status.isModuleActive when { - YukiHookAPI.Status.executorVersion > 0 -> + Executor.apiLevel > 0 -> binding.mainTextApiWay.text = - "Activated by ${YukiHookAPI.Status.executorName} API ${YukiHookAPI.Status.executorVersion}" + "Activated by ${Executor.name} API ${Executor.apiLevel}" YukiHookAPI.Status.isTaiChiModuleActive -> binding.mainTextApiWay.text = "Activated by TaiChi" else -> binding.mainTextApiWay.text = "Activated by anonymous" } diff --git a/app/src/main/res/values/array.xml b/app/src/main/res/values/array.xml index 41c0886..f7c6d7b 100644 --- a/app/src/main/res/values/array.xml +++ b/app/src/main/res/values/array.xml @@ -3,5 +3,7 @@ cn.fzhuayantcoltd.huayaapp com.cimoc.haleydu + com.nowcasting.activity + com.android.providers.downloads \ No newline at end of file diff --git a/build.gradle b/build.gradle index 1a93f31..aaa87fb 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { } ext { - appVersionName = "1.1.2" - appVersionCode = 3 + appVersionName = "1.2.0" + appVersionCode = 6 enableR8 = false } \ No newline at end of file