mirror of
https://github.com/LittleTurtle2333/SimplicityTools.git
synced 2026-07-13 11:51:22 +08:00
Disable installation's count checking (#216)
Disable installation's count checking
This commit is contained in:
@@ -47,6 +47,7 @@ class MenuPage : BasePage() {
|
||||
"killall com.miui.screenshot",
|
||||
"killall com.milink.service",
|
||||
"killall com.xiaomi.misubscreenui",
|
||||
"killall com.miui.packageinstaller"
|
||||
)
|
||||
ShellUtils.execCommand(command, true)
|
||||
dismiss()
|
||||
|
||||
@@ -172,6 +172,12 @@ class OtherPageForS : BasePage() {
|
||||
TextSummaryV(textId = R.string.remove_thememanager_ads),
|
||||
SwitchV("remove_thememanager_ads")
|
||||
)
|
||||
Line()
|
||||
TitleText(textId = R.string.pkg_installer)
|
||||
TextSummaryWithSwitch(
|
||||
TextSummaryV(textId = R.string.pkg_installer_summary),
|
||||
SwitchV("pkg_installer_count_checking")
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -172,6 +172,12 @@ class OtherPageForT : BasePage() {
|
||||
TextSummaryV(textId = R.string.remove_thememanager_ads),
|
||||
SwitchV("remove_thememanager_ads")
|
||||
)
|
||||
Line()
|
||||
TitleText(textId = R.string.pkg_installer)
|
||||
TextSummaryWithSwitch(
|
||||
TextSummaryV(textId = R.string.pkg_installer_summary),
|
||||
SwitchV("pkg_installer_count_checking")
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ class MainHook : EasyXposedInit() {
|
||||
ScreenShot, // 截屏
|
||||
Cast, //投屏
|
||||
RearDisplay, //背屏
|
||||
PackageInstaller, // 应用包管理组件
|
||||
)
|
||||
|
||||
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam?) {
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.lt2333.simplicitytools.hooks.apps
|
||||
|
||||
import com.github.kyuubiran.ezxhelper.utils.findMethod
|
||||
import com.github.kyuubiran.ezxhelper.utils.hookBefore
|
||||
import com.lt2333.simplicitytools.utils.hasEnable
|
||||
import com.lt2333.simplicitytools.utils.xposed.base.AppRegister
|
||||
import de.robv.android.xposed.XposedBridge
|
||||
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
||||
|
||||
object PackageInstaller: AppRegister() {
|
||||
|
||||
override val packageName: String = "com.miui.packageinstaller"
|
||||
|
||||
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
|
||||
hasEnable("pkg_installer_count_checking") {
|
||||
findMethod("com.miui.packageInstaller.model.RiskControlRules") {
|
||||
name == "getCurrentLevel"
|
||||
}.hookBefore { param ->
|
||||
XposedBridge.log("Hooked getCurrentLevel, param result = ${param.result}")
|
||||
param.result = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user