Exemple #1
0
            private bool DetectAndFixXamarinApp(XC_LoadPackage.LoadPackageParam param)
            {
                var nativeDir = param.AppInfo.NativeLibraryDir;

                if (nativeDir == null)
                {
                    XposedBridge.Log("native dir is null");
                    IsXamarinApp = false;
                    return(false);
                }

                foreach (var file in Directory.EnumerateFiles(nativeDir))
                {
                    var lib = Path.GetFileName(file);
                    if (lib == "libxamarin-app.so" || lib == "libmono-native.so" || lib == "libmonodroid.so" || lib == "libxamarin-debug-app-helper.so")
                    {
                        XposedBridge.Log("XamarinPosed found Xamarin App: " + param.PackageName);
                        //TODO:
                        //var unhook = XposedHelpers.FindAndHookMethod("android.content.Context", param.ClassLoader, "getClassLoader",
                        //    new Context_GetClassLoaderHook());

                        IsXamarinApp = true;
                        return(true);
                    }
                }

                return(false);
            }
Exemple #2
0
 /// <summary>
 /// Write your logic here
 /// </summary>
 /// <param name="param"></param>
 public void HandleLoadPackage(XC_LoadPackage.LoadPackageParam param)
 {
     DetectAndFixXamarinApp(param); //This is required for Xamarin app compatibility
     Log.Info("XamarinPosed", "XamarinPosed HandleLoadPackage: " + param.PackageName);
     XposedBridge.Log("XamarinPosed HandleLoadPackage: " + param.PackageName);
     //This is a demo, remove it
     HookMyself(param);
 }
Exemple #3
0
 /// <summary>
 /// Write your logic here
 /// </summary>
 /// <param name="param"></param>
 public void HandleInitPackageResources(XC_InitPackageResources.InitPackageResourcesParam param)
 {
     XposedBridge.Log("XamarinPosed HandleInitPackageResources: " + param.PackageName);
 }
Exemple #4
0
 /// <summary>
 /// Write your logic here
 /// </summary>
 /// <param name="param"></param>
 public void InitZygote(XposedHookZygoteInitStartupParam param)
 {
     XposedBridge.Log("XamarinPosed InitZygote: " + param.ModulePath);
 }
Exemple #5
0
 public Loader()
 {
     XposedBridge.Log("XamarinPosed Loader created.");
 }