From 2c756b8e9a44046d3cd1e9b8b3295a37bd2b7541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=80=E6=BC=93=E4=B8=A8Sevtinge?= Date: Sun, 14 May 2023 11:08:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E9=B2=81=E7=8F=AD-?= =?UTF-8?q?=E7=BB=95=E8=BF=87=E9=B2=81=E7=8F=AD=E9=89=B4=E6=9D=83=20hook?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cemiuiler/module/mtb/BypassAuthentication.kt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/mtb/BypassAuthentication.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/mtb/BypassAuthentication.kt index 7613a73390..c3024ec5e7 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/mtb/BypassAuthentication.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/mtb/BypassAuthentication.kt @@ -1,9 +1,6 @@ package com.sevtinge.cemiuiler.module.mtb -import com.github.kyuubiran.ezxhelper.utils.field -import com.github.kyuubiran.ezxhelper.utils.findMethod -import com.github.kyuubiran.ezxhelper.utils.hookAfter -import com.github.kyuubiran.ezxhelper.utils.hookBefore +import com.github.kyuubiran.ezxhelper.utils.* import com.sevtinge.cemiuiler.module.base.BaseHook object BypassAuthentication : BaseHook() { @@ -21,7 +18,8 @@ object BypassAuthentication : BaseHook() { findMethod("com.xiaomi.mtb.activity.ModemTestBoxMainActivity") { name == "updateClass" }.hookBefore { - it.thisObject.field("mClassNet", true).set(it.thisObject, 0) + it.args[0] = 0 + it.thisObject.putObject("mClassNet", 0) } } catch (_: Throwable) { } @@ -30,9 +28,10 @@ object BypassAuthentication : BaseHook() { findMethod("com.xiaomi.mtb.activity.ModemTestBoxMainActivity") { name == "initClassProduct" }.hookAfter { - it.thisObject.field("mClassProduct", true).set(it.thisObject, 0) + it.thisObject.putObject("mClassProduct", 0) } } catch (_: Throwable) { } } + }