-
Notifications
You must be signed in to change notification settings - Fork 572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Process GameAssembly.dll and global.metadata.dll from runtime #611
Conversation
…equired Before PrincessDumper
…AutoTranslator; Removed Unnecessary Config Entries;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix looks fine to me but adding two submodules seems excessive, especially PrincessDumper since it's basically a single class. Someone actively working with the 6.x branch will have to chime in on the rest since I'm not familiar with the IL2Cpp part.
I am not a programmer, I can only use and configure the software a little... [Message: Preloader] BepInEx 6.0.0-be.672 - GAME
[Message: Preloader] Built from commit 472e950179f4a5ab2e4a89f26dba793795fb6811
[Info : BepInEx] System platform: Windows 10 64-bit
[Info : BepInEx] Process bitness: 64-bit (x64)
[Info : BepInEx] Running under Unity 2021.3.25f1
[Info : BepInEx] Runtime version: 6.0.7
[Info : BepInEx] Runtime information: .NET 6.0.7
[Info : Preloader] 0 patcher plugins loaded
[Info : Preloader] 0 assemblies discovered
[Message:AssemblyPatcher] Executing 0 patch(es)
[Message: BepInEx] Chainloader initialized
[Warning:Il2CppInterop] Class::Init signatures have been exhausted, using a substitute!
[Info :Il2CppInterop] Registered mono type Il2CppInterop.Runtime.DelegateSupport+Il2CppToMonoDelegateReference in il2cpp domain
[Info : BepInEx] 2 plugins to load
[Info : BepInEx] Loading [XUnity Auto Translator 5.2.0]
[Error : BepInEx] Error loading [XUnity Auto Translator 5.2.0]: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.MissingMethodException: Method not found: 'System.String BepInEx.Unity.IL2CPP.Preloader.get_IL2CPPInteropAssemblyPath()'.
at XUnity.AutoTranslator.Plugin.BepInEx.AutoTranslatorPlugin..ctor()
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
--- End of inner exception stack trace ---
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type)
at BepInEx.Unity.IL2CPP.IL2CPPChainloader.LoadPlugin(PluginInfo pluginInfo, Assembly pluginAssembly) in /home/runner/work/BepInEx/BepInEx/Runtimes/Unity/BepInEx.Unity.IL2CPP/IL2CPPChainloader.cs:line 129
at BepInEx.Bootstrap.BaseChainloader`1.LoadPlugins(IList`1 plugins) in /home/runner/work/BepInEx/BepInEx/BepInEx.Core/Bootstrap/BaseChainloader.cs:line 411
[Info : BepInEx] Loading [XUnity Resource Redirector 2.0.0]
[Message: BepInEx] Chainloader startup complete [Message: Preloader] BepInEx 6.0.0-be.672 - GAMA_2
[Message: Preloader] Built from commit 472e950179f4a5ab2e4a89f26dba793795fb6811
[Info : BepInEx] System platform: Windows 10 64-bit
[Info : BepInEx] Process bitness: 64-bit (x64)
[Info : BepInEx] Running under Unity 2020.3.8f1
[Info : BepInEx] Runtime version: 6.0.7
[Info : BepInEx] Runtime information: .NET 6.0.7
[Message:InteropManager] Downloading unity base libraries
[Message:InteropManager] Extracting downloaded unity base libraries
[Message:InteropManager] Running Cpp2IL to generate dummy assemblies
[Info : Cpp2IL] [Library] Initializing Metadata...
[Info : Cpp2IL] [Library] Using actual IL2CPP Metadata version 27,1
[Info : Cpp2IL] [Library] Initialized Metadata in 98ms
[Info : Cpp2IL] [Library] Using binary type Portable Executable (from LibCpp2IL)
[Info : Cpp2IL] [Library] Searching Binary for Required Data...
[Info : Cpp2IL] [Library] Got Binary codereg: 0x1811BC1E0, metareg: 0x1811BD660 in 116ms.
[Info : Cpp2IL] [Library] Initializing Binary...
[Info : Cpp2IL] [Library] Initialized Binary in 70ms
[Info : Cpp2IL] [Library] Mapping pointers to Il2CppMethodDefinitions...
[Info : Cpp2IL] [Library] Processed 43141 OK (48ms)
[Info : Cpp2IL] [Program] Creating application model...
[Info : Cpp2IL] [Program] Application model created in 625,9036ms
[Info :InteropManager] Cpp2IL finished in 00:00:03.1659169
[Info :InteropManager] Generating interop assemblies
[Info :Il2CppInteropGen] Reading assemblies...
[Info :Il2CppInteropGen] Done in 00:00:00.0541552
[Info :Il2CppInteropGen] Reading unity assemblies...
[Info :Il2CppInteropGen] Done in 00:00:00.0121971
[Info :Il2CppInteropGen] Creating rewrite assemblies...
[Info :Il2CppInteropGen] Done in 00:00:00.0095924
[Info :Il2CppInteropGen] Computing renames...
[Info :Il2CppInteropGen] Done in 00:00:00.0357395
[Info :Il2CppInteropGen] Creating typedefs...
[Info :Il2CppInteropGen] Done in 00:00:00.0331188
[Info :Il2CppInteropGen] Computing struct blittability...
[Info :Il2CppInteropGen] Done in 00:00:00.0318859
[Info :Il2CppInteropGen] Filling typedefs...
[Info :Il2CppInteropGen] Done in 00:00:00.0141674
[Info :Il2CppInteropGen] Filling generic constraints...
[Info :Il2CppInteropGen] Done in 00:00:00.0050883
[Info :Il2CppInteropGen] Creating members...
[Info :Il2CppInteropGen] Done in 00:00:00.6711145
[Info :Il2CppInteropGen] Scanning method cross-references...
[Info :Il2CppInteropGen] Done in 00:00:00.4857104
[Info :Il2CppInteropGen] Finalizing method declarations...
[Info :Il2CppInteropGen] Done in 00:00:00.7964652
[Info :Il2CppInteropGen] 1 total potentially dead methods
[Info :Il2CppInteropGen] Filling method parameters...
[Info :Il2CppInteropGen] Done in 00:00:00.1834706
[Info :Il2CppInteropGen] Creating static constructors...
[Info :Il2CppInteropGen] Done in 00:00:00.2365051
[Info :Il2CppInteropGen] Creating value type fields...
[Info :Il2CppInteropGen] Done in 00:00:00.0429471
[Info :Il2CppInteropGen] Creating enums...
[Info :Il2CppInteropGen] Done in 00:00:00.0334631
[Info :Il2CppInteropGen] Creating IntPtr constructors...
[Info :Il2CppInteropGen] Done in 00:00:00.0807333
[Info :Il2CppInteropGen] Creating non-blittable struct constructors...
[Info :Il2CppInteropGen] Done in 00:00:00.0047449
[Info :Il2CppInteropGen] Creating generic method static constructors...
[Info :Il2CppInteropGen] Done in 00:00:00.0323496
[Info :Il2CppInteropGen] Creating field accessors...
[Info :Il2CppInteropGen] Done in 00:00:00.3762291
[Info :Il2CppInteropGen] Filling methods...
[Info :Il2CppInteropGen] Done in 00:00:01.3604575
[Info :Il2CppInteropGen] Generating implicit conversions...
[Info :Il2CppInteropGen] Done in 00:00:00.0290498
[Info :Il2CppInteropGen] Creating properties...
[Info :Il2CppInteropGen] Done in 00:00:00.0377080
[Info :Il2CppInteropGen] Unstripping types...
[Info :Il2CppInteropGen] Done in 00:00:00.0460818
[Info :Il2CppInteropGen] Unstripping fields...
[Info :Il2CppInteropGen] Restored 772 fields
[Info :Il2CppInteropGen] Failed to restore 22 fields
[Info :Il2CppInteropGen] Done in 00:00:00.0129805
[Info :Il2CppInteropGen] Unstripping methods...
[Info :Il2CppInteropGen] Restored 16725 methods
[Info :Il2CppInteropGen] Failed to restore 1122 methods
[Info :Il2CppInteropGen] Done in 00:00:00.4954489
[Info :Il2CppInteropGen] Unstripping method bodies...
[Info :Il2CppInteropGen] IL unstrip statistics: 7620 successful, 3237 failed
[Info :Il2CppInteropGen] Done in 00:00:00.5193133
[Info :Il2CppInteropGen] Writing xref cache...
[Info :Il2CppInteropGen] Done in 00:00:00.6476920
[Info :Il2CppInteropGen] Writing assemblies...
[Info :Il2CppInteropGen] Done in 00:00:00.4673563
[Info :Il2CppInteropGen] Writing method pointer map...
[Info :Il2CppInteropGen] Done in 00:00:00.0178462
[Info :Il2CppInteropGen] Done!
[Info : Preloader] 0 patcher plugins loaded
[Info : Preloader] 0 assemblies discovered
[Message:AssemblyPatcher] Executing 0 patch(es)
[Message: BepInEx] Chainloader initialized
[Info :Il2CppInterop] Registered mono type Il2CppInterop.Runtime.DelegateSupport+Il2CppToMonoDelegateReference in il2cpp domain
[Info : BepInEx] 2 plugins to load
[Info : BepInEx] Loading [XUnity Auto Translator 5.2.0]
[Error : BepInEx] Error loading [XUnity Auto Translator 5.2.0]: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.MissingMethodException: Method not found: 'System.String BepInEx.Unity.IL2CPP.Preloader.get_IL2CPPInteropAssemblyPath()'.
at XUnity.AutoTranslator.Plugin.BepInEx.AutoTranslatorPlugin..ctor()
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
--- End of inner exception stack trace ---
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type)
at BepInEx.Unity.IL2CPP.IL2CPPChainloader.LoadPlugin(PluginInfo pluginInfo, Assembly pluginAssembly) in /home/runner/work/BepInEx/BepInEx/Runtimes/Unity/BepInEx.Unity.IL2CPP/IL2CPPChainloader.cs:line 129
at BepInEx.Bootstrap.BaseChainloader`1.LoadPlugins(IList`1 plugins) in /home/runner/work/BepInEx/BepInEx/BepInEx.Core/Bootstrap/BaseChainloader.cs:line 411
[Info : BepInEx] Loading [XUnity Resource Redirector 2.0.0]
[Message: BepInEx] Chainloader startup complete The same Games + past software versions... [Message: Preloader] BepInEx 6.0.0-pre.1 - GAMES_2
[Info : BepInEx] System platform: Windows 10 64-bit
[Info : BepInEx] Process bitness: 64-bit (x64)
[Info : Preloader] Running under Unity v2020.3.8
[Message: Preloader] Downloading unity base libraries
[Message: Preloader] Extracting downloaded unity base libraries
[Message: Preloader] Generating Il2CppUnhollower assemblies
[Info : Cpp2IL] [Library] Initializing Metadata...
[Info : Cpp2IL] [Library] Using actual IL2CPP Metadata version 27,1
[Info : Cpp2IL] [Library] Initialized Metadata in 686ms
[Info : Cpp2IL] [Library] Searching Binary for Required Data...
[Info : Cpp2IL] [Library] Got Binary codereg: 0x1811BC1E0, metareg: 0x1811BD660 in 504ms.
[Info : Cpp2IL] [Library] Initializing Binary...
[Info : Cpp2IL] [Library] Initialized Binary in 419ms
[Info : Cpp2IL] [Library] Mapping pointers to Il2CppMethodDefinitions...
[Info : Cpp2IL] [Library] Processed 43141 OK (72ms)
[Info : Cpp2IL] [Program] Building assemblies...This may take some time.
[Info : Cpp2IL] [Program] Finished Building Assemblies in 1052ms
[Info : Cpp2IL] [Program] Fixing up explicit overrides. Any warnings you see here aren't errors - they usually indicate improperly stripped or obfuscated types, but this is not a big deal. This should only take a second...
[Info : Cpp2IL] [Program] Fixup complete (124ms)
[Info : Cpp2IL] Total time: 00:00:03.3469656
[Info : Preloader] Executing Il2CppUnhollower generator
[Info :Unhollower] Reading assemblies...
[Info :Unhollower] Done in 00:00:00.0030964
[Info :Unhollower] Reading system assemblies...
[Info :Unhollower] Done in 00:00:00.0330741
[Info :Unhollower] Reading unity assemblies...
[Info :Unhollower] Done in 00:00:00.0229463
[Info :Unhollower] Creating rewrite assemblies...
[Info :Unhollower] Done in 00:00:00.0063186
[Info :Unhollower] Computing renames...
[Info :Unhollower] Done in 00:00:00.0148169
[Info :Unhollower] Creating typedefs...
[Info :Unhollower] Done in 00:00:00.0318657
[Info :Unhollower] Computing struct blittability...
[Info :Unhollower] Done in 00:00:00.0021191
[Info :Unhollower] Filling typedefs...
[Info :Unhollower] Done in 00:00:00.0081482
[Info :Unhollower] Filling generic constraints...
[Info :Unhollower] Done in 00:00:00.0011680
[Info :Unhollower] Creating members...
[Info :Unhollower] Done in 00:00:00.1563202
[Info :Unhollower] Scanning method cross-references...
[Info :Unhollower] Done in 00:00:00.3173916
[Info :Unhollower] Finalizing method declarations...
[Info :Unhollower] Done in 00:00:00.2996463
[Info :Unhollower] 1 total potentially dead methods
[Info :Unhollower] Filling method parameters...
[Info :Unhollower] Done in 00:00:00.1072865
[Info :Unhollower] Creating static constructors...
[Info :Unhollower] Done in 00:00:00.1203776
[Info :Unhollower] Creating value type fields...
[Info :Unhollower] Done in 00:00:00.0316453
[Info :Unhollower] Creating enums...
[Info :Unhollower] Done in 00:00:00.0098382
[Info :Unhollower] Creating IntPtr constructors...
[Info :Unhollower] Done in 00:00:00.0094692
[Info :Unhollower] Creating type getters...
[Info :Unhollower] Done in 00:00:00.0247776
[Info :Unhollower] Creating non-blittable struct constructors...
[Info :Unhollower] Done in 00:00:00.0026087
[Info :Unhollower] Creating generic method static constructors...
[Info :Unhollower] Done in 00:00:00.0099429
[Info :Unhollower] Creating field accessors...
[Info :Unhollower] Done in 00:00:00.2504413
[Info :Unhollower] Filling methods...
[Info :Unhollower] Done in 00:00:00.6276162
[Info :Unhollower] Generating implicit conversions...
[Info :Unhollower] Done in 00:00:00.0143232
[Info :Unhollower] Creating properties...
[Info :Unhollower] Done in 00:00:00.0191012
[Info :Unhollower] Unstripping types...
[Info :Unhollower] Done in 00:00:00.0219492
[Info :Unhollower] Unstripping fields...
[Info :Unhollower]
[Info :Unhollower] 761 fields restored
[Info :Unhollower] 33 fields failed to restore
[Info :Unhollower] Done in 00:00:00.0154447
[Info :Unhollower] Unstripping methods...
[Info :Unhollower]
[Info :Unhollower] 16657 methods restored
[Info :Unhollower] 1217 methods failed to restore
[Info :Unhollower] Done in 00:00:00.4943085
[Info :Unhollower] Unstripping method bodies...
[Info :Unhollower]
[Info :Unhollower] IL unstrip statistics: 7558 successful, 3254 failed
[Info :Unhollower] Done in 00:00:00.4350590
[Info :Unhollower] Generating forwarded types...
[Info :Unhollower] Done in 00:00:00.0031124
[Info :Unhollower] Writing xref cache...
[Info :Unhollower] Done in 00:00:00.1472251
[Info :Unhollower] Writing assemblies...
[Info :Unhollower] Done in 00:00:00.7079054
[Info :Unhollower] Writing method pointer map...
[Info :Unhollower] Done in 00:00:00.0168630
[Info :Unhollower] Done!
[Info : Preloader] 0 patcher plugins loaded
[Info : Preloader] 0 assemblies discovered
[Message:AssemblyPatcher] Executing 0 patch(es)
[Message: BepInEx] Chainloader initialized
[Info :Unhollower] Registered mono type UnhollowerRuntimeLib.DelegateSupport+Il2CppToMonoDelegateReference in il2cpp domain
[Info : BepInEx] 2 plugins to load
[Info : BepInEx] Loading [XUnity Auto Translator 5.2.0]
[Info :Unhollower] Registered mono type XUnity.AutoTranslator.Plugin.Core.PluginLoader+AutoTranslatorProxyBehaviour in il2cpp domain
[Info : BepInEx] Loading [XUnity Resource Redirector 2.0.0]
[Message: BepInEx] Chainloader startup complete
[Info :XUnity.AutoTranslator] Force loading ALL proxy assemblies.
[Warning:XUnity.AutoTranslator] Could not find 'UnityEngine.WWW' in IL2CPP domain even though it could be found in the managed domain.
[Warning:XUnity.AutoTranslator] Could not find 'UnityEngine.GUI+ToolbarButtonSize' in IL2CPP domain even though it could be found in the managed domain.
[Info :XUnity.AutoTranslator] Loaded XUnity.AutoTranslator into Unity [2020.3.8f1] game.
[Info :Unhollower] Registered mono type XUnity.AutoTranslator.Plugin.Core.Il2CppManagedEnumerator in il2cpp domain
[Info :XUnity.AutoTranslator] Skipping plugin scan because no plugin-specific translations has been registered. |
You are not using the correct build. |
Ok... |
You need to compile this branch. |
I don't compile(((
|
Compiled your branch...
Thank you... It doesn't work with the original (v5.2.0) Auto-Translator...))) |
Now the combination of BepInEx-Unity.IL2CPP-win-x64-6.0.0-be.672 and XUnity.AutoTranslator(v5.3.0) also work correctly...))) |
Description
Implemented
Il2CppDumper version 6.7.40
Implemented
PrincessDumper
Added Public
IL2CPPInteropAssemblyPath
ForXUnity.AutoTranslator
.Added
UseApplicationDataPath
.Motivation and Context
PrincessDumper
will retrieveGameAssembly.dll
from current process handle.PrincessDumper
will fix all sections so it can be processed byIl2CppDumper
.PrincessDumper
will also extractglobal-metadata.dat
from current process handle.This feature is for games with
global-metadata.dat
embedded inGameAssembly.dll
.Applied
CheckIfGenerationRequired()
beforePrincessDumper
's execution.Uses
Il2CppDumper
to processList<Mono.Cecil.AssemblyDefinition>
sinceCpp2IL
is incompetent with memory dumped file.IL2CPPInteropAssemblyPath
was added for XUnity.AutoTranslator. (Plan to migrateXUnity.AutoTranslator
fromUnhollower
toIl2CppInterop
.)UseApplicationDataPath
was added to reduce the need of initilization toolchain rerun for environment whereBepInEx
is removed upon exit.How Has This Been Tested?
Tested with PrincessConnectReDive (JP)
Chainloader startup complete
Tested with Umamusume (JP)
Umamusume (JP) will result at this error, but can be fixed with my
Il2CppInterop
's pull request Implemented TypeComparer For GetOrCreateProperty When There Are More … #91Screenshots (if appropriate):
Types of changes
Checklist: