Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Display Modes
  #1  
Old 28-12-2021, 12:14
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,155
Thanks: 284
Thanked 1,346 Times in 610 Posts
Masquerade is on a distinguished road
UBT | Unity Bundle Tool

UBT | Unity Bundle Tool

Unity Bundle Tool is a software made by my friend, SowwyItsAnAlt, which I have been using in my repacks for a few months. With her permission, I have rewritten and polished the code and made a new executable which I am sharing here.

The function of this tool is the ability to decompress compressed Unity Asset Bundles and then recompress them to a close enough point in which a patch is possible (& viable!). I like to use HDiffZ because it gives the smallest patches. XDelta should work just fine (patch creation is significantly quicker than with HDiffZ although the patch file will be larger).

UBT is based on AssetTools.NET by nesrak1 and has compression support for both LZ4 and LZMA algorithms.

Code:
 █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
 █      Unity Bundle Tool       █
 █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█

 Usage: UBT.EXE <options> <infile> <outfile>

 Options:

     -i       : List information about bundle file (only specify <infile>).
     -d       : Decompress bundle file.
     -c       : Compress bundle file (must specifiy use of LZ4 or LZMA).
     -credits : View credits.

 Example usage:

 UBT.EXE -i data.unity3d
 UBT.EXE -d data.unity3d decompressed_data.unity3d
 UBT.EXE -c lz4 decompressed_data.unity3d data.unity3d
 UBT.EXE -c lzma decompressed_data.unity3d data.unity3d
To prove just how well this tool works, I will demonstrate on the game "Poly Bridge 2" (which I do recommend you all try if you enjoy a good puzzle like myself). This game contains "data.unity3d" which is compressed with LZ4. The steps are:
  1. Decompress the bundle
  2. Compress the decompressed file using the same compression algo as what the original bundle was compressed with
  3. Use your patch program of choice to create a patch file between the new compressed file and the original compressed bundle.



    As we can see from the above image, the new file is so similar that our HDiffZ patch is less than 1mb in size! Now, in your repack installation, you simply include the decompressed file and compress it then patch it using the patch file after the archive is extracted. Easy!

    Of course, you don't need to patch the file, since Unity will read the file regardless - compressed or decompressed. The patch is simply for a 100% CRC perfect repack.

    Highlighted above is the function of the -d and -c option. Using -i will give the file size in bytes, MD5 and compression type used on the input file.

    This is a standalone tool and NOT for use with FreeArc.
Attached Files
File Type: 7z UBT.7z (74.9 KB, 160 views)

Last edited by Masquerade; 15-07-2022 at 07:39.
Reply With Quote
The Following 18 Users Say Thank You to Masquerade For This Useful Post:
COPyCAT (12-01-2022), danthespal (28-12-2021), FIFA_LOVER (28-12-2021), Gehrman (09-03-2022), Grumpy (28-12-2021), Hexagon123 (30-12-2021), kj911 (29-12-2021), L0v3craft (01-04-2022), newfolder (06-10-2022), panker1992 (29-12-2021), Pantsi (29-12-2021), prince55 (08-01-2022), ramydarkness (19-03-2022), Razor12911 (29-12-2021), ScOOt3r (29-12-2021), st0rm (02-01-2022), Vladislav989 (09-08-2022), ZAZA4EVER (03-01-2022)
Sponsored Links
  #2  
Old 10-02-2022, 08:18
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,155
Thanks: 284
Thanked 1,346 Times in 610 Posts
Masquerade is on a distinguished road
Update for 10/2/22
  • UBT now works with bundles larger than 2GB.
  • AssetsTools.NET library upgraded from v2.0.9 to v2.0.11.
  • Significantly less memory usage for compression and decompression.
  • Please note that YMMV for patches with larger bundles...



  • The above image shows a test on SKUL: The Hero Slayer.

Last edited by Masquerade; 28-07-2022 at 10:45.
Reply With Quote
The Following 3 Users Say Thank You to Masquerade For This Useful Post:
FIFA_LOVER (16-02-2022), Gehrman (09-03-2022), Pantsi (12-02-2022)
  #3  
Old 03-03-2022, 13:37
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,155
Thanks: 284
Thanked 1,346 Times in 610 Posts
Masquerade is on a distinguished road
*.CMS from Car Mechanic Simulator games are compressed Asset Bundles with LZ4, however devs changed the File Header so that the "U" in UnityFS is replaced with an S.

