Skip to content

Commit

Permalink
feat: KillDelayBootHook (#1553)
Browse files Browse the repository at this point in the history
Kill ff_boot_exp_delay_xxx from cloud control in
com.bilibili.gripper.exp.a$a
  • Loading branch information
CodePwn2021 authored Nov 12, 2024
1 parent 9926eef commit 7d07474
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/src/main/java/me/iacn/biliroaming/BiliBiliPackage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class BiliBiliPackage constructor(private val mClassLoader: ClassLoader, mContex
?: "tv.danmaku.bili.MainActivityV2" from mClassLoader
}
val mainActivityClass by Weak { "tv.danmaku.bili.MainActivityV2" from mClassLoader }
val gripperBootExpClass by Weak { "com.bilibili.gripper.exp.a\$a" from mClassLoader }
val homeUserCenterClass by Weak { if (mHookInfo.settings.homeUserCenterCount == 1) mHookInfo.settings.homeUserCenterList.first().class_ from mClassLoader else null }
val menuGroupItemClass by Weak { mHookInfo.settings.menuGroupItem from mClassLoader }
val drawerLayoutClass by Weak { mHookInfo.drawer.layout from mClassLoader }
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/me/iacn/biliroaming/XposedInit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class XposedInit : IXposedHookLoadPackage, IXposedHookZygoteInit {
if (BuildConfig.DEBUG) {
startHook(SSLHook(lpparam.classLoader))
}
startHook(KillDelayBootHook(lpparam.classLoader))
startHook(HintHook(lpparam.classLoader))
startHook(BangumiSeasonHook(lpparam.classLoader))
startHook(BangumiPlayUrlHook(lpparam.classLoader))
Expand Down
12 changes: 12 additions & 0 deletions app/src/main/java/me/iacn/biliroaming/hook/KillDelayBootHook.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package me.iacn.biliroaming.hook

import me.iacn.biliroaming.BiliBiliPackage.Companion.instance
import me.iacn.biliroaming.utils.hookAfterMethod

class KillDelayBootHook(classLoader: ClassLoader) : BaseHook(classLoader) {
override fun startHook() {
instance.gripperBootExpClass?.hookAfterMethod("getDelayMillis") { param ->
param.result = -1L
}
}
}

0 comments on commit 7d07474

Please sign in to comment.