From b68a2fc277b4c1986a49c2294bd472e8702210ca Mon Sep 17 00:00:00 2001 From: xihan123 Date: Thu, 24 Aug 2023 17:36:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=80=82=E9=85=8D=20`980`=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xihan123 --- .../main/kotlin/cn/xihan/qdds/AdvManage.kt | 100 +++--- .../main/kotlin/cn/xihan/qdds/BookShelf.kt | 2 +- .../main/kotlin/cn/xihan/qdds/HookEntry.kt | 284 +++++++++--------- .../main/kotlin/cn/xihan/qdds/Intercept.kt | 20 +- .../main/kotlin/cn/xihan/qdds/MainActivity.kt | 42 ++- app/src/main/kotlin/cn/xihan/qdds/ReadPage.kt | 53 ++-- .../main/kotlin/cn/xihan/qdds/ReplaceRule.kt | 2 +- app/src/main/kotlin/cn/xihan/qdds/Shield.kt | 49 +-- app/src/main/kotlin/cn/xihan/qdds/Splash.kt | 6 +- .../main/kotlin/cn/xihan/qdds/StartImage.kt | 15 +- app/src/main/kotlin/cn/xihan/qdds/ViewHide.kt | 93 ++---- 11 files changed, 327 insertions(+), 339 deletions(-) diff --git a/app/src/main/kotlin/cn/xihan/qdds/AdvManage.kt b/app/src/main/kotlin/cn/xihan/qdds/AdvManage.kt index becea4b..85badbe 100644 --- a/app/src/main/kotlin/cn/xihan/qdds/AdvManage.kt +++ b/app/src/main/kotlin/cn/xihan/qdds/AdvManage.kt @@ -3,6 +3,7 @@ package cn.xihan.qdds import android.view.View import android.widget.ImageView import android.widget.LinearLayout +import com.highcapable.yukihookapi.hook.core.YukiMemberHookCreator import com.highcapable.yukihookapi.hook.param.PackageParam import com.highcapable.yukihookapi.hook.type.android.ContextClass import com.highcapable.yukihookapi.hook.type.android.ViewClass @@ -10,6 +11,8 @@ import com.highcapable.yukihookapi.hook.type.java.BooleanType import com.highcapable.yukihookapi.hook.type.java.ListClass import com.highcapable.yukihookapi.hook.type.java.StringClass import com.highcapable.yukihookapi.hook.type.java.UnitType +import okhttp3.internal.connection.ConnectInterceptor +import okhttp3.internal.connection.ConnectInterceptor.intercept /** * @项目名 : QDReadHook @@ -52,7 +55,7 @@ fun PackageParam.advOption(versionCode: Int, optionValueSet: Set) { */ fun PackageParam.disableDailyReadAd(versionCode: Int) { when (versionCode) { - in 812..980 -> { + in 812..999 -> { findClass("com.qidian.QDReader.ui.activity.DailyReadingActivity").hook { injectMember { method { @@ -93,7 +96,7 @@ fun PackageParam.disableBookshelfActivityPopup(versionCode: Int) { } } - in 906..980 -> { + in 906..999 -> { findClass("com.qidian.QDReader.ui.activity.MainGroupActivity").hook { injectMember { method { @@ -180,7 +183,7 @@ fun PackageParam.disableBookshelfFloatWindow(versionCode: Int) { } } - in 827..980 -> { + in 827..999 -> { findClass("com.qidian.QDReader.ui.modules.bookshelf.QDBookShelfRebornFragment").hook { injectMember { @@ -234,7 +237,7 @@ fun PackageParam.disableBookshelfFloatWindow(versionCode: Int) { */ fun PackageParam.disableBottomNavigationCenterAd(versionCode: Int) { when (versionCode) { - in 758..980 -> { + in 758..999 -> { findClass("com.qidian.QDReader.ui.activity.MainGroupActivity").hook { injectMember { method { @@ -291,7 +294,7 @@ fun PackageParam.disableAccountCenterAd(versionCode: Int) { } } - in 896..980 -> { + in 896..999 -> { findClass("com.qidian.QDReader.ui.fragment.main_group.QDUserAccountRebornFragment").hook { injectMember { method { @@ -313,7 +316,7 @@ fun PackageParam.disableAccountCenterAd(versionCode: Int) { */ fun PackageParam.disableReadPageFloatAd(versionCode: Int) { when (versionCode) { - in 958..970 -> { + in 958..999 -> { findClass("com.qidian.QDReader.readerengine.view.QDSuperEngineView").hook { injectMember { method { @@ -339,7 +342,7 @@ fun PackageParam.disableReadPageFloatAd(versionCode: Int) { in 916..924 -> "h1" in 932..944 -> "B0" in 950..958 -> "t1" - 970 -> "s1" + in 970..980 -> "s1" else -> null } hookMethodName?.let { @@ -372,7 +375,7 @@ fun PackageParam.disableReadPageFloatAd(versionCode: Int) { */ fun PackageParam.disableReadPageRewardTheater(versionCode: Int) { when (versionCode) { - in 812..980 -> { + in 812..999 -> { findClass("com.qidian.QDReader.ui.activity.chapter.list.NewParagraphCommentListActivity").hook { injectMember { method { @@ -395,7 +398,7 @@ fun PackageParam.disableReadPageRewardTheater(versionCode: Int) { */ fun PackageParam.disableReadPageNewestPageWindowBannerAd(versionCode: Int) { when (versionCode) { - in 896..970 -> { + in 896..980 -> { findClass("com.qidian.QDReader.bll.manager.QDBKTManager").hook { injectMember { method { @@ -430,7 +433,7 @@ fun PackageParam.disableReadPageChapterEnd( disableVoteTicketSpecialLine: Boolean = false, ) { when (versionCode) { - in 812..980 -> { + in 812..999 -> { findClass("com.qidian.QDReader.readerengine.manager.ChapterProvider").hook { if (disableAll) { /** @@ -564,7 +567,7 @@ fun PackageParam.disableAd(versionCode: Int) { } } - in 932..980 -> { + in 932..999 -> { findClass("com.qq.e.comm.managers.GDTADManager").hook { injectMember { method { @@ -610,48 +613,50 @@ fun PackageParam.disableUpdate(versionCode: Int) { /** * 也可全局搜索 "UpgradeCommon"、"checkUpdate:" */ - val needHookClass = when (versionCode) { - in 758..788 -> "com.qidian.QDReader.util.z4" - in 792..796 -> "com.qidian.QDReader.util.i5" - in 800..834 -> "com.qidian.QDReader.util.l5" - in 842..878 -> "com.qidian.QDReader.util.m5" - 884 -> "com.qidian.QDReader.util.k5" - in 890..900 -> "com.qidian.QDReader.util.l5" - in 906..970 -> "com.qidian.QDReader.util.m5" - else -> null - } - val needHookMethod = when (versionCode) { - in 758..878 -> "b" - in 884..970 -> "judian" - else -> null - } - val needHookMethod2 = when (versionCode) { - in 758..878 -> "a" - in 884..970 -> "search" - else -> null - } - needHookClass?.hook { - needHookMethod?.let { - injectMember { - method { - name = it - returnType = UnitType - } - intercept() + val methodMap = mapOf( + "needHookClass" to when (versionCode) { + in 758..788 -> "com.qidian.QDReader.util.z4" + in 792..796 -> "com.qidian.QDReader.util.i5" + in 800..834 -> "com.qidian.QDReader.util.l5" + in 842..878 -> "com.qidian.QDReader.util.m5" + 884 -> "com.qidian.QDReader.util.k5" + in 890..900 -> "com.qidian.QDReader.util.l5" + in 906..970 -> "com.qidian.QDReader.util.m5" + 980 -> "com.qidian.QDReader.util.k5" + else -> null + }, + "needHookMethod" to when (versionCode) { + in 758..878 -> "b" + in 884..980 -> "judian" + else -> null + }, + "needHookMethod2" to when (versionCode) { + in 758..878 -> "a" + in 884..980 -> "search" + else -> null + } + ) + + methodMap["needHookClass"]?.hook { + injectMember { + method { + name = methodMap["needHookMethod"]!! + returnType = UnitType } + intercept() } - needHookMethod2?.let { - injectMember { - method { - name = it - returnType = UnitType - } - intercept() + injectMember { + method { + name = methodMap["needHookMethod2"]!! + returnType = UnitType } + intercept() } + } + /* /** * 上级调用:com.qidian.QDReader.ui.activity.MainGroupActivity.checkUpdate() @@ -677,7 +682,7 @@ fun PackageParam.disableUpdate(versionCode: Int) { */ when (versionCode) { - in 758..980 -> { + in 758..999 -> { findClass("com.qidian.QDReader.ui.activity.MainGroupActivity").hook { injectMember { @@ -748,6 +753,7 @@ fun PackageParam.disableUpdate(versionCode: Int) { */ val needHookClass2 = when (versionCode) { 970 -> "r4.d" + 980 -> "s4.f" else -> null } needHookClass2?.hook { diff --git a/app/src/main/kotlin/cn/xihan/qdds/BookShelf.kt b/app/src/main/kotlin/cn/xihan/qdds/BookShelf.kt index 3ade9a5..4297285 100644 --- a/app/src/main/kotlin/cn/xihan/qdds/BookShelf.kt +++ b/app/src/main/kotlin/cn/xihan/qdds/BookShelf.kt @@ -13,7 +13,7 @@ import com.highcapable.yukihookapi.hook.param.PackageParam */ fun PackageParam.customBookShelfTopImage(versionCode: Int) { when (versionCode) { - in 860..980 -> { + in 860..999 -> { findClass("com.qidian.QDReader.repository.entity.config.BookshelfConfig").hook { injectMember { method { diff --git a/app/src/main/kotlin/cn/xihan/qdds/HookEntry.kt b/app/src/main/kotlin/cn/xihan/qdds/HookEntry.kt index a757d22..db4c998 100644 --- a/app/src/main/kotlin/cn/xihan/qdds/HookEntry.kt +++ b/app/src/main/kotlin/cn/xihan/qdds/HookEntry.kt @@ -17,7 +17,6 @@ import com.alibaba.fastjson2.toJSONString import com.google.android.material.appbar.AppBarLayout import com.highcapable.yukihookapi.YukiHookAPI import com.highcapable.yukihookapi.annotation.xposed.InjectYukiHookWithXposed -import com.highcapable.yukihookapi.hook.core.YukiMemberHookCreator import com.highcapable.yukihookapi.hook.factory.current import com.highcapable.yukihookapi.hook.factory.method import com.highcapable.yukihookapi.hook.factory.registerModuleAppActivities @@ -837,14 +836,13 @@ fun PackageParam.newAutoSignIn(versionCode: Int) { } } - in 842..970 -> { + in 842..980 -> { val needHookMethod = when (versionCode) { in 842..878 -> "E" - in 884..970 -> "B" + in 884..980 -> "B" else -> null } - val needHookVariableName1 = versionCode.QDUIButtonTextViewVariableName - if (needHookMethod != null && needHookVariableName1 != null) { + if (needHookMethod != null) { /** * BookShelfCheckIn */ @@ -854,57 +852,51 @@ fun PackageParam.newAutoSignIn(versionCode: Int) { name = needHookMethod } afterHook { - val v = instance.getView( - "v" - ) - v?.let { qdv -> - val e = qdv.getView(needHookVariableName1) - e?.let { etv -> - if (etv.text == "签到") { - v.performClick() - } - } + val qDUIButtons = + instance.getViews("com.qd.ui.component.widget.QDUIButton".toClass()) + qDUIButtons.filter { button -> + button.getViews() + .any { textView -> textView.text == "签到" } + }.forEach { button -> + (button as View).performClick() } } } } } - // 需要Hook的变量名 - val needHookVariableName = when (versionCode) { - in 884..890 -> "a" - in 896..970 -> "b" - else -> null - } - if (needHookVariableName != null && needHookVariableName1 != null) { - findClass("com.qidian.QDReader.ui.modules.bookshelf.view.BookShelfCheckInView").hook { - injectMember { - method { - name = "updateCheckIn" - paramCount(2) - returnType = UnitType + findClass("com.qidian.QDReader.ui.modules.bookshelf.view.BookShelfCheckInView").hook { + injectMember { + method { + name = "updateCheckIn" + paramCount(2) + returnType = UnitType + } + afterHook { + val binding = instance.getParam("binding") ?: return@afterHook + val qDUIButtons = + binding.getViews("com.qd.ui.component.widget.QDUIButton".toClass()) + qDUIButtons.filter { button -> + button.getViews() + .any { textView -> textView.text == "签到" } + }.forEach { button -> + (button as View).performClick() } - afterHook { - val binding = instance.getParam("binding") - val d = binding?.getParam(needHookVariableName) - val e1 = d?.getParam(needHookVariableName1) - e1?.let { tv -> - if (tv.text == "签到") { - d.performClick() - } - }/* - // 隐藏每日导读方案2 - val h = binding?.getParam("h") - val parent = h?.parent as? ViewGroup - parent?.visibility = View.GONE - */ - } + /* + // 隐藏每日导读方案2 + val h = binding?.getParam("h") + val parent = h?.parent as? ViewGroup + parent?.visibility = View.GONE + + */ } } - } else { + }.onHookClassNotFoundFailure { "新版书架自动签到".printlnNotSupportVersion(versionCode) } + + } else -> "自动签到".printlnNotSupportVersion(versionCode) @@ -934,6 +926,7 @@ fun PackageParam.newOldLayout( in 944..950 -> "r4.search\$search" 958 -> "p4.search\$search" 970 -> "o4.search\$search" + 980 -> "com.qidian.QDReader.component.abtest.ABTestConfigHelper\$search" else -> null }, "needHookNewUserAccountMethod" to when (versionCode) { @@ -966,30 +959,31 @@ fun PackageParam.newOldLayout( in 932..944 -> "d0" in 950..958 -> "e0" 970 -> "f0" + 980 -> "i0" else -> null } ) - infix fun String.hookTo(initiate: YukiMemberHookCreator.MemberHookCreator.() -> Unit) { - this.hook { injectMember(initiate = initiate) } - } - methodMap["needHookClass"]?.hookTo { + methodMap["needHookClass"]?.hook { if (methodMap["needHookNewUserAccountMethod"] == null) { if (versionCode in 868..890) { "新版我的布局".printlnNotSupportVersion(versionCode) } } else { - method { - name = methodMap["needHookNewUserAccountMethod"]!! - emptyParam() - returnType = BooleanType - } - if (enableNewUserAccount) { - replaceToTrue() - } else { - replaceToFalse() + injectMember { + method { + name = methodMap["needHookNewUserAccountMethod"]!! + emptyParam() + returnType = BooleanType + } + if (enableNewUserAccount) { + replaceToTrue() + } else { + replaceToFalse() + } } + } if (methodMap["needHookBookStoreV2Method"] == null) { @@ -997,15 +991,17 @@ fun PackageParam.newOldLayout( "新旧精选布局".printlnNotSupportVersion(versionCode) } } else { - method { - name = methodMap["needHookBookStoreV2Method"]!! - emptyParam() - returnType = BooleanType - } - if (enableNewStore) { - replaceToTrue() - } else { - replaceToFalse() + injectMember { + method { + name = methodMap["needHookBookStoreV2Method"]!! + emptyParam() + returnType = BooleanType + } + if (enableNewStore) { + replaceToTrue() + } else { + replaceToFalse() + } } } @@ -1014,26 +1010,30 @@ fun PackageParam.newOldLayout( "新版书架布局".printlnNotSupportVersion(versionCode) } } else { - method { - name = methodMap["needHookMethod"]!! - emptyParam() - returnType = BooleanType - } - if (enableNewBookShelfLayout) { - replaceToTrue() - } else { - replaceToFalse() + injectMember { + method { + name = methodMap["needHookMethod"]!! + emptyParam() + returnType = BooleanType + } + if (enableNewBookShelfLayout) { + replaceToTrue() + } else { + replaceToFalse() + } } } if (methodMap["needHookGDTGameMethod"] != null) { - method { - name = methodMap["needHookGDTGameMethod"]!! - emptyParam() - returnType = BooleanType + injectMember { + method { + name = methodMap["needHookGDTGameMethod"]!! + emptyParam() + returnType = BooleanType + } + replaceToFalse() } - replaceToFalse() } } } @@ -1111,7 +1111,7 @@ fun PackageParam.enableLocalCard(versionCode: Int) { } } - in 896..980 -> { + in 896..999 -> { findClass("com.qidian.QDReader.repository.entity.user_account.Member").hook { injectMember { method { @@ -1162,7 +1162,7 @@ fun PackageParam.enableLocalCard(versionCode: Int) { */ fun PackageParam.unlockMemberBackground(versionCode: Int) { when (versionCode) { - in 827..980 -> { + in 827..999 -> { findClass("com.qidian.QDReader.ui.activity.QDReaderThemeDetailActivity").hook { injectMember { method { @@ -1375,7 +1375,7 @@ fun PackageParam.freeAdReward(versionCode: Int) { } } - in 896..970 -> { + in 896..980 -> { /** * showRewardVideo * preloadRewardVideo @@ -1449,7 +1449,7 @@ fun PackageParam.ignoreFreeSubscribeLimit(versionCode: Int) { 924 -> "com.qidian.QDReader.component.bll.manager.a1" in 932..944 -> "com.qidian.QDReader.component.bll.manager.c1" 950 -> "com.qidian.QDReader.component.bll.manager.b1" - in 958..970 -> "com.qidian.QDReader.component.bll.manager.d1" + in 958..980 -> "com.qidian.QDReader.component.bll.manager.d1" else -> null }, "needHookMethod" to when (versionCode) { @@ -1458,34 +1458,32 @@ fun PackageParam.ignoreFreeSubscribeLimit(versionCode: Int) { in 896..924 -> "l0" in 932..938 -> "p0" in 944..958 -> "q0" - 970 -> "r0" + in 970..980 -> "r0" else -> null } ) - infix fun String.hookTo(initiate: YukiMemberHookCreator.MemberHookCreator.() -> Unit) { - this.hook { injectMember(initiate = initiate) } - } - if (classMap["needHookClass"] == null || classMap["needHookMethod"] == null) { "忽略限时免费批量订阅限制".printlnNotSupportVersion(versionCode) return } - classMap["needHookClass"]?.hookTo { - method { - name = classMap["needHookMethod"]!! - param( - "com.qidian.QDReader.framework.network.qd.QDHttpResp".toClass(), - JSONObjectClass, - LongType - ) - returnType = IntType - } - beforeHook { - val jb = args[1] as? JSONObject - safeRun { - jb?.optJSONObject("Data")?.put("IsFreeLimit", -1) - args(1).set(jb) + classMap["needHookClass"]?.hook { + injectMember { + method { + name = classMap["needHookMethod"]!! + param( + "com.qidian.QDReader.framework.network.qd.QDHttpResp".toClass(), + JSONObjectClass, + LongType + ) + returnType = IntType + } + beforeHook { + val jb = args[1] as? JSONObject + safeRun { + jb?.optJSONObject("Data")?.put("IsFreeLimit", -1) + args(1).set(jb) + } } } } @@ -1496,7 +1494,7 @@ fun PackageParam.ignoreFreeSubscribeLimit(versionCode: Int) { */ fun PackageParam.exportEmoji(versionCode: Int) { when (versionCode) { - in 884..970 -> { + in 884..980 -> { findClass("com.qidian.QDReader.ui.activity.QDStickersDetailActivity").hook { injectMember { method { @@ -1521,7 +1519,7 @@ fun PackageParam.exportEmoji(versionCode: Int) { imageList += image } } - val topBarViewId = when (versionCode) { + val topBarId = when (versionCode) { 884 -> 0x7F09176F 890 -> 0x7F091784 in 896..900 -> 0x7F091789 @@ -1533,11 +1531,12 @@ fun PackageParam.exportEmoji(versionCode: Int) { 950 -> 0x7F0918A1 958 -> 0x7F0918A8 970 -> 0x7F091931 + 980 -> 0x7F091970 else -> null } - if (topBarViewId != null) { + if (topBarId != null) { val topBar = XposedHelpers.callMethod( - context, "findViewById", topBarViewId + context, "findViewById", topBarId ) as? RelativeLayout if (topBar != null) { val layoutParams = RelativeLayout.LayoutParams( @@ -1616,6 +1615,7 @@ fun PackageParam.forceTrialMode(versionCode: Int) { val needHookClass = when (versionCode) { in 896..900 -> "com.qidian.QDReader.util.v4" in 906..970 -> "com.qidian.QDReader.util.w4" + 980 -> "com.qidian.QDReader.util.u4" else -> null } @@ -1625,6 +1625,7 @@ fun PackageParam.forceTrialMode(versionCode: Int) { */ val needHookMethod = when (versionCode) { in 896..970 -> "M" + 980 -> "L" else -> null } @@ -1646,7 +1647,7 @@ fun PackageParam.forceTrialMode(versionCode: Int) { */ fun PackageParam.hideWelfare(versionCode: Int) { when (versionCode) { - in 906..980 -> { + in 906..999 -> { findClass("com.qidian.QDReader.ui.activity.QDSearchActivity").hook { injectMember { method { @@ -1721,7 +1722,7 @@ fun PackageParam.hideWelfare(versionCode: Int) { */ fun PackageParam.receiveReadingCreditsAutomatically(versionCode: Int) { when (versionCode) { - 970 -> { + in 970..980 -> { /** * 自动领取今日阅读时长积分 */ @@ -1757,11 +1758,12 @@ fun PackageParam.receiveReadingCreditsAutomatically(versionCode: Int) { if (list.isNullOrEmpty()) { return@afterHook } - val viewId = when (HookEntry.versionCode) { + val pBarTagContainerId = when (versionCode) { 970 -> 0x7F091391 + 980 -> 0x7F0913D0 else -> null } - if (viewId == null) { + if (pBarTagContainerId == null) { "自动领取每周阅读时长宝箱".printlnNotSupportVersion(HookEntry.versionCode) return@afterHook } @@ -1769,7 +1771,7 @@ fun PackageParam.receiveReadingCreditsAutomatically(versionCode: Int) { name = "_\$_findCachedViewById" paramCount(1) returnType = ViewClass - }.get(instance).call(viewId) as? FrameLayout + }.get(instance).call(pBarTagContainerId) as? FrameLayout view?.let { val count = it.childCount @@ -1835,7 +1837,7 @@ fun PackageParam.receiveReadingCreditsAutomatically(versionCode: Int) { returnType = CharSequenceClass }.call() val list = listOf( - "领取奖励", "开启新一周PK" + "领取奖励", "开启新一周PK","匹配对手" ) if (text in list) { button.postRandomDelay { performClick() } @@ -1853,34 +1855,44 @@ fun PackageParam.receiveReadingCreditsAutomatically(versionCode: Int) { /** * 发帖显示图片直链 + * CirclePostEditActivity + * showUpLoadingDialog */ fun PackageParam.postToShowImageUrl(versionCode: Int) { - when (versionCode) { - 970 -> { - findClass("com.qidian.QDReader.ui.dialog.h9").hook { - injectMember { - method { - name = "p" - emptyParam() - returnType = UnitType - } - afterHook { - val lists = instance.getParamList>().takeUnless { it.isEmpty() } - ?.filterNot { it[0] is String } - lists?.firstOrNull()?.let { urlList -> - urlList.mapNotNull { it?.getParam("mAccessUrl") } - .let { accessUrls -> - instance.getViews() - .firstNotNullOfOrNull { it.context } - ?.showUrlListDialog(accessUrls) - } + val needHookClass = when (versionCode) { + 970 -> "com.qidian.QDReader.ui.dialog.h9" + 980 -> "com.qidian.QDReader.ui.dialog.i9" + else -> null + } + val needHookMethod = when (versionCode) { + in 970..980 -> "p" + else -> null + } + if (needHookClass == null || needHookMethod == null) { + "发帖显示图片直链".printlnNotSupportVersion(versionCode) + return + } + + needHookClass.hook { + injectMember { + method { + name = needHookMethod + emptyParam() + returnType = UnitType + } + afterHook { + val lists = instance.getParamList>().takeUnless { it.isEmpty() } + ?.filterNot { it[0] is String } + lists?.firstOrNull()?.let { urlList -> + urlList.mapNotNull { it?.getParam("mAccessUrl") } + .let { accessUrls -> + instance.getViews() + .firstNotNullOfOrNull { it.context } + ?.showUrlListDialog(accessUrls) } - } } } } - - else -> "发帖显示图片直链".printlnNotSupportVersion(versionCode) } } diff --git a/app/src/main/kotlin/cn/xihan/qdds/Intercept.kt b/app/src/main/kotlin/cn/xihan/qdds/Intercept.kt index c4e9d82..4444e82 100644 --- a/app/src/main/kotlin/cn/xihan/qdds/Intercept.kt +++ b/app/src/main/kotlin/cn/xihan/qdds/Intercept.kt @@ -57,7 +57,7 @@ fun PackageParam.interceptGeetest(version: Int) { */ fun PackageParam.interceptPrivacyPolicy(version: Int) { when (version) { - in 868..980 -> { + in 868..999 -> { findClass("com.qidian.QDReader.ui.activity.MainGroupActivity").hook { injectMember { method { @@ -84,13 +84,14 @@ fun PackageParam.interceptAgreePrivacyPolicy(version: Int) { 884 -> "com.qidian.QDReader.util.u4" in 890..900 -> "com.qidian.QDReader.util.v4" in 906..970 -> "com.qidian.QDReader.util.w4" + 980 -> "com.qidian.QDReader.util.u4" else -> null } val needHookMethod = when (version) { in 868..872 -> "k0" 878 -> "l0" in 884..958 -> "i0" - 970 -> "j0" + in 970..980 -> "j0" else -> null } if (needHookClass == null || needHookMethod == null) { @@ -116,12 +117,12 @@ fun PackageParam.interceptAgreePrivacyPolicy(version: Int) { fun PackageParam.interceptWebSocket(version: Int) { val needHookClass = when (version) { in 868..878 -> "com.qidian.QDReader.component.msg.c" - in 884..970 -> "com.qidian.QDReader.component.msg.cihai" + in 884..980 -> "com.qidian.QDReader.component.msg.cihai" else -> null } val needHookMethod = when (version) { in 868..878 -> "r" - in 884..970 -> "o" + in 884..980 -> "o" else -> null } if (needHookClass == null || needHookMethod == null) { @@ -145,7 +146,7 @@ fun PackageParam.interceptWebSocket(version: Int) { */ fun PackageParam.interceptQSNModeRequest(version: Int) { when (version) { - in 868..980 -> { + in 868..999 -> { findClass("com.qidian.QDReader.bll.manager.QDTeenagerManager").hook { injectMember { method { @@ -176,10 +177,11 @@ fun PackageParam.interceptSplashAdActivity(version: Int) { in 944..950 -> "m6.search" 958 -> "k6.search" 970 -> "j6.search" + 980 -> "d6.search" else -> null } val needHookMethod = when (version) { - in 884..970 -> "b" + in 884..980 -> "b" else -> null } @@ -199,7 +201,7 @@ fun PackageParam.interceptSplashAdActivity(version: Int) { */ fun PackageParam.interceptReadBookPageWaterMark(versionCode: Int) { when (versionCode) { - 970 -> { + in 970..999 -> { findClass("com.qidian.QDReader.ui.activity.QDReaderActivity").hook { injectMember { method { @@ -221,7 +223,7 @@ fun PackageParam.interceptReadBookPageWaterMark(versionCode: Int) { */ fun PackageParam.interceptPostImageWatermark(versionCode: Int) { when (versionCode) { - 970 -> { + in 970..999 -> { findClass("com.qidian.QDReader.ui.activity.CirclePostEditActivity").hook { injectMember { method { @@ -255,7 +257,7 @@ fun PackageParam.interceptAsyncInitTask( clsNameList: List ) { when (version) { - in 872..980 -> { + in 872..999 -> { findClass("com.rousetime.android_startup.StartupManager").hook { injectMember { method { diff --git a/app/src/main/kotlin/cn/xihan/qdds/MainActivity.kt b/app/src/main/kotlin/cn/xihan/qdds/MainActivity.kt index 56ca711..5cb2df1 100644 --- a/app/src/main/kotlin/cn/xihan/qdds/MainActivity.kt +++ b/app/src/main/kotlin/cn/xihan/qdds/MainActivity.kt @@ -166,7 +166,8 @@ class MainActivity : ModuleAppCompatActivity() { BottomNavigationBar( navController = navController, items = items, - modifier = Modifier.fillMaxWidth() + modifier = Modifier + .fillMaxWidth() .navigationBarsPadding() ) } @@ -271,7 +272,8 @@ fun SwitchSetting( }), verticalAlignment = Alignment.CenterVertically ) { Column( - modifier = Modifier.weight(1f) + modifier = Modifier + .weight(1f) .padding(8.dp), ) { Text( @@ -319,7 +321,8 @@ fun EditTextSetting( modifier = modifier, verticalAlignment = Alignment.CenterVertically ) { Column( - modifier = Modifier.weight(1f) + modifier = Modifier + .weight(1f) .padding(8.dp) ) { Text( @@ -400,7 +403,8 @@ fun TextSetting( verticalAlignment = Alignment.CenterVertically ) { Column( - modifier = Modifier.weight(1f) + modifier = Modifier + .weight(1f) .padding(8.dp) ) { Text( @@ -747,7 +751,8 @@ fun MainScreen( ) { Card( - modifier = Modifier.fillMaxWidth() + modifier = Modifier + .fillMaxWidth() .padding(8.dp), shape = RoundedCornerShape(8.dp), elevation = CardDefaults.cardElevation(4.dp) @@ -941,7 +946,8 @@ fun MainScreen( } Card( - modifier = Modifier.fillMaxWidth() + modifier = Modifier + .fillMaxWidth() .padding(8.dp), shape = RoundedCornerShape(8.dp), elevation = CardDefaults.cardElevation(4.dp) @@ -1011,7 +1017,8 @@ fun MainScreen( } Card( - modifier = Modifier.fillMaxWidth() + modifier = Modifier + .fillMaxWidth() .padding(8.dp), shape = RoundedCornerShape(8.dp), elevation = CardDefaults.cardElevation(4.dp) @@ -1105,7 +1112,8 @@ fun MainScreen( Card( - modifier = Modifier.fillMaxWidth() + modifier = Modifier + .fillMaxWidth() .padding(8.dp), shape = RoundedCornerShape(8.dp), elevation = CardDefaults.cardElevation(4.dp) @@ -1249,7 +1257,8 @@ fun MainScreen( } Card( - modifier = Modifier.fillMaxWidth() + modifier = Modifier + .fillMaxWidth() .padding(8.dp), shape = RoundedCornerShape(8.dp), elevation = CardDefaults.cardElevation(4.dp) @@ -1335,7 +1344,8 @@ fun PurifyScreen( modifier = Modifier.verticalScroll(rememberScrollState()) ) { Card( - modifier = Modifier.fillMaxWidth() + modifier = Modifier + .fillMaxWidth() .padding(8.dp), shape = RoundedCornerShape(8.dp), elevation = CardDefaults.cardElevation(4.dp) @@ -1376,7 +1386,8 @@ fun PurifyScreen( } Card( - modifier = Modifier.fillMaxWidth() + modifier = Modifier + .fillMaxWidth() .padding(8.dp), shape = RoundedCornerShape(8.dp), elevation = CardDefaults.cardElevation(4.dp) @@ -1391,7 +1402,8 @@ fun PurifyScreen( } Card( - modifier = Modifier.fillMaxWidth() + modifier = Modifier + .fillMaxWidth() .padding(8.dp), shape = RoundedCornerShape(8.dp), elevation = CardDefaults.cardElevation(4.dp) @@ -1517,7 +1529,8 @@ fun PurifyScreen( } Card( - modifier = Modifier.fillMaxWidth() + modifier = Modifier + .fillMaxWidth() .padding(8.dp), shape = RoundedCornerShape(8.dp), elevation = CardDefaults.cardElevation(4.dp) @@ -1697,7 +1710,8 @@ fun PurifyScreen( } Card( - modifier = Modifier.fillMaxWidth() + modifier = Modifier + .fillMaxWidth() .padding(8.dp), shape = RoundedCornerShape(8.dp), elevation = CardDefaults.cardElevation(4.dp) diff --git a/app/src/main/kotlin/cn/xihan/qdds/ReadPage.kt b/app/src/main/kotlin/cn/xihan/qdds/ReadPage.kt index 29442e9..2720760 100644 --- a/app/src/main/kotlin/cn/xihan/qdds/ReadPage.kt +++ b/app/src/main/kotlin/cn/xihan/qdds/ReadPage.kt @@ -35,11 +35,12 @@ fun PackageParam.customReadBackgroundPath(versionCode: Int) { in 944..950 -> "a6.c" 958 -> "y5.c" 970 -> "w5.c" + 980 -> "kc.a" else -> null } val needHookMethod = when (versionCode) { in 827..878 -> "G" - in 884..970 -> "C" + in 884..980 -> "C" else -> null } if (needHookClass == null || needHookMethod == null) { @@ -69,7 +70,7 @@ fun PackageParam.readerPageChapterReviewPictures( enableShowReaderPageChapterSaveAudioDialog: Boolean = false, enableCopyReaderPageChapterComment: Boolean = false, ) { - if (enableShowReaderPageChapterSaveRawPictures && versionCode in 868..980) { + if (enableShowReaderPageChapterSaveRawPictures && versionCode in 868..999) { findClass("com.qd.ui.component.modules.imagepreivew.QDUIGalleryActivity").hook { injectMember { method { @@ -85,27 +86,30 @@ fun PackageParam.readerPageChapterReviewPictures( } if (enableShowReaderPageChapterSavePictureDialog || enableCopyReaderPageChapterComment) { - + /** + * com.qidian.QDReader.ui.adapter.reader.ChapterParagraphCommentAdapter.onBindContentItemViewHolder + * b00.A(newParagraphCommentListBean$DataListBean0, this.getMBookInfo()); + */ val needHookClass = when (versionCode) { in 868..878 -> "com.qidian.QDReader.ui.viewholder.chaptercomment.list.b0" 884 -> "com.qidian.QDReader.ui.viewholder.chaptercomment.list.y" in 890..944 -> "com.qidian.QDReader.ui.viewholder.chaptercomment.list.e0" 950 -> "com.qidian.QDReader.ui.viewholder.chaptercomment.list.m0" - in 958..970 -> "com.qidian.QDReader.ui.viewholder.chaptercomment.list.e0" - else -> null - } - val needHookClass2 = when (versionCode) { - 970 -> "com.qidian.QDReader.ui.viewholder.chaptercomment.list.m0" + in 958..980 -> "com.qidian.QDReader.ui.viewholder.chaptercomment.list.e0" else -> null } val needHookMethod = when (versionCode) { in 868..878 -> "A" 884 -> "x" - in 890..970 -> "z" + in 890..980 -> "z" + else -> null + } + val needHookClass2 = when (versionCode) { + in 970..980 -> "com.qidian.QDReader.ui.viewholder.chaptercomment.list.m0" else -> null } val needHookMethod2 = when (versionCode) { - 970 -> "z" + in 970..980 -> "z" else -> null } if (needHookClass == null || needHookMethod == null) { @@ -236,15 +240,11 @@ fun PackageParam.readerPageChapterReviewPictures( } } } - /** - * com.qidian.QDReader.ui.adapter.reader.ChapterParagraphCommentAdapter.onBindContentItemViewHolder - * b00.A(newParagraphCommentListBean$DataListBean0, this.getMBookInfo()); - */ } - if (enableShowReaderPageChapterSaveAudioDialog && versionCode in 890..970) { + if (enableShowReaderPageChapterSaveAudioDialog && versionCode in 890..980) { when (versionCode) { - in 890..970 -> { + in 890..980 -> { findClass("com.qidian.QDReader.ui.view.chapter_review.VoicePlayerView").hook { injectMember { method { @@ -262,8 +262,8 @@ fun PackageParam.readerPageChapterReviewPictures( if ((strings.isNotEmpty() && strings.size == 2) && relativeLayouts.isNotEmpty()) { relativeLayouts.forEach { - (it as View).setOnLongClickListener { - it.context.audioExportDialog(strings[0], strings[1]) + (it as View).setOnLongClickListener { view -> + view.context.audioExportDialog(strings[0], strings[1]) true } } @@ -299,11 +299,12 @@ fun PackageParam.readTimeDouble( 950 -> "uf.search" 958 -> "rf.search" 970 -> "tf.search" + 980 -> "xg.search" else -> null } val needHookMethod = when (versionCode) { in 868..878 -> "d" - in 884..970 -> "a" + in 884..980 -> "a" else -> null } if (needHookClass == null || needHookMethod == null) { @@ -424,11 +425,11 @@ fun PackageParam.readBookLastPage( hideAdView: Boolean = false ) { val needHookClass = when (versionCode) { - in 896..970 -> "com.qidian.QDReader.ui.view.lastpage.LastPageRoleView" + in 896..980 -> "com.qidian.QDReader.ui.view.lastpage.LastPageRoleView" else -> null } val needHookMethod = when (versionCode) { - in 896..970 -> "l" + in 896..980 -> "l" else -> null } needHookClass?.hook { @@ -456,12 +457,12 @@ fun PackageParam.readBookLastPage( } val needHookClass2 = when (versionCode) { - in 896..970 -> "com.qidian.QDReader.ui.view.lastpage.LastPageCircleView" + in 896..980 -> "com.qidian.QDReader.ui.view.lastpage.LastPageCircleView" else -> null } val needHookMethod2 = when (versionCode) { in 896..900 -> "f" - in 906..970 -> "g" + in 906..980 -> "g" else -> null } @@ -490,11 +491,11 @@ fun PackageParam.readBookLastPage( } val needHookClass3 = when (versionCode) { - in 896..970 -> "com.qidian.QDReader.ui.view.lastpage.LastPageTryReadViewWrap" + in 896..980 -> "com.qidian.QDReader.ui.view.lastpage.LastPageTryReadViewWrap" else -> null } val needHookMethod3 = when (versionCode) { - in 896..970 -> "bind" + in 896..980 -> "bind" else -> null } needHookClass3?.hook { @@ -521,7 +522,7 @@ fun PackageParam.readBookLastPage( } } when (versionCode) { - in 896..980 -> { + in 896..999 -> { if (hideAdView) { findClass("com.qidian.QDReader.ui.activity.BookLastPageNewActivity").hook { injectMember { diff --git a/app/src/main/kotlin/cn/xihan/qdds/ReplaceRule.kt b/app/src/main/kotlin/cn/xihan/qdds/ReplaceRule.kt index c4ee0de..538e1d6 100644 --- a/app/src/main/kotlin/cn/xihan/qdds/ReplaceRule.kt +++ b/app/src/main/kotlin/cn/xihan/qdds/ReplaceRule.kt @@ -15,7 +15,7 @@ import com.highcapable.yukihookapi.hook.type.java.StringClass */ fun PackageParam.enableReplace(versionCode: Int) { when (versionCode) { - in 812..980 -> { + in 812..999 -> { findClass("com.qidian.QDReader.component.util.FockUtil").hook { injectMember { method { diff --git a/app/src/main/kotlin/cn/xihan/qdds/Shield.kt b/app/src/main/kotlin/cn/xihan/qdds/Shield.kt index 674fb25..da5e186 100644 --- a/app/src/main/kotlin/cn/xihan/qdds/Shield.kt +++ b/app/src/main/kotlin/cn/xihan/qdds/Shield.kt @@ -69,12 +69,13 @@ fun PackageParam.shieldDailyReading( in 860..878 -> "com.qidian.QDReader.component.api.k1" in 884..890 -> "com.qidian.QDReader.component.api.h1" in 896..970 -> "com.qidian.QDReader.component.api.i1" + 980 -> "com.qidian.QDReader.component.api.j1" else -> null } val needHookMethod = when (versionCode) { in 788..812 -> "j" in 827..878 -> "k" - in 884..970 -> "h" + in 884..980 -> "h" else -> null } if (needHookClass == null || needHookMethod == null) { @@ -104,7 +105,7 @@ fun PackageParam.shieldDailyReading( */ fun PackageParam.shieldChoice(versionCode: Int) { when (versionCode) { - in 788..980 -> { + in 788..999 -> { /** * 精选主页面 */ @@ -207,7 +208,7 @@ fun PackageParam.shieldCategory(versionCode: Int) { } } - in 827..970 -> { + in 827..980 -> { val needHookClass = when (versionCode) { 827 -> "com.qidian.QDReader.ui.adapter.x6" 834 -> "com.qidian.QDReader.ui.adapter.y6" @@ -217,11 +218,12 @@ fun PackageParam.shieldCategory(versionCode: Int) { in 896..924 -> "com.qidian.QDReader.ui.adapter.v6" in 932..958 -> "com.qidian.QDReader.ui.adapter.x6" 970 -> "com.qidian.QDReader.ui.adapter.a7" + 980 -> "com.qidian.QDReader.ui.adapter.z6" else -> null } val needHookMethod = when (versionCode) { in 827..878 -> "r" - in 884..970 -> "o" + in 884..980 -> "o" else -> null } if (needHookClass == null || needHookMethod == null) { @@ -291,7 +293,7 @@ fun PackageParam.shieldCategory(versionCode: Int) { * if(this.getContentItemViewType(arg8) != 8) */ fun PackageParam.shieldFreeRecommend(versionCode: Int) { - val freeRecommendHookClass: String? = when (versionCode) { + val freeRecommendHookClass = when (versionCode) { 788 -> "la.a" in 792..808 -> "ka.a" 812 -> "ia.a" @@ -309,11 +311,12 @@ fun PackageParam.shieldFreeRecommend(versionCode: Int) { 950 -> "ma.search" 958 -> "ja.search" 970 -> "ia.search" + 980 -> "cb.search" else -> null } val freeRecommendHookMethod = when (versionCode) { in 788..878 -> "n" - in 884..970 -> "k" + in 884..980 -> "k" else -> null } if (freeRecommendHookClass == null || freeRecommendHookMethod == null) { @@ -459,7 +462,7 @@ fun PackageParam.shieldNewBook(versionCode: Int) { } } - in 850..980 -> { + in 850..999 -> { findClass("com.qidian.QDReader.ui.adapter.newbook.BookTagViewHolder").hook { injectMember { method { @@ -579,7 +582,7 @@ fun PackageParam.shieldNewBook(versionCode: Int) { */ fun PackageParam.shieldFreeNewBook(versionCode: Int) { when (versionCode) { - in 788..980 -> { + in 788..999 -> { findClass("com.qidian.QDReader.ui.fragment.QDNewBookInStoreFragment").hook { injectMember { method { @@ -652,6 +655,7 @@ fun PackageParam.shieldHotAndRecommend(versionCode: Int) { in 842..860 -> "com.qidian.QDReader.ui.adapter.t" in 868..878 -> "com.qidian.QDReader.ui.adapter.u" in 884..970 -> "com.qidian.QDReader.ui.adapter.r" + 980 -> "com.qidian.QDReader.ui.adapter.q" else -> null } needHookClass?.hook { @@ -771,7 +775,7 @@ fun PackageParam.shieldNewBookAndRecommend(versionCode: Int) { } } - in 804..970 -> { + in 804..980 -> { /** *上级调用:com.qidian.QDReader.ui.fragment.SanJiangPagerFragment mAdapter */ @@ -785,11 +789,12 @@ fun PackageParam.shieldNewBookAndRecommend(versionCode: Int) { in 896..924 -> "com.qidian.QDReader.ui.adapter.mb" in 932..958 -> "com.qidian.QDReader.ui.adapter.rb" 970 -> "com.qidian.QDReader.ui.adapter.ub" + 980 -> "com.qidian.QDReader.ui.adapter.tb" else -> null } val needHookMethod = when (versionCode) { in 804..878 -> "q" - in 884..970 -> "n" + in 884..980 -> "n" else -> null } if (needHookClass == null || needHookMethod == null) { @@ -850,7 +855,7 @@ fun PackageParam.shieldNewBookAndRecommend(versionCode: Int) { */ fun PackageParam.shieldBookRank(versionCode: Int) { when (versionCode) { - in 808..980 -> { + in 808..999 -> { findClass("com.qidian.QDReader.ui.fragment.RankingFragment").hook { injectMember { method { @@ -933,7 +938,7 @@ fun PackageParam.shieldCategoryAllBook(versionCode: Int) { } } - in 884..980 -> { + in 884..999 -> { findClass("com.qidian.QDReader.ui.fragment.LibraryFragment\$search").hook { injectMember { method { @@ -963,7 +968,7 @@ fun PackageParam.shieldCategoryAllBook(versionCode: Int) { fun PackageParam.shieldCategoryBookListReborn(versionCode: Int) { val needHookMethodName = when (versionCode) { in 950..958 -> "o0" - 970 -> "n0" + in 970..980 -> "n0" else -> null } needHookMethodName?.let { @@ -990,7 +995,7 @@ fun PackageParam.shieldCategoryBookListReborn(versionCode: Int) { */ fun PackageParam.shieldSearchFind(versionCode: Int) { when (versionCode) { - in 788..980 -> { + in 788..999 -> { /** * 搜索发现(热词) */ @@ -1030,7 +1035,7 @@ fun PackageParam.shieldSearch( * 屏蔽热门作品榜更多 * 上级调用: com.qidian.QDReader.ui.activity.QDSearchListActivity.bindView() mAdapter */ - val needHookClass: String? = when (versionCode) { + val needHookClass = when (versionCode) { 788 -> "o9.d" in 792..808 -> "n9.d" 812 -> "l9.d" @@ -1046,11 +1051,12 @@ fun PackageParam.shieldSearch( 944 -> "m9.a" 950 -> "n9.a" in 958..970 -> "l9.a" + 980 -> "ea.a" else -> null } val needHookMethod = when (versionCode) { in 788..878 -> "o" - in 884..970 -> "l" + in 884..980 -> "l" else -> null } if (needHookClass == null || needHookMethod == null) { @@ -1075,7 +1081,7 @@ fun PackageParam.shieldSearch( } when (versionCode) { - in 788..980 -> { + in 788..999 -> { findClass("com.qidian.QDReader.ui.view.search.SearchHomePageRankView").hook { if (isNeedShieldBookRank) { /** @@ -1132,7 +1138,7 @@ fun PackageParam.shieldSearch( */ fun PackageParam.shieldSearchRecommend(versionCode: Int) { when (versionCode) { - in 788..980 -> { + in 788..999 -> { /** * 搜索-为你推荐 */ @@ -1158,7 +1164,7 @@ fun PackageParam.shieldSearchRecommend(versionCode: Int) { */ fun PackageParam.shieldComic(versionCode: Int) { when (versionCode) { - in 812..980 -> { + in 812..999 -> { findClass("com.qidian.QDReader.repository.entity.ComicSquareItem").hook { injectMember { method { @@ -1191,11 +1197,12 @@ fun PackageParam.shieldComicOther(versionCode: Int) { in 842..860 -> "com.qidian.QDReader.ui.adapter.d2" in 868..878 -> "com.qidian.QDReader.ui.adapter.e2" in 884..970 -> "com.qidian.QDReader.ui.adapter.b2" + 980 -> "com.qidian.QDReader.ui.adapter.a2" else -> null } val needHookMethod = when (versionCode) { in 812..878 -> "q" - in 884..970 -> "n" + in 884..980 -> "n" else -> null } if (needHookClass == null || needHookMethod == null) { @@ -1237,6 +1244,7 @@ fun PackageParam.quickShield(versionCode: Int) { 950 -> 0x7F091998 958 -> 0x7F09199F 970 -> 0x7F091A30 + 980 -> 0x7F091A6E else -> null } @@ -1254,6 +1262,7 @@ fun PackageParam.quickShield(versionCode: Int) { 950 -> 0x7F09194E 958 -> 0x7F091955 970 -> 0x7F0919E5 + 980 -> 0x7F091A23 else -> null } if (tvBookNameId == null || tvAuthorNameId == null) { diff --git a/app/src/main/kotlin/cn/xihan/qdds/Splash.kt b/app/src/main/kotlin/cn/xihan/qdds/Splash.kt index 09ed896..3d25d1c 100644 --- a/app/src/main/kotlin/cn/xihan/qdds/Splash.kt +++ b/app/src/main/kotlin/cn/xihan/qdds/Splash.kt @@ -42,14 +42,14 @@ fun PackageParam.splashPage( */ fun PackageParam.disableSplash(versionCode: Int) { when (versionCode) { - in 758..980 -> { + in 758..999 -> { /** * com.qidian.QDReader.ui.activity.MainGroupActivity.onCreate * SplashManager.c().h(this.getApplicationContext()); */ val splashManagerNeedHookMethod = when (versionCode) { in 758..878 -> "k" - in 884..980 -> "h" + in 884..999 -> "h" else -> null } if (splashManagerNeedHookMethod != null) { @@ -102,7 +102,7 @@ fun PackageParam.enableCustomSplash( customSplashImageType: Int = 0, ) { when (versionCode) { - in 758..980 -> { + in 758..999 -> { findClass("com.qidian.QDReader.ui.activity.SplashImageActivity").hook { if (!isEnableCustomSplashImageShowAllButton) { injectMember { diff --git a/app/src/main/kotlin/cn/xihan/qdds/StartImage.kt b/app/src/main/kotlin/cn/xihan/qdds/StartImage.kt index 9c0e803..97dbb80 100644 --- a/app/src/main/kotlin/cn/xihan/qdds/StartImage.kt +++ b/app/src/main/kotlin/cn/xihan/qdds/StartImage.kt @@ -23,7 +23,7 @@ import com.highcapable.yukihookapi.hook.type.java.UnitType */ fun PackageParam.customStartImage(versionCode: Int) { when (versionCode) { - in 860..980 -> { + in 860..999 -> { findClass("com.qidian.QDReader.repository.entity.config.AppConfigBean").hook { injectMember { method { @@ -37,14 +37,6 @@ fun PackageParam.customStartImage(versionCode: Int) { bootWallPapers?.let { var papers = it.getParam>("papers") if (!papers.isNullOrEmpty()) { - /* - val iterator = papers.iterator() - while (iterator.hasNext()) { - val item = iterator.next().toJSONString() - loggerE(msg = "paper: $item") - } - - */ val copyPapers = papers papers.first()?.let { page -> if (page::class.java.name == "com.qidian.QDReader.repository.entity.config.Paper") { @@ -104,7 +96,7 @@ fun PackageParam.customStartImage(versionCode: Int) { */ fun PackageParam.captureTheOfficialLaunchMapList(versionCode: Int) { when (versionCode) { - in 860..980 -> { + in 860..999 -> { findClass("com.qidian.QDReader.ui.activity.splash_config.QDSplashConfigFragment").hook { injectMember { method { @@ -119,7 +111,6 @@ fun PackageParam.captureTheOfficialLaunchMapList(versionCode: Int) { optionEntity.startImageOption.officialLaunchMapList dataList?.forEach { item -> item?.let { -// val text = item.toJSONString() val imageUrl = item.getParam("imageUrl") val paperId = item.getParam("paperId") val name = item.getParam("name") @@ -161,7 +152,7 @@ fun PackageParam.captureTheOfficialLaunchMapList(versionCode: Int) { */ fun PackageParam.customLocalStartImage(versionCode: Int) { when (versionCode) { - in 944..970 -> { + in 944..980 -> { val list = listOf( "com.qidian.QDReader.ui.activity.SplashActivity\$judian", "com.qidian.QDReader.ui.activity.SplashActivity\$cihai" diff --git a/app/src/main/kotlin/cn/xihan/qdds/ViewHide.kt b/app/src/main/kotlin/cn/xihan/qdds/ViewHide.kt index 09173ad..c476423 100644 --- a/app/src/main/kotlin/cn/xihan/qdds/ViewHide.kt +++ b/app/src/main/kotlin/cn/xihan/qdds/ViewHide.kt @@ -48,32 +48,7 @@ fun PackageParam.homeOption(versionCode: Int, optionValueSet: List { - /* - findClass("com.qidian.morphing.card.BaseMorphingCard").hook { - injectMember { - method { - name = "item" - paramCount(1) - returnType = UnitType - } - afterHook { - args[0]?.let { - val name = it.getParam("data")?.getParam("cardTitle") - ?.getParam("name") -// "name: $name".loge() - if (name.isNullOrBlank()) return@let - HookEntry.optionEntity.viewHideOption.selectedOption.configurations.findOrPlus( - title = name - ) { - instance().visibility = View.GONE - } - } - } - } - } - - */ + in 868..999 -> { /** * 新方法 @@ -239,7 +214,7 @@ fun PackageParam.selectedOption(versionCode: Int) { */ fun PackageParam.selectedTitleOption(versionCode: Int) { when (versionCode) { - in 872..980 -> { + in 872..999 -> { findClass("com.qidian.QDReader.ui.fragment.QDStorePagerFragment").hook { injectMember { method { @@ -329,7 +304,7 @@ fun PackageParam.selectedTitleOption(versionCode: Int) { */ fun PackageParam.hideMainTopBox(versionCode: Int) { when (versionCode) { - in 812..980 -> { + in 812..999 -> { findClass("com.qidian.QDReader.ui.activity.MainGroupActivity").hook { injectMember { method { @@ -351,7 +326,7 @@ fun PackageParam.hideMainTopBox(versionCode: Int) { */ fun PackageParam.hideMainTopPower(versionCode: Int) { when (versionCode) { - in 878..980 -> { + in 878..999 -> { findClass("com.qidian.QDReader.ui.activity.MainGroupActivity").hook { injectMember { method { @@ -378,6 +353,7 @@ fun PackageParam.hideBookshelfDailyReading(versionCode: Int) { in 827..860 -> "com.qidian.QDReader.ui.adapter.i0" in 868..878 -> "com.qidian.QDReader.ui.adapter.j0" in 884..970 -> "com.qidian.QDReader.ui.adapter.g0" + 980 -> "com.qidian.QDReader.ui.adapter.f0" else -> null } val listAdapterClass = when (versionCode) { @@ -385,6 +361,7 @@ fun PackageParam.hideBookshelfDailyReading(versionCode: Int) { in 827..860 -> "com.qidian.QDReader.ui.adapter.k0" in 868..878 -> "com.qidian.QDReader.ui.adapter.l0" in 884..970 -> "com.qidian.QDReader.ui.adapter.i0" + 980 -> "com.qidian.QDReader.ui.adapter.h0" else -> null } if (gridAdapterClass == null || listAdapterClass == null) { @@ -432,13 +409,13 @@ fun PackageParam.hideBookshelfDailyReading(versionCode: Int) { */ fun PackageParam.hideBookshelfFindBook(versionCode: Int) { when (versionCode) { - in 868..970 -> { + in 868..980 -> { /** * QDBookShelfBrowserRecordHolder */ val needHookClass = when (versionCode) { in 868..878 -> "com.qidian.QDReader.ui.viewholder.bookshelf.r" - in 884..970 -> "com.qidian.QDReader.ui.viewholder.bookshelf.o" + in 884..980 -> "com.qidian.QDReader.ui.viewholder.bookshelf.o" else -> null } needHookClass?.hook { @@ -475,7 +452,7 @@ fun PackageParam.hideBookshelfFindBook(versionCode: Int) { */ fun PackageParam.hideSearchAllView(versionCode: Int) { when (versionCode) { - in 788..980 -> { + in 788..999 -> { /** * 搜索页面一刀切 */ @@ -502,7 +479,7 @@ fun PackageParam.hideBottomRedDot(versionCode: Int) { val needHookClass = when (versionCode) { in 758..768 -> "com.qidian.QDReader.ui.widget.maintab.a" in 772..878 -> "com.qidian.QDReader.ui.widget.maintab.e" - in 884..970 -> "com.qidian.QDReader.ui.widget.maintab.b" + in 884..980 -> "com.qidian.QDReader.ui.widget.maintab.b" else -> null } val needHookMethod = when (versionCode) { @@ -512,7 +489,7 @@ fun PackageParam.hideBottomRedDot(versionCode: Int) { 906 -> "e" in 916..924 -> "h" in 932..958 -> "e" - 970 -> "g" + in 970..980 -> "g" else -> null } if (needHookClass == null || needHookMethod == null) { @@ -538,7 +515,7 @@ fun PackageParam.hideBottomNavigation(versionCode: Int) { val needHookMethod = when (versionCode) { in 872..878 -> "s" in 884..958 -> "p" - 970 -> "s" + in 970..980 -> "s" else -> null } if (needHookMethod == null) { @@ -547,7 +524,7 @@ fun PackageParam.hideBottomNavigation(versionCode: Int) { } when (versionCode) { - in 827..970 -> { + in 827..980 -> { findClass("com.qidian.QDReader.ui.widget.maintab.PagerSlidingTabStrip").hook { injectMember { method { @@ -590,7 +567,7 @@ fun PackageParam.findViewHide( versionCode: Int, ) { when (versionCode) { - in 860..980 -> { + in 860..999 -> { findClass("com.qidian.QDReader.ui.fragment.FindFragmentReborn").hook { injectMember { method { @@ -831,7 +808,7 @@ fun PackageParam.accountViewHide( } } - in 906..980 -> { + in 906..999 -> { findClass("com.qidian.QDReader.ui.fragment.main_group.QDUserAccountRebornFragment").hook { injectMember { method { @@ -963,7 +940,7 @@ fun PackageParam.accountViewHide( */ fun PackageParam.accountRightTopRedDot(versionCode: Int) { when (versionCode) { - in 812..980 -> { + in 812..999 -> { findClass("com.qidian.QDReader.component.config.QDAppConfigHelper\$Companion").hook { injectMember { method { @@ -1051,6 +1028,7 @@ fun PackageParam.removeQSNYDialog(versionCode: Int) { in 884..900 -> "com.qidian.QDReader.bll.helper.h1" in 906..924 -> "com.qidian.QDReader.bll.helper.n1" in 932..970 -> "com.qidian.QDReader.bll.helper.m0" + 980 -> "com.qidian.QDReader.bll.helper.l0" else -> null } needHookClass?.hook { @@ -1063,33 +1041,6 @@ fun PackageParam.removeQSNYDialog(versionCode: Int) { intercept() } } ?: "移除青少年模式弹框".printlnNotSupportVersion(versionCode) - - - /* - /** - * 上级调用位置:com.qidian.QDReader.bll.manager.QDTeenagerManager.teenWorkDialog - */ - val dialogClassName: String? = when (versionCode) { - in 758..768 -> "com.qidian.QDReader.bll.helper.v1" - 772 -> "com.qidian.QDReader.bll.helper.w1" - in 776..800 -> "com.qidian.QDReader.bll.helper.t1" - else -> null - } - dialogClassName?.hook { - injectMember { - method { - name = "show" - superClass() - } - beforeHook { - printCallStack(instance.javaClass.name) - } - //intercept() - } - } ?: "移除青少年模式弹框".printlnNotSupportVersion(versionCode) - - */ - } /** @@ -1271,7 +1222,7 @@ fun PackageParam.bookDetailHide( } } - in 827..970 -> { + in 827..980 -> { findClass("com.qidian.QDReader.ui.activity.QDBookDetailActivity").hook { injectMember { method { @@ -1377,6 +1328,7 @@ fun PackageParam.bookDetailHide( 950 -> 0x7F091A0B 958 -> 0x7F091A12 970 -> 0x7F091AA5 + 980 -> 0x7F091AE5 else -> null } if (tvCircleMarkLevelId != null) { @@ -1401,7 +1353,7 @@ fun PackageParam.bookDetailHide( */ val bookFansModuleNeedHookMethod = when (versionCode) { in 827..878 -> "d" - in 884..970 -> "a" + in 884..980 -> "a" else -> null } if (bookFansModuleNeedHookMethod == null) { @@ -1457,7 +1409,7 @@ fun PackageParam.bookDetailHide( */ fun PackageParam.hideReadPageBottom(versionCode: Int) { when (versionCode) { - in 827..980 -> { + in 827..999 -> { findClass("com.qidian.QDReader.readerengine.view.QDSuperEngineView").hook { injectMember { method { @@ -1499,6 +1451,7 @@ fun PackageParam.comicHideBannerAd(versionCode: Int) { 950 -> "pa.d" 958 -> "ma.d" 970 -> "la.d" + 980 -> "fb.d" else -> null } needHookClass?.hook { @@ -1526,7 +1479,7 @@ fun PackageParam.comicHideBannerAd(versionCode: Int) { */ fun PackageParam.hideRedDot(versionCode: Int) { when (versionCode) { - in 868..980 -> { + in 868..999 -> { findClass("com.qidian.QDReader.framework.widget.customerview.SmallDotsView").hook { injectMember { method {