nesrak1 / UABEA

c# uabe for newer versions of unity
MIT License
1.22k stars 153 forks source link

Applying EMIP to compressed bundle #262

Open ibaios opened 1 year ago

ibaios commented 1 year ago

Hi, I have used emip files to replace text assets in *.assets files many times thanks to UABEA. But now I have a data.unity3d bundle file that is compressed, and even if I create the EMIP file without problems (or at least without errors), when I try to apply the EMIP, I get an error like this:

uabea crash exception (please report this crash with uabeacrash.log) System.IO.IOException: Not a directory : '/home/deck/.steam/steam/steamapps/common/SIGNALIS/SIGNALIS_Data/data.unity3d/resources.assets' at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func2 errorRewriter) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at UABEAvalonia.CommandLineHandler.ApplyEmip(String[] args) in /home/runner/work/UABEA/UABEA/UABEAvalonia/CommandLineHandler.cs:line 318 at UABEAvalonia.CommandLineHandler.CLHMain(String[] args) in /home/runner/work/UABEA/UABEA/UABEAvalonia/CommandLineHandler.cs:line 369 at UABEAvalonia.Program.Main(String[] args) in /home/runner/work/UABEA/UABEA/UABEAvalonia/Program.cs:line 47 Unhandled exception. System.IO.IOException: Not a directory : '/home/deck/.steam/steam/steamapps/common/SIGNALIS/SIGNALIS_Data/data.unity3d/resources.assets' at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func2 errorRewriter) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at UABEAvalonia.CommandLineHandler.ApplyEmip(String[] args) in /home/runner/work/UABEA/UABEA/UABEAvalonia/CommandLineHandler.cs:line 318 at UABEAvalonia.CommandLineHandler.CLHMain(String[] args) in /home/runner/work/UABEA/UABEA/UABEAvalonia/CommandLineHandler.cs:line 369 at UABEAvalonia.Program.Main(String[] args) in /home/runner/work/UABEA/UABEA/UABEAvalonia/Program.cs:line 47 Aborted (core dumped)

It seems that it treats the bundle file as if it was a directory. I have tried with an uncompressed bundle too, but I get the same result.

Am I doing something wrong? Is it possible to apply EMIP files to *.unity3d bundles?

I am using the sixth release for Ubuntu.

Thank you in advance,

nesrak1 commented 1 year ago

Bundle emips aren't supported. I never finished support for emip because I'm planning on making a different format that's more resilient to game updates.

ibaios commented 1 year ago

Thank you for the quick reply! While the new format is created, is there any way to uncompress/compress bundles and extract/import assets to the bundle without user interaction? Can it be done using a terminal command or maybe with a small program? Is there any documentation about this?

Thank you a lot!

nesrak1 commented 1 year ago

For the time being, you can write a program to patch the bundle with AssetsTools.NET which is what UABEA uses or UnityPy which is a Python library that can do similar to patch the bundle.

ibaios commented 1 year ago

Great! Thanks for the help!