If you swap the S for a U, you can then decompress the bundles with UBT

Last edited by Masquerade; 03-03-2022 at 14:23.
Reply With Quote
  #4  
Old 01-04-2022, 06:30
L0v3craft's Avatar
L0v3craft L0v3craft is offline
Registered User
 
Join Date: Dec 2015
Location: Rome
Posts: 90
Thanks: 374
Thanked 24 Times in 15 Posts
L0v3craft is on a distinguished road
Hi. Thank you very much for your work, but please, share an UBT.exe file that works with files larger than 2GB and that is not detected as a trojan. It is dected as virus by 44 on 67 antiviruses:

Code:
https://www.virustotal.com/gui/file/9d34b1c2b139f41d6c733b3cb0730ec76c70a6083818c4ee28644ed5421a365f/detection
it is useless for repacks if the antivirus of the user deletes or blocks it.

Edit: testing it on the file data.unity3d from the game "TUNIC" and gives error in re-compression.

Last edited by L0v3craft; 01-04-2022 at 06:39.
Reply With Quote
  #5  
Old 01-04-2022, 11:47
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,155
Thanks: 284
Thanked 1,346 Times in 610 Posts
Masquerade is on a distinguished road
Unprotected version: https://bayfiles.com/77eaG3Scxc/UBT_7z

Compiled + ILRepack
Reply With Quote
The Following 3 Users Say Thank You to Masquerade For This Useful Post:
Gehrman (01-04-2022), L0v3craft (02-04-2022), pratikpatel8982 (07-04-2022)
  #6  
Old 27-06-2022, 22:07
-tara -tara is offline
Registered User
 
Join Date: May 2022
Location: Asda
Posts: 10
Thanks: 6
Thanked 8 Times in 3 Posts
-tara is on a distinguished road
whats happening here?

ran decomp on "data.unity3d" on a game called "Mango", the file is ~1.7 GB and is compressed with lz4, got an output of ~4 GB or so. Then compressed it using lz4 and the tool finished weirdly quick, after checking the output of the compression it was 300 Megs, then i tried running the game using this output as the "data.unity3d" and the game ran however every texture was purple, whats going on?
Reply With Quote
  #7  
Old 29-06-2022, 00:40
Joe Forster/STA's Avatar
Joe Forster/STA Joe Forster/STA is offline
Senior forum member
 
Join Date: Nov 2000
Location: Hungary
Posts: 9,790
Thanks: 16
Thanked 327 Times in 212 Posts
Joe Forster/STA is on a distinguished road
Quote:
Originally Posted by -tara View Post
however every texture was purple
Just an idea: this purple is the transparent color in the textures but the compressor forgot to keep the transparency flag.
__________________
Joe Forster/STA
For more information, see the FileForums forum rules and the PC Games forum FAQ!
Don't contact me via E-mail or PM to ask for help with anything other than patches (or software in general) done by me, otherwise your request may be deleted without any reply!
Homepage: http://sta.c64.org, E-mail: [email protected]; for attachments, send compressed (ZIP or RAR) files only, otherwise your E-mail will bounce back!
Reply With Quote
The Following User Says Thank You to Joe Forster/STA For This Useful Post:
Masquerade (29-06-2022)
  #8  
Old 15-07-2022, 07:47
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,155
Thanks: 284
Thanked 1,346 Times in 610 Posts
Masquerade is on a distinguished road
Update for 15/7/22
  • AssetsTools.NET library upgraded from v2.0.11 to v2.0.12.
  • AssetsTools.NET library made external to the executable.
What this means is that you can now update the library without needing a compiled executable. Useful for any future updates from nesrak1.

Download the latest build from the AssetsTools.NET GitHub and grab the file "AssetsTools.NET.dll" from the zip. Put it in the same folder as UBT.EXE and you're good to go. I don't mind compiling a "standalone" version with the library merged into the executable if someone would like that.

https://github.com/nesrak1/AssetsToo...eleases/latest

Also there's no support for Powerwash Simulator because the bundles are strange. Here's a quote from sowwyitsnalt when we were discussing the bundles:
Quote:
Originally Posted by sowwyitsanalt
The bundles themselves seem to be broken, maybe by the devs, basically what happens is the bundle has a size of 16735030, but it reports the data starts at 1487 and is of length 16735288 so it would end after the actual bundle

