This is the legacy version. For the newest version with .NET 7+ support, please check XamarinPosed.Core !
Write Xposed module with Xamarin and C# π±βπ»
I only test it on VirtualXposed. If it won't work on Xposed, please help me fix it.
The app startup time would be slightly longer because of mono initialization. But hey, who cares? Welcome to the .NET world.
For VirtualXposed: The module app will be unable to open directly after you enable it as a Xposed module. That's because the same native libraries are already loaded by the module's ClassLoader, so the APK's ClassLoader won't be able to use them.
Please use the newest stable version of Visual Studio and Xamarin.
Clone this repo and implement your InitZygote
, HandleLoadPackage
, HandleInitPackageResources
in XamarinPosed\XamarinPosed\Loader.cs
.
(HandleInitPackageResources
is disabled by default. To enable it, remove "VXP" from XaraminPosed Properties - Conditional Compilation Symbols)
Build XamarinPosed
project with release config. It will be a Xposed module apk.
Build all projects with Release config.
Install both XamarinPosed
and Xamarin.Posed.Demo
to your phone. Enable the Xamarin.Posed
module. (Don't try to open it after enabled.)
Open Xamarin.Posed.Demo
(Monarch Solutions logo), click the FloatingActionButton (bottom-right), then click ACTION
.
If the Xamarin.Posed
module is working, you will get a toast showing All your base are belong to us!
. Otherwise, nothing happens.
XamarinPosed Project Properties - Android Manifest - change package name to whatever you want
Since resource hook is not supported by VirtualXposed, it's disabled by default. To enable it:
XamarinPosed Project Properties - Build - Conditional Compilation Symbols - remove "VXP"
This project is a good start for research, however it won't work, since it only get over the very first problem - Jar Binding.
There is still a lot of work to do after that, as you can learn from XamarinPosed.
XamarinPosed is licensed under MIT license.
by Ulysses (wdwxy12345@gmail.com)