fix: No updatrs

This commit is contained in:
MoonLeeeaf 2024-06-09 12:48:17 +08:00
parent c6a3f015e5
commit 68b3d96fdd
2 changed files with 14 additions and 52 deletions

View File

@ -1,50 +1,20 @@
{
"allFiles": [
{
"file": "/storage/emulated/0/铃芽の文件/Projects/FuckMaoNemo/app/src/main/res/xml/config.xml",
"selection": {
"end": {
"column": 15,
"index": 519,
"line": 17
},
"start": {
"column": 15,
"index": 519,
"line": 17
}
}
},
{
"file": "/storage/emulated/0/铃芽の文件/Projects/FuckMaoNemo/app/src/main/java/io/github/moonleeeaf/fuckmaonemo/Hook.java",
"selection": {
"end": {
"column": 28,
"index": 5956,
"line": 146
"column": 34,
"index": 6410,
"line": 160
},
"start": {
"column": 28,
"index": 5956,
"line": 146
}
}
},
{
"file": "/storage/emulated/0/铃芽の文件/Projects/FuckMaoNemo/app/build.gradle",
"selection": {
"end": {
"column": 22,
"index": 272,
"line": 14
},
"start": {
"column": 22,
"index": 272,
"line": 14
"column": 34,
"index": 6410,
"line": 160
}
}
}
],
"selectedFile": "/storage/emulated/0/铃芽の文件/Projects/FuckMaoNemo/app/src/main/res/xml/config.xml"
"selectedFile": "/storage/emulated/0/铃芽の文件/Projects/FuckMaoNemo/app/src/main/java/io/github/moonleeeaf/fuckmaonemo/Hook.java"
}

View File

@ -2,6 +2,7 @@ package io.github.moonleeeaf.fuckmaonemo;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;
import de.robv.android.xposed.IXposedHookLoadPackage;
@ -153,22 +154,13 @@ public class Hook implements IXposedHookLoadPackage {
// 屏蔽更新
load("fuck_update", () -> {
XposedBridge.log("[FuckMaoNemo] Hook_屏蔽更新");
XposedBridge.hookMethod(
methodToVoid(
getMethod(
XposedHelpers.findClass("cn.codemao.android.update.CodemaoUpdate$Builder", classLoader),
"setEnv",
int.class
),
new XC_MethodHook(){
@Override
protected void afterHookedMethod(MethodHookParam arg0) throws Throwable {
XposedHelpers.setStaticObjectField(
XposedHelpers.findClass("cn.codemao.android.update.util.UpdateConstants", classLoader),
"UPDATE_URL",
"http://114.514.1.1"
);
}
}
XposedHelpers.findClass("com.codemao.nemo.sdk.update.NetChangeReceiver", classLoader),
"onReceive",
Context.class,
Intent.class
)
);
});