Last edited by Masquerade; 15-07-2022 at 07:50.
Reply With Quote
The Following 2 Users Say Thank You to Masquerade For This Useful Post:
-tara (15-07-2022), Gehrman (15-07-2022)
  #9  
Old 27-07-2022, 05:44
dixen dixen is offline
Registered User
 
Join Date: Sep 2014
Location: Russia
Posts: 384
Thanks: 445
Thanked 430 Times in 197 Posts
dixen is on a distinguished road
Batch decompress - it possible?
Reply With Quote
  #10  
Old 27-07-2022, 06:38
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,155
Thanks: 284
Thanked 1,346 Times in 610 Posts
Masquerade is on a distinguished road
Quote:
Originally Posted by dixen View Post
Batch decompress - it possible?
For batch file:

Code:
for /r %%f in (*.bundle) do ubt -d "%%f" "%%f.dec"
Or in parallel, use mparallel tool:

Code:
for /r %%f in (*.bundle) do echo ubt -d "%%f" "%%f.dec" >> run.txt

mparallel --input=run.txt
Reply With Quote
The Following 3 Users Say Thank You to Masquerade For This Useful Post:
dixen (27-07-2022), Gehrman (27-07-2022), kuyhaa (16-08-2022)
  #11  
Old 28-07-2022, 08:37
dixen dixen is offline
Registered User
 
Join Date: Sep 2014
Location: Russia
Posts: 384
Thanks: 445
Thanked 430 Times in 197 Posts
dixen is on a distinguished road
As Dusk Falls

UBT.exe - c lz4 1.tmp 2 tmp - don't work and don't compressed

UBT.exe - c lzma 1.tmp 2 tmp - all fine works.
Reply With Quote
  #12  
Old 28-07-2022, 09:48
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,155
Thanks: 284
Thanked 1,346 Times in 610 Posts
Masquerade is on a distinguished road
Quote:
Originally Posted by dixen View Post
As Dusk Falls

UBT.exe - c lz4 1.tmp 2 tmp - don't work and don't compressed
Please may you upload a small sample?
Reply With Quote
  #13  
Old 28-07-2022, 14:11
dixen dixen is offline
Registered User
 
Join Date: Sep 2014
Location: Russia
Posts: 384
Thanks: 445
Thanked 430 Times in 197 Posts
dixen is on a distinguished road
Quote:
Originally Posted by Masquerade View Post
Please may you upload a small sample?
https://drive.google.com/file/d/1tYe...ew?usp=sharing

Old version (UBT_Unprotected) - All fine with lz4
Reply With Quote
The Following User Says Thank You to dixen For This Useful Post:
Masquerade (28-07-2022)
  #14  
Old 09-08-2022, 14:55
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 4,362
Thanks: 1,076
Thanked 6,961 Times in 2,632 Posts
KaktoR is on a distinguished road
Quote:
Originally Posted by Masquerade View Post
Unprotected version: https://bayfiles.com/77eaG3Scxc/UBT_7z

Compiled + ILRepack
Could you reupload the unprotected version? I get "Bad Gateway" on this download.
__________________
Haters gonna hate
Reply With Quote
  #15  
Old 09-08-2022, 15:01
Hexagon123 Hexagon123 is offline
Registered User
 
Join Date: Dec 2016
Location: IOWA
Posts: 73
Thanks: 4
Thanked 45 Times in 26 Posts
Hexagon123 is on a distinguished road
Quote:
Originally Posted by KaktoR View Post
Could you reupload the unprotected version? I get "Bad Gateway" on this download.
Here.
Attached Files
File Type: 7z UBT.7z (231.4 KB, 53 views)
Reply With Quote
The Following User Says Thank You to Hexagon123 For This Useful Post:
KaktoR (09-08-2022)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Useful programs Joe Forster/STA Conversion Tutorials 103 21-05-2024 09:48
Multiple Text/String Replacer Tool vollachr Conversion Tutorials 7 07-01-2018 04:12
Preview: Conversion Tool for Advanced Setup Creator Razor12911 Conversion Tutorials 6 10-05-2017 00:30
New Chinese SecuROM tool EMPiRE PC Games 5 01-11-2005 13:49
UT2004 tool dflash PC Games 2 28-03-2004 06:16



All times are GMT -7. The time now is 21:04.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright 2000-2020, FileForums @ https://fileforums.com