eusth / ipa Goto Github PK
View Code? Open in Web Editor NEWIllusion Plugin Architecture (Reloaded)
License: MIT License
Illusion Plugin Architecture (Reloaded)
License: MIT License
I managed to use IPA in an old game named "Redrunner" (https://github.com/BayatGames/RedRunner). This was built on Unity 2017.X.
However, as for games and VR apps built using later versions of Unity, the tool does not seem to work. It got a bunch of errors at first, which I managed to solve using try/catch blocks for the line:
_Module.Write(_File.FullName);
in files patcher.cs and virtualizer.cs.
After this, the injection went through without any errors.
BUT, the console showing that is supposed to show up with the --verbose flag, simply wouldn't show up, no matter what I try. It works fine for Redrunner, btw.
Simple scenario:
The reason is that the IL for virtual method calls and normal calls is different. For normal method calls, no lookup is performed, and it will always go straight for the original implementation. This kinda nullifies the virtualisation of methods, because overriding them doesn't really do anything.
The behaviour is similar as if the class wasn't virtual, and I were to override the method using new
. A possible "fix" would be to change the IL to adjust all method calls to virtual calls; however doing so likely incurs a performance impact, if it is even possible at all.
G
Updating files...
Architecture: x64
Successfully updated files!
ERROR: Oops! This should not have happened.
System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
at Mono.Cecil.PE.ImageReader.ReadImage()
at Mono.Cecil.PE.ImageReader.ReadImageFrom(Stream stream)
at Mono.Cecil.ModuleDefinition.ReadModule(Stream stream, ReaderParameters parameters)
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
at IPA.Patcher.VirtualizedModule.LoadModules()
at IPA.Program.Install(PatchContext context)
[Press any key to quit]
[ERROR] Could not load x.dll! System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
at IllusionInjector.PluginManager.LoadPluginsFromFile (System.String file, System.String exeName) [0x00000] in <filename unknown>:0
I have followed 2 image tutorials, and 1 YouTube tutorial, and despite doing every step those people are doing when I drag an .EXE onto IPA.exe it just opens and crashes. No error message is given at all?? If I run it from a console window it says this:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or ass
embly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c56193
4e089' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c
561934e089'
at IPA.Program.Main(String[] args)
Whenever i drag and drop a games executable onto IPA i get the following error:
Architecture: x64
Successfully updated files!
Patching UnityEngine.dll... ERROR: Oops! This should not have happened.
System.Exception: Could not find any entry type!
at IPA.Patcher.PatchedModule.Patch()
at IPA.Program.Install(PatchContext context)
[Press any key to quit]
Any solutions?
Updating files...
Architecture: x64
Copying C:\Games\Goblin Lord Wants me to Become a Virgin Wizard by Managing the Brothel!\Goblin Burrow Manager_Data\Managed\IllusionInjector.dll
Copying C:\Games\Goblin Lord Wants me to Become a Virgin Wizard by Managing the Brothel!\Goblin Burrow Manager_Data\Managed\IllusionPlugin.dll
Copying C:\Games\Goblin Lord Wants me to Become a Virgin Wizard by Managing the Brothel!\Goblin Burrow Manager_Data\Managed\IllusionPlugin.xml
Successfully updated files!
Patching UnityEngine.dll... ERROR: Oops! This should not have happened.
System.Exception: Could not find any entry type!
в IPA.Patcher.PatchedModule.Patch()
в IPA.Program.Install(PatchContext context)
[Press any key to quit]
Can I somehow solve this problem?
Updating files...
Architecture: x64
Copying D:\BILDER\Uplay\Far Cryr 3\Far Cry 3 screenshots\Ny mapp\Ny mapp\Ny mapp\Ny mapp\ANIME\honey select\illusion\HoneySelect\HoneySelect_64_Data\Managed\IllusionInjector.dll
ERROR: Oops! This should not have happened.
System.UnauthorizedAccessException: Åtkomst till sökvägen D:\BILDER\Uplay\Far Cryr 3\Far Cry 3 screenshots\Ny mapp\Ny mapp\Ny mapp\Ny mapp\ANIME\honey select\illusion\HoneySelect\HoneySelect_64_Data\Managed\IllusionInjector.dll nekas.
vid System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
vid System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite)
vid System.IO.FileInfo.CopyTo(String destFileName, Boolean overwrite)
vid IPA.Program.CopyAll(DirectoryInfo source, DirectoryInfo target, Boolean aggressive, BackupUnit backup, Func3 interceptor) vid IPA.Program.CopyAll(DirectoryInfo source, DirectoryInfo target, Boolean aggressive, BackupUnit backup, Func
3 interceptor)
vid IPA.Program.Install(PatchContext context)
[Press any key to quit]
I have tried running as admin and it still won't work
Patched game doesn't run all plugins, in particular the ShortcutPlugin in Honey Select under wine.
The game itself works flawlessly.
I can't see any error messages in the terminal window where the application is started.
I tried the --verbose switch, but no terminal appears.
The strange thing is that the translation seems to work, which implicates some kind of functionality.
Could it be that I am using the 32 bit version?
In the past I have had issues with wine DLLs being loaded instead of those required by plugins, could that be the problem?
Newer versions of UnityEngine.dll contain only references to external assemblies which gives you the error
System.Exception: Could not find any entry type!
at IPA.Patcher.PatchedModule.Patch()
at IPA.Program.Install(PatchContext context)
The entry points UnityEngine.Input and UnityEngine.Display have both been moved to
.assembly extern UnityEngine.CoreModule
{
.ver 0:0:0:0
}
(excerpt from the UnityEngine.dll manifest courtesy of ildasm)
If FindEntryTypes()
in IPA.Patcher returns no results for UnityEngine.dll, setting engineFile
to UnityEngine.CoreModule.dll and trying to patch again works.
Seems like the latest release (v3.4.1) does not include commit ca30be3 as the the order in the compiled .dll is still "UnityEngine.dll", then "UnityEngine.CoreModule.dll" instead of the other way around.
It seems Unity moved to a different way of managing their .dll files in the newest versions.
This was thrown while attempting to install IPA on Beat Saber (oculus store version).
Patching UnityEngine.dll... ERROR: Oops! This should not have happened.
System.Exception: Could not find any entry type!
at IPA.Patcher.PatchedModule.Patch()
at IPA.Program.Install(PatchContext context)
[Press any key to quit]
POSTED ON WRONG GITHUB PAGE
"E:\SteamLibrary\steamapps\common\My Summer Car
Backing up 'E:\SteamLibrary\steamapps\common\My Summer Car\mysummercar_Data/globalgamemanagers'...
Unhandled Exception: System.IO.FileNotFoundException: Could not find file 'E:\SteamLibrary\steamapps\common\My Summer Car\mysummercar_Data/globalgamemanagers'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
at System.IO.File.Copy(String sourceFileName, String destFileName)
at UnityVRPatcher.Program.CreateGameManagersBackup(String gameManagersPath)
at UnityVRPatcher.Program.Main(String[] args)
Press any key to close this console."
Off from searching the game files, globalgamemanagers does not appear to exist
ProgramTest.cs :
public void CopiesCorrectly(string from, string to, string nativeFolder, bool isFlat, string[] expected)
{
var outcome = Program.NativePluginInterceptor(new FileInfo(from), new FileInfo(to), new DirectoryInfo(nativeFolder), isFlat).Select(f => f.FullName).ToList();
var expectedPaths = expected.Select(e => new FileInfo(e)).Select(f => f.FullName).ToList();
Assert.Equal(expectedPaths, outcome);
}
There is no last param "Architecture" to call NativePluginInterceptor function , it can't compile.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.