什么可能导致Xposed模块的启动循环

时间:2019-05-29 02:46:05

标签: boot xposed

我正在开发Xposed模块来生成虚假位置。我已成功安装Xposed并成功重启。当我测试我的早期模块时,一切正常,在我添加了更多钩子函数之后,我的设备进入了bootloop,我的钩子函数大约是locationmanagerwifimanager和网,我不确定是什么原因导致了这个问题。我删除了一些我认为可能会导致问题的功能,但仍然存在。以下是我认为可能会导致问题的函数,但我不确定

   findAndHookMethod("com.android.server.LocationManagerService$Receiver", lpp.classLoader, "callLocationChangedLocked", new XC_MethodHook() {
        @Override
        protected void beforeHookedMethod(MethodHookParam param) throws Throwable {

   findAndHookMethod("android.provider.Settings.Secure", mLpp.classLoader, "getString", ContentResolver.class, String.class, new XC_MethodHook() {
        protected void beforeHookedMethod(XC_MethodHook.MethodHookParam param)
                throws Throwable {
            if (((String) param.args[1]).equals("mock_location"))
                param.setResult("0");
        }
    });

    findAndHookMethod("android.net.NetworkInfo", mLpp.classLoader, "getTypeName", XC_MethodReplacement.returnConstant("WIFI"));//"MOBILE"
    findAndHookMethod("android.net.NetworkInfo", mLpp.classLoader, "isConnectedOrConnecting", XC_MethodReplacement.returnConstant(true));
    findAndHookMethod("android.net.NetworkInfo", mLpp.classLoader, "isConnected", XC_MethodReplacement.returnConstant(true));
    findAndHookMethod("android.net.NetworkInfo", mLpp.classLoader, "isAvailable", XC_MethodReplacement.returnConstant(true));

我希望设备可以启动

0 个答案:

没有答案