mirror of
https://github.com/fankes/TSBattery.git
synced 2025-09-06 18:55:45 +08:00
适配 QQ 8.8.8.0
This commit is contained in:
@@ -21,7 +21,7 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.fankes.tsbattery"
|
applicationId "com.fankes.tsbattery"
|
||||||
minSdk 22
|
minSdk 22
|
||||||
targetSdk 31
|
targetSdk 26
|
||||||
versionCode rootProject.ext.appVersionCode
|
versionCode rootProject.ext.appVersionCode
|
||||||
versionName rootProject.ext.appVersionName
|
versionName rootProject.ext.appVersionName
|
||||||
|
|
||||||
|
@@ -43,6 +43,7 @@ import com.highcapable.yukihookapi.hook.bean.VariousClass
|
|||||||
import com.highcapable.yukihookapi.hook.factory.encase
|
import com.highcapable.yukihookapi.hook.factory.encase
|
||||||
import com.highcapable.yukihookapi.hook.factory.field
|
import com.highcapable.yukihookapi.hook.factory.field
|
||||||
import com.highcapable.yukihookapi.hook.log.loggerD
|
import com.highcapable.yukihookapi.hook.log.loggerD
|
||||||
|
import com.highcapable.yukihookapi.hook.log.loggerE
|
||||||
import com.highcapable.yukihookapi.hook.param.PackageParam
|
import com.highcapable.yukihookapi.hook.param.PackageParam
|
||||||
import com.highcapable.yukihookapi.hook.type.android.*
|
import com.highcapable.yukihookapi.hook.type.android.*
|
||||||
import com.highcapable.yukihookapi.hook.type.java.*
|
import com.highcapable.yukihookapi.hook.type.java.*
|
||||||
@@ -100,7 +101,7 @@ class HookEntry : YukiHookXposedInitProxy {
|
|||||||
interceptBaseChatPie(methodName = "bj")
|
interceptBaseChatPie(methodName = "bj")
|
||||||
interceptBaseChatPie(methodName = "bk")
|
interceptBaseChatPie(methodName = "bk")
|
||||||
}
|
}
|
||||||
"8.8.55", "8.8.68" -> {
|
"8.8.55", "8.8.68", "8.8.80" -> {
|
||||||
interceptBaseChatPie(methodName = "bk")
|
interceptBaseChatPie(methodName = "bk")
|
||||||
interceptBaseChatPie(methodName = "bl")
|
interceptBaseChatPie(methodName = "bl")
|
||||||
}
|
}
|
||||||
@@ -323,6 +324,55 @@ class HookEntry : YukiHookXposedInitProxy {
|
|||||||
intercept()
|
intercept()
|
||||||
}.ignoredAllFailure()
|
}.ignoredAllFailure()
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 一个不知道是什么作用的电源锁
|
||||||
|
* 同样直接干掉
|
||||||
|
*/
|
||||||
|
findClass(name = "com.tencent.mars.comm.WakerLock").hook {
|
||||||
|
injectMember {
|
||||||
|
method {
|
||||||
|
name = "lock"
|
||||||
|
param(LongType)
|
||||||
|
}
|
||||||
|
intercept()
|
||||||
|
}.ignoredAllFailure()
|
||||||
|
injectMember {
|
||||||
|
method {
|
||||||
|
name = "lock"
|
||||||
|
param(StringType)
|
||||||
|
}
|
||||||
|
intercept()
|
||||||
|
}.ignoredAllFailure()
|
||||||
|
injectMember {
|
||||||
|
method { name = "lock" }
|
||||||
|
intercept()
|
||||||
|
}.ignoredAllFailure()
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 干掉消息收发功能的电源锁
|
||||||
|
* 每个版本的差异暂未做排查
|
||||||
|
* 旧版本理论上没有这个类
|
||||||
|
*/
|
||||||
|
findClass(name = "$QQ_PACKAGE_NAME.msf.service.y").hook {
|
||||||
|
injectMember {
|
||||||
|
method {
|
||||||
|
name = "a"
|
||||||
|
param(StringType, LongType)
|
||||||
|
returnType = UnitType
|
||||||
|
}
|
||||||
|
intercept()
|
||||||
|
}.onAllFailure { loggerE(msg = "Hook MsfService Failed $it") }
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 干掉自动上传服务的电源锁
|
||||||
|
* 每个版本的差异暂未做排查
|
||||||
|
*/
|
||||||
|
findClass(name = "com.tencent.upload.impl.UploadServiceImpl").hook {
|
||||||
|
injectMember {
|
||||||
|
method { name = "acquireWakeLockIfNot" }
|
||||||
|
intercept()
|
||||||
|
}.onAllFailure { loggerE(msg = "Hook UploadServiceImpl Failed $it") }
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Hook 掉一个一像素保活 [Activity] 真的我怎么都想不到讯哥的程序员做出这种事情
|
* Hook 掉一个一像素保活 [Activity] 真的我怎么都想不到讯哥的程序员做出这种事情
|
||||||
* 这个东西经过测试会在锁屏的时候吊起来,解锁的时候自动 finish(),无限耍流氓耗电
|
* 这个东西经过测试会在锁屏的时候吊起来,解锁的时候自动 finish(),无限耍流氓耗电
|
||||||
|
@@ -63,7 +63,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
private const val moduleVersion = BuildConfig.VERSION_NAME
|
private const val moduleVersion = BuildConfig.VERSION_NAME
|
||||||
private const val qqSupportVersion =
|
private const val qqSupportVersion =
|
||||||
"8.2.11(Play)、8.8.17、8.8.23、8.8.35、8.8.38、8.8.50、8.8.55、8.8.68 (8.2.11、8.5.5~8.8.68)"
|
"8.2.11(Play)、8.8.17、8.8.23、8.8.35、8.8.38、8.8.50、8.8.55、8.8.68、8.8.80 (8.2.11、8.5.5~8.8.80)"
|
||||||
private const val timSupportVersion = "2+、3+ (并未完全测试每个版本)"
|
private const val timSupportVersion = "2+、3+ (并未完全测试每个版本)"
|
||||||
private const val wechatSupportVersion = "全版本仅支持基础省电,更多功能依然画饼"
|
private const val wechatSupportVersion = "全版本仅支持基础省电,更多功能依然画饼"